Helios API/ API Reference/ Classes/
ByteArrayData
Plutus-core bytearray data class. Wraps a regular list of uint8 numbers (so not Uint8Array)
Hierarchy
-
↳
ByteArrayData
Index
Constructors
constructor
• new ByteArrayData(bytes
)
Parameters
Name | Type |
---|---|
bytes | number [] |
Overrides
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
Name | Type |
---|---|
other | UplcData |
Returns
boolean
Inherited from
toCbor
▸ toCbor(): number
[]
Returns
number
[]
Inherited from
toCborHex
▸ toCborHex(): string
Returns
string
Inherited from
toHex
▸ toHex(): string
Returns
string
toSchemaJson
▸ toSchemaJson(): string
Returns
string
Inherited from
transfer
▸ transfer(other
): any
Parameters
Name | Type |
---|---|
other | TransferUplcAst |
Returns
any
Inherited from
fromCbor
▸ Static
fromCbor(bytes
): ByteArrayData
Parameters
Name | Type |
---|---|
bytes | number [] |
Returns
Overrides
fromString
▸ Static
fromString(s
): ByteArrayData
Applies utf-8 encoding
Parameters
Name | Type |
---|---|
s | string |
Returns
memSizeInternal
▸ Static
memSizeInternal(bytes
): number
Calculates the mem size of a byte array without the DATA_NODE overhead.
Parameters
Name | Type |
---|---|
bytes | number [] |
Returns
number