@zkproofport-app/sdk 0.2.13 → 0.2.14

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.
@@ -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. `bb` proofs are checked by `acirVerifyUltraKeccakHonk(proof,
15
- * vk)` — the keccak variant, matching how these proofs are produced. Two things
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. The verification key format is not stable across bb releases:
19
- * the pinned build emits a 1816-byte key where bb 0.87.0 and 1.2.0 emit 1760.
20
- * `@aztec/bb.js@1.0.0-nightly.20250723` is the WASM build of the same bb the
21
- * circuits were compiled with. A different one will reject valid proofs.
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 oracle hash. Proofs are generated with `--oracle_hash keccak` so the
24
- * Solidity verifiers can check them, so the poseidon-flavoured verify — which
25
- * is what `BarretenbergVerifier.verifyUltraHonkProof` uses — says false for a
26
- * perfectly good proof.
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 `@aztec/bb.js` at the pinned version. It is an optional peer dependency
52
- * — the WASM is large and most callers verify on-chain — so the failure to have
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.13",
3
+ "version": "0.2.14",
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,7 @@
32
32
  "prepublishOnly": "npm run build"
33
33
  },
34
34
  "dependencies": {
35
+ "@aztec/bb.js": "1.0.0-nightly.20250723",
35
36
  "qrcode": "^1.5.3",
36
37
  "socket.io-client": "^4.8.0"
37
38
  },
@@ -45,19 +46,14 @@
45
46
  "tslib": "^2.8.1",
46
47
  "typedoc": "^0.28.16",
47
48
  "typescript": "^5.3.3",
48
- "vitest": "^4.0.18",
49
- "@aztec/bb.js": "1.0.0-nightly.20250723"
49
+ "vitest": "^4.0.18"
50
50
  },
51
51
  "peerDependencies": {
52
- "ethers": "^5.7.0 || ^6.0.0",
53
- "@aztec/bb.js": "1.0.0-nightly.20250723"
52
+ "ethers": "^5.7.0 || ^6.0.0"
54
53
  },
55
54
  "peerDependenciesMeta": {
56
55
  "ethers": {
57
56
  "optional": true
58
- },
59
- "@aztec/bb.js": {
60
- "optional": true
61
57
  }
62
58
  },
63
59
  "keywords": [