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
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
NextLexicographical()
Returns the next digest in byte-increasing order.
public ObjectId NextLexicographical()
Returns
NextLexicographicalOpt()
Returns the next digest in byte-increasing order, or None if the result would overflow.
public ObjectId? NextLexicographicalOpt()
Returns
ToAddress()
public Address ToAddress()
Returns
ToBcs()
Convert this type to BCS encoded bytes.
public Byte[] ToBcs()
Returns
Exceptions
ToBytes()
public Byte[] ToBytes()
Returns
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
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
ToHex()
Returns the string representation of this object id in hex format with 0x prefix.
public string ToHex()
Returns
ToJson()
Convert this type to a JSON encoded string.
public string ToJson()
Returns
Exceptions
ToRawHex()
Returns the string representation of this object id in hex format without 0x prefix.
public string ToRawHex()
Returns
ToRawShortHex()
Returns the shortest possible string representation of the object id (i.e. with leading
zeroes trimmed), without 0x prefix.
public string ToRawShortHex()
Returns
ToShortHex()
Returns the shortest possible string representation of the object ID (i.e. with leading zeroes trimmed).
public string ToShortHex()
Returns
ToString()
public override string ToString()
Returns
Equals(ObjectId)
public bool Equals(ObjectId? other)
Parameters
other ObjectId?
Returns
Equals(Object)
public override bool Equals(object? obj)
Parameters
obj Object?
Returns
GetHashCode()
public override int GetHashCode()
Returns
AuthenticatorState()
public static ObjectId AuthenticatorState()
Returns
Clock()
public static ObjectId Clock()
Returns
DenyList()
public static ObjectId DenyList()
Returns
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
Framework()
public static ObjectId Framework()
Returns
FromBcs(Byte[])
Create this type from BCS encoded bytes.
public static ObjectId FromBcs(Byte[] bcs)
Parameters
bcs Byte[]
Returns
Exceptions
FromBytes(Byte[])
public static ObjectId FromBytes(Byte[] bytes)
Parameters
bytes Byte[]
Returns
Exceptions
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
Exceptions
FromJson(String)
Create this type from a JSON encoded string.
public static ObjectId FromJson(string json)
Parameters
json String
Returns
Exceptions
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
Exceptions
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
Exceptions
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
Exceptions
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
Exceptions
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
Exceptions
GenesisBridge()
public static ObjectId GenesisBridge()
Returns
GenesisIotaBridge()
public static ObjectId GenesisIotaBridge()
Returns
Max()
public static ObjectId Max()
Returns
RandomnessState()
public static ObjectId RandomnessState()
Returns
Stardust()
public static ObjectId Stardust()
Returns
Std()
public static ObjectId Std()
Returns
System()
public static ObjectId System()
Returns
SystemState()
public static ObjectId SystemState()
Returns
TransactionDenyRules()
public static ObjectId TransactionDenyRules()
Returns
Zero()
public static ObjectId Zero()