Helios API/ API Reference/ Classes/

ValidatorHash

Represents a blake2b-224 hash of a spending validator script (first encoded as a CBOR byte-array and prepended by a script version byte).

Hierarchy

Index

Constructors

constructor

new ValidatorHash(props)

Parameters

NameType
propsHashProps

Inherited from

ScriptHash.constructor

Properties

bytes

Readonly bytes: number[]

Inherited from

ScriptHash.bytes

Accessors

hex

get hex(): string

Hexadecimal representation.

Returns

string

Inherited from

ScriptHash.hex

Methods

eq

eq(other): boolean

Parameters

NameType
otherHash

Returns

boolean

Inherited from

ScriptHash.eq

toCbor

toCbor(): number[]

Returns

number[]

Inherited from

ScriptHash.toCbor

toCborHex

toCborHex(): string

Returns

string

Inherited from

ScriptHash.toCborHex

toSchemaJson

toSchemaJson(): string

Returns

string

Inherited from

ScriptHash.toSchemaJson

compare

Static compare(a, b): number

Parameters

NameType
aHash
bHash

Returns

number

Inherited from

ScriptHash.compare

fromCbor

Static fromCbor(bytes): Hash

Used internally for metadataHash and scriptDataHash

Parameters

NameType
bytesnumber[]

Returns

Hash

Inherited from

ScriptHash.fromCbor

fromHex

Static fromHex(str): Hash

Might be needed for internal use

Parameters

NameType
strstring

Returns

Hash

Inherited from

ScriptHash.fromHex

fromProps

Static fromProps(props): Hash

Parameters

NameType
propsHash | HashProps

Returns

Hash

Inherited from

ScriptHash.fromProps

fromUplcCbor

Static fromUplcCbor(bytes): ValidatorHash

Parameters

NameType
bytesstring | number[]

Returns

ValidatorHash

fromUplcData

Static fromUplcData(data): ValidatorHash

Parameters

NameType
dataUplcData

Returns

ValidatorHash