Skip to main content

OwnerInterface

interface OwnerInterface

Enum of different types of ownership for an object.

BCS

The BCS serialized form of this type is specified in bcs-schema.abnf.

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
toBcsabstract fun toBcs(): ByteArray
Convert this type to BCS encoded bytes.
toDisplayStringabstract fun toDisplayString(): String
Render this type as human-readable text.
toJsonabstract fun toJson(): String
Convert this type to a JSON encoded string.