sdk.uplcencoder.encodetype
Home > @blaze-cardano/sdk > UPLCEncoder > encodeType
UPLCEncoder.encodeType() method
Encodes a data type.
Signature:
encodeType(type: DataType): number[];
Parameters
| Parameter | Type | Description | 
|---|---|---|
| type | DataType | The data type to encode. | 
Returns:
number[]
An array of numbers representing the encoded type.
Exceptions
{Error} If the type cannot be encoded.