Skip to main content

OwnerInterface

interface OwnerInterface

Enum of different types of ownership for an object.

BCS

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

owner = owner-address / owner-object / owner-shared / owner-immutable

owner-address = %d00 address
owner-object = %d01 object-id
owner-shared = %d02 u64
owner-immutable = %d03

Inheritors

Owner

Functions

NameSummary
addressOrObjectabstract fun addressOrObject(): Address?
Returns an Address if this object is owned by an address or object, and None if it is shared or immutable.
asAddressabstract fun asAddress(): Address
Convert this owner into an address owner if it is one, or panic otherwise
asObjectabstract fun asObject(): ObjectId
Convert this owner into an object owner if it is one, or panic otherwise
asOptAddressabstract fun asOptAddress(): Address?
Convert this owner into an address owner if it is one, or return None otherwise
asOptObjectabstract fun asOptObject(): ObjectId?
Convert this owner into an object owner if it is one, or return None otherwise
asOptSharedabstract fun asOptShared(): Version?
Convert this owner into a shared owner if it is one, or return None otherwise
asSharedabstract fun asShared(): Version
Convert this owner into a shared owner if it is one, or panic otherwise
isAddressabstract fun isAddress(): Boolean
Check if this is an address owner
isImmutableabstract fun isImmutable(): Boolean
Check if this is an immutable owner
isObjectabstract fun isObject(): Boolean
Check if this is an object owner
isSharedabstract fun isShared(): Boolean
Check if this is a shared owner