@ledgerhq/zcash-utils 2.0.0 → 2.1.0

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.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - abe272e: Surface the Ironwood bundle from `parsePczt`.
8
+
3
9
  ## 2.0.0
4
10
 
5
11
  ### Major Changes
package/index.d.ts CHANGED
@@ -560,6 +560,61 @@ export interface PcztOrchardBundle {
560
560
  /** Orchard commitment-tree anchor, 32 bytes. */
561
561
  anchor: Uint8Array
562
562
  }
563
+ /**
564
+ * A single Ironwood action (NU6.3, V6 transactions only).
565
+ *
566
+ * The wire format mirrors an Orchard action with the PCZT v2
567
+ * `note_plaintext_version` byte appended; the fields are spelled out here
568
+ * rather than nested so the object maps 1:1 onto the signer's
569
+ * `PcztIronwoodAction`.
570
+ */
571
+ export interface PcztIronwoodAction {
572
+ /** Value commitment, 32 bytes. */
573
+ cvNet: Uint8Array
574
+ /** Spend nullifier, 32 bytes. */
575
+ nullifier: Uint8Array
576
+ /** Randomized verification key, 32 bytes. */
577
+ rk: Uint8Array
578
+ /** Raw Orchard address of the spent note, 43 bytes. */
579
+ spendRecipient: Uint8Array
580
+ /** Spent-note value in zatoshis (decimal string to avoid f64 precision loss). */
581
+ spendValue: string
582
+ /** Spend rho, 32 bytes. */
583
+ spendRho: Uint8Array
584
+ /** Spend rseed, 32 bytes. */
585
+ spendRseed: Uint8Array
586
+ /** Spend-authorization randomizer, 32 bytes. */
587
+ alpha: Uint8Array
588
+ /** ZIP-32 derivation path of the signing key. */
589
+ signingPath: string
590
+ /** ZIP-32 seed fingerprint, 32 bytes. */
591
+ seedFingerprint: Uint8Array
592
+ /** Note commitment x-coordinate, 32 bytes. */
593
+ cmx: Uint8Array
594
+ /** Ephemeral key, 32 bytes. */
595
+ ephemeralKey: Uint8Array
596
+ encCiphertext: Uint8Array
597
+ outCiphertext: Uint8Array
598
+ /** Raw Orchard address of the output note, 43 bytes. */
599
+ recipient: Uint8Array
600
+ /** Output-note value in zatoshis (decimal string to avoid f64 precision loss). */
601
+ value: string
602
+ /** Output rseed, 32 bytes. */
603
+ rseed: Uint8Array
604
+ /** Value commitment randomness, 32 bytes. */
605
+ rcv: Uint8Array
606
+ /** Note-plaintext lead byte (`0x03` for Ironwood), required for PCZT v2. */
607
+ notePlaintextVersion: number
608
+ }
609
+ /** The Ironwood action bundle plus its trailer (V6 transactions only). */
610
+ export interface PcztIronwoodBundle {
611
+ actions: Array<PcztIronwoodAction>
612
+ flags: number
613
+ /** Net value balance in zatoshis (signed decimal string, lossless for i128). */
614
+ valueBalance: string
615
+ /** Ironwood commitment-tree anchor, 32 bytes. */
616
+ anchor: Uint8Array
617
+ }
563
618
  /** A fully structured PCZT ready for `DmkSignerZcash.signPcztTransaction`. */
564
619
  export interface PcztTransaction {
565
620
  global: PcztGlobal
@@ -567,6 +622,12 @@ export interface PcztTransaction {
567
622
  transparentOutputs: Array<PcztTransparentOutput>
568
623
  /** `null` when the transaction has no Orchard actions. */
569
624
  orchardBundle?: PcztOrchardBundle
625
+ /**
626
+ * `null` when the transaction has no Ironwood actions. Always `null` below
627
+ * transaction version 6 — the Ironwood pool is V6-only, and the signer
628
+ * rejects an Ironwood bundle on a V5 transaction.
629
+ */
630
+ ironwoodBundle?: PcztIronwoodBundle
570
631
  }
571
632
  /**
572
633
  * Parse canonical PCZT bytes (hex, as returned by `buildTransaction`) into the
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.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Native Zcash key derivation and shielded sync — Node.js (NAPI)",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",