ConstrData

One of the 5 Plutus-Core builtin data classes. Parent class is UplcData.

Represents a tag index and a list of data fields. Each field is also a UplcData child instance.

Constructor

new helios.ConstrData(
    index: number,
    fields: helios.UplcData[]
)

Static methods

fromCbor

Decoded a CBOR encoded ConstrData instance. Mutates bytes and shifts it to the following element.

helios.ConstrData.fromCbor(bytes: number[]): helios.ConstrData

Getters

index

Returns the ConstrData tag.

constr_data.index: number

fields

Returns the ConstrData fields.

constr_data.fields: helios.UplcData[]

Methods

toCbor

Encodes a ConstrData instance as CBOR bytes.

constr_data.toCbor(): number[]

toSchemaJson

Returns the schema JSON needed to interact with external tools like cardano-cli and Lucid.

constr_data.toSchemaJson(): string