Skip to main content

TokenPolicyCap

open class TokenPolicyCap : Disposable, AutoCloseable, TokenPolicyCapInterface

A typed view of an on-chain 0x2::token::TokenPolicyCap<T> object.

Functions

NameSummary
close@Synchronized
open override fun close()
destroyopen override fun destroy()
idopen override fun id(): ObjectId
The object's ID.
policyIdopen override fun policyId(): ObjectId
Object ID of the TokenPolicy this cap controls (the Move for field).
toStringopen override fun toString(): String

Companion object functions

NameSummary
tryFromBcsfun tryFromBcs(bytes: ByteArray): TokenPolicyCap
Decode from BCS bytes, without validating the on-chain type tag.
tryFromObjectWithTypefun tryFromObjectWithType(object: Object, typeParam: TypeTag): TokenPolicyCap
Decode from an on-chain object, validating its Move type tag, including that its type parameter equals type_param.