Oid

Oid is the fully qualified identifier of an object across all universes, uniquely identifying the object within the protocol.

Representation

An Oid can be represented using the following structure:

#![allow(unused)]
fn main() {
pub struct Oid {
    universe: u64,
    set: u64,
    id: u64,
}
}

The table below outlines the fields of the Oid structure:

Size (bytes)FieldTypeDescription
8universeu64The universe ID
8setu64The set ID
8idu64The object ID

Encoding

The Oid structure is often encoded as a u256:

#![allow(unused)]
fn main() {
(u256(oid.universe) << 128) | (u256(oid.set) << 64) | u256(oid.id)
}