Helios API/ API Reference/ Classes/

ByteArrayData

Plutus-core bytearray data class. Wraps a regular list of uint8 numbers (so not Uint8Array)

Hierarchy

Index

Constructors

constructor

new ByteArrayData(bytes)

Parameters

NameType
bytesnumber[]

Overrides

UplcData.constructor

Accessors

hex

get hex(): string

Returns

string

memSize

get memSize(): number

Estimate of memory usage during validation

Returns

number

Inherited from

UplcData.memSize

Methods

isSame

isSame(other): boolean

Compares the schema jsons

Parameters

NameType
otherUplcData

Returns

boolean

Inherited from

UplcData.isSame

toCbor

toCbor(): number[]

Returns

number[]

Inherited from

UplcData.toCbor

toCborHex

toCborHex(): string

Returns

string

Inherited from

UplcData.toCborHex

toHex

toHex(): string

Returns

string

toSchemaJson

toSchemaJson(): string

Returns

string

Inherited from

UplcData.toSchemaJson

transfer

transfer(other): any

Parameters

NameType
otherTransferUplcAst

Returns

any

Inherited from

UplcData.transfer

fromCbor

Static fromCbor(bytes): ByteArrayData

Parameters

NameType
bytesnumber[]

Returns

ByteArrayData

Overrides

UplcData.fromCbor

fromString

Static fromString(s): ByteArrayData

Applies utf-8 encoding

Parameters

NameType
sstring

Returns

ByteArrayData

memSizeInternal

Static memSizeInternal(bytes): number

Calculates the mem size of a byte array without the DATA_NODE overhead.

Parameters

NameType
bytesnumber[]

Returns

number