Skip to main content

Owner

Namespace: IotaSdk

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
public class Owner : IOwner, System.IEquatable`1[[IotaSdk.Owner, IotaSdk, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.IDisposable

Inheritance ObjectOwner
Implements IOwner, IEquatable<Owner>, IDisposable
Attributes NullableContextAttribute, NullableAttribute

Constructors

Owner(UInt64)

public Owner(ulong pointer)

Parameters

pointer UInt64

Methods

Destroy()

public void Destroy()

Dispose()

public void Dispose()

AddressOrObject()

Returns an Address if this object is owned by an address or object, and None if it is shared or immutable.

public Address? AddressOrObject()

Returns

Address?

AsAddress()

Convert this owner into an address owner if it is one, or panic otherwise

public Address AsAddress()

Returns

Address

AsObject()

Convert this owner into an object owner if it is one, or panic otherwise

public ObjectId AsObject()

Returns

ObjectId

AsOptAddress()

Convert this owner into an address owner if it is one, or return None otherwise

public Address? AsOptAddress()

Returns

Address?

AsOptObject()

Convert this owner into an object owner if it is one, or return None otherwise

public ObjectId? AsOptObject()

Returns

ObjectId?

AsOptShared()

Convert this owner into a shared owner if it is one, or return None otherwise

public Version? AsOptShared()

Returns

Version?

AsShared()

Convert this owner into a shared owner if it is one, or panic otherwise

public Version AsShared()

Returns

Version

IsAddress()

Check if this is an address owner

public bool IsAddress()

Returns

Boolean

IsImmutable()

Check if this is an immutable owner

public bool IsImmutable()

Returns

Boolean

IsObject()

Check if this is an object owner

public bool IsObject()

Returns

Boolean

IsShared()

Check if this is a shared owner

public bool IsShared()

Returns

Boolean

ToString()

public override string ToString()

Returns

String

Equals(Owner)

public bool Equals(Owner? other)

Parameters

other Owner?

Returns

Boolean

Equals(Object)

public override bool Equals(object? obj)

Parameters

obj Object?

Returns

Boolean

GetHashCode()

public override int GetHashCode()

Returns

Int32

NewAddress(Address)

public static Owner NewAddress(Address address)

Parameters

address Address

Returns

Owner

NewImmutable()

public static Owner NewImmutable()

Returns

Owner

NewObject(ObjectId)

public static Owner NewObject(ObjectId id)

Parameters

id ObjectId

Returns

Owner

NewShared(Version)

public static Owner NewShared(Version version)

Parameters

version Version

Returns

Owner