Skip to main content

Module opcode

Module opcode 

Source
Expand description

NQuin cosmic opcodes and 48-byte metadata layout (OCS §14.2).

The OCS defines five opcodes in the 0x50–0x55 range, packed into bits [0..7] of the predicate field of an NQuin:

OpcodeValueMeaning
OP_COSMIC_POSE0x50Entity has a spacetime pose in a realm
OP_REALM_TRANSIT0x51Entity transits between realms/frames
OP_OBSERVER_FIBER0x53Observer fiber attachment to an entity
OP_MICRO_POSE0x54Microscopic-scale pose (sub-atomic)
OP_ELEMENT_COLLAPSE0x55Granular element collapse onto physical

These are in the 0x50+ range, above the LTL range (0x40–0x44) and do not conflict with any existing modality.

§48-byte NQuin Layout for Cosmic Operations (OCS §14.2)

Field      Bits      Content
─────────────────────────────────────────────────────────────────
subject    [63]      MSB flag (1 = did:q42 entity/observer pointer)
           [0..62]   q_hash(entity_or_observer_did)

predicate  [63]      0
           [8..62]   q_hash("cosmic:hasSpacetimePose") << 8
           [0..7]    Opcode (0x50–0x55)

object     [63]      MSB=1 (did:q42 topological pointer to Pose/Anchor)
           [0..62]   q_hash(pose_or_record_iri)

context    [56..63]  Sensitivity Class (PUBLIC=0, RESTRICTED=1, CLASSIFIED=2)
           [0..55]   q_hash(realm_usri) (56-bit scoped realm hash)

metadata   [61..62]  PermissiveRoutingLane (01=Commons, 10=Bilateral Isolated)
           [32..60]  Lamport Logical Clock / Epoch Timestamp (29 bits)
           [0..31]   Realm Class & Scale Level Index
                      bits [0..7]:  realm class index
                      bits [8..15]: hierarchy level (L_-2..L_12)
                      bits [16..31]: nesting depth + reserved

parity     [0..63]   XOR fold: subject ^ predicate ^ object ^ context ^ metadata

Reference: OCS Specification v2.2.0 §14.2.

Structs§

CosmicNQuin
A 48-byte cosmic NQuin built from OCS components.

Constants§

COSMIC_POSE_IRI
The canonical predicate IRI for cosmic pose operations.
LANE_BILATERAL
LANE_COMMONS
LANE_PASSTHROUGH
PermissiveRoutingLane constants (OCS §14.2, matching NQuin metadata field).
LANE_SPATIAL
OP_COSMIC_POSE
Entity has a spacetime pose in a realm.
OP_ELEMENT_COLLAPSE
Granular element collapse onto physical spacetime.
OP_MICRO_POSE
Microscopic-scale pose (sub-atomic / quantum realm).
OP_OBSERVER_FIBER
Observer fiber attachment to an entity.
OP_REALM_TRANSIT
Entity transits between realms or reference frames.
SENSITIVITY_CLASSIFIED
SENSITIVITY_PUBLIC
Sensitivity class constants (OCS §14.2, matching NQuin context field).
SENSITIVITY_RESTRICTED

Functions§

from_cb_usri
Build a CosmicNQuin from a CompactBinaryUsri (OCS §13.2 + §14.2).