Skip to main content

MintingPolicyHash

export interface MintingPolicyHash<C=unknown> {
  bytes: number[]
  context: C
  isEqual(other: MintingPolicyHash): boolean
  kind: "MintingPolicyHash"
  toCbor(): number[]
  toHex(): string
  toString(): string
  toUplcData(): ByteArrayData
}
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.

C is some optional context:

  • null: unwitnessed or witnessed by NativeScript
  • unknown: witnessed or unwitnessed (default)
  • {program: ..., redeemer: ...}: witnessed by UplcProgram

Properties​

bytes​

bytes: number[]

context​

context: C

isEqual​

isEqual(other: MintingPolicyHash): boolean

kind​

kind: "MintingPolicyHash"

toCbor​

toCbor(): number[]

toHex​

toHex(): string

toString​

toString(): string
Alias for toHex()

toUplcData​

toUplcData(): ByteArrayData