Helios API/ API Reference/ Classes/
Datum
Represents either an inline datum, or a hashed datum.
Inside the Helios language this type is named OutputDatum
in order to distinguish it from user defined Datums,
But outside helios scripts there isn't much sense to keep using the name 'OutputDatum' instead of Datum.
Hierarchy
-
↳
Datum
↳↳
HashedDatum
Index
Constructors
constructor
• new Datum()
Inherited from
Accessors
data
• get
data(): null
| UplcData
Returns
null
| UplcData
hash
• get
hash(): DatumHash
Returns
Methods
dump
▸ dump(): any
Returns
any
isHashed
▸ isHashed(): boolean
Returns
boolean
isInline
▸ isInline(): boolean
Returns
boolean
toCbor
▸ toCbor(): number
[]
Returns
number
[]
Inherited from
toCborHex
▸ toCborHex(): string
Returns
string
Inherited from
toData
▸ toData(): ConstrData
Returns
fromCbor
▸ Static
fromCbor(bytes
): Datum
Parameters
Name | Type |
---|---|
bytes | number [] |
Returns
fromUplcData
▸ Static
fromUplcData(data
): null
| Datum
Parameters
Name | Type |
---|---|
data | UplcData |
Returns
null
| Datum
hashed
▸ Static
hashed(data
): Datum
Constructs a HashedDatum
. The input data is hashed internally.
Parameters
Name | Type |
---|---|
data | UplcData | HeliosData | UplcDataValue |
Returns
inline
▸ Static
inline(data
): Datum
Parameters
Name | Type |
---|---|
data | UplcData | HeliosData | UplcDataValue |