uplc.uplcencoder.encodedata
Home > @blaze-cardano/uplc > UPLCEncoder > encodeData
UPLCEncoder.encodeData() method
Encodes data based on its type.
Signature:
encodeData(type: DataTypeType, data: Data): void;
Parameters
| Parameter | Type | Description | 
|---|---|---|
| type | DataTypeType | The type of the data to encode. | 
| data | Data | The data to encode. | 
Returns:
void
Exceptions
{Error} If the data type is not supported.