Helios API/ API Reference/ Classes/
Hash
Base class of all hash-types
Hierarchy
-
↳
Hash
↳↳
DatumHash
↳↳
PubKeyHash
↳↳
ScriptHash
↳↳
TxId
Index
Constructors
constructor
• new Hash(props
)
Parameters
Name | Type |
---|---|
props | HashProps |
Overrides
Properties
bytes
• Readonly
bytes: number
[]
Accessors
hex
• get
hex(): string
Hexadecimal representation.
Returns
string
Methods
eq
▸ eq(other
): boolean
Parameters
Name | Type |
---|---|
other | Hash |
Returns
boolean
toCbor
▸ toCbor(): number
[]
Returns
number
[]
Inherited from
toCborHex
▸ toCborHex(): string
Returns
string
Inherited from
toSchemaJson
▸ toSchemaJson(): string
Returns
string
Inherited from
compare
▸ Static
compare(a
, b
): number
Parameters
Returns
number
fromCbor
▸ Static
fromCbor(bytes
): Hash
Used internally for metadataHash and scriptDataHash
Parameters
Name | Type |
---|---|
bytes | number [] |
Returns
fromHex
▸ Static
fromHex(str
): Hash
Might be needed for internal use
Parameters
Name | Type |
---|---|
str | string |
Returns
fromProps
▸ Static
fromProps(props
): Hash