@bind-protocol/sdk 0.5.0 → 0.7.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 (35) hide show
  1. package/dist/{adapter-TZa35x8K.d.ts → adapter-Cl7HtxU3.d.ts} +2 -2
  2. package/dist/{adapter-D5b7G1RU.d.cts → adapter-zyYSX6_e.d.cts} +2 -2
  3. package/dist/adapters/dimo/index.d.cts +4 -3
  4. package/dist/adapters/dimo/index.d.ts +4 -3
  5. package/dist/adapters/index.cjs +151 -0
  6. package/dist/adapters/index.cjs.map +1 -1
  7. package/dist/adapters/index.d.cts +4 -4
  8. package/dist/adapters/index.d.ts +4 -4
  9. package/dist/adapters/index.js +151 -0
  10. package/dist/adapters/index.js.map +1 -1
  11. package/dist/adapters/zktls/index.cjs +151 -0
  12. package/dist/adapters/zktls/index.cjs.map +1 -1
  13. package/dist/adapters/zktls/index.d.cts +3 -3
  14. package/dist/adapters/zktls/index.d.ts +3 -3
  15. package/dist/adapters/zktls/index.js +151 -0
  16. package/dist/adapters/zktls/index.js.map +1 -1
  17. package/dist/{client-BgnXV1AH.d.ts → client-BkohyCGJ.d.cts} +58 -1
  18. package/dist/{client-BN68auuk.d.cts → client-CadOSqx6.d.ts} +58 -1
  19. package/dist/core/index.cjs +151 -0
  20. package/dist/core/index.cjs.map +1 -1
  21. package/dist/core/index.d.cts +2 -2
  22. package/dist/core/index.d.ts +2 -2
  23. package/dist/core/index.js +151 -0
  24. package/dist/core/index.js.map +1 -1
  25. package/dist/index.cjs +151 -0
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.cts +4 -4
  28. package/dist/index.d.ts +4 -4
  29. package/dist/index.js +151 -0
  30. package/dist/index.js.map +1 -1
  31. package/dist/{types-ohCQhfQK.d.ts → types-Ca_xbN13.d.ts} +1 -1
  32. package/dist/{types-CWadrDVs.d.cts → types-Cz9q5U3r.d.cts} +156 -1
  33. package/dist/{types-CWadrDVs.d.ts → types-Cz9q5U3r.d.ts} +156 -1
  34. package/dist/{types-CsmX8NG4.d.cts → types-DAN8BlbI.d.cts} +1 -1
  35. package/package.json +1 -1
@@ -1,7 +1,10 @@
1
+ import { PublicPolicySpec as PublicPolicySpec$1 } from '@bind-protocol/policy-spec';
2
+
1
3
  /**
2
4
  * Core types for the Bind Protocol SDK
3
5
  */
4
6
 
7
+ type PublicPolicySpec = PublicPolicySpec$1;
5
8
  /**
6
9
  * Configuration options for BindClient
7
10
  */
@@ -226,5 +229,157 @@ interface GetSessionResponse {
226
229
  data?: ZkTlsSession;
227
230
  error?: string;
228
231
  }
