What is an object ID, and how do I find one?
November 8, 2026
An object ID is the globally unique 32-byte identifier of a Sui object, written as 64 hex characters with a 0x prefix. It's derived from the digest of the transaction that created the object plus a counter, and it never changes, even when the object is transferred, wrapped or modified. To find one, list your objects with sui client objects, read the created objects in a transaction's effects, search an explorer, or query it from the TypeScript SDK.
Find object IDs with the CLI
# All objects owned by the active address (or pass an address or alias)
sui client objects
# Details for one object: type, owner, version, digest and fields
sui client object 0x<OBJECT_ID>
# Only your SUI coins
sui client gasWhen you publish or call a function, the CLI output lists the object changes of the transaction. Look for created objects there: the package ID after a publish, a shared object made in init, or an UpgradeCap. Add --json to get machine-readable output for scripts.
Find object IDs from a transaction (TypeScript)
The created objects are in the effects. With @mysten/sui v2:
import { SuiGrpcClient } from '@mysten/sui/grpc';
import { Transaction } from '@mysten/sui/transactions';
const client = new SuiGrpcClient({
network: 'testnet',
baseUrl: 'https://fullnode.testnet.sui.io:443',
});
const tx = new Transaction();
tx.moveCall({ target: `${PACKAGE_ID}::counter::create` });
const result = await client.signAndExecuteTransaction({
signer,
transaction: tx,
include: { effects: true, objectTypes: true },
});
if (result.$kind === 'FailedTransaction') throw new Error('transaction failed');
const { effects, objectTypes } = result.Transaction;
for (const obj of effects.changedObjects) {
if (obj.idOperation === 'Created') {
console.log(obj.objectId, objectTypes[obj.objectId]);
}
}To list what an address owns, optionally filtered by type:
const { objects } = await client.listOwnedObjects({
owner: '0x<ADDRESS>',
type: `${PACKAGE_ID}::counter::Counter`,
});
objects.forEach((o) => console.log(o.objectId, o.version));Get an object's ID inside Move
let id: ID = object::id(&counter); // ID of any `key` value
let addr: address = counter.id.to_address(); // the same bytes as an address
let inner: ID = counter.id.to_inner(); // from a UID fieldUID is the field type inside your struct and can't be copied or dropped. ID is a plain copyable value for storing references to other objects, emitting in events, or comparing.
Well-known IDs
Some system objects have fixed IDs on every network:
| ID | Object |
|---|---|
0x5 |
Sui system state |
0x6 |
Clock (see How do I get the current time in Sui Move?) |
0x8 |
Random |
0x403 |
Coin deny list |
Short forms like 0x6 are padded with leading zeros to the full 32 bytes. The SDK exports these as constants such as SUI_CLOCK_OBJECT_ID from @mysten/sui/utils.
Gotchas
- Object ID vs. address. IDs and account addresses share the same 32-byte format and never collide. That's what lets you send objects to an object (transfer to object).
- Wrapped objects disappear from lookups. Once an object is stored inside another object's field, a query by its ID won't find it until it's unwrapped. Dynamic object field children stay visible.
- Package ID is an object ID too. A published package is an immutable object, and its ID is what you use in
targetstrings (What is a package ID?). - Explorers work too. Paste an ID into any Sui explorer to see its owner, fields and history.
Sources
- Object Model, Sui documentation
- Address-Owned Objects, Sui documentation
- object.move, Sui framework source
- client_commands.rs, Sui CLI source