/** * NetworkReceipt validation per SPEC/uvrn-receipt-v1.md ยง3. * Exports a standard JSON Schema document (for ajv users such as the worker) plus a dependency-free * structural validator, preserving the zero-external path. */ export declare const RECEIPT_KINDS: readonly ["delta", "master", "drift", "canon", "parity", "analytics", "genesis"]; export declare const LINK_RELS: readonly ["follows", "caused-by", "references", "part-of", "responds-to"]; /** JSON Schema (draft 2020-12) for the `uvrn-receipt-4` envelope. */ export declare const NETWORK_RECEIPT_SCHEMA: { readonly $schema: "https://json-schema.org/draft/2020-12/schema"; readonly $id: "https://uvrn.org/schemas/uvrn-receipt-4.json"; readonly type: "object"; readonly required: readonly ["schemaVersion", "receiptHash", "kind", "claim", "source", "action", "occurredAt", "payload"]; readonly properties: { readonly schemaVersion: { readonly const: "uvrn-receipt-4"; }; readonly receiptHash: { readonly type: "string"; readonly pattern: "^sha256:[0-9a-f]{64}$"; }; readonly kind: { readonly type: "string"; readonly minLength: 1; }; readonly claim: { readonly type: "object"; readonly required: readonly ["id", "text"]; readonly properties: { readonly id: { readonly type: "string"; readonly minLength: 1; }; readonly text: { readonly type: "string"; readonly minLength: 1; }; }; }; readonly source: { readonly type: "string"; readonly minLength: 1; }; readonly action: { readonly type: "string"; readonly minLength: 1; }; readonly occurredAt: { readonly type: "string"; readonly format: "date-time"; }; readonly payload: { readonly type: "object"; }; readonly topic: { readonly type: "string"; readonly minLength: 1; }; readonly tags: { readonly type: "array"; readonly items: { readonly type: "string"; }; }; readonly narrative: { readonly type: "string"; readonly maxLength: 500; }; readonly links: { readonly type: "array"; readonly maxItems: 50; readonly items: { readonly type: "object"; readonly required: readonly ["hash", "rel"]; readonly properties: { readonly hash: { readonly type: "string"; readonly pattern: "^sha256:[0-9a-f]{64}$"; }; readonly rel: { readonly enum: readonly ["follows", "caused-by", "references", "part-of", "responds-to"]; }; readonly label: { readonly type: "string"; readonly maxLength: 256; }; }; }; }; readonly chainId: { readonly type: "string"; readonly maxLength: 128; }; readonly sdk: { readonly type: "object"; readonly required: readonly ["name", "version", "integrityHash"]; readonly properties: { readonly name: { readonly type: "string"; }; readonly version: { readonly type: "string"; }; readonly integrityHash: { readonly type: "string"; }; }; }; readonly signature: { readonly type: "object"; readonly required: readonly ["alg", "publicKeyRef", "sig"]; readonly properties: { readonly alg: { readonly const: "ed25519"; }; readonly publicKeyRef: { readonly type: "string"; readonly minLength: 1; }; readonly sig: { readonly type: "string"; readonly minLength: 1; }; readonly signedAt: { readonly type: "string"; readonly format: "date-time"; }; }; }; }; readonly allOf: readonly [{ readonly if: { readonly properties: { readonly kind: { readonly const: "master"; }; }; }; readonly then: { readonly required: readonly ["narrative"]; readonly properties: { readonly narrative: { readonly type: "string"; readonly minLength: 1; }; }; }; }]; }; /** ValidationOutcome lists every problem found; valid means zero problems. */ export interface ValidationOutcome { valid: boolean; errors: string[]; } /** * validateNetworkReceipt structurally validates a candidate envelope without external deps. * It mirrors NETWORK_RECEIPT_SCHEMA; consumers ignore unknown fields (forward compatibility). */ export declare function validateNetworkReceipt(candidate: unknown): ValidationOutcome; //# sourceMappingURL=index.d.ts.map