@zkproofport-ai/sdk 0.2.9 → 0.2.11

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 (70) hide show
  1. package/README.md +232 -18
  2. package/dist/arcWallet.d.ts +50 -0
  3. package/dist/arcWallet.d.ts.map +1 -0
  4. package/dist/arcWallet.js +158 -0
  5. package/dist/arcWallet.js.map +1 -0
  6. package/dist/attestation.d.ts +5 -1
  7. package/dist/attestation.d.ts.map +1 -1
  8. package/dist/attestation.js +21 -2
  9. package/dist/attestation.js.map +1 -1
  10. package/dist/cdp.d.ts +162 -0
  11. package/dist/cdp.d.ts.map +1 -0
  12. package/dist/cdp.js +78 -0
  13. package/dist/cdp.js.map +1 -0
  14. package/dist/circuits.d.ts +121 -0
  15. package/dist/circuits.d.ts.map +1 -0
  16. package/dist/circuits.js +129 -0
  17. package/dist/circuits.js.map +1 -0
  18. package/dist/constants.d.ts +8 -2
  19. package/dist/constants.d.ts.map +1 -1
  20. package/dist/constants.js +19 -4
  21. package/dist/constants.js.map +1 -1
  22. package/dist/delegation.d.ts +102 -0
  23. package/dist/delegation.d.ts.map +1 -0
  24. package/dist/delegation.js +121 -0
  25. package/dist/delegation.js.map +1 -0
  26. package/dist/extract.d.ts +46 -12
  27. package/dist/extract.d.ts.map +1 -1
  28. package/dist/extract.js +92 -30
  29. package/dist/extract.js.map +1 -1
  30. package/dist/flow.d.ts +13 -0
  31. package/dist/flow.d.ts.map +1 -1
  32. package/dist/flow.js +90 -3
  33. package/dist/flow.js.map +1 -1
  34. package/dist/index.d.ts +12 -1
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +21 -0
  37. package/dist/index.js.map +1 -1
  38. package/dist/inputs.d.ts +12 -0
  39. package/dist/inputs.d.ts.map +1 -1
  40. package/dist/inputs.js +13 -2
  41. package/dist/inputs.js.map +1 -1
  42. package/dist/nanopayment.d.ts +71 -0
  43. package/dist/nanopayment.d.ts.map +1 -0
  44. package/dist/nanopayment.js +77 -0
  45. package/dist/nanopayment.js.map +1 -0
  46. package/dist/payment.d.ts +73 -0
  47. package/dist/payment.d.ts.map +1 -0
  48. package/dist/payment.js +167 -0
  49. package/dist/payment.js.map +1 -0
  50. package/dist/prove.d.ts +7 -0
  51. package/dist/prove.d.ts.map +1 -1
  52. package/dist/prove.js +2 -0
  53. package/dist/prove.js.map +1 -1
  54. package/dist/typedAction.d.ts +3 -0
  55. package/dist/typedAction.d.ts.map +1 -0
  56. package/dist/typedAction.js +50 -0
  57. package/dist/typedAction.js.map +1 -0
  58. package/dist/types.d.ts +150 -3
  59. package/dist/types.d.ts.map +1 -1
  60. package/dist/types.js +9 -6
  61. package/dist/types.js.map +1 -1
  62. package/dist/usdc.d.ts +63 -0
  63. package/dist/usdc.d.ts.map +1 -0
  64. package/dist/usdc.js +78 -0
  65. package/dist/usdc.js.map +1 -0
  66. package/dist/wallets.d.ts +96 -0
  67. package/dist/wallets.d.ts.map +1 -0
  68. package/dist/wallets.js +214 -0
  69. package/dist/wallets.js.map +1 -0
  70. package/package.json +40 -3
