@fluxpointstudios/orynq-sdk-midnight-prover 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/LICENSE +21 -0
  2. package/dist/index.d.ts +78 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +89 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/linking/cardano-anchor-link.d.ts +250 -0
  7. package/dist/linking/cardano-anchor-link.d.ts.map +1 -0
  8. package/dist/linking/cardano-anchor-link.js +447 -0
  9. package/dist/linking/cardano-anchor-link.js.map +1 -0
  10. package/dist/linking/index.d.ts +33 -0
  11. package/dist/linking/index.d.ts.map +1 -0
  12. package/dist/linking/index.js +31 -0
  13. package/dist/linking/index.js.map +1 -0
  14. package/dist/linking/proof-publication.d.ts +217 -0
  15. package/dist/linking/proof-publication.d.ts.map +1 -0
  16. package/dist/linking/proof-publication.js +385 -0
  17. package/dist/linking/proof-publication.js.map +1 -0
  18. package/dist/midnight/index.d.ts +30 -0
  19. package/dist/midnight/index.d.ts.map +1 -0
  20. package/dist/midnight/index.js +27 -0
  21. package/dist/midnight/index.js.map +1 -0
  22. package/dist/midnight/proof-server-client.d.ts +236 -0
  23. package/dist/midnight/proof-server-client.d.ts.map +1 -0
  24. package/dist/midnight/proof-server-client.js +422 -0
  25. package/dist/midnight/proof-server-client.js.map +1 -0
  26. package/dist/midnight/public-inputs.d.ts +134 -0
  27. package/dist/midnight/public-inputs.d.ts.map +1 -0
  28. package/dist/midnight/public-inputs.js +338 -0
  29. package/dist/midnight/public-inputs.js.map +1 -0
  30. package/dist/midnight/witness-builder.d.ts +119 -0
  31. package/dist/midnight/witness-builder.d.ts.map +1 -0
  32. package/dist/midnight/witness-builder.js +238 -0
  33. package/dist/midnight/witness-builder.js.map +1 -0
  34. package/dist/proofs/hash-chain-proof.d.ts +171 -0
  35. package/dist/proofs/hash-chain-proof.d.ts.map +1 -0
  36. package/dist/proofs/hash-chain-proof.js +437 -0
  37. package/dist/proofs/hash-chain-proof.js.map +1 -0
  38. package/dist/proofs/index.d.ts +35 -0
  39. package/dist/proofs/index.d.ts.map +1 -0
  40. package/dist/proofs/index.js +34 -0
  41. package/dist/proofs/index.js.map +1 -0
  42. package/dist/proofs/policy-compliance-proof.d.ts +165 -0
  43. package/dist/proofs/policy-compliance-proof.d.ts.map +1 -0
  44. package/dist/proofs/policy-compliance-proof.js +514 -0
  45. package/dist/proofs/policy-compliance-proof.js.map +1 -0
  46. package/dist/proofs/selective-disclosure.d.ts +213 -0
  47. package/dist/proofs/selective-disclosure.d.ts.map +1 -0
  48. package/dist/proofs/selective-disclosure.js +629 -0
  49. package/dist/proofs/selective-disclosure.js.map +1 -0
  50. package/dist/prover-interface.d.ts +288 -0
  51. package/dist/prover-interface.d.ts.map +1 -0
  52. package/dist/prover-interface.js +114 -0
  53. package/dist/prover-interface.js.map +1 -0
  54. package/dist/prover.d.ts +163 -0
  55. package/dist/prover.d.ts.map +1 -0
  56. package/dist/prover.js +417 -0
  57. package/dist/prover.js.map +1 -0
  58. package/dist/types.d.ts +410 -0
  59. package/dist/types.d.ts.map +1 -0
  60. package/dist/types.js +128 -0
  61. package/dist/types.js.map +1 -0
  62. package/package.json +59 -0
  63. package/src/__tests__/hash-chain-proof.test.ts +709 -0
  64. package/src/__tests__/midnight-prover.test.ts +716 -0
  65. package/src/__tests__/policy-compliance.test.ts +567 -0
  66. package/src/__tests__/proof-publication.test.ts +644 -0
  67. package/src/__tests__/selective-disclosure.test.ts +921 -0
  68. package/src/index.ts +260 -0
  69. package/src/linking/cardano-anchor-link.ts +682 -0
  70. package/src/linking/index.ts +58 -0
  71. package/src/linking/proof-publication.ts +557 -0
  72. package/src/midnight/index.ts +73 -0
  73. package/src/midnight/proof-server-client.ts +595 -0
  74. package/src/midnight/public-inputs.ts +590 -0
  75. package/src/midnight/witness-builder.ts +341 -0
  76. package/src/proofs/hash-chain-proof.ts +610 -0
  77. package/src/proofs/index.ts +77 -0
  78. package/src/proofs/policy-compliance-proof.ts +717 -0
  79. package/src/proofs/selective-disclosure.ts +839 -0
  80. package/src/prover-interface.ts +410 -0
  81. package/src/prover.ts +537 -0
  82. package/src/types.ts +551 -0
