@tokamak-private-dapps/private-state-cli 0.1.4 → 0.1.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.5 - 2026-04-28
4
+
5
+ - Switched channel balance proof generation to invoke `tokamak-groth16 --prove` instead of importing Groth16 proof internals directly.
6
+ - Read proof artifacts from the fixed Groth16 runtime workspace manifest.
7
+
3
8
  ## 0.1.4 - 2026-04-28
4
9
 
5
10
  - Paced chunked log recovery queries at five requests per second to avoid RPC throughput bursts.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokamak-private-dapps/private-state-cli",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Command-line client for the Tokamak private-state DApp.",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "author": "Tokamak Network",
@@ -43,7 +43,7 @@
43
43
  "@ethereumjs/util": "^10.1.1",
44
44
  "@noble/curves": "^1.2.0",
45
45
  "@tokamak-private-dapps/common-library": "^0.1.0",
46
- "@tokamak-private-dapps/groth16": "^0.1.0",
46
+ "@tokamak-private-dapps/groth16": "^0.1.1",
47
47
  "@tokamak-zk-evm/cli": "^2.0.8",
48
48
  "ethers": "^6.14.1",
49
49
  "tokamak-l2js": "^0.1.3"
@@ -67,7 +67,6 @@ import {
67
67
  PUBLIC_GROTH16_MPC_DRIVE_FOLDER_ID,
68
68
  downloadLatestPublicGroth16MpcArtifacts,
69
69
  } from "@tokamak-private-dapps/groth16/public-drive-crs";
70
- import { main as generateUpdateTreeProof } from "@tokamak-private-dapps/groth16/prover/updateTree/generateProof";
71
70
  import {
72
71
  CHANNEL_BOUND_L2_DERIVATION_MODE,
73
72
  deriveChannelIdFromName,
@@ -3457,10 +3456,7 @@ async function buildGrothTransition({ operationDir, workspace, stateManager, vau
3457
3456
 
3458
3457
  const inputPath = path.join(operationDir, "input.json");
3459
3458
  writeJson(inputPath, input);
3460
- const proofManifest = await generateUpdateTreeProof([
3461
- "--input",
3462
- inputPath,
3463
- ]);
3459
+ const proofManifest = runGroth16UpdateTreeProof(inputPath);
3464
3460
 
3465
3461
  const proofJson = readJson(proofManifest.proofPath);
3466
3462
  const publicSignals = readJson(proofManifest.publicPath);
@@ -3507,6 +3503,21 @@ function runCaptured(command, args, { cwd = defaultCommandCwd, env = process.env
3507
3503
  };
3508
3504
  }
3509
3505
 
3506
+ function runGroth16UpdateTreeProof(inputPath) {
3507
+ const packageRoot = resolveGroth16PackageRoot();
3508
+ const entryPath = resolveGroth16CliEntryPath(packageRoot);
3509
+ run(process.execPath, [entryPath, "--prove", inputPath], { cwd: packageRoot });
3510
+ const manifestPath = groth16ProofManifestPath();
3511
+ const manifest = readJson(manifestPath);
3512
+ expect(typeof manifest.proofPath === "string" && manifest.proofPath.length > 0, "Groth16 proof manifest is missing proofPath.");
3513
+ expect(typeof manifest.publicPath === "string" && manifest.publicPath.length > 0, "Groth16 proof manifest is missing publicPath.");
3514
+ return manifest;
3515
+ }
3516
+
3517
+ function groth16ProofManifestPath() {
3518
+ return path.join(os.homedir(), "tokamak-private-channels", "groth16", "proof", "proof-manifest.json");
3519
+ }
3520
+
3510
3521
  function runTokamakProofPipeline({ operationDir, bundlePath }) {
3511
3522
  runTokamakCliStage({
3512
3523
  operationDir,