package types import "time" // StateV1 is versioned for KV compatibility. type StateV1 struct { Version uint8 `json:"v"` DID string `json:"did"` DIDDocument []byte `json:"did_document"` ChainTipHash string `json:"chain_tip_hash"` RotationKeys []string `json:"rotation_keys,omitempty"` LatestOpSeq uint64 `json:"latest_op_seq"` UpdatedAt time.Time `json:"updated_at"` } type BlockRefV1 struct { Version uint8 `json:"v"` BlockID uint64 `json:"block_id"` Offset uint64 `json:"offset"` Length uint64 `json:"length"` OpSeq uint64 `json:"op_seq"` DID string `json:"did"` CID string `json:"cid"` PrevCID string `json:"prev_cid"` OpHash string `json:"op_hash"` Received string `json:"received"` CreatedAt string `json:"created_at,omitempty"` } type CheckpointReference struct { Sequence uint64 `json:"sequence"` CheckpointHash string `json:"checkpoint_hash"` } // CheckpointV1 is serialized deterministically for signing. type CheckpointV1 struct { Version uint8 `json:"v"` Sequence uint64 `json:"sequence"` Timestamp string `json:"timestamp"` DIDMerkleRoot string `json:"did_merkle_root"` BlockMerkleRoot string `json:"block_merkle_root"` PreviousCheckpointHash string `json:"previous_checkpoint_hash"` KeyID string `json:"key_id"` Signature string `json:"signature"` CheckpointHash string `json:"checkpoint_hash"` } // ThinCacheMetaV1 tracks thin-mode cache freshness and eviction order. type ThinCacheMetaV1 struct { Version uint8 `json:"v"` DID string `json:"did"` LastVerified time.Time `json:"last_verified"` LastAccess time.Time `json:"last_access"` }