Skip to main content

ObjectDataProtocol

ObjectDataProtocol Objects

class ObjectDataProtocol(typing.Protocol)

Object data, either a package or struct

BCS

The BCS serialized form for this type is defined by the following ABNF:

object-data = object-data-struct / object-data-package

object-data-struct = %d00 object-move-struct
object-data-package = %d01 object-move-package

as_opt_package

def as_opt_package() -> typing.Optional[MovePackage]

Try to interpret this object as a MovePackage

as_opt_struct

def as_opt_struct() -> typing.Optional[MoveStruct]

Try to interpret this object as a MoveStruct

is_package

def is_package() -> bool

Return whether this object is a MovePackage

is_struct

def is_struct() -> bool

Return whether this object is a MoveStruct