Helios API/ API Reference/ Classes/

StakingValidatorHash

Represents a blake2b-224 hash of a staking script.

Note: before hashing, the staking script is first encoded as a CBOR byte-array and then prepended by a script version byte.

Hierarchy

Index

Constructors

constructor

new StakingValidatorHash(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): StakingValidatorHash

Parameters

NameType
bytesstring | number[]

Returns

StakingValidatorHash

fromUplcData

Static fromUplcData(data): StakingValidatorHash

Parameters

NameType
dataUplcData

Returns

StakingValidatorHash