Skip to main content

ModuleMetadata

ModuleMetadata Objects

class ModuleMetadata(ModuleMetadataProtocol)

A typed view of an on-chain 0x2::module_metadata::ModuleMetadata object, the per-module key-value store owned by a package's PackageMetadataV1.

try_from_bcs

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

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

try_from_object

@classmethod
def try_from_object(cls, object: Object) -> ModuleMetadata

Decode from an on-chain object, validating its Move type tag.

id

def id() -> ObjectId

The object's ID.

size

def size() -> int

The number of key-value pairs stored in the metadata's dynamic fields. The entries themselves (e.g. the view-function names) live in dynamic fields, not in this object's contents.