Skip to content

Credential

Extends: RefCounted

Description

Constants Descriptions

CredentialType

enum CredentialType{KEY_HASH = 0, SCRIPT_HASH = 1}

Status

enum Status{SUCCESS = 0, INCORRECT_TYPE = 1}

Method Descriptions

_init

func _init(credential: _Credential) -> Credential

get_type

func get_type() -> Credential.CredentialType

to_bytes

func to_bytes() -> PackedByteArray

to_hex

func to_hex() -> String

to_pub_key_hash

func to_pub_key_hash() -> ToPubKeyHashResult

to_script_hash

func to_script_hash() -> ToScriptHashResult

from_script (static)

func from_script(script: PlutusScript) -> Credential

from_script_hash (static)

func from_script_hash(script_hash: ScriptHash) -> Credential

from_script_source (static)

func from_script_source(script_source: PlutusScriptSource) -> Credential

from_key_hash (static)

func from_key_hash(key_hash: PubKeyHash) -> Credential

Sub-classes

ToPubKeyHashResult

Property Descriptions

value

var value: PubKeyHash
  • 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.

ToScriptHashResult

Property Descriptions

value

var value: ScriptHash
  • 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.