Skip to main content

TreasuryCap

TreasuryCap Objects

class TreasuryCap(TreasuryCapProtocol)

A typed view of an on-chain 0x2::coin::TreasuryCap<T> object, the capability controlling a coin type's supply.

try_from_bcs

@classmethod
def try_from_bcs(cls, bytes: bytes) -> TreasuryCap

Decode from BCS bytes, without validating the on-chain type tag.

try_from_object_with_type

@classmethod
def try_from_object_with_type(cls, object: Object,
type_param: TypeTag) -> TreasuryCap

Decode from an on-chain object, validating its Move type tag, including that its type parameter equals type_param.

id

def id() -> ObjectId

The object's ID.

total_supply

def total_supply() -> int

Total supply of the coin currently in circulation, in base units.