Skip to content

PolicyId

Extends: RefCounted

Description

Constants Descriptions

Status

enum Status{SUCCESS = 0, COULD_NOT_DECODE_HEX = 1}

Method Descriptions

_init

func _init(policy_id: _PolicyId) -> PolicyId

WARNING: Do not use this constructor directly, use [method from_hex], [method from_script] or [method from_script_source] for safe building.

to_hex

func to_hex() -> String

Get the hex encoding of the minting policy's hash

from_hex (static)

func from_hex(hash: String) -> FromHexResult

Try to parse a PolicyId encoded as hex.

from_script (static)

func from_script(script: PlutusScript) -> PolicyId

Obtain a PolicyId.

from_script_source (static)

func from_script_source(script_source: PlutusScriptSource) -> PolicyId

Obtain a PolicyId.

Sub-classes

FromHexResult

Property Descriptions

value

var value: PolicyId
  • Getter: @value_getter

WARNING: This function may fail! First match on Result.tag or call Result.is_ok.

error

var error: String
  • Getter: @error_getter

WARNING: This function may fail! First match on Result.tag or call Result._is_err.