Interface: OwnerLike
Enum of different types of ownership for an object.
BCS
The BCS serialized form of this type is specified in
bcs-schema.abnf.
Methods
addressOrObject()
addressOrObject(): AddressLike | undefined;
Returns an Address if this object is owned by an address or object, and None if it is
shared or immutable.
Returns
AddressLike | undefined
asAddress()
asAddress(): AddressLike;
Convert this owner into an address owner if it is one, or panic otherwise
Returns
asObject()
asObject(): ObjectIdLike;
Convert this owner into an object owner if it is one, or panic otherwise
Returns
asOptAddress()
asOptAddress(): AddressLike | undefined;
Convert this owner into an address owner if it is one, or return None otherwise
Returns
AddressLike | undefined
asOptObject()
asOptObject(): ObjectIdLike | undefined;
Convert this owner into an object owner if it is one, or return None otherwise
Returns
ObjectIdLike | undefined
asOptShared()
asOptShared(): VersionLike | undefined;
Convert this owner into a shared owner if it is one, or return None otherwise
Returns
VersionLike | undefined
asShared()
asShared(): VersionLike;
Convert this owner into a shared owner if it is one, or panic otherwise
Returns
isAddress()
isAddress(): boolean;
Check if this is an address owner
Returns
boolean
isImmutable()
isImmutable(): boolean;
Check if this is an immutable owner
Returns
boolean
isObject()
isObject(): boolean;
Check if this is an object owner
Returns
boolean
isShared()
isShared(): boolean;
Check if this is a shared owner
Returns
boolean
toBcs()
toBcs(): ArrayBuffer;
Convert this type to BCS encoded bytes.
Returns
ArrayBuffer
toDisplayString()
toDisplayString(): string;
Render this type as human-readable text.
Some types also print this through the binding's native string conversion; this method is the spelling every object type has.
The layout is meant for reading and can change between releases. Use the JSON or BCS conversions for output that gets parsed.
Returns
string
toJson()
toJson(): string;
Convert this type to a JSON encoded string.
Returns
string