package/dist/cdp.d.ts ADDED
@@ -0,0 +1,162 @@
1
+ /**
2
+ * Pay from a wallet this SDK does not own: CDP, viem, a browser provider.
3
+ *
4
+ * ## Deleted 2026-04-03, restored 2026-09-09
5
+ *
6
+ * This file and `payment.ts` were removed together in `ee1c09d`, whose reason
7
+ * was written into the commit before it: "Remove CDP wallet support (no longer
8
+ * needed with payment disabled)". Payment had been switched off two hours
9
+ * earlier as a configuration change; 491 lines were then deleted because a
10
+ * setting was off. Turning the setting back on left nothing to turn on with.
11
+ *
12
+ * The same night produced `isTestnet = ... || chainRpcUrl.includes('sepolia')`,
13
+ * for the same reason -- with payment disabled the chain was no longer known,
14
+ * so it was guessed. That guess resolved every unrecognised configuration to
15
+ * Base mainnet and is why there was no place to put Arc.
16
+ *
17
+ * Restored as it was. The interface is deliberately structural rather than a
18
+ * CDP dependency: anything with these methods works, which is how an Arc agent
19
+ * wallet or a viem account plugs in without this SDK importing either.
20
+ */
21
+ import type { ProofportSigner } from './signer.js';
22
+ /**
23
+ * Adapter interface for CDP wallet-like objects (or any external wallet).
24
+ *
25
+ * Pass any object that satisfies these method signatures — CDP MPC wallets,
26
+ * viem wallets, Privy embedded wallets, etc. — and wrap it with
27
+ * `CdpWalletSigner` or `fromExternalWallet()` to get a `ProofportSigner`.
28
+ *
29
+ * @example
30
+ * ```typescript
31
+ * // With @coinbase/cdp-sdk
32
+ * import { CdpClient } from '@coinbase/cdp-sdk';
33
+ * import { CdpWalletSigner } from '@zkproofport-ai/sdk';
34
+ *
35
+ * const cdp = new CdpClient();
36
+ * const wallet = await cdp.evm.getOrCreateWallet({ networkId: 'base' });
37
+ * const account = await wallet.getDefaultAddress();
38
+ *
39
+ * const signer = new CdpWalletSigner({
40
+ * getAddress: () => account.getId(),
41
+ * signMessage: (msg) => account.signPayload({ payload: Buffer.from(msg).toString('hex') }).then(r => r.signature),
42
+ * signTypedData: (domain, types, message) => account.signTypedData({ domain, types, message }),
43
+ * sendTransaction: async (tx) => {
44
+ * const result = await account.sendTransaction(tx);
45
+ * return { hash: result.transactionHash, wait: async () => ({ status: 1 }) };
46
+ * },
47
+ * });
48
+ * ```
49
+ */
50
+ export interface ExternalWallet {
51
+ /**
52
+ * Returns the wallet's Ethereum address.
53
+ * May be synchronous or asynchronous depending on the provider.
54
+ */
55
+ getAddress(): string | Promise<string>;
56
+ /**
57
+ * Signs a raw message (personal_sign style).
58
+ * Accepts either a Uint8Array of raw bytes or a pre-encoded string.
59
+ */
60
+ signMessage(message: Uint8Array | string): Promise<string>;
61
+ /**
62
+ * Signs EIP-712 typed data.
63
+ * Compatible with ethers v6 `signTypedData` and viem `signTypedData` call shapes.
64
+ */
65
+ signTypedData(domain: Record<string, unknown>, types: Record<string, Array<{
66
+ name: string;
67
+ type: string;
68
+ }>>, message: Record<string, unknown>): Promise<string>;
69
+ /**
70
+ * Sends a transaction and returns the hash plus a `wait()` helper.
71
+ * Optional — omit if the wallet is used only for signing (e.g., attestation signer).
72
+ * If omitted and `sendTransaction` is called on the signer, an error is thrown at runtime.
73
+ */
74
+ sendTransaction?(tx: {
75
+ to: string;
76
+ data: string;
77
+ value?: bigint;
78
+ }): Promise<{
79
+ hash: string;
80
+ wait(): Promise<{
81
+ status: number | null;
82
+ }>;
83
+ }>;
84
+ }
85
+ /**
86
+ * Adapter that bridges any `ExternalWallet`-compatible object to the
87
+ * `ProofportSigner` interface. No additional npm dependencies required —
88
+ * the caller brings their own wallet implementation.
89
+ *
90
+ * @example
91
+ * ```typescript
92
+ * import { CdpWalletSigner } from '@zkproofport-ai/sdk';
93
+ *
94
+ * // Wrap any CDP / external wallet
95
+ * const signer = new CdpWalletSigner(myExternalWallet);
96
+ *
97
+ * // Use as attestation signer
98
+ * const client = new ProofportClient({ ... }, { attestation: signer });
99
+ * ```
100
+ */
101
+ export declare class CdpWalletSigner implements ProofportSigner {
102
+ private readonly wallet;
103
+ constructor(wallet: ExternalWallet);
104
+ /** Returns the wallet address, resolving async providers transparently. */
105
+ getAddress(): string | Promise<string>;
106
+ /**
107
+ * Signs a raw byte message.
108
+ * Passes the Uint8Array directly to the underlying wallet; the wallet is
109
+ * responsible for any encoding (e.g., personal_sign prefix).
110
+ */
111
+ signMessage(message: Uint8Array): Promise<string>;
112
+ /**
113
+ * Signs EIP-712 typed data.
114
+ * The strict `ProofportSigner` domain shape is widened to
115
+ * `Record<string, unknown>` when forwarded so any external wallet
116
+ * implementation can accept it without type conflicts.
117
+ */
118
+ signTypedData(domain: {
119
+ name: string;
120
+ version: string;
121
+ chainId: number;
122
+ verifyingContract: string;
123
+ }, types: Record<string, Array<{
124
+ name: string;
125
+ type: string;
126
+ }>>, message: Record<string, unknown>): Promise<string>;
127
+ /**
128
+ * Sends a transaction via the underlying wallet.
129
+ * Throws a descriptive error if the wrapped wallet did not provide
130
+ * a `sendTransaction` method (e.g., signing-only attestation wallets).
131
+ */
132
+ sendTransaction(tx: {
133
+ to: string;
134
+ data: string;
135
+ value?: bigint;
136
+ }): Promise<{
137
+ hash: string;
138
+ wait(): Promise<{
139
+ status: number | null;
140
+ }>;
141
+ }>;
142
+ }
143
+ /**
144
+ * Convenience factory — equivalent to `new CdpWalletSigner(wallet)`.
145
+ *
146
+ * Useful for returning a `ProofportSigner` without exposing the concrete
147
+ * `CdpWalletSigner` class to callers.
148
+ *
149
+ * @example
150
+ * ```typescript
151
+ * import { fromExternalWallet } from '@zkproofport-ai/sdk';
152
+ *
153
+ * const signer = fromExternalWallet({
154
+ * getAddress: () => '0xYourAddress',
155
+ * signMessage: (msg) => myWallet.sign(msg),
156
+ * signTypedData: (domain, types, message) =>
157
+ * myWallet.signTypedData({ domain, types, message }),
158
+ * });
159
+ * ```
160
+ */
161
+ export declare function fromExternalWallet(wallet: ExternalWallet): ProofportSigner;
162
+ //# sourceMappingURL=cdp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cdp.d.ts","sourceRoot":"","sources":["../src/cdp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,UAAU,IAAI,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEvC;;;OAGG;IACH,WAAW,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAE3D;;;OAGG;IACH,aAAa,CACX,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,EAC5D,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,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IAAI,OAAO,CAAC;YAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAC,CAAA;KAAE,CAAC;CAU1E;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,cAAc,GAAG,eAAe,CAE1E"}
package/dist/cdp.js ADDED
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Adapter that bridges any `ExternalWallet`-compatible object to the
3
+ * `ProofportSigner` interface. No additional npm dependencies required —
4
+ * the caller brings their own wallet implementation.
5
+ *
6
+ * @example
7
+ * ```typescript
8
+ * import { CdpWalletSigner } from '@zkproofport-ai/sdk';
9
+ *
10
+ * // Wrap any CDP / external wallet
11
+ * const signer = new CdpWalletSigner(myExternalWallet);
12
+ *
13
+ * // Use as attestation signer
14
+ * const client = new ProofportClient({ ... }, { attestation: signer });
15
+ * ```
16
+ */
17
+ export class CdpWalletSigner {
18
+ wallet;
19
+ constructor(wallet) {
20
+ this.wallet = wallet;
21
+ }
22
+ /** Returns the wallet address, resolving async providers transparently. */
23
+ getAddress() {
24
+ return this.wallet.getAddress();
25
+ }
26
+ /**
27
+ * Signs a raw byte message.
28
+ * Passes the Uint8Array directly to the underlying wallet; the wallet is
29
+ * responsible for any encoding (e.g., personal_sign prefix).
30
+ */
31
+ async signMessage(message) {
32
+ return this.wallet.signMessage(message);
33
+ }
34
+ /**
35
+ * Signs EIP-712 typed data.
36
+ * The strict `ProofportSigner` domain shape is widened to
37
+ * `Record<string, unknown>` when forwarded so any external wallet
38
+ * implementation can accept it without type conflicts.
39
+ */
40
+ async signTypedData(domain, types, message) {
41
+ return this.wallet.signTypedData(domain, types, message);
42
+ }
43
+ /**
44
+ * Sends a transaction via the underlying wallet.
45
+ * Throws a descriptive error if the wrapped wallet did not provide
46
+ * a `sendTransaction` method (e.g., signing-only attestation wallets).
47
+ */
48
+ async sendTransaction(tx) {
49
+ if (typeof this.wallet.sendTransaction !== 'function') {
50
+ throw new Error('CdpWalletSigner: the wrapped wallet does not implement sendTransaction. ' +
51
+ 'Provide a sendTransaction method on the ExternalWallet object, or use a ' +
52
+ 'different signer for payment transactions.');
53
+ }
54
+ return this.wallet.sendTransaction(tx);
55
+ }
56
+ }
57
+ /**
58
+ * Convenience factory — equivalent to `new CdpWalletSigner(wallet)`.
59
+ *
60
+ * Useful for returning a `ProofportSigner` without exposing the concrete
61
+ * `CdpWalletSigner` class to callers.
62
+ *
63
+ * @example
64
+ * ```typescript
65
+ * import { fromExternalWallet } from '@zkproofport-ai/sdk';
66
+ *
67
+ * const signer = fromExternalWallet({
68
+ * getAddress: () => '0xYourAddress',
69
+ * signMessage: (msg) => myWallet.sign(msg),
70
+ * signTypedData: (domain, types, message) =>
71
+ * myWallet.signTypedData({ domain, types, message }),
72
+ * });
73
+ * ```
74
+ */
75
+ export function fromExternalWallet(wallet) {
76
+ return new CdpWalletSigner(wallet);
77
+ }
78
+ //# sourceMappingURL=cdp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cdp.js","sourceRoot":"","sources":["../src/cdp.ts"],"names":[],"mappings":"AAqFA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,OAAO,eAAe;IACT,MAAM,CAAiB;IAExC,YAAY,MAAsB;QAChC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,2EAA2E;IAC3E,UAAU;QACR,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;IAClC,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,WAAW,CAAC,OAAmB;QACnC,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,aAAa,CACjB,MAKC,EACD,KAA4D,EAC5D,OAAgC;QAEhC,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,MAAiC,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IACtF,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,eAAe,CAAC,EAIrB;QACC,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,KAAK,UAAU,EAAE,CAAC;YACtD,MAAM,IAAI,KAAK,CACb,0EAA0E;gBACxE,0EAA0E;gBAC1E,4CAA4C,CAC/C,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC;IACzC,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAAsB;IACvD,OAAO,IAAI,eAAe,CAAC,MAAM,CAAC,CAAC;AACrC,CAAC"}
@@ -0,0 +1,121 @@
1
+ /**
2
+ * Canonical ZKProofport circuit identifiers, for `@zkproofport-ai/sdk`.
3
+ *
4
+ * ## The customer SDK owns this list
5
+ *
6
+ * `@zkproofport-app/sdk/circuits` (repo `zkproofport/proofport-app-sdk`,
7
+ * `src/circuits.ts`) is the single source of truth for circuit identifiers
8
+ * across every layer: the mobile app, the relay, the demo, and proofport-ai.
9
+ * The names below are that module's values, verbatim — the same eight ids in
10
+ * the same order with the same support statuses.
11
+ *
12
+ * This file is a **mirror, not a second source of truth**. Nothing here may be
13
+ * edited on its own judgement: change the SDK first, then bring the change over.
14
+ *
15
+ * ## Why this package keeps a copy
16
+ *
17
+ * There are two reasons, and only the first is temporary:
18
+ *
19
+ 1. ~~The published customer SDK does not ship the module.~~ **No longer true**
20
+ * as of 0.2.16, whose `exports` map carries `./circuits` and whose tarball
21
+ * has `dist/circuits.{js,esm.js,mjs,d.ts}` — verified with `npm pack`
22
+ * 2026-09-11. Reason 2 is now the only one holding this mirror up.
23
+ * 2. This package is published to npm, and `@zkproofport-app/sdk` carries
24
+ * `qrcode` and `socket.io-client` (38 transitive packages, measured). The
25
+ * `./circuits` subpath is dependency-free at *import* time, but npm still
26
+ * installs the whole dependency tree. Paying that on every
27
+ * `npx zkproofport-mcp` for seven strings is a poor trade, so even after the
28
+ * SDK publishes the subpath this mirror may be worth keeping.
29
+ *
30
+ * The root server tree keeps its own mirror at `src/config/circuitIds.ts` — the
31
+ * two trees are compiled and shipped separately (`rootDir: src` in each,
32
+ * different npm packages / Docker images), so neither can import the other.
33
+ *
34
+ * ## What stops the mirrors drifting
35
+ *
36
+ * `tests/circuitIds.test.ts` at the repo root reads the real customer SDK — the
37
+ * installed package if present, otherwise the sibling checkout at
38
+ * `../proofport-app-sdk` — and fails when either mirror disagrees with it, or
39
+ * with the other. It fails, rather than skips, when it can find neither.
40
+ *
41
+ * ## Identifiers are canonical and case-sensitive
42
+ *
43
+ * Each id is the circuit's `name` in its `Nargo.toml`, verbatim: lowercase with
44
+ * underscores. Hyphenated spellings (`coinbase-kyc`) are directory or UI route
45
+ * names elsewhere and are not circuit ids; passing one produces a nullifier
46
+ * mismatch or a failed on-chain lookup rather than a clear error.
47
+ */
48
+ /**
49
+ * Whether a circuit is officially supported today or still on the roadmap.
50
+ *
51
+ * - `supported` — generally available.
52
+ * - `planned` — the identifier is reserved, but availability, inputs and
53
+ * public-input layout may still change.
54
+ */
55
+ export type CircuitSupportStatus = 'supported' | 'experimental' | 'planned';
56
+ /**
57
+ * Every canonical circuit identifier ZKProofport has assigned, keyed by a stable
58
+ * constant name. Mirrors `CIRCUIT_IDS` in `@zkproofport-app/sdk/circuits`.
59
+ *
60
+ * This is the full ZKProofport catalogue, which is wider than what the
61
+ * proofport-ai server can prove — see {@link PROVABLE_CIRCUIT_IDS} for that.
62
+ */
63
+ export declare const CIRCUIT_IDS: Readonly<{
64
+ /** Coinbase KYC attestation. Officially supported. */
65
+ readonly COINBASE_ATTESTATION: "coinbase_attestation";
66
+ /** Coinbase country attestation (inclusion / exclusion). Officially supported. */
67
+ readonly COINBASE_COUNTRY_ATTESTATION: "coinbase_country_attestation";
68
+ /** OIDC email-domain attestation. Officially supported. */
69
+ readonly OIDC_DOMAIN_ATTESTATION: "oidc_domain_attestation";
70
+ /** Arc eligibility: one EIP-712 action, authorized. Officially supported. */
71
+ readonly ARC_ELIGIBILITY: "arc_eligibility";
72
+ /** GIWA attestation. Planned — not officially supported yet. */
73
+ readonly GIWA_ATTESTATION: "giwa_attestation";
74
+ /** Korea Mobile ID ownership. Planned — not officially supported yet. */
75
+ readonly MDL_KR_OWNERSHIP: "mdl_kr_ownership";
76
+ /** Korea Mobile ID age threshold. Planned — not officially supported yet. */
77
+ readonly MDL_KR_AGE: "mdl_kr_age";
78
+ /** Korea Mobile ID si/do region. Planned — not officially supported yet. */
79
+ readonly MDL_KR_REGION: "mdl_kr_region";
80
+ }>;
81
+ /**
82
+ * Union of every canonical circuit identifier.
83
+ *
84
+ * The customer SDK calls this type `CircuitId`. It is named
85
+ * `CanonicalCircuitId` here because {@link CircuitId} is already this package's
86
+ * public name for the narrower set proofport-ai can prove; widening it would be
87
+ * a silent breaking change for anyone writing `Record<CircuitId, …>`, and would
88
+ * let `circuit: 'mdl_kr_age'` typecheck against an endpoint that cannot serve it.
89
+ */
90
+ export type CanonicalCircuitId = (typeof CIRCUIT_IDS)[keyof typeof CIRCUIT_IDS];
91
+ /**
92
+ * Support status for every canonical circuit. Exhaustive over
93
+ * {@link CanonicalCircuitId}, so an identifier without a status is a compile
94
+ * error.
95
+ */
96
+ export declare const CIRCUIT_SUPPORT_STATUS: Readonly<Record<CanonicalCircuitId, CircuitSupportStatus>>;
97
+ /** Every canonical circuit identifier, in declaration order. */
98
+ export declare const ALL_CIRCUIT_IDS: readonly CanonicalCircuitId[];
99
+ /** Circuits ZKProofport officially supports today. Derived, so it cannot desync. */
100
+ export declare const SUPPORTED_CIRCUIT_IDS: readonly CanonicalCircuitId[];
101
+ /** Circuits whose identifiers are reserved but not officially supported yet. */
102
+ export declare const PLANNED_CIRCUIT_IDS: readonly CanonicalCircuitId[];
103
+ /**
104
+ * Narrows an unknown value to a canonical circuit identifier. Returns `false`
105
+ * for hyphenated route names such as `'coinbase-kyc'`.
106
+ */
107
+ export declare function isCanonicalCircuitId(value: unknown): value is CanonicalCircuitId;
108
+ /** Returns the support status of a canonical circuit. */
109
+ export declare function getCircuitSupportStatus(circuit: CanonicalCircuitId): CircuitSupportStatus;
110
+ /**
111
+ * The circuits the proofport-ai server can prove: the ones it has compiled
112
+ * artifacts, an input builder and a deployed verifier for.
113
+ *
114
+ * A strict subset of {@link ALL_CIRCUIT_IDS} — `satisfies` makes an id that is
115
+ * no longer canonical a compile error here, and the entries are the canonical
116
+ * constants rather than repeated string literals.
117
+ */
118
+ export declare const PROVABLE_CIRCUIT_IDS: readonly ["coinbase_attestation", "coinbase_country_attestation", "oidc_domain_attestation", "arc_eligibility"];
119
+ /** Narrows an unknown value to a circuit the proofport-ai server can prove. */
120
+ export declare function isProvableCircuitId(value: unknown): value is CanonicalCircuitId;
121
+ //# sourceMappingURL=circuits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"circuits.d.ts","sourceRoot":"","sources":["../src/circuits.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG,cAAc,GAAG,SAAS,CAAC;AAE5E;;;;;;GAMG;AACH,eAAO,MAAM,WAAW;IACtB,sDAAsD;;IAEtD,kFAAkF;;IAElF,2DAA2D;;IAE3D,6EAA6E;;IAE7E,gEAAgE;;IAEhE,yEAAyE;;IAEzE,6EAA6E;;IAE7E,4EAA4E;;EAEnE,CAAC;AAEZ;;;;;;;;GAQG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAEhF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAAC,MAAM,CAAC,kBAAkB,EAAE,oBAAoB,CAAC,CAUjF,CAAC;AAEd,gEAAgE;AAChE,eAAO,MAAM,eAAe,EAAE,SAAS,kBAAkB,EAExD,CAAC;AAEF,oFAAoF;AACpF,eAAO,MAAM,qBAAqB,EAAE,SAAS,kBAAkB,EAE9D,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,mBAAmB,EAAE,SAAS,kBAAkB,EAE5D,CAAC;AAEF;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,kBAAkB,CAEhF;AAED,yDAAyD;AACzD,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,kBAAkB,GAAG,oBAAoB,CAOzF;AAMD;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,iHAKiB,CAAC;AAEnD,+EAA+E;AAC/E,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,kBAAkB,CAE/E"}
@@ -0,0 +1,129 @@
1
+ /**
2
+ * Canonical ZKProofport circuit identifiers, for `@zkproofport-ai/sdk`.
3
+ *
4
+ * ## The customer SDK owns this list
5
+ *
6
+ * `@zkproofport-app/sdk/circuits` (repo `zkproofport/proofport-app-sdk`,
7
+ * `src/circuits.ts`) is the single source of truth for circuit identifiers
8
+ * across every layer: the mobile app, the relay, the demo, and proofport-ai.
9
+ * The names below are that module's values, verbatim — the same eight ids in
10
+ * the same order with the same support statuses.
11
+ *
12
+ * This file is a **mirror, not a second source of truth**. Nothing here may be
13
+ * edited on its own judgement: change the SDK first, then bring the change over.
14
+ *
15
+ * ## Why this package keeps a copy
16
+ *
17
+ * There are two reasons, and only the first is temporary:
18
+ *
19
+ 1. ~~The published customer SDK does not ship the module.~~ **No longer true**
20
+ * as of 0.2.16, whose `exports` map carries `./circuits` and whose tarball
21
+ * has `dist/circuits.{js,esm.js,mjs,d.ts}` — verified with `npm pack`
22
+ * 2026-09-11. Reason 2 is now the only one holding this mirror up.
23
+ * 2. This package is published to npm, and `@zkproofport-app/sdk` carries
24
+ * `qrcode` and `socket.io-client` (38 transitive packages, measured). The
25
+ * `./circuits` subpath is dependency-free at *import* time, but npm still
26
+ * installs the whole dependency tree. Paying that on every
27
+ * `npx zkproofport-mcp` for seven strings is a poor trade, so even after the
28
+ * SDK publishes the subpath this mirror may be worth keeping.
29
+ *
30
+ * The root server tree keeps its own mirror at `src/config/circuitIds.ts` — the
31
+ * two trees are compiled and shipped separately (`rootDir: src` in each,
32
+ * different npm packages / Docker images), so neither can import the other.
33
+ *
34
+ * ## What stops the mirrors drifting
35
+ *
36
+ * `tests/circuitIds.test.ts` at the repo root reads the real customer SDK — the
37
+ * installed package if present, otherwise the sibling checkout at
38
+ * `../proofport-app-sdk` — and fails when either mirror disagrees with it, or
39
+ * with the other. It fails, rather than skips, when it can find neither.
40
+ *
41
+ * ## Identifiers are canonical and case-sensitive
42
+ *
43
+ * Each id is the circuit's `name` in its `Nargo.toml`, verbatim: lowercase with
44
+ * underscores. Hyphenated spellings (`coinbase-kyc`) are directory or UI route
45
+ * names elsewhere and are not circuit ids; passing one produces a nullifier
46
+ * mismatch or a failed on-chain lookup rather than a clear error.
47
+ */
48
+ /**
49
+ * Every canonical circuit identifier ZKProofport has assigned, keyed by a stable
50
+ * constant name. Mirrors `CIRCUIT_IDS` in `@zkproofport-app/sdk/circuits`.
51
+ *
52
+ * This is the full ZKProofport catalogue, which is wider than what the
53
+ * proofport-ai server can prove — see {@link PROVABLE_CIRCUIT_IDS} for that.
54
+ */
55
+ export const CIRCUIT_IDS = Object.freeze({
56
+ /** Coinbase KYC attestation. Officially supported. */
57
+ COINBASE_ATTESTATION: 'coinbase_attestation',
58
+ /** Coinbase country attestation (inclusion / exclusion). Officially supported. */
59
+ COINBASE_COUNTRY_ATTESTATION: 'coinbase_country_attestation',
60
+ /** OIDC email-domain attestation. Officially supported. */
61
+ OIDC_DOMAIN_ATTESTATION: 'oidc_domain_attestation',
62
+ /** Arc eligibility: one EIP-712 action, authorized. Officially supported. */
63
+ ARC_ELIGIBILITY: 'arc_eligibility',
64
+ /** GIWA attestation. Planned — not officially supported yet. */
65
+ GIWA_ATTESTATION: 'giwa_attestation',
66
+ /** Korea Mobile ID ownership. Planned — not officially supported yet. */
67
+ MDL_KR_OWNERSHIP: 'mdl_kr_ownership',
68
+ /** Korea Mobile ID age threshold. Planned — not officially supported yet. */
69
+ MDL_KR_AGE: 'mdl_kr_age',
70
+ /** Korea Mobile ID si/do region. Planned — not officially supported yet. */
71
+ MDL_KR_REGION: 'mdl_kr_region',
72
+ });
73
+ /**
74
+ * Support status for every canonical circuit. Exhaustive over
75
+ * {@link CanonicalCircuitId}, so an identifier without a status is a compile
76
+ * error.
77
+ */
78
+ export const CIRCUIT_SUPPORT_STATUS = Object.freeze({
79
+ coinbase_attestation: 'supported',
80
+ coinbase_country_attestation: 'supported',
81
+ oidc_domain_attestation: 'supported',
82
+ arc_eligibility: 'experimental',
83
+ giwa_attestation: 'planned',
84
+ mdl_kr_ownership: 'planned',
85
+ mdl_kr_age: 'planned',
86
+ mdl_kr_region: 'planned',
87
+ });
88
+ /** Every canonical circuit identifier, in declaration order. */
89
+ export const ALL_CIRCUIT_IDS = Object.freeze(Object.values(CIRCUIT_IDS));
90
+ /** Circuits ZKProofport officially supports today. Derived, so it cannot desync. */
91
+ export const SUPPORTED_CIRCUIT_IDS = Object.freeze(ALL_CIRCUIT_IDS.filter((id) => CIRCUIT_SUPPORT_STATUS[id] === 'supported'));
92
+ /** Circuits whose identifiers are reserved but not officially supported yet. */
93
+ export const PLANNED_CIRCUIT_IDS = Object.freeze(ALL_CIRCUIT_IDS.filter((id) => CIRCUIT_SUPPORT_STATUS[id] === 'planned'));
94
+ /**
95
+ * Narrows an unknown value to a canonical circuit identifier. Returns `false`
96
+ * for hyphenated route names such as `'coinbase-kyc'`.
97
+ */
98
+ export function isCanonicalCircuitId(value) {
99
+ return typeof value === 'string' && ALL_CIRCUIT_IDS.includes(value);
100
+ }
101
+ /** Returns the support status of a canonical circuit. */
102
+ export function getCircuitSupportStatus(circuit) {
103
+ if (!isCanonicalCircuitId(circuit)) {
104
+ throw new Error(`Unknown circuit '${String(circuit)}'. Expected one of: ${ALL_CIRCUIT_IDS.join(', ')}`);
105
+ }
106
+ return CIRCUIT_SUPPORT_STATUS[circuit];
107
+ }
108
+ // ── proofport-ai's own subset ───────────────────────────────────────────────
109
+ // Everything above mirrors the customer SDK. Everything below is this repo's,
110
+ // and the SDK has no opinion on it.
111
+ /**
112
+ * The circuits the proofport-ai server can prove: the ones it has compiled
113
+ * artifacts, an input builder and a deployed verifier for.
114
+ *
115
+ * A strict subset of {@link ALL_CIRCUIT_IDS} — `satisfies` makes an id that is
116
+ * no longer canonical a compile error here, and the entries are the canonical
117
+ * constants rather than repeated string literals.
118
+ */
119
+ export const PROVABLE_CIRCUIT_IDS = [
120
+ CIRCUIT_IDS.COINBASE_ATTESTATION,
121
+ CIRCUIT_IDS.COINBASE_COUNTRY_ATTESTATION,
122
+ CIRCUIT_IDS.OIDC_DOMAIN_ATTESTATION,
123
+ CIRCUIT_IDS.ARC_ELIGIBILITY,
124
+ ];
125
+ /** Narrows an unknown value to a circuit the proofport-ai server can prove. */
126
+ export function isProvableCircuitId(value) {
127
+ return typeof value === 'string' && PROVABLE_CIRCUIT_IDS.includes(value);
128
+ }
129
+ //# sourceMappingURL=circuits.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"circuits.js","sourceRoot":"","sources":["../src/circuits.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAWH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC;IACvC,sDAAsD;IACtD,oBAAoB,EAAE,sBAAsB;IAC5C,kFAAkF;IAClF,4BAA4B,EAAE,8BAA8B;IAC5D,2DAA2D;IAC3D,uBAAuB,EAAE,yBAAyB;IAClD,6EAA6E;IAC7E,eAAe,EAAE,iBAAiB;IAClC,gEAAgE;IAChE,gBAAgB,EAAE,kBAAkB;IACpC,yEAAyE;IACzE,gBAAgB,EAAE,kBAAkB;I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BAAuB,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACvF,CAAC;IACJ,CAAC;IACD,OAAO,sBAAsB,CAAC,OAAO,CAAC,CAAC;AACzC,CAAC;AAED,+EAA+E;AAC/E,8EAA8E;AAC9E,oCAAoC;AAEpC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,WAAW,CAAC,oBAAoB;IAChC,WAAW,CAAC,4BAA4B;IACxC,WAAW,CAAC,uBAAuB;IACnC,WAAW,CAAC,eAAe;CACqB,CAAC;AAEnD,+EAA+E;AAC/E,MAAM,UAAU,mBAAmB,CAAC,KAAc;IAChD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAK,oBAA0C,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAClG,CAAC"}
@@ -1,4 +1,10 @@
1
- export declare const CIRCUITS: Record<string, {
1
+ import type { CircuitId } from './types.js';
2
+ /**
3
+ * Per-circuit metadata. Keyed by the canonical identifiers from `./circuits.js`
4
+ * and typed `Record<CircuitId, …>`, so adding a provable circuit without an
5
+ * entry — or keeping an entry for one that no longer exists — is a compile error.
6
+ */
7
+ export declare const CIRCUITS: Record<CircuitId, {
2
8
  displayName: string;
3
9
  easSchemaId?: string;
4
10
  functionSelector?: string;
@@ -7,7 +13,7 @@ export declare const CIRCUITS: Record<string, {
7
13
  export declare const COINBASE_ATTESTER_CONTRACT = "0x357458739F90461b99789350868CD7CF330Dd7EE";
8
14
  export declare const AUTHORIZED_SIGNERS: string[];
9
15
  export declare const DEFAULT_EAS_GRAPHQL = "https://base.easscan.org/graphql";
10
- export declare const DEFAULT_EAS_RPC = "https://mainnet.base.org";
16
+ export declare const DEFAULT_EAS_RPC = "https://base.drpc.org";
11
17
  export declare const RAW_TX_PADDED_LENGTH = 300;
12
18
  export declare const MERKLE_PROOF_MAX_DEPTH = 8;
13
19
  export declare const COUNTRY_LIST_MAX_LENGTH = 10;
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE;IACpC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAeA,CAAC;AAEF,eAAO,MAAM,0BAA0B,+CAA+C,CAAC;AAEvF,eAAO,MAAM,kBAAkB,UAK9B,CAAC;AAEF,eAAO,MAAM,mBAAmB,qCAAqC,CAAC;AACtE,eAAO,MAAM,eAAe,6BAA6B,CAAC;AAE1D,eAAO,MAAM,oBAAoB,MAAM,CAAC;AACxC,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,uBAAuB,KAAK,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,SAAS,EAAE;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAoBA,CAAC;AAEF,eAAO,MAAM,0BAA0B,+CAA+C,CAAC;AAEvF,eAAO,MAAM,kBAAkB,UAK9B,CAAC;AAEF,eAAO,MAAM,mBAAmB,qCAAqC,CAAC;AAKtE,eAAO,MAAM,eAAe,0BAA0B,CAAC;AAEvD,eAAO,MAAM,oBAAoB,MAAM,CAAC;AACxC,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,uBAAuB,KAAK,CAAC"}
package/dist/constants.js CHANGED
@@ -1,18 +1,29 @@
1
+ import { CIRCUIT_IDS } from './circuits.js';
2
+ /**
3
+ * Per-circuit metadata. Keyed by the canonical identifiers from `./circuits.js`
4
+ * and typed `Record<CircuitId, …>`, so adding a provable circuit without an
5
+ * entry — or keeping an entry for one that no longer exists — is a compile error.
6
+ */
1
7
  export const CIRCUITS = {
2
- coinbase_attestation: {
8
+ [CIRCUIT_IDS.COINBASE_ATTESTATION]: {
3
9
  displayName: 'Coinbase KYC',
4
10
  easSchemaId: '0xf8b05c79f090979bf4a80270aba232dff11a10d9ca55c4f88de95317970f0de9',
5
11
  functionSelector: '0x56feed5e',
6
12
  },
7
- coinbase_country_attestation: {
13
+ [CIRCUIT_IDS.COINBASE_COUNTRY_ATTESTATION]: {
8
14
  displayName: 'Coinbase Country',
9
15
  easSchemaId: '0x1801901fabd0e6189356b4fb52bb0ab855276d84f7ec140839fbd1f6801ca065',
10
16
  functionSelector: '0x0a225248',
11
17
  },
12
- oidc_domain_attestation: {
18
+ [CIRCUIT_IDS.OIDC_DOMAIN_ATTESTATION]: {
13
19
  displayName: 'OIDC Domain',
14
20
  inputType: 'oidc',
15
21
  },
22
+ [CIRCUIT_IDS.ARC_ELIGIBILITY]: {
23
+ displayName: 'Arc Eligibility',
24
+ easSchemaId: '0xf8b05c79f090979bf4a80270aba232dff11a10d9ca55c4f88de95317970f0de9',
25
+ functionSelector: '0x56feed5e',
26
+ },
16
27
  };
17
28
  export const COINBASE_ATTESTER_CONTRACT = '0x357458739F90461b99789350868CD7CF330Dd7EE';
18
29
  export const AUTHORIZED_SIGNERS = [
@@ -22,7 +33,11 @@ export const AUTHORIZED_SIGNERS = [
22
33
  '0x44ace9abb148e8412ac4492e9a1ae6bd88226803',
23
34
  ];
24
35
  export const DEFAULT_EAS_GRAPHQL = 'https://base.easscan.org/graphql';
25
- export const DEFAULT_EAS_RPC = 'https://mainnet.base.org';
36
+ // Use drpc.org instead of mainnet.base.org: the latter prunes transactions
37
+ // older than ~30 days, so eth_getTransactionByHash returns null for any
38
+ // attestation made earlier (mainnet.base.org returned null for txs from 2025).
39
+ // drpc.org retains full history at no cost and no API key.
40
+ export const DEFAULT_EAS_RPC = 'https://base.drpc.org';
26
41
  export const RAW_TX_PADDED_LENGTH = 300;
27
42
  export const MERKLE_PROOF_MAX_DEPTH = 8;
28
43
  export const COUNTRY_LIST_MAX_LENGTH = 10;
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,QAAQ,GAKhB;IACH,oBAAoB,EAAE;QACpB,WAAW,EAAE,cAAc;QAC3B,WAAW,EAAE,oEAAoE;QACjF,gBAAgB,EAAE,YAAY;KAC/B;IACD,4BAA4B,EAAE;QAC5B,WAAW,EAAE,kBAAkB;QAC/B,WAAW,EAAE,oEAAoE;QACjF,gBAAgB,EAAE,YAAY;KAC/B;IACD,uBAAuB,EAAE;QACvB,WAAW,EAAE,aAAa;QAC1B,SAAS,EAAE,MAAM;KAClB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,4CAA4C,CAAC;AAEvF,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;CAC7C,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,kCAAkC,CAAC;AACtE,MAAM,CAAC,MAAM,eAAe,GAAG,0BAA0B,CAAC;AAE1D,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAC;AACxC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACxC,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAG5C;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAKhB;IACH,CAAC,WAAW,CAAC,oB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