@@ -0,0 +1,410 @@
1
+ /**
2
+ * @fileoverview Type definitions for the poi-midnight-prover package.
3
+ *
4
+ * Location: packages/midnight-prover/src/types.ts
5
+ *
6
+ * Summary:
7
+ * This file contains all type definitions for ZK proof generation using the Midnight network.
8
+ * It defines proof types, input/output structures for various proof circuits, configuration
9
+ * options, and error handling.
10
+ *
11
+ * Usage:
12
+ * Types are imported by the prover-interface.ts and will be used by proof generation
13
+ * implementations in the proofs/ directory. These types integrate with process-trace
14
+ * (TraceEvent, TraceBundle) and attestor (AttestationBundle, VerifierPolicy) packages.
15
+ *
16
+ * Key concepts:
17
+ * - ProofType: Discriminator for different ZK proof circuits
18
+ * - HashChainProof: Proves trace hash chain validity
19
+ * - PolicyProof: Proves content compliance without revealing content
20
+ * - AttestationProof: Proves valid TEE attestation
21
+ * - DisclosureProof: Selective disclosure of spans without revealing others
22
+ * - InferenceProof: Optional zkML proof for model inference correctness
23
+ */
24
+ import type { TraceEvent, TraceSpan, TraceBundle } from "@fluxpointstudios/orynq-sdk-process-trace";
25
+ import type { AttestationBundle, VerifierPolicy, TeeType } from "@fluxpointstudios/orynq-sdk-attestor";
26
+ /**
27
+ * Discriminator for different ZK proof types.
28
+ * Each type corresponds to a specific Compact circuit.
29
+ */
30
+ export type ProofType = "hash-chain" | "policy-compliance" | "attestation-valid" | "selective-disclosure" | "zkml-inference";
31
+ /**
32
+ * Base interface for all ZK proofs.
33
+ * Contains common fields shared by all proof types.
34
+ *
35
+ * @property proofType - Discriminator for proof kind
36
+ * @property proofId - Unique identifier for this proof
37
+ * @property proof - Serialized proof bytes (Compact format)
38
+ * @property createdAt - ISO 8601 timestamp of proof generation
39
+ * @property provingTimeMs - Time taken to generate the proof
40
+ * @property proofSizeBytes - Size of the proof in bytes
41
+ */
42
+ export interface Proof {
43
+ proofType: ProofType;
44
+ proofId: string;
45
+ proof: Uint8Array;
46
+ createdAt: string;
47
+ provingTimeMs: number;
48
+ proofSizeBytes: number;
49
+ }
50
+ /**
51
+ * Input for hash chain validity proof.
52
+ * Proves that a sequence of events produces the expected rolling hash.
53
+ *
54
+ * @property events - The trace events (private witness)
55
+ * @property genesisHash - Initial hash state (usually zeros)
56
+ * @property expectedRootHash - Public commitment (from Cardano anchor)
57
+ * @property cardanoAnchorTxHash - Transaction hash on Cardano L1 for cross-chain binding
58
+ */
59
+ export interface HashChainInput {
60
+ events: TraceEvent[];
61
+ genesisHash: string;
62
+ expectedRootHash: string;
63
+ cardanoAnchorTxHash: string;
64
+ }
65
+ /**
66
+ * Hash chain validity proof.
67
+ * Demonstrates that a sequence of events produces the anchored root hash.
68
+ *
69
+ * @property publicInputs - Values visible to verifiers
70
+ * @property publicInputs.rootHash - The final rolling hash (matches anchor)
71
+ * @property publicInputs.eventCount - Number of events in the chain
72
+ * @property publicInputs.cardanoAnchorTxHash - Binding to Cardano anchor
73
+ */
74
+ export interface HashChainProof extends Proof {
75
+ proofType: "hash-chain";
76
+ publicInputs: HashChainPublicInputs;
77
+ }
78
+ export interface HashChainPublicInputs {
79
+ rootHash: string;
80
+ eventCount: number;
81
+ cardanoAnchorTxHash: string;
82
+ }
83
+ /**
84
+ * Input for policy compliance proof.
85
+ * Proves content passed a policy without revealing the content.
86
+ *
87
+ * @property promptHash - Hash of the prompt (private)
88
+ * @property outputHash - Hash of the output (private)
89
+ * @property policy - Policy definition to check against
90
+ * @property cardanoAnchorTxHash - Binding to Cardano anchor
91
+ */
92
+ export interface PolicyInput {
93
+ promptHash: string;
94
+ outputHash: string;
95
+ policy: ContentPolicy;
96
+ cardanoAnchorTxHash: string;
97
+ }
98
+ /**
99
+ * Content policy definition.
100
+ * Describes rules that content must comply with.
101
+ *
102
+ * @property id - Unique identifier for this policy
103
+ * @property version - Semantic version of the policy
104
+ * @property rules - Array of rules to evaluate
105
+ */
106
+ export interface ContentPolicy {
107
+ id: string;
108
+ version: string;
109
+ rules: PolicyRule[];
110
+ }
111
+ /**
112
+ * Individual policy rule.
113
+ *
114
+ * @property type - Rule type (blocklist, allowlist, regex, classifier)
115
+ * @property target - What to apply the rule to (prompt, output, or both)
116
+ * @property params - Rule-specific parameters
117
+ */
118
+ export interface PolicyRule {
119
+ type: "blocklist" | "allowlist" | "regex" | "classifier";
120
+ target: "prompt" | "output" | "both";
121
+ params: Record<string, unknown>;
122
+ }
123
+ /**
124
+ * Policy compliance proof.
125
+ * Demonstrates content compliance without revealing content.
126
+ *
127
+ * @property publicInputs - Values visible to verifiers
128
+ * @property publicInputs.promptHash - Reveals hash, not content
129
+ * @property publicInputs.policyId - Policy that was checked
130
+ * @property publicInputs.policyVersion - Version of the policy
131
+ * @property publicInputs.compliant - Whether content passed policy
132
+ * @property publicInputs.cardanoAnchorTxHash - Binding to Cardano anchor
133
+ */
134
+ export interface PolicyProof extends Proof {
135
+ proofType: "policy-compliance";
136
+ publicInputs: PolicyPublicInputs;
137
+ }
138
+ export interface PolicyPublicInputs {
139
+ promptHash: string;
140
+ policyId: string;
141
+ policyVersion: string;
142
+ compliant: boolean;
143
+ cardanoAnchorTxHash: string;
144
+ }
145
+ /**
146
+ * Input for attestation validity proof.
147
+ * Proves a TEE attestation is valid without revealing full evidence.
148
+ *
149
+ * @property attestation - Full attestation bundle (private witness)
150
+ * @property policy - Expected verifier policy
151
+ * @property cardanoAnchorTxHash - Binding to Cardano anchor
152
+ */
153
+ export interface AttestationInput {
154
+ attestation: AttestationBundle;
155
+ policy: VerifierPolicy;
156
+ cardanoAnchorTxHash: string;
157
+ }
158
+ /**
159
+ * Attestation validity proof.
160
+ * Demonstrates TEE attestation validity without exposing full evidence.
161
+ *
162
+ * @property publicInputs - Values visible to verifiers
163
+ * @property publicInputs.teeType - Type of TEE that was attested
164
+ * @property publicInputs.measurementMatch - Whether measurements matched policy
165
+ * @property publicInputs.boundHash - The hash that was bound in attestation
166
+ * @property publicInputs.cardanoAnchorTxHash - Binding to Cardano anchor
167
+ */
168
+ export interface AttestationProof extends Proof {
169
+ proofType: "attestation-valid";
170
+ publicInputs: AttestationPublicInputs;
171
+ }
172
+ export interface AttestationPublicInputs {
173
+ teeType: TeeType;
174
+ measurementMatch: boolean;
175
+ boundHash: string;
176
+ cardanoAnchorTxHash: string;
177
+ }
178
+ /**
179
+ * Input for selective disclosure proof.
180
+ * Proves a span exists in a bundle without revealing other spans.
181
+ *
182
+ * @property bundle - Full trace bundle (private witness)
183
+ * @property spanId - ID of span to disclose/prove membership
184
+ * @property merkleRoot - Expected Merkle root (from anchor)
185
+ * @property cardanoAnchorTxHash - Binding to Cardano anchor
186
+ */
187
+ export interface DisclosureInput {
188
+ bundle: TraceBundle;
189
+ spanId: string;
190
+ merkleRoot: string;
191
+ cardanoAnchorTxHash: string;
192
+ }
193
+ /**
194
+ * Selective disclosure proof.
195
+ * Proves span membership with optional span/event revelation.
196
+ *
197
+ * @property publicInputs - Values visible to verifiers
198
+ * @property publicInputs.spanHash - Hash of the disclosed span
199
+ * @property publicInputs.merkleRoot - Merkle root the span belongs to
200
+ * @property publicInputs.cardanoAnchorTxHash - Binding to Cardano anchor
201
+ * @property disclosedSpan - Optionally revealed span data
202
+ * @property disclosedEvents - Optionally revealed events in span
203
+ */
204
+ export interface DisclosureProof extends Proof {
205
+ proofType: "selective-disclosure";
206
+ publicInputs: DisclosurePublicInputs;
207
+ disclosedSpan: TraceSpan | undefined;
208
+ disclosedEvents: TraceEvent[] | undefined;
209
+ }
210
+ export interface DisclosurePublicInputs {
211
+ spanHash: string;
212
+ merkleRoot: string;
213
+ cardanoAnchorTxHash: string;
214
+ }
215
+ /**
216
+ * Inference parameters for zkML proof.
217
+ * Captures model configuration at inference time.
218
+ */
219
+ export interface InferenceParams {
220
+ temperature: number | undefined;
221
+ topP: number | undefined;
222
+ topK: number | undefined;
223
+ maxTokens: number | undefined;
224
+ stopStrings: string[] | undefined;
225
+ frequencyPenalty: number | undefined;
226
+ presencePenalty: number | undefined;
227
+ }
228
+ /**
229
+ * Input for zkML inference proof.
230
+ * Proves model output is correct for given inputs.
231
+ *
232
+ * WARNING: zkML proofs are extremely expensive. Use only for high-stakes scenarios.
233
+ *
234
+ * @property modelId - Identifier of the model (e.g., "gpt-4", "claude-3")
235
+ * @property modelWeightDigest - Hash of model weights (for verification)
236
+ * @property inputTokens - Tokenized input (private)
237
+ * @property outputTokens - Tokenized output (private)
238
+ * @property params - Inference parameters used
239
+ * @property cardanoAnchorTxHash - Binding to Cardano anchor
240
+ */
241
+ export interface InferenceInput {
242
+ modelId: string;
243
+ modelWeightDigest: string;
244
+ inputTokens: number[];
245
+ outputTokens: number[];
246
+ params: InferenceParams;
247
+ cardanoAnchorTxHash: string;
248
+ }
249
+ /**
250
+ * zkML inference proof.
251
+ * Proves model inference correctness (extremely expensive).
252
+ *
253
+ * @property publicInputs - Values visible to verifiers
254
+ * @property publicInputs.modelWeightDigest - Proves which model was used
255
+ * @property publicInputs.inputHash - Hash of input tokens
256
+ * @property publicInputs.outputHash - Hash of output tokens
257
+ * @property publicInputs.paramsHash - Hash of inference parameters
258
+ * @property publicInputs.cardanoAnchorTxHash - Binding to Cardano anchor
259
+ * @property metrics - Cost/performance metrics for the proof
260
+ */
261
+ export interface InferenceProof extends Proof {
262
+ proofType: "zkml-inference";
263
+ publicInputs: InferencePublicInputs;
264
+ metrics: InferenceProofMetrics;
265
+ }
266
+ export interface InferencePublicInputs {
267
+ modelWeightDigest: string;
268
+ inputHash: string;
269
+ outputHash: string;
270
+ paramsHash: string;
271
+ cardanoAnchorTxHash: string;
272
+ }
273
+ /**
274
+ * Metrics for zkML proof generation.
275
+ * zkML proofs are expensive - these metrics help track costs.
276
+ */
277
+ export interface InferenceProofMetrics {
278
+ provingTimeMs: number;
279
+ proofSizeBytes: number;
280
+ circuitSize: number;
281
+ memoryUsageMB: number | undefined;
282
+ gpuUsed: boolean | undefined;
283
+ }
284
+ /**
285
+ * Configuration for connecting to a Midnight proof server.
286
+ *
287
+ * @property proofServerUrl - URL of the Midnight proof server
288
+ * @property apiKey - Optional API key for authentication
289
+ * @property timeout - Request timeout in milliseconds
290
+ * @property retries - Number of retries on failure
291
+ * @property circuitCacheDir - Optional local circuit cache directory
292
+ */
293
+ export interface ProofServerConfig {
294
+ proofServerUrl: string;
295
+ apiKey: string | undefined;
296
+ timeout: number;
297
+ retries: number;
298
+ circuitCacheDir: string | undefined;
299
+ }
300
+ /**
301
+ * Default proof server configuration.
302
+ */
303
+ export declare const DEFAULT_PROOF_SERVER_CONFIG: Partial<ProofServerConfig>;
304
+ /**
305
+ * Result of publishing a proof to the Midnight network.
306
+ *
307
+ * @property midnightTxHash - Transaction hash on Midnight
308
+ * @property proofId - Unique identifier for the proof
309
+ * @property timestamp - When the proof was published
310
+ * @property cardanoAnchorTxHash - Cross-chain reference to Cardano
311
+ * @property blockNumber - Block number where proof was included
312
+ * @property fee - Fee paid for publication
313
+ */
314
+ export interface PublicationResult {
315
+ midnightTxHash: string;
316
+ proofId: string;
317
+ timestamp: string;
318
+ cardanoAnchorTxHash: string;
319
+ blockNumber: number | undefined;
320
+ fee: bigint | undefined;
321
+ }
322
+ /**
323
+ * Result of verifying a proof.
324
+ */
325
+ export interface ProofVerificationResult {
326
+ valid: boolean;
327
+ proofType: ProofType;
328
+ publicInputs: Record<string, unknown>;
329
+ errors: string[];
330
+ warnings: string[];
331
+ verifiedAt: string;
332
+ }
333
+ /**
334
+ * Error codes for midnight-prover operations.
335
+ * Uses 5xxx range as specified in architectural plan.
336
+ */
337
+ export declare enum MidnightProverError {
338
+ CONNECTION_FAILED = 5000,
339
+ CONNECTION_TIMEOUT = 5001,
340
+ CONNECTION_REFUSED = 5002,
341
+ AUTHENTICATION_FAILED = 5003,
342
+ PROOF_GENERATION_FAILED = 5020,
343
+ CIRCUIT_NOT_FOUND = 5021,
344
+ INVALID_WITNESS = 5022,
345
+ WITNESS_TOO_LARGE = 5023,
346
+ INSUFFICIENT_RESOURCES = 5024,
347
+ PROVING_TIMEOUT = 5025,
348
+ PROOF_VERIFICATION_FAILED = 5050,
349
+ INVALID_PROOF_FORMAT = 5051,
350
+ PUBLIC_INPUT_MISMATCH = 5052,
351
+ PROOF_EXPIRED = 5053,
352
+ PUBLICATION_FAILED = 5080,
353
+ INSUFFICIENT_FUNDS = 5081,
354
+ NETWORK_ERROR = 5082,
355
+ TRANSACTION_REJECTED = 5083,
356
+ INVALID_INPUT = 5100,
357
+ MISSING_REQUIRED_FIELD = 5101,
358
+ HASH_MISMATCH = 5102,
359
+ ANCHOR_NOT_FOUND = 5103,
360
+ SPAN_NOT_FOUND = 5104,
361
+ CIRCUIT_COMPILE_FAILED = 5120,
362
+ CIRCUIT_EXECUTION_FAILED = 5121,
363
+ CIRCUIT_CONSTRAINT_VIOLATED = 5122
364
+ }
365
+ /**
366
+ * Exception class for midnight-prover errors.
367
+ * Provides structured error information with error codes.
368
+ */
369
+ export declare class MidnightProverException extends Error {
370
+ readonly code: MidnightProverError;
371
+ readonly cause?: Error | undefined;
372
+ constructor(code: MidnightProverError, message: string, cause?: Error | undefined);
373
+ /**
374
+ * Create a formatted error message including code.
375
+ */
376
+ toString(): string;
377
+ }
378
+ /**
379
+ * Union of all proof types for type guards and discriminated unions.
380
+ */
381
+ export type AnyProof = HashChainProof | PolicyProof | AttestationProof | DisclosureProof | InferenceProof;
382
+ /**
383
+ * Union of all proof input types.
384
+ */
385
+ export type AnyProofInput = HashChainInput | PolicyInput | AttestationInput | DisclosureInput | InferenceInput;
386
+ /**
387
+ * Union of all public input types.
388
+ */
389
+ export type AnyPublicInputs = HashChainPublicInputs | PolicyPublicInputs | AttestationPublicInputs | DisclosurePublicInputs | InferencePublicInputs;
390
+ /**
391
+ * Type guard for HashChainProof.
392
+ */
393
+ export declare function isHashChainProof(proof: AnyProof): proof is HashChainProof;
394
+ /**
395
+ * Type guard for PolicyProof.
396
+ */
397
+ export declare function isPolicyProof(proof: AnyProof): proof is PolicyProof;
398
+ /**
399
+ * Type guard for AttestationProof.
400
+ */
401
+ export declare function isAttestationProof(proof: AnyProof): proof is AttestationProof;
402
+ /**
403
+ * Type guard for DisclosureProof.
404
+ */
405
+ export declare function isDisclosureProof(proof: AnyProof): proof is DisclosureProof;
406
+ /**
407
+ * Type guard for InferenceProof.
408
+ */
409
+ export declare function isInferenceProof(proof: AnyProof): proof is InferenceProof;
410
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AACpG,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,sCAAsC,CAAC;AAMvG;;;GAGG;AACH,MAAM,MAAM,SAAS,GACjB,YAAY,GACZ,mBAAmB,GACnB,mBAAmB,GACnB,sBAAsB,GACtB,gBAAgB,CAAC;AAMrB;;;;;;;;;;GAUG;AACH,MAAM,WAAW,KAAK;IACpB,SAAS,EAAE,SAAS,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,UAAU,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;CACxB;AAMD;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,cAAe,SAAQ,KAAK;IAC3C,SAAS,EAAE,YAAY,CAAC;IACxB,YAAY,EAAE,qBAAqB,CAAC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ACd,WAAW,GACX,gBAAgB,GAChB,eAAe,GACf,cAAc,CAAC;AAEnB;;GAEG;AACH,MAAM,MAAM,eAAe,GACvB,qBAAqB,GACrB,kBAAkB,GAClB,uBAAuB,GACvB,sBAAsB,GACtB,qBAAqB,CAAC;AAM1B;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,QAAQ,GAAG,KAAK,IAAI,cAAc,CAEzE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,QAAQ,GAAG,KAAK,IAAI,WAAW,CAEnE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,QAAQ,GAAG,KAAK,IAAI,gBAAgB,CAE7E;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,QAAQ,GAAG,KAAK,IAAI,eAAe,CAE3E;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,QAAQ,GAAG,KAAK,IAAI,cAAc,CAEzE"}
package/dist/types.js ADDED
@@ -0,0 +1,128 @@
1
+ /**
2
+ * @fileoverview Type definitions for the poi-midnight-prover package.
3
+ *
4
+ * Location: packages/midnight-prover/src/types.ts
5
+ *
6
+ * Summary:
7
+ * This file contains all type definitions for ZK proof generation using the Midnight network.
8
+ * It defines proof types, input/output structures for various proof circuits, configuration
9
+ * options, and error handling.
10
+ *
11
+ * Usage:
12
+ * Types are imported by the prover-interface.ts and will be used by proof generation
13
+ * implementations in the proofs/ directory. These types integrate with process-trace
14
+ * (TraceEvent, TraceBundle) and attestor (AttestationBundle, VerifierPolicy) packages.
15
+ *
16
+ * Key concepts:
17
+ * - ProofType: Discriminator for different ZK proof circuits
18
+ * - HashChainProof: Proves trace hash chain validity
19
+ * - PolicyProof: Proves content compliance without revealing content
20
+ * - AttestationProof: Proves valid TEE attestation
21
+ * - DisclosureProof: Selective disclosure of spans without revealing others
22
+ * - InferenceProof: Optional zkML proof for model inference correctness
23
+ */
24
+ /**
25
+ * Default proof server configuration.
26
+ */
27
+ export const DEFAULT_PROOF_SERVER_CONFIG = {
28
+ timeout: 300_000, // 5 minutes
29
+ retries: 3,
30
+ };
31
+ // =============================================================================
32
+ // ERRORS
33
+ // =============================================================================
34
+ /**
35
+ * Error codes for midnight-prover operations.
36
+ * Uses 5xxx range as specified in architectural plan.
37
+ */
38
+ export var MidnightProverError;
39
+ (function (MidnightProverError) {
40
+ // Connection errors (5000-5019)
41
+ MidnightProverError[MidnightProverError["CONNECTION_FAILED"] = 5000] = "CONNECTION_FAILED";
42
+ MidnightProverError[MidnightProverError["CONNECTION_TIMEOUT"] = 5001] = "CONNECTION_TIMEOUT";
43
+ MidnightProverError[MidnightProverError["CONNECTION_REFUSED"] = 5002] = "CONNECTION_REFUSED";
44
+ MidnightProverError[MidnightProverError["AUTHENTICATION_FAILED"] = 5003] = "AUTHENTICATION_FAILED";
45
+ // Proof generation errors (5020-5049)
46
+ MidnightProverError[MidnightProverError["PROOF_GENERATION_FAILED"] = 5020] = "PROOF_GENERATION_FAILED";
47
+ MidnightProverError[MidnightProverError["CIRCUIT_NOT_FOUND"] = 5021] = "CIRCUIT_NOT_FOUND";
48
+ MidnightProverError[MidnightProverError["INVALID_WITNESS"] = 5022] = "INVALID_WITNESS";
49
+ MidnightProverError[MidnightProverError["WITNESS_TOO_LARGE"] = 5023] = "WITNESS_TOO_LARGE";
50
+ MidnightProverError[MidnightProverError["INSUFFICIENT_RESOURCES"] = 5024] = "INSUFFICIENT_RESOURCES";
51
+ MidnightProverError[MidnightProverError["PROVING_TIMEOUT"] = 5025] = "PROVING_TIMEOUT";
52
+ // Proof verification errors (5050-5079)
53
+ MidnightProverError[MidnightProverError["PROOF_VERIFICATION_FAILED"] = 5050] = "PROOF_VERIFICATION_FAILED";
54
+ MidnightProverError[MidnightProverError["INVALID_PROOF_FORMAT"] = 5051] = "INVALID_PROOF_FORMAT";
55
+ MidnightProverError[MidnightProverError["PUBLIC_INPUT_MISMATCH"] = 5052] = "PUBLIC_INPUT_MISMATCH";
56
+ MidnightProverError[MidnightProverError["PROOF_EXPIRED"] = 5053] = "PROOF_EXPIRED";
57
+ // Publication errors (5080-5099)
58
+ MidnightProverError[MidnightProverError["PUBLICATION_FAILED"] = 5080] = "PUBLICATION_FAILED";
59
+ MidnightProverError[MidnightProverError["INSUFFICIENT_FUNDS"] = 5081] = "INSUFFICIENT_FUNDS";
60
+ MidnightProverError[MidnightProverError["NETWORK_ERROR"] = 5082] = "NETWORK_ERROR";
61
+ MidnightProverError[MidnightProverError["TRANSACTION_REJECTED"] = 5083] = "TRANSACTION_REJECTED";
62
+ // Input validation errors (5100-5119)
63
+ MidnightProverError[MidnightProverError["INVALID_INPUT"] = 5100] = "INVALID_INPUT";
64
+ MidnightProverError[MidnightProverError["MISSING_REQUIRED_FIELD"] = 5101] = "MISSING_REQUIRED_FIELD";
65
+ MidnightProverError[MidnightProverError["HASH_MISMATCH"] = 5102] = "HASH_MISMATCH";
66
+ MidnightProverError[MidnightProverError["ANCHOR_NOT_FOUND"] = 5103] = "ANCHOR_NOT_FOUND";
67
+ MidnightProverError[MidnightProverError["SPAN_NOT_FOUND"] = 5104] = "SPAN_NOT_FOUND";
68
+ // Circuit errors (5120-5139)
69
+ MidnightProverError[MidnightProverError["CIRCUIT_COMPILE_FAILED"] = 5120] = "CIRCUIT_COMPILE_FAILED";
70
+ MidnightProverError[MidnightProverError["CIRCUIT_EXECUTION_FAILED"] = 5121] = "CIRCUIT_EXECUTION_FAILED";
71
+ MidnightProverError[MidnightProverError["CIRCUIT_CONSTRAINT_VIOLATED"] = 5122] = "CIRCUIT_CONSTRAINT_VIOLATED";
72
+ })(MidnightProverError || (MidnightProverError = {}));
73
+ /**
74
+ * Exception class for midnight-prover errors.
75
+ * Provides structured error information with error codes.
76
+ */
77
+ export class MidnightProverException extends Error {
78
+ code;
79
+ cause;
80
+ constructor(code, message, cause) {
81
+ super(message);
82
+ this.code = code;
83
+ this.cause = cause;
84
+ this.name = "MidnightProverException";
85
+ }
86
+ /**
87
+ * Create a formatted error message including code.
88
+ */
89
+ toString() {
90
+ const codeStr = MidnightProverError[this.code] ?? this.code.toString();
91
+ const causeStr = this.cause ? ` (caused by: ${this.cause.message})` : "";
92
+ return `[${codeStr}] ${this.message}${causeStr}`;
93
+ }
94
+ }
95
+ // =============================================================================
96
+ // TYPE GUARDS
97
+ // =============================================================================
98
+ /**
99
+ * Type guard for HashChainProof.
100
+ */
101
+ export function isHashChainProof(proof) {
102
+ return proof.proofType === "hash-chain";
103
+ }
104
+ /**
105
+ * Type guard for PolicyProof.
106
+ */
107
+ export function isPolicyProof(proof) {
108
+ return proof.proofType === "policy-compliance";
109
+ }
110
+ /**
111
+ * Type guard for AttestationProof.
112
+ */
113
+ export function isAttestationProof(proof) {
114
+ return proof.proofType === "attestation-valid";
115
+ }
116
+ /**
117
+ * Type guard for DisclosureProof.
118
+ */
119
+ export function isDisclosureProof(proof) {
120
+ return proof.proofType === "selective-disclosure";
121
+ }
122
+ /**
123
+ * Type guard for InferenceProof.
124
+ */
125
+ export function isInferenceProof(proof) {
126
+ return proof.proofType === "zkml-inference";
127
+ }
128
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAkVH;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAA+B;IACrE,OAAO,EAAE,OAAO,EAAE,YAAY;IAC9B,OAAO,EAAE,CAAC;CACF,CAAC;AAyCX,gFAAgF;AAChF,SAAS;AACT,gFAAgF;AAEhF;;;GAGG;AACH,MAAM,CAAN,IAAY,mBAsCX;AAtCD,WAAY,mBAAmB;IAC7B,gCAAgC;IAChC,0FAAwB,CAAA;IACxB,4FAAyB,CAAA;IACzB,4FAAyB,CAAA;IACzB,kGAA4B,CAAA;IAE5B,sCAAsC;IACtC,sGAA8B,CAAA;IAC9B,0FAAwB,CAAA;IACx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AgB,CAAC,KAAe;IAC9C,OAAO,KAAK,CAAC,SAAS,KAAK,YAAY,CAAC;AAC1C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,KAAe;IAC3C,OAAO,KAAK,CAAC,SAAS,KAAK,mBAAmB,CAAC;AACjD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAe;IAChD,OAAO,KAAK,CAAC,SAAS,KAAK,mBAAmB,CAAC;AACjD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAe;IAC/C,OAAO,KAAK,CAAC,SAAS,KAAK,sBAAsB,CAAC;AACpD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAe;IAC9C,OAAO,KAAK,CAAC,SAAS,KAAK,gBAAgB,CAAC;AAC9C,CAAC"}
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "@fluxpointstudios/orynq-sdk-midnight-prover",
3
+ "version": "0.1.0",
4
+ "description": "ZK proof generation for PoI using Midnight network",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist",
16
+ "src"
17
+ ],
18
+ "dependencies": {
19
+ "@fluxpointstudios/orynq-sdk-core": "0.1.0",
20
+ "@fluxpointstudios/orynq-sdk-process-trace": "0.1.0",
21
+ "@fluxpointstudios/orynq-sdk-anchors-cardano": "0.1.0",
22
+ "@fluxpointstudios/orynq-sdk-attestor": "0.1.0"
23
+ },
24
+ "devDependencies": {
25
+ "@types/node": "^20.0.0",
26
+ "typescript": "^5.3.3",
27
+ "vitest": "^2.1.8"
28
+ },
29
+ "peerDependencies": {
30
+ "@midnight-ntwrk/compact-runtime": "^0.14.0"
31
+ },
32
+ "peerDependenciesMeta": {
33
+ "@midnight-ntwrk/compact-runtime": {
34
+ "optional": true
35
+ }
36
+ },
37
+ "keywords": [
38
+ "poi",
39
+ "proof-of-inference",
40
+ "midnight",
41
+ "zk",
42
+ "zero-knowledge",
43
+ "privacy"
44
+ ],
45
+ "author": "Flux Point Studios",
46
+ "license": "MIT",
47
+ "repository": {
48
+ "type": "git",
49
+ "url": "https://github.com/Flux-Point-Studios/orynq-sdk.git",
50
+ "directory": "packages/midnight-prover"
51
+ },
52
+ "scripts": {
53
+ "build": "tsc",
54
+ "clean": "rimraf dist",
55
+ "test": "vitest run",
56
+ "lint": "eslint src --ext .ts",
57
+ "typecheck": "tsc --noEmit"
58
+ }
59
+ }