ObjectId
open class ObjectId : Disposable, AutoCloseable, ObjectIdInterface
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
Functions
| Name | Summary |
|---|---|
| close | @Synchronized open override fun close() |
| deriveDynamicChildId | open override fun deriveDynamicChildId(keyTypeTag: TypeTag, keyBytes: ByteArray): ObjectId Derive an ObjectId for a Dynamic Child Object. |
| deriveObjectId | open override fun deriveObjectId(keyTypeTag: TypeTag, keyBytes: ByteArray): ObjectId Derive the ObjectId of a derived object ( 0x2::derived_object). |
| destroy | open override fun destroy() |
| equals | open operator override fun equals(other: Any?): Boolean |
| hashCode | open override fun hashCode(): Int |
| nextLexicographical | open override fun nextLexicographical(): ObjectId Returns the next digest in byte-increasing order. |
| nextLexicographicalOpt | open override fun nextLexicographicalOpt(): ObjectId? Returns the next digest in byte-increasing order, or None if the result would overflow. |
| toAddress | open override fun toAddress(): Address |
| toBytes | open override fun toBytes(): ByteArray |
| toCanonicalString | open override fun toCanonicalString(withPrefix: Boolean): String Returns the string representation of this object ID using the canonical display, with or without a 0x prefix. |
| toHex | open override fun toHex(): String Returns the string representation of this object id in hex format with 0x prefix. |
| toRawHex | open override fun toRawHex(): String Returns the string representation of this object id in hex format without 0x prefix. |
| toRawShortHex | open override fun toRawShortHex(): String Returns the shortest possible string representation of the object id (i.e. with leading zeroes trimmed), without 0x prefix. |
| toShortHex | open override fun toShortHex(): String Returns the shortest possible string representation of the object ID (i.e. with leading zeroes trimmed). |
| toString | open override fun toString(): String |
Companion object functions
| Name | Summary |
|---|---|
| authenticatorState | fun authenticatorState(): ObjectId |
| clock | fun clock(): ObjectId |
| denyList | fun denyList(): ObjectId |
| deriveId | fun deriveId(digest: TransactionDigest, count: ULong): ObjectId Create an ObjectId from a transaction digest and the number of objects that have been created during a transactions. |
| framework | fun framework(): ObjectId |
| fromBytes | fun fromBytes(bytes: ByteArray): ObjectId |
| fromHex | fun fromHex(hex: String): ObjectId 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). |
| fromPrefixedHex | fun fromPrefixedHex(hex: String): ObjectId 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). |
| fromPrefixedShortHex | fun fromPrefixedShortHex(hex: String): ObjectId 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. |
| fromShortHex | fun fromShortHex(hex: String): ObjectId 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. |
| genesisBridge | fun genesisBridge(): ObjectId |
| genesisIotaBridge | fun genesisIotaBridge(): ObjectId |
| max | fun max(): ObjectId |
| randomnessState | fun randomnessState(): ObjectId |
| stardust | fun stardust(): ObjectId |
| std | fun std(): ObjectId |
| system | fun system(): ObjectId |
| systemState | fun systemState(): ObjectId |
| transactionDenyRules | fun transactionDenyRules(): ObjectId |
| zero | fun zero(): ObjectId |