Skip to main content
Version: 0.3.6

uplc.uplcencoder.encodetype

Home > @blaze-cardano/uplc > UPLCEncoder > encodeType

UPLCEncoder.encodeType() method

Encodes a data type.

Signature:

encodeType(type: DataTypeType): number[];

Parameters

Parameter

Type

Description

type

DataTypeType

The data type to encode.

Returns:

number[]

An array of numbers representing the encoded type.

Exceptions

{Error} If the type cannot be encoded.