232
+ interface SharedProof {
233
+ id: string;
234
+ proveJobId: string;
235
+ sharingOrgId: string;
236
+ verifierOrgId: string;
237
+ expiresAt: string | null;
238
+ revokedAt: string | null;
239
+ note: string | null;
240
+ createdAt: string;
241
+ proveJob: {
242
+ id: string;
243
+ status: string;
244
+ circuitId: string;
245
+ circuitName: string;
246
+ policyId: string | null;
247
+ policyVersion: string | null;
248
+ completedAt: string | null;
249
+ };
250
+ /**
251
+ * Public policy spec (when available).
252
+ * Contains only PUBLIC fields - private fields (inputs, rules, evaluation, proving)
253
+ * are never included for security.
254
+ */
255
+ policySpec?: PublicPolicySpec;
256
+ }
257
+ interface ShareProofRequest {
258
+ proveJobId: string;
259
+ verifierOrgId: string;
260
+ expiresAt?: string;
261
+ note?: string;
262
+ }
263
+ interface ShareProofResponse {
264
+ success: boolean;
265
+ data?: SharedProof;
266
+ error?: string;
267
+ }
268
+ interface ListSharedProofsOptions {
269
+ direction?: 'outgoing' | 'incoming';
270
+ limit?: number;
271
+ offset?: number;
272
+ includeExpired?: boolean;
273
+ includeRevoked?: boolean;
274
+ }
275
+ interface ListSharedProofsResponse {
276
+ success: boolean;
277
+ data?: {
278
+ shares: SharedProof[];
279
+ pagination: {
280
+ limit: number;
281
+ offset: number;
282
+ count: number;
283
+ total: number;
284
+ };
285
+ };
286
+ error?: string;
287
+ }
288
+ interface GetSharedProofResponse {
289
+ success: boolean;
290
+ data?: SharedProof;
291
+ error?: string;
292
+ }
293
+ interface RevokeSharedProofResponse {
294
+ success: boolean;
295
+ data?: {
296
+ id: string;
297
+ proveJobId: string;
298
+ verifierOrgId: string;
299
+ revokedAt: string;
300
+ message: string;
301
+ };
302
+ error?: string;
303
+ }
304
+ type VerifyJobStatus = 'pending' | 'processing' | 'completed' | 'failed';
305
+ /**
306
+ * Response from queuing a verification job (before polling)
307
+ */
308
+ interface VerifyJobQueuedResponse {
309
+ success: boolean;
310
+ data?: {
311
+ jobId: string;
312
+ status: VerifyJobStatus;
313
+ creditsCharged: number;
314
+ message?: string;
315
+ };
316
+ error?: string;
317
+ }
318
+ /**
319
+ * Response from polling a verification job status
320
+ */
321
+ interface VerifyJobStatusResponse {
322
+ success: boolean;
323
+ data?: {
324
+ status: VerifyJobStatus;
325
+ isValid?: boolean;
326
+ error?: string;
327
+ verificationTimeMs?: number;
328
+ creditsCharged: number;
329
+ verificationResultId?: string;
330
+ publicInputs?: string[];
331
+ publicInputsMatch?: boolean;
332
+ };
333
+ error?: string;
334
+ }
335
+ interface VerificationResult {
336
+ isValid: boolean;
337
+ error?: string;
338
+ verificationTimeMs: number;
339
+ creditsCharged: number;
340
+ verificationResultId: string;
341
+ }
342
+ interface VerifySharedProofResponse {
343
+ success: boolean;
344
+ data?: VerificationResult;
345
+ error?: string;
346
+ }
347
+ interface VerifyUploadedProofRequest {
348
+ proof: string;
349
+ vk: string;
350
+ }
351
+ interface VerifyUploadedProofResponse {
352
+ success: boolean;
353
+ data?: VerificationResult;
354
+ error?: string;
355
+ }
356
+ interface VerificationHistoryEntry {
357
+ id: string;
358
+ sharedProofId: string | null;
359
+ directUpload: boolean;
360
+ proofHash: string | null;
361
+ isValid: boolean;
362
+ error: string | null;
363
+ verificationTimeMs: number | null;
364
+ creditsCharged: number;
365
+ createdAt: string;
366
+ }
367
+ interface GetVerificationHistoryOptions {
368
+ limit?: number;
369
+ offset?: number;
370
+ }
371
+ interface GetVerificationHistoryResponse {
372
+ success: boolean;
373
+ data?: {
374
+ results: VerificationHistoryEntry[];
375
+ pagination: {
376
+ limit: number;
377
+ offset: number;
378
+ count: number;
379
+ total: number;
380
+ };
381
+ };
382
+ error?: string;
383
+ }
229
384
 
230
- export type { ActivateCircuitResponse as A, BindClientOptions as B, CircuitStatus as C, GetProveJobResponse as G, ListProveJobsOptions as L, ProveJobStatus as P, SubmitProveJobRequest as S, VerificationMode as V, ZkTlsSessionStatus as Z, ProveJobInputs as a, ProveJobOutputs as b, ProofDownloadUrls as c, ProveJob as d, ProveJobSummary as e, SubmitProveJobResponse as f, ListProveJobsResponse as g, CircuitValidationStatus as h, Circuit as i, ListCircuitsResponse as j, GetCircuitResponse as k, BindCredential as l, ZkTlsExtractor as m, ZkTlsWitness as n, ZkTlsAttestation as o, ZkTlsSession as p, ListExtractorsResponse as q, ListAttestationsResponse as r, GetAttestationResponse as s, CreateSessionResponse as t, GetSessionResponse as u };
385
+ export type { ActivateCircuitResponse as A, BindClientOptions as B, CircuitStatus as C, GetSharedProofResponse as D, VerifyJobStatus as E, VerifyJobQueuedResponse as F, GetProveJobResponse as G, VerifyJobStatusResponse as H, VerificationResult as I, VerifySharedProofResponse as J, VerifyUploadedProofRequest as K, ListProveJobsOptions as L, VerifyUploadedProofResponse as M, VerificationHistoryEntry as N, GetVerificationHistoryOptions as O, ProveJobStatus as P, GetVerificationHistoryResponse as Q, RevokeSharedProofResponse as R, SubmitProveJobRequest as S, VerificationMode as V, ZkTlsSessionStatus as Z, ProveJobInputs as a, ProveJobOutputs as b, ProofDownloadUrls as c, ProveJob as d, ProveJobSummary as e, SubmitProveJobResponse as f, ListProveJobsResponse as g, CircuitValidationStatus as h, Circuit as i, ListCircuitsResponse as j, GetCircuitResponse as k, BindCredential as l, ZkTlsExtractor as m, ZkTlsWitness as n, ZkTlsAttestation as o, ZkTlsSession as p, ListExtractorsResponse as q, ListAttestationsResponse as r, GetAttestationResponse as s, CreateSessionResponse as t, GetSessionResponse as u, SharedProof as v, ShareProofRequest as w, ShareProofResponse as x, ListSharedProofsOptions as y, ListSharedProofsResponse as z };
@@ -1,4 +1,4 @@
1
- import { a as ProveJobInputs } from './types-CWadrDVs.cjs';
1
+ import { a as ProveJobInputs } from './types-Cz9q5U3r.cjs';
2
2
 
3
3
  /**
4
4
  * Base types for data source adapters
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bind-protocol/sdk",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "TypeScript SDK for the Bind Protocol - privacy-preserving credential issuance and verification",
5
5
  "license": "MIT",
6
6
  "keywords": [