@zkproofport-ai/sdk 0.3.0 → 0.4.1
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.
- package/README.md +52 -134
- package/dist/action.js +1 -1
- package/dist/action.js.map +1 -1
- package/dist/actionApproval.js +1 -1
- package/dist/actionApproval.js.map +1 -1
- package/dist/attestation.d.ts +6 -1
- package/dist/attestation.d.ts.map +1 -1
- package/dist/attestation.js +41 -4
- package/dist/attestation.js.map +1 -1
- package/dist/cdp.d.ts +3 -3
- package/dist/circuits.d.ts +26 -105
- package/dist/circuits.d.ts.map +1 -1
- package/dist/circuits.js +18 -114
- package/dist/circuits.js.map +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +0 -10
- package/dist/constants.js.map +1 -1
- package/dist/extract.d.ts +6 -3
- package/dist/extract.d.ts.map +1 -1
- package/dist/extract.js +11 -10
- package/dist/extract.js.map +1 -1
- package/dist/flow.d.ts.map +1 -1
- package/dist/flow.js +13 -14
- package/dist/flow.js.map +1 -1
- package/dist/index.d.ts +2 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -16
- package/dist/index.js.map +1 -1
- package/dist/inputs.d.ts +4 -3
- package/dist/inputs.d.ts.map +1 -1
- package/dist/inputs.js +4 -7
- package/dist/inputs.js.map +1 -1
- package/dist/payment.d.ts +7 -9
- package/dist/payment.d.ts.map +1 -1
- package/dist/payment.js +20 -43
- package/dist/payment.js.map +1 -1
- package/dist/types.d.ts +9 -28
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +1 -1
- package/dist/usdc.d.ts +6 -10
- package/dist/usdc.d.ts.map +1 -1
- package/dist/usdc.js +6 -11
- package/dist/usdc.js.map +1 -1
- package/dist/verify.d.ts +5 -1
- package/dist/verify.d.ts.map +1 -1
- package/dist/verify.js +15 -13
- package/dist/verify.js.map +1 -1
- package/dist/wallets.d.ts +8 -34
- package/dist/wallets.d.ts.map +1 -1
- package/dist/wallets.js +10 -87
- package/dist/wallets.js.map +1 -1
- package/package.json +3 -12
- package/dist/arcWallet.d.ts +0 -50
- package/dist/arcWallet.d.ts.map +0 -1
- package/dist/arcWallet.js +0 -161
- package/dist/arcWallet.js.map +0 -1
- package/dist/delegation.d.ts +0 -107
- package/dist/delegation.d.ts.map +0 -1
- package/dist/delegation.js +0 -126
- package/dist/delegation.js.map +0 -1
- package/dist/nanopayment.d.ts +0 -71
- package/dist/nanopayment.d.ts.map +0 -1
- package/dist/nanopayment.js +0 -77
- package/dist/nanopayment.js.map +0 -1
- package/dist/typedAction.d.ts +0 -3
- package/dist/typedAction.d.ts.map +0 -1
- package/dist/typedAction.js +0 -50
- package/dist/typedAction.js.map +0 -1
package/dist/attestation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attestation.js","sourceRoot":"","sources":["../src/attestation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EACL,QAAQ,EACR,mBAAmB,EACnB,eAAe,EACf,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AAIxB,2EAA2E;AAE3E,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;;;CAoB9B,CAAC;AAEF,2EAA2E;AAE3E,MAAM,WAAW,GAAG,CAAC,CAAC;AACtB,MAAM,cAAc,GAAG,IAAI,CAAC;AAC5B,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"attestation.js","sourceRoot":"","sources":["../src/attestation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EACL,QAAQ,EACR,mBAAmB,EACnB,eAAe,EACf,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AAIxB,2EAA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-12,11 +12,11 @@
|
|
|
12
12
|
* The same night produced `isTestnet = ... || chainRpcUrl.includes('sepolia')`,
|
|
13
13
|
* for the same reason -- with payment disabled the chain was no longer known,
|
|
14
14
|
* so it was guessed. That guess resolved every unrecognised configuration to
|
|
15
|
-
* Base mainnet
|
|
15
|
+
* Base mainnet.
|
|
16
16
|
*
|
|
17
17
|
* Restored as it was. The interface is deliberately structural rather than a
|
|
18
|
-
* CDP dependency: anything with these methods works, which is how
|
|
19
|
-
*
|
|
18
|
+
* CDP dependency: anything with these methods works, which is how a viem
|
|
19
|
+
* account plugs in without this SDK importing it.
|
|
20
20
|
*/
|
|
21
21
|
import type { ProofportSigner } from './signer.js';
|
|
22
22
|
/**
|
package/dist/circuits.d.ts
CHANGED
|
@@ -1,121 +1,42 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Canonical ZKProofport circuit identifiers, for `@zkproofport-ai/sdk`.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* the
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
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.
|
|
4
|
+
* `@zkproofport-app/core/circuits` is the single source of truth for circuit
|
|
5
|
+
* identifiers across every layer: the mobile app, the relay, the demo, the
|
|
6
|
+
* proofport-ai server and this package. Everything canonical here is
|
|
7
|
+
* re-exported from it.
|
|
8
|
+
*
|
|
9
|
+
* Until core existed this file was a hand-kept mirror, because the only
|
|
10
|
+
* published home of the list was `@zkproofport-app/sdk`, whose dependency tree
|
|
11
|
+
* is a poor trade on every `npx zkproofport-mcp`. Core's `./circuits` subpath
|
|
12
|
+
* has no dependencies, so the mirror and the test that compared it are gone.
|
|
13
|
+
*
|
|
14
|
+
* What stays is this package's own subset -- the circuits the proofport-ai
|
|
15
|
+
* server can prove -- which core has no opinion on.
|
|
47
16
|
*/
|
|
48
|
-
|
|
49
|
-
|
|
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
|
-
}>;
|
|
17
|
+
import { type CircuitId as CoreCircuitId } from '@zkproofport-app/core/circuits';
|
|
18
|
+
export { CIRCUIT_IDS, CIRCUIT_SUPPORT_STATUS, ALL_CIRCUIT_IDS, SUPPORTED_CIRCUIT_IDS, EXPERIMENTAL_CIRCUIT_IDS, PLANNED_CIRCUIT_IDS, getCircuitSupportStatus, isCircuitId as isCanonicalCircuitId, } from '@zkproofport-app/core/circuits';
|
|
19
|
+
export type { CircuitSupportStatus } from '@zkproofport-app/core/circuits';
|
|
81
20
|
/**
|
|
82
21
|
* Union of every canonical circuit identifier.
|
|
83
22
|
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
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'`.
|
|
23
|
+
* Core calls this type `CircuitId`. It is named `CanonicalCircuitId` here
|
|
24
|
+
* because {@link CircuitId} is already this package's public name for the
|
|
25
|
+
* narrower set proofport-ai can prove; widening it would be a silent breaking
|
|
26
|
+
* change for anyone writing `Record<CircuitId, ...>`, and would let
|
|
27
|
+
* `circuit: 'mdl_kr_age'` typecheck against an endpoint that cannot serve it.
|
|
106
28
|
*/
|
|
107
|
-
export
|
|
108
|
-
/** Returns the support status of a canonical circuit. */
|
|
109
|
-
export declare function getCircuitSupportStatus(circuit: CanonicalCircuitId): CircuitSupportStatus;
|
|
29
|
+
export type CanonicalCircuitId = CoreCircuitId;
|
|
110
30
|
/**
|
|
111
31
|
* The circuits the proofport-ai server can prove: the ones it has compiled
|
|
112
32
|
* artifacts, an input builder and a deployed verifier for.
|
|
113
33
|
*
|
|
114
|
-
* A strict subset of
|
|
115
|
-
*
|
|
116
|
-
*
|
|
34
|
+
* A strict subset of core's ids -- `satisfies` makes an id that is no longer
|
|
35
|
+
* canonical a compile error here. The server keeps the same list in
|
|
36
|
+
* `src/config/circuitIds.ts`; the two trees ship separately and cannot import
|
|
37
|
+
* each other, so `tests/circuitIds.test.ts` holds them equal.
|
|
117
38
|
*/
|
|
118
|
-
export declare const PROVABLE_CIRCUIT_IDS: readonly ["coinbase_attestation", "coinbase_country_attestation", "oidc_domain_attestation", "
|
|
39
|
+
export declare const PROVABLE_CIRCUIT_IDS: readonly ["coinbase_attestation", "coinbase_country_attestation", "oidc_domain_attestation", "giwa_attestation"];
|
|
119
40
|
/** Narrows an unknown value to a circuit the proofport-ai server can prove. */
|
|
120
41
|
export declare function isProvableCircuitId(value: unknown): value is CanonicalCircuitId;
|
|
121
42
|
//# sourceMappingURL=circuits.d.ts.map
|
package/dist/circuits.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"circuits.d.ts","sourceRoot":"","sources":["../src/circuits.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"circuits.d.ts","sourceRoot":"","sources":["../src/circuits.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAe,KAAK,SAAS,IAAI,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE9F,OAAO,EACL,WAAW,EACX,sBAAsB,EACtB,eAAe,EACf,qBAAqB,EACrB,wBAAwB,EACxB,mBAAmB,EACnB,uBAAuB,EACvB,WAAW,IAAI,oBAAoB,GACpC,MAAM,gCAAgC,CAAC;AACxC,YAAY,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAE3E;;;;;;;;GAQG;AACH,MAAM,MAAM,kBAAkB,GAAG,aAAa,CAAC;AAI/C;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,kHAKiB,CAAC;AAEnD,+EAA+E;AAC/E,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,kBAAkB,CAE/E"}
|
package/dist/circuits.js
CHANGED
|
@@ -1,131 +1,35 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Canonical ZKProofport circuit identifiers, for `@zkproofport-ai/sdk`.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* the
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
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.
|
|
4
|
+
* `@zkproofport-app/core/circuits` is the single source of truth for circuit
|
|
5
|
+
* identifiers across every layer: the mobile app, the relay, the demo, the
|
|
6
|
+
* proofport-ai server and this package. Everything canonical here is
|
|
7
|
+
* re-exported from it.
|
|
8
|
+
*
|
|
9
|
+
* Until core existed this file was a hand-kept mirror, because the only
|
|
10
|
+
* published home of the list was `@zkproofport-app/sdk`, whose dependency tree
|
|
11
|
+
* is a poor trade on every `npx zkproofport-mcp`. Core's `./circuits` subpath
|
|
12
|
+
* has no dependencies, so the mirror and the test that compared it are gone.
|
|
13
|
+
*
|
|
14
|
+
* What stays is this package's own subset -- the circuits the proofport-ai
|
|
15
|
+
* server can prove -- which core has no opinion on.
|
|
47
16
|
*/
|
|
48
|
-
|
|
49
|
-
|
|
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
|
-
// Experimental since 2026-09-22: built, deployed on GIWA Sepolia and
|
|
84
|
-
// provable here. Testnet-only, which is what keeps it out of 'supported'.
|
|
85
|
-
giwa_attestation: 'experimental',
|
|
86
|
-
mdl_kr_ownership: 'planned',
|
|
87
|
-
mdl_kr_age: 'planned',
|
|
88
|
-
mdl_kr_region: 'planned',
|
|
89
|
-
});
|
|
90
|
-
/** Every canonical circuit identifier, in declaration order. */
|
|
91
|
-
export const ALL_CIRCUIT_IDS = Object.freeze(Object.values(CIRCUIT_IDS));
|
|
92
|
-
/** Circuits ZKProofport officially supports today. Derived, so it cannot desync. */
|
|
93
|
-
export const SUPPORTED_CIRCUIT_IDS = Object.freeze(ALL_CIRCUIT_IDS.filter((id) => CIRCUIT_SUPPORT_STATUS[id] === 'supported'));
|
|
94
|
-
/** Circuits whose identifiers are reserved but not officially supported yet. */
|
|
95
|
-
export const PLANNED_CIRCUIT_IDS = Object.freeze(ALL_CIRCUIT_IDS.filter((id) => CIRCUIT_SUPPORT_STATUS[id] === 'planned'));
|
|
96
|
-
/**
|
|
97
|
-
* Narrows an unknown value to a canonical circuit identifier. Returns `false`
|
|
98
|
-
* for hyphenated route names such as `'coinbase-kyc'`.
|
|
99
|
-
*/
|
|
100
|
-
export function isCanonicalCircuitId(value) {
|
|
101
|
-
return typeof value === 'string' && ALL_CIRCUIT_IDS.includes(value);
|
|
102
|
-
}
|
|
103
|
-
/** Returns the support status of a canonical circuit. */
|
|
104
|
-
export function getCircuitSupportStatus(circuit) {
|
|
105
|
-
if (!isCanonicalCircuitId(circuit)) {
|
|
106
|
-
throw new Error(`Unknown circuit '${String(circuit)}'. Expected one of: ${ALL_CIRCUIT_IDS.join(', ')}`);
|
|
107
|
-
}
|
|
108
|
-
return CIRCUIT_SUPPORT_STATUS[circuit];
|
|
109
|
-
}
|
|
17
|
+
import { CIRCUIT_IDS } from '@zkproofport-app/core/circuits';
|
|
18
|
+
export { CIRCUIT_IDS, CIRCUIT_SUPPORT_STATUS, ALL_CIRCUIT_IDS, SUPPORTED_CIRCUIT_IDS, EXPERIMENTAL_CIRCUIT_IDS, PLANNED_CIRCUIT_IDS, getCircuitSupportStatus, isCircuitId as isCanonicalCircuitId, } from '@zkproofport-app/core/circuits';
|
|
110
19
|
// ── proofport-ai's own subset ───────────────────────────────────────────────
|
|
111
|
-
// Everything above mirrors the customer SDK. Everything below is this repo's,
|
|
112
|
-
// and the SDK has no opinion on it.
|
|
113
20
|
/**
|
|
114
21
|
* The circuits the proofport-ai server can prove: the ones it has compiled
|
|
115
22
|
* artifacts, an input builder and a deployed verifier for.
|
|
116
23
|
*
|
|
117
|
-
* A strict subset of
|
|
118
|
-
*
|
|
119
|
-
*
|
|
24
|
+
* A strict subset of core's ids -- `satisfies` makes an id that is no longer
|
|
25
|
+
* canonical a compile error here. The server keeps the same list in
|
|
26
|
+
* `src/config/circuitIds.ts`; the two trees ship separately and cannot import
|
|
27
|
+
* each other, so `tests/circuitIds.test.ts` holds them equal.
|
|
120
28
|
*/
|
|
121
29
|
export const PROVABLE_CIRCUIT_IDS = [
|
|
122
30
|
CIRCUIT_IDS.COINBASE_ATTESTATION,
|
|
123
31
|
CIRCUIT_IDS.COINBASE_COUNTRY_ATTESTATION,
|
|
124
32
|
CIRCUIT_IDS.OIDC_DOMAIN_ATTESTATION,
|
|
125
|
-
CIRCUIT_IDS.ARC_ELIGIBILITY,
|
|
126
|
-
// Added 2026-09-22 with the server's own list, which a test holds byte
|
|
127
|
-
// identical to this one: the two trees ship separately and cannot import
|
|
128
|
-
// each other, so nothing else stops one moving without the other.
|
|
129
33
|
CIRCUIT_IDS.GIWA_ATTESTATION,
|
|
130
34
|
];
|
|
131
35
|
/** Narrows an unknown value to a circuit the proofport-ai server can prove. */
|
package/dist/circuits.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"circuits.js","sourceRoot":"","sources":["../src/circuits.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"circuits.js","sourceRoot":"","sources":["../src/circuits.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,WAAW,EAAmC,MAAM,gCAAgC,CAAC;AAE9F,OAAO,EACL,WAAW,EACX,sBAAsB,EACtB,eAAe,EACf,qBAAqB,EACrB,wBAAwB,EACxB,mBAAmB,EACnB,uBAAuB,EACvB,WAAW,IAAI,oBAAoB,GACpC,MAAM,gCAAgC,CAAC;AAcxC,+EAA+E;AAE/E;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,WAAW,CAAC,oBAAoB;IAChC,WAAW,CAAC,4BAA4B;IACxC,WAAW,CAAC,uBAAuB;IACnC,WAAW,CAAC,gBAAgB;CACoB,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"}
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,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
package/dist/constants.js
CHANGED
|
@@ -19,11 +19,6 @@ export const CIRCUITS = {
|
|
|
19
19
|
displayName: 'OIDC Domain',
|
|
20
20
|
inputType: 'oidc',
|
|
21
21
|
},
|
|
22
|
-
[CIRCUIT_IDS.ARC_ELIGIBILITY]: {
|
|
23
|
-
displayName: 'Arc Eligibility',
|
|
24
|
-
easSchemaId: '0xf8b05c79f090979bf4a80270aba232dff11a10d9ca55c4f88de95317970f0de9',
|
|
25
|
-
functionSelector: '0x56feed5e',
|
|
26
|
-
},
|
|
27
22
|
[CIRCUIT_IDS.GIWA_ATTESTATION]: {
|
|
28
23
|
displayName: 'GIWA Attestation',
|
|
29
24
|
// No EAS schema: GIWA's attestation is not indexed by EAS on Base. It is
|
|
@@ -64,11 +59,6 @@ export const ATTESTATION_SOURCES = {
|
|
|
64
59
|
contract: COINBASE_ATTESTER_CONTRACT,
|
|
65
60
|
signers: AUTHORIZED_SIGNERS,
|
|
66
61
|
},
|
|
67
|
-
[CIRCUIT_IDS.ARC_ELIGIBILITY]: {
|
|
68
|
-
kind: 'eas-base',
|
|
69
|
-
contract: COINBASE_ATTESTER_CONTRACT,
|
|
70
|
-
signers: AUTHORIZED_SIGNERS,
|
|
71
|
-
},
|
|
72
62
|
[CIRCUIT_IDS.GIWA_ATTESTATION]: {
|
|
73
63
|
kind: 'giwa-sepolia',
|
|
74
64
|
contract: GIWA_ATTESTER_CONTRACT,
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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,oBAAoB,CAAC,EAAE;QAClC,WAAW,EAAE,cAAc;QAC3B,WAAW,EAAE,oEAAoE;QACjF,gBAAgB,EAAE,YAAY;KAC/B;IACD,CAA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,MAAM,CAAC,MAAM,mBAAmB,GAAG,kCAAkC,CAAC;AACtE,2EAA2E;AAC3E,wEAAwE;AACxE,+EAA+E;AAC/E,2DAA2D;AAC3D,MAAM,CAAC,MAAM,eAAe,GAAG,uBAAuB,CAAC;AAEvD,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CAAC;AACxC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACxC,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC"}
|
package/dist/extract.d.ts
CHANGED
|
@@ -18,9 +18,12 @@
|
|
|
18
18
|
*
|
|
19
19
|
* ## Public-input layouts are this repo's knowledge
|
|
20
20
|
*
|
|
21
|
-
* The index ranges below
|
|
22
|
-
*
|
|
23
|
-
*
|
|
21
|
+
* The index ranges below repeat what `@zkproofport-app/core` holds for the
|
|
22
|
+
* same circuits. Core's extractors are not used because they differ in
|
|
23
|
+
* contract: they take an array of fields and throw on an unknown circuit,
|
|
24
|
+
* while these take the server's one concatenated hex string and answer `null`
|
|
25
|
+
* for anything this server cannot prove. Only the *identifiers* come from
|
|
26
|
+
* `./circuits.js` (re-exporting `@zkproofport-app/core/circuits`).
|
|
24
27
|
*
|
|
25
28
|
* coinbase_attestation (128 fields):
|
|
26
29
|
* Index 0-31: signal_hash (32 bytes)
|
package/dist/extract.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../src/extract.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../src/extract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AA4E5C;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAC1C,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,SAAS,GACjB,MAAM,GAAG,IAAI,CAWf;AAED;;;;;;;;;GASG;AACH,wBAAgB,gCAAgC,CAC9C,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,SAAS,GACjB,MAAM,GAAG,IAAI,CAWf;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,6BAA6B,CAC3C,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,SAAS,GACjB,MAAM,GAAG,IAAI,CAwBf"}
|
package/dist/extract.js
CHANGED
|
@@ -18,9 +18,12 @@
|
|
|
18
18
|
*
|
|
19
19
|
* ## Public-input layouts are this repo's knowledge
|
|
20
20
|
*
|
|
21
|
-
* The index ranges below
|
|
22
|
-
*
|
|
23
|
-
*
|
|
21
|
+
* The index ranges below repeat what `@zkproofport-app/core` holds for the
|
|
22
|
+
* same circuits. Core's extractors are not used because they differ in
|
|
23
|
+
* contract: they take an array of fields and throw on an unknown circuit,
|
|
24
|
+
* while these take the server's one concatenated hex string and answer `null`
|
|
25
|
+
* for anything this server cannot prove. Only the *identifiers* come from
|
|
26
|
+
* `./circuits.js` (re-exporting `@zkproofport-app/core/circuits`).
|
|
24
27
|
*
|
|
25
28
|
* coinbase_attestation (128 fields):
|
|
26
29
|
* Index 0-31: signal_hash (32 bytes)
|
|
@@ -63,13 +66,11 @@ const LAYOUTS = {
|
|
|
63
66
|
// Read off the compiled ABI, not counted by hand:
|
|
64
67
|
// signal_hash 0-31, domain_separator 32-63, action_hash 64-95,
|
|
65
68
|
// signer_list_merkle_root 96-127, scope 128-159, nullifier 160-191.
|
|
66
|
-
//
|
|
67
|
-
//
|
|
68
|
-
|
|
69
|
-
//
|
|
70
|
-
//
|
|
71
|
-
// Coinbase's old offsets returns the Merkle root where the nullifier is --
|
|
72
|
-
// one value for every user of the circuit.
|
|
69
|
+
// giwa_attestation gained the EIP-712 pair on 2026-09-22; the two extra
|
|
70
|
+
// 32-byte fields before the Merkle root push scope and nullifier 64 fields
|
|
71
|
+
// past where they sit in coinbase_attestation. Reading it at Coinbase's
|
|
72
|
+
// offsets returns the Merkle root where the nullifier is -- one value for
|
|
73
|
+
// every user of the circuit.
|
|
73
74
|
[CIRCUIT_IDS.GIWA_ATTESTATION]: { scope: [128, 159], nullifier: [160, 191] },
|
|
74
75
|
};
|
|
75
76
|
/**
|
package/dist/extract.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract.js","sourceRoot":"","sources":["../src/extract.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"extract.js","sourceRoot":"","sources":["../src/extract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAe5C;;;;;GAKG;AACH,MAAM,OAAO,GAAyC;IACpD,CAAC,WAAW,CAAC,oBAAoB,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE;IAC7E,CAAC,WAAW,CAAC,4BAA4B,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,SAAS,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE;IACvF,CAAC,WAAW,CAAC,uBAAuB,CAAC,EAAE;QACrC,KAAK,EAAE,CAAC,EAAE,EAAE,GAAG,CAAC;QAChB,SAAS,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;QACrB,aAAa,EAAE,EAAE;QACjB,SAAS,EAAE,EAAE;KACd;IACD,kDAAkD;IAClD,iEAAiE;IACjE,sEAAsE;IACtE,wEAAwE;IACxE,2EAA2E;IAC3E,wEAAwE;IACxE,0EAA0E;IAC1E,6BAA6B;IAC7B,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG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O,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAOhD,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;CACrC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE;IACP,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B;;;;;;;;;;OAUG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB,EACD,MAAM,EAAE,WAAW,EACnB,SAAS,CAAC,EAAE,aAAa,GACxB,OAAO,CAAC,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"flow.d.ts","sourceRoot":"","sources":["../src/flow.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EAEZ,WAAW,EACX,WAAW,EACX,UAAU,EACX,MAAM,YAAY,CAAC;AAQpB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAOhD,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;CACrC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE;IACP,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B;;;;;;;;;;OAUG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB,EACD,MAAM,EAAE,WAAW,EACnB,SAAS,CAAC,EAAE,aAAa,GACxB,OAAO,CAAC,WAAW,CAAC,CA0MtB"}
|
package/dist/flow.js
CHANGED
|
@@ -28,6 +28,9 @@ export async function generateProof(config, signers, params, callbacks) {
|
|
|
28
28
|
// Keep the requested circuit and approved values stable across asynchronous operations.
|
|
29
29
|
const circuit = params.circuit;
|
|
30
30
|
const action = params.action ? structuredClone(params.action) : params.action;
|
|
31
|
+
if (!Object.hasOwn(CIRCUIT_NAME_MAP, circuit)) {
|
|
32
|
+
throw new Error(`Unknown circuit '${String(circuit)}'. Known: ${Object.keys(CIRCUIT_NAME_MAP).join(', ')}.`);
|
|
33
|
+
}
|
|
31
34
|
const circuitId = CIRCUIT_NAME_MAP[circuit];
|
|
32
35
|
const scope = params.scope || 'proofport';
|
|
33
36
|
const isOidc = CIRCUITS[circuitId]?.inputType === 'oidc';
|
|
@@ -47,21 +50,19 @@ export async function generateProof(config, signers, params, callbacks) {
|
|
|
47
50
|
let domainSeparator;
|
|
48
51
|
let actionHash;
|
|
49
52
|
/*
|
|
50
|
-
* Which
|
|
53
|
+
* Which circuit carries an action, and what happens when one is given.
|
|
51
54
|
*
|
|
52
|
-
*
|
|
53
|
-
* data, without one it signs the request's signal hash.
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* dropped action leaves the caller believing the proof authorized something.
|
|
55
|
+
* giwa_attestation branches in-circuit: with an action the wallet signs the
|
|
56
|
+
* typed data, without one it signs the request's signal hash. The only
|
|
57
|
+
* refusal is an action sent where nothing can prove it, which must be an
|
|
58
|
+
* error rather than a silent drop: a dropped action leaves the caller
|
|
59
|
+
* believing the proof authorized something.
|
|
58
60
|
*/
|
|
59
|
-
const canBindAction = circuitId === CIRCUIT_IDS.
|
|
60
|
-
circuitId === CIRCUIT_IDS.GIWA_ATTESTATION;
|
|
61
|
+
const canBindAction = circuitId === CIRCUIT_IDS.GIWA_ATTESTATION;
|
|
61
62
|
if (action && !canBindAction) {
|
|
62
63
|
throw new Error(`An action was given but '${circuitId}' was requested, and it has no inputs for one. ` +
|
|
63
64
|
`Signing typed data for '${circuitId}' yields a signature that circuit cannot verify. ` +
|
|
64
|
-
`Ask for ${CIRCUIT_IDS.
|
|
65
|
+
`Ask for ${CIRCUIT_IDS.GIWA_ATTESTATION}, or drop the action.`);
|
|
65
66
|
}
|
|
66
67
|
const actionHashes = action ? hashTypedAction(action) : undefined;
|
|
67
68
|
if (!isOidc) {
|
|
@@ -144,9 +145,7 @@ export async function generateProof(config, signers, params, callbacks) {
|
|
|
144
145
|
// Step 3b: Pay, if the service charges.
|
|
145
146
|
//
|
|
146
147
|
// The buyer signs an EIP-3009 authorization and the service settles it, so
|
|
147
|
-
// no gas and no native balance are needed on the paying chain
|
|
148
|
-
// what makes paying on Arc possible at all, since no public facilitator
|
|
149
|
-
// settles Arc and the buyer cannot rely on one.
|
|
148
|
+
// no gas and no native balance are needed on the paying chain.
|
|
150
149
|
let paymentHeaders;
|
|
151
150
|
if (challenge.requiresPayment) {
|
|
152
151
|
if (!signers.payment) {
|
|
@@ -155,7 +154,7 @@ export async function generateProof(config, signers, params, callbacks) {
|
|
|
155
154
|
.filter(Boolean)
|
|
156
155
|
.join(', ');
|
|
157
156
|
throw new Error(`${config.baseUrl} charges for proofs and no payment wallet was given. ` +
|
|
158
|
-
`Pass signers.payment (see walletFromPrivateKey / walletFromCdp
|
|
157
|
+
`Pass signers.payment (see walletFromPrivateKey / walletFromCdp). ` +
|
|
159
158
|
`Chains offered: ${offered || 'none named'}`);
|
|
160
159
|
}
|
|
161
160
|
t = Date.now();
|