@ledgerhq/zcash-utils 2.5.0 → 2.5.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ledgerhq/zcash-utils
2
2
 
3
+ ## 2.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - c963227: The Node addon now creates Orchard and Ironwood proofs on every core, about five times faster on an Apple M1 Max; the proof itself is unchanged.
8
+
3
9
  ## 2.5.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -16,7 +16,7 @@ Published on the public npm registry under the `@ledgerhq` scope; no registry co
16
16
 
17
17
  Prebuilt `.node` binaries are bundled for six targets — `darwin-arm64`, `darwin-x64`, `linux-x64-gnu`, `linux-arm64-gnu`, `win32-x64-msvc`, `win32-arm64-msvc` — so there is no compilation step and no Rust toolchain to install. On any other platform, build from source: see [`CONTRIBUTING.md`](CONTRIBUTING.md).
18
18
 
19
- Node.js 20 or later. The addon is a native module, so it runs in Node and in the Electron main process, not in a browser or a renderer without `nodeIntegration`.
19
+ Node.js 24 or later. The addon is a native module, so it runs in Node and in the Electron main process, not in a browser or a renderer without `nodeIntegration`.
20
20
 
21
21
  ## Quick start — scanning
22
22
 
@@ -155,7 +155,7 @@ Full signatures, every field, and its constraints are in [`index.d.ts`](index.d.
155
155
 
156
156
  | Export | Purpose |
157
157
  | --- | --- |
158
- | `buildTransaction(params)` | Builds, proves, and serializes a V5 PCZT from Orchard notes, transparent UTXOs, or both. Bears the Halo 2 proving cost inline (~2–5 s cold, ~hundreds of ms after, via a process-global proving-key cache). |
158
+ | `buildTransaction(params)` | Builds, proves, and serializes a V5 PCZT from Orchard notes, transparent UTXOs, or both. Halo 2 proving runs on every core, off the JavaScript thread: about five times faster than on a single core (roughly 0.35–0.4 s per action on an Apple M1 Max), plus a one-time proving-key build per circuit (cached process-wide). The Node addon enables this. A consumer of the `zcash-crypto` Rust crate proves on a single core unless it enables the crate's `multicore` feature; inside this workspace, feature unification turns it on for every build and test. |
159
159
  | `buildIronwoodTransaction(params)` | Same, for an Ironwood (NU6.3) source — a redacted V6 PCZT. See [Ironwood (NU6.3)](#ironwood-nu63) below. |
160
160
  | `parsePczt(pcztHex)` | Decodes canonical PCZT bytes into the `PcztTransaction` the device signer consumes. Fails if a field the device needs to sign is missing. |
161
161
  | `finalizeTransaction(params)` | Injects device signatures, computes the binding signature, extracts the signed transaction and its txid. CPU-bound (proof verification), dispatched to a blocking thread. |
package/index.d.ts CHANGED
@@ -285,10 +285,12 @@ export interface BuildTransactionResult {
285
285
  * Build, prove, and serialize a PCZT for a send transaction.
286
286
  *
287
287
  * Supports Orchard-source (Private→*) and transparent-source (Public→*)
288
- * flows. Halo 2 proof generation happens here for Orchard-bundle transactions
289
- * (~2-5 s first call, ~hundreds of ms thereafter thanks to the process-global
290
- * ProvingKey cache). Transparent-only transactions skip the Orchard prover, and
291
- * need no UFVK — see `ufvk` / `transparentAccountPubkey` on the params.
288
+ * flows. Halo 2 proof generation happens here for Orchard-bundle transactions.
289
+ * It runs on every core, off the JavaScript thread: about five times faster
290
+ * than on a single core (roughly 0.35–0.4 s per action on an Apple M1 Max),
291
+ * plus a one-time proving-key build per circuit that the
292
+ * process-global ProvingKey cache then amortizes. Transparent-only transactions
293
+ * skip the Orchard prover, and need no UFVK — see `ufvk` / `transparentAccountPubkey` on the params.
292
294
  *
293
295
  * Note: unlike `finalize_transaction` (purely CPU-bound, offloaded via
294
296
  * `spawn_blocking`), this is an async orchestrator that interleaves gRPC
@@ -375,9 +377,10 @@ export interface BuildIronwoodTransactionResult {
375
377
  * place of Orchard ones and emitting a V6 (ZIP-230) PCZT.
376
378
  *
377
379
  * Same proving-cost profile as `buildTransaction`: Halo 2 proof generation
378
- * happens here for the Ironwood bundle (~2-5 s first call against the
379
- * `PostNu6_3` circuit, ~hundreds of ms thereafter via the process-global
380
- * proving-key cache).
380
+ * happens here for the Ironwood bundle, on every core and off the JavaScript
381
+ * thread (roughly 0.35–0.4 s per action on an Apple M1 Max), plus a one-time
382
+ * proving-key build for the `PostNu6_3` circuit that the process-global
383
+ * proving-key cache then amortizes.
381
384
  */
382
385
  export declare function buildIronwoodTransaction(params: BuildIronwoodTransactionParams): Promise<BuildIronwoodTransactionResult>
383
386
  /** Parameters for finalizing a PCZT with device-provided signatures. */
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/zcash-utils",
3
- "version": "2.5.0",
3
+ "version": "2.5.1",
4
4
  "description": "Native Zcash key derivation and shielded sync — Node.js (NAPI)",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "access": "public"
19
19
  },
20
20
  "devDependencies": {
21
- "@changesets/cli": "^2.29.8",
21
+ "@changesets/cli": "^3.0.3",
22
22
  "@napi-rs/cli": "^2.18.0",
23
23
  "@types/node": "^25.5.2",
24
24
  "prettier": "^3.9.6",