import type { HsonNode } from "./types.js"; /** Canonical 45-bit persisted node identity. */ export type PersistedQuid = string; export declare const PERSISTED_QUID_LENGTH = 9; export declare const PERSISTED_QUID_ALPHABET = "0123456789abcdefghjkmnpqrstvwxyz"; /** True only for an already-canonical persisted QUID; this never normalizes. */ export declare function is_persisted_quid(value: unknown): value is PersistedQuid; /** Encode the first 45 bits of exactly six random bytes as nine Base32 digits. */ export declare function encode_persisted_quid(bytes: Uint8Array): PersistedQuid; export type HsonNodeQuidValidationCode = "INELIGIBLE_QUID" | "MALFORMED_QUID" | "DUPLICATE_QUID"; export declare class HsonNodeQuidValidationError extends Error { readonly code: HsonNodeQuidValidationCode; readonly node: HsonNode; readonly path: string | undefined; readonly value?: unknown; readonly conflictingNode: HsonNode | undefined; readonly conflictingPath: string | undefined; constructor(code: HsonNodeQuidValidationCode, message: string, details: { node: HsonNode; path?: string; value?: unknown; conflictingNode?: HsonNode; conflictingPath?: string; }); } /** Generate one canonical 45-bit persisted QUID from secure random bytes. */ export declare function mint_hson_node_quid(): PersistedQuid; /** Reject any attempt to establish or operate on QUID state for a VSN. */ export declare function assert_hson_node_quid_eligible(node: HsonNode, operation: string): void; /** * Read and validate persisted QUID metadata without consulting a consumer * registry. Clean VSNs report absence; QUID-bearing VSNs reject. */ export declare function read_hson_node_quid(node: HsonNode): PersistedQuid | undefined; export declare function has_hson_node_quid(node: HsonNode): boolean; /** Validate one node's optional QUID value and placement without mutation. */ export declare function validate_hson_node_quid(node: HsonNode): void; /** Assign one supplied canonical QUID to an eligible node. */ export declare function assign_hson_node_quid(node: HsonNode, quid: unknown): PersistedQuid; /** Reuse valid metadata or mint and persist a fresh canonical QUID. */ export declare function ensure_hson_node_quid(node: HsonNode): PersistedQuid; /** Deliberately remove valid QUID metadata from an eligible node. */ export declare function remove_hson_node_quid(node: HsonNode): PersistedQuid | undefined; export type HsonNodeQuidClaim = Readonly<{ quid: PersistedQuid; node: HsonNode; path: string; }>; /** * Validate and collect every canonical QUID claim in one Hson object graph. * * Equal values on distinct nodes are preserved as separate claims. Repeated * references to the same object are one graph node and are visited once. * Traversal is deterministic depth-first content order and never mutates or * registers the graph. */ export declare function collect_hson_node_quid_claims(root: HsonNode): readonly HsonNodeQuidClaim[]; /** Deterministically reject duplicate claims and build one ownership index. */ export declare function index_unique_hson_node_quid_claims(claims: readonly HsonNodeQuidClaim[]): ReadonlyMap; /** * Validate one graph and require unique persisted claims. * * This compatibility helper remains the canonical ownership-domain scan. * Pure transform boundaries use `collect_hson_node_quid_claims()` instead. */ export declare function scan_hson_node_quids(root: HsonNode): ReadonlyMap; //# sourceMappingURL=hson-node-quid.d.ts.map