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

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

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

Inheritance Object → ObjectId
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

ToBcs()​

Convert this type to BCS encoded bytes.

public Byte[] ToBcs()

Returns​

Byte[]

Exceptions​

SdkFfiException

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

ToDisplayString()​

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.

public string ToDisplayString()

Returns​

String

ToHex()​

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

public string ToHex()

Returns​

String

ToJson()​

Convert this type to a JSON encoded string.

public string ToJson()

Returns​

String

Exceptions​

SdkFfiException

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

FromBcs(Byte[])​

Create this type from BCS encoded bytes.

public static ObjectId FromBcs(Byte[] bcs)

Parameters​

bcs Byte[]

Returns​

ObjectId

Exceptions​

SdkFfiException

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

FromJson(String)​

Create this type from a JSON encoded string.

public static ObjectId FromJson(string json)

Parameters​

json 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

FromRawHex(String)​

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

public static ObjectId FromRawHex(string hex)

Parameters​

hex String

Returns​

ObjectId

Exceptions​

SdkFfiException

FromRawShortHex(String)​

Parses an ObjectId from a hex string 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. Will return an error if the string has a 0x prefix.

public static ObjectId FromRawShortHex(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