@zkproofport-app/sdk 0.2.13 → 0.2.15
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/dist/ProofportSDK.d.ts +2 -4
- package/dist/index.esm.js +68 -20
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +68 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +68 -20
- package/dist/index.mjs.map +1 -1
- package/dist/offChainVerifier.d.ts +15 -13
- package/package.json +5 -8
|
@@ -11,19 +11,22 @@
|
|
|
11
11
|
* (through mopro's native Barretenberg); it was only the JavaScript side that
|
|
12
12
|
* had no such thing.
|
|
13
13
|
*
|
|
14
|
-
* HOW IT WORKS.
|
|
15
|
-
*
|
|
14
|
+
* HOW IT WORKS. Proofs here are made with `--oracle_hash keccak` and ZK on, so
|
|
15
|
+
* the matching check is `acirVerifyUltraKeccakZkHonk(proof, vk)`. Two things
|
|
16
16
|
* have to line up:
|
|
17
17
|
*
|
|
18
|
-
* The version.
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
18
|
+
* The version. `@aztec/bb.js@1.0.0-nightly.20250723` is the WASM build of the
|
|
19
|
+
* same bb the circuits are compiled with. Versions are not interchangeable:
|
|
20
|
+
* measured on the Korea Mobile ID age circuit, the pinned bb writes a 16256-
|
|
21
|
+
* byte proof where bb 1.2.0 writes 16224 for the identical circuit and
|
|
22
|
+
* witness — and the verification key comes out the SAME either way, so the
|
|
23
|
+
* key cannot warn you. A mismatch shows up only as verification failing.
|
|
22
24
|
*
|
|
23
|
-
* The
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
25
|
+
* The flavour. There are four verify entry points and picking the wrong one
|
|
26
|
+
* is not a polite false. `acirVerifyUltraZKHonk` (poseidon) answers false for
|
|
27
|
+
* a perfectly good proof, and `acirVerifyUltraKeccakHonk` — keccak without ZK
|
|
28
|
+
* — TRAPS the WebAssembly with a bare "unreachable", which looks exactly like
|
|
29
|
+
* a corrupt proof, a mismatched key, or a missing SRS.
|
|
27
30
|
*
|
|
28
31
|
* THE PROOF ARRIVES IN TWO PIECES. The mobile app splits what Barretenberg
|
|
29
32
|
* produced into `proof` and `publicInputs` before sending it, because the
|
|
@@ -48,9 +51,8 @@ export interface OffChainVerifyOptions {
|
|
|
48
51
|
/**
|
|
49
52
|
* Verify a proof off-chain, against its verification key.
|
|
50
53
|
*
|
|
51
|
-
* Needs
|
|
52
|
-
*
|
|
53
|
-
* it installed says so plainly rather than surfacing as a module-not-found.
|
|
54
|
+
* Needs no setup from the caller: the verifier ships with this SDK and is
|
|
55
|
+
* loaded on first use.
|
|
54
56
|
*
|
|
55
57
|
* @param circuit - Canonical circuit identifier
|
|
56
58
|
* @param proof - Proof bytes as hex, WITHOUT public inputs (as the relay sends it)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zkproofport-app/sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.15",
|
|
4
4
|
"description": "ZKProofport SDK for requesting zero-knowledge proofs from the ZKProofport mobile app and verifying them on-chain",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -32,6 +32,8 @@
|
|
|
32
32
|
"prepublishOnly": "npm run build"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
+
"@aztec/bb.js": "1.0.0-nightly.20250723",
|
|
36
|
+
"buffer": "^6.0.3",
|
|
35
37
|
"qrcode": "^1.5.3",
|
|
36
38
|
"socket.io-client": "^4.8.0"
|
|
37
39
|
},
|
|
@@ -45,19 +47,14 @@
|
|
|
45
47
|
"tslib": "^2.8.1",
|
|
46
48
|
"typedoc": "^0.28.16",
|
|
47
49
|
"typescript": "^5.3.3",
|
|
48
|
-
"vitest": "^4.0.18"
|
|
49
|
-
"@aztec/bb.js": "1.0.0-nightly.20250723"
|
|
50
|
+
"vitest": "^4.0.18"
|
|
50
51
|
},
|
|
51
52
|
"peerDependencies": {
|
|
52
|
-
"ethers": "^5.7.0 || ^6.0.0"
|
|
53
|
-
"@aztec/bb.js": "1.0.0-nightly.20250723"
|
|
53
|
+
"ethers": "^5.7.0 || ^6.0.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependenciesMeta": {
|
|
56
56
|
"ethers": {
|
|
57
57
|
"optional": true
|
|
58
|
-
},
|
|
59
|
-
"@aztec/bb.js": {
|
|
60
|
-
"optional": true
|
|
61
58
|
}
|
|
62
59
|
},
|
|
63
60
|
"keywords": [
|