Skip to main content

ObjectId

Namespace: IotaSdk

An ObjectId is a 32-byte identifier used to uniquely identify an object on the IOTA blockchain.

Relationship to Address

Addresses and ObjectIds share the same 32-byte addressable space but are derived leveraging different domain-separator values to ensure, cryptographically, that there won't be any overlap, e.g. there can't be a valid Object whose ObjectId is equal to that of the Address of a user account.

BCS

An ObjectId's BCS serialized form is defined by the following:

object-id = address
public class ObjectId : IObjectId, System.IEquatable`1[[IotaSdk.ObjectId, IotaSdk, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.IDisposable

Inheritance ObjectObjectId
Implements IObjectId, IEquatable<ObjectId>, IDisposable
Attributes NullableContextAttribute, NullableAttribute

Constructors

ObjectId(UInt64)

public ObjectId(ulong pointer)

Parameters

pointer UInt64

Methods

Destroy()

public void Destroy()

Dispose()

public void Dispose()

DeriveDynamicChildId(TypeTag, Byte[])

Derive an ObjectId for a Dynamic Child Object.

hash(parent || len(key) || key || key_type_tag)

public ObjectId DeriveDynamicChildId(TypeTag keyTypeTag, Byte[] keyBytes)

Parameters

keyTypeTag TypeTag

keyBytes Byte[]

Returns

ObjectId

DeriveObjectId(TypeTag, Byte[])

Derive the ObjectId of a derived object (0x2::derived_object).

hash(parent || len(key) || key || DerivedObjectKey(key_type_tag))

public ObjectId DeriveObjectId(TypeTag keyTypeTag, Byte[] keyBytes)

Parameters

keyTypeTag TypeTag

keyBytes Byte[]

Returns

ObjectId

NextLexicographical()

Returns the next digest in byte-increasing order.

public ObjectId NextLexicographical()

Returns

ObjectId

NextLexicographicalOpt()

Returns the next digest in byte-increasing order, or None if the result would overflow.

public ObjectId? NextLexicographicalOpt()

Returns

ObjectId?

ToAddress()

public Address ToAddress()

Returns

Address

ToBytes()

public Byte[] ToBytes()

Returns

Byte[]

ToCanonicalString(Boolean)

Returns the string representation of this object ID using the canonical display, with or without a 0x prefix.

public string ToCanonicalString(bool withPrefix)

Parameters

withPrefix Boolean

Returns

String

ToHex()

Returns the string representation of this object id in hex format with 0x prefix.

public string ToHex()

Returns

String

ToRawHex()

Returns the string representation of this object id in hex format without 0x prefix.

public string ToRawHex()

Returns

String

ToRawShortHex()

Returns the shortest possible string representation of the object id (i.e. with leading zeroes trimmed), without 0x prefix.

public string ToRawShortHex()

Returns

String

ToShortHex()

Returns the shortest possible string representation of the object ID (i.e. with leading zeroes trimmed).

public string ToShortHex()

Returns

String

ToString()

public override string ToString()

Returns

String

Equals(ObjectId)

public bool Equals(ObjectId? other)

Parameters

other ObjectId?

Returns

Boolean

Equals(Object)

public override bool Equals(object? obj)

Parameters

obj Object?

Returns

Boolean

GetHashCode()

public override int GetHashCode()

Returns

Int32

AuthenticatorState()

public static ObjectId AuthenticatorState()

Returns

ObjectId

Clock()

public static ObjectId Clock()

Returns

ObjectId

DenyList()

public static ObjectId DenyList()

Returns

ObjectId

DeriveId(TransactionDigest, UInt64)

Create an ObjectId from a transaction digest and the number of objects that have been created during a transactions.

public static ObjectId DeriveId(TransactionDigest digest, ulong count)

Parameters

digest TransactionDigest

count UInt64

Returns

ObjectId

Framework()

public static ObjectId Framework()

Returns

ObjectId

FromBytes(Byte[])

public static ObjectId FromBytes(Byte[] bytes)

Parameters

bytes Byte[]

Returns

ObjectId

Exceptions

SdkFfiException

FromHex(String)

Parses an ObjectId from a full-length hex string (64 hex characters), with or without a 0x prefix. Will return an error if the string is not exactly 64 hex characters long (excluding the 0x prefix).

public static ObjectId FromHex(string hex)

Parameters

hex String

Returns

ObjectId

Exceptions

SdkFfiException

FromPrefixedHex(String)

Parses an ObjectId from a full-length hex string (64 hex characters), with a mandatory 0x prefix. Will return an error if the string is not exactly 64 hex characters long (excluding the 0x prefix).

public static ObjectId FromPrefixedHex(string hex)

Parameters

hex String

Returns

ObjectId

Exceptions

SdkFfiException

FromPrefixedShortHex(String)

Parses an ObjectId from a hex string with a mandatory 0x prefix. The string can be of variable length; if it's shorter than 64 hex characters, it will be left-padded with 0s.

public static ObjectId FromPrefixedShortHex(string hex)

Parameters

hex String

Returns

ObjectId

Exceptions

SdkFfiException

FromShortHex(String)

Parses an ObjectId from a hex string, with or without a 0x prefix. The string can be of variable length; if it's shorter than 64 hex characters, it will be left-padded with 0s.

public static ObjectId FromShortHex(string hex)

Parameters

hex String

Returns

ObjectId

Exceptions

SdkFfiException

GenesisBridge()

public static ObjectId GenesisBridge()

Returns

ObjectId

GenesisIotaBridge()

public static ObjectId GenesisIotaBridge()

Returns

ObjectId

Max()

public static ObjectId Max()

Returns

ObjectId

RandomnessState()

public static ObjectId RandomnessState()

Returns

ObjectId

Stardust()

public static ObjectId Stardust()

Returns

ObjectId

Std()

public static ObjectId Std()

Returns

ObjectId

System()

public static ObjectId System()

Returns

ObjectId

SystemState()

public static ObjectId SystemState()

Returns

ObjectId

TransactionDenyRules()

public static ObjectId TransactionDenyRules()

Returns

ObjectId

Zero()

public static ObjectId Zero()

Returns

ObjectId