Helios API/ API Reference/ Classes/

MintingPolicyHash

Represents a blake2b-224 hash of a minting policy script

Note: to calculate this hash the script is first encoded as a CBOR byte-array and then prepended by a script version byte.

Hierarchy

Index

Constructors

constructor

new MintingPolicyHash(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

toBech32

toBech32(): string

Encodes as bech32 string using 'asset' as human readable part

Returns

string

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): MintingPolicyHash

Parameters

NameType
bytesnumber[]

Returns

MintingPolicyHash

Overrides

ScriptHash.fromCbor

fromHex

Static fromHex(str): MintingPolicyHash

Parameters

NameType
strstring

Returns

MintingPolicyHash

Overrides

ScriptHash.fromHex

fromProps

Static fromProps(props): MintingPolicyHash

Parameters

NameType
propsHashProps | MintingPolicyHash

Returns

MintingPolicyHash

Overrides

ScriptHash.fromProps

fromUplcCbor

Static fromUplcCbor(bytes): MintingPolicyHash

Parameters

NameType
bytesstring | number[]

Returns

MintingPolicyHash

fromUplcData

Static fromUplcData(data): MintingPolicyHash

Parameters

NameType
dataUplcData

Returns

MintingPolicyHash