Skip to content

feat: native wallet zcash support#760

Merged
gomesalexandre merged 12 commits intomasterfrom
zcash-support
Dec 5, 2025
Merged

feat: native wallet zcash support#760
gomesalexandre merged 12 commits intomasterfrom
zcash-support

Conversation

@kaladinlight
Copy link
Contributor

@kaladinlight kaladinlight commented Dec 3, 2025

Summary by CodeRabbit

  • New Features

    • Zcash support added to the sandbox: retrieve public keys/addresses and sign Zcash transactions via the UI.
  • Improvements

    • Zcash-aware signing flow with correct Zcash versioning and enhanced signature/hash handling.
  • Chores

    • Workspace version bumps and update of the underlying Bitcoin library and related packages.

✏️ Tip: You can customize this high-level summary in your review settings.

@kaladinlight kaladinlight requested a review from a team as a code owner December 3, 2025 21:39
@coderabbitai
Copy link

coderabbitai bot commented Dec 3, 2025

Warning

Rate limit exceeded

@gomesalexandre has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 18 minutes and 36 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 5f726f8 and 441de83.

📒 Files selected for processing (27)
  • examples/sandbox/package.json (2 hunks)
  • integration/package.json (2 hunks)
  • lerna.json (1 hunks)
  • packages/hdwallet-coinbase/package.json (2 hunks)
  • packages/hdwallet-core/package.json (2 hunks)
  • packages/hdwallet-gridplus/package.json (2 hunks)
  • packages/hdwallet-keepkey-chromeusb/package.json (2 hunks)
  • packages/hdwallet-keepkey-electron/package.json (2 hunks)
  • packages/hdwallet-keepkey-nodehid/package.json (2 hunks)
  • packages/hdwallet-keepkey-nodewebusb/package.json (2 hunks)
  • packages/hdwallet-keepkey-tcp/package.json (2 hunks)
  • packages/hdwallet-keepkey-webusb/package.json (2 hunks)
  • packages/hdwallet-keepkey/package.json (2 hunks)
  • packages/hdwallet-keplr/package.json (2 hunks)
  • packages/hdwallet-ledger-webhid/package.json (2 hunks)
  • packages/hdwallet-ledger-webusb/package.json (2 hunks)
  • packages/hdwallet-ledger/package.json (2 hunks)
  • packages/hdwallet-metamask-multichain/package.json (2 hunks)
  • packages/hdwallet-native-vault/package.json (2 hunks)
  • packages/hdwallet-native/package.json (2 hunks)
  • packages/hdwallet-phantom/package.json (2 hunks)
  • packages/hdwallet-portis/package.json (2 hunks)
  • packages/hdwallet-trezor-connect/package.json (2 hunks)
  • packages/hdwallet-trezor/package.json (2 hunks)
  • packages/hdwallet-vultisig/package.json (2 hunks)
  • packages/hdwallet-walletconnect/package.json (2 hunks)
  • packages/hdwallet-walletconnectV2/package.json (2 hunks)
📝 Walkthrough

Walkthrough

Adds Zcash support: network config and SLIP-44 entry, native wallet PSBT/signing handling with Zcash-specific versioning, sandbox UI for Zcash xpub/address/signing, a bitcoinjs-lib patch exposing optional singleHash parameters, and wide package version bumps.

Changes

Cohort / File(s) Summary
Sandbox UI Examples
examples/sandbox/index.html, examples/sandbox/index.ts
Added Zcash UI/Xpubs button; wired Zcash public-keys input (44'/133'/0'), address retrieval (showDisplay), and a Zcash transaction signing flow that calls btcSignTx(coin="Zcash").
Core Network & SLIP-44
packages/hdwallet-core/src/networks.ts, packages/hdwallet-core/src/utils.ts
Added zcash network entry and SLIP-44 mapping Zcash: 133.
Native Wallet Bitcoin Logic
packages/hdwallet-native/src/bitcoin.ts
Integrated zcash into supportedCoins and account paths; added Zcash constants and initialized PSBT with Zcash-specific version, versionGroupId, and consensusBranchId; resolved forkCoin mapping (zcash→zec).
Type-safety Tweak
packages/hdwallet-core/src/bitcoin.ts
Use typed key access when checking OP_RETURN opcode (k as keyof typeof bitcoin.script.OPS) for TypeScript safety.
bitcoinjs-lib Patch
patches/@shapeshiftoss+bitcoinjs-lib+7.0.0-shapeshift.0.patch
Extended PSBT/Transaction method signatures with optional singleHash boolean; threaded singleHash through internal hashing/signing utilities and updated TypeScript declarations.
Package Manifests / Version Bumps
lerna.json, examples/sandbox/package.json, integration/package.json, packages/.../package.json
Bumped versions to 1.62.22 and updated @shapeshiftoss/bitcoinjs-lib to 7.0.0-shapeshift.2 and internal @shapeshiftoss/hdwallet-* references across many packages.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant UI as Sandbox UI
    participant Core as hdwallet-native
    participant PSBT as bitcoinjs-lib PSBT
    participant Device as Wallet/Device

    User->>UI: Trigger Zcash sign flow
    UI->>Core: btcSignTx(coin="Zcash", inputs, outputs)
    Core->>Core: Resolve forkCoin (zcash → zec) and set Zcash version/ids
    Core->>PSBT: Init PSBT (version=5, versionGroupId, consensusBranchId)
    PSBT->>PSBT: Build Zcash transaction
    Core->>Device: Request signatures (may pass singleHash)
    Device-->>Core: Signatures or error
    Core-->>UI: Serialized transaction or failure
    UI-->>User: Display result
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Extra attention:
    • bitcoinjs-lib patch: verify singleHash propagation and backward compatibility.
    • Zcash constants and forkCoin mapping in packages/hdwallet-native/src/bitcoin.ts.
    • Network parameters and bip32 constants in packages/hdwallet-core/src/networks.ts.
    • Sandbox UI flows in examples/sandbox/index.ts for unsupported-wallet handling.

Possibly related PRs

Suggested reviewers

  • NeOMakinG

Poem

🐇 I hop and sniff the code at dawn,
Zcash seeds planted on the lawn,
PSBT hums with version five,
singleHash helps signatures thrive,
A tiny hop — a new chain born.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: native wallet zcash support' directly and clearly summarizes the main change: adding Zcash support to the native wallet implementation.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@twblack88
Copy link

🧨 yay

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between b770a29 and 9c75e22.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (14)
  • examples/sandbox/index.html (2 hunks)
  • examples/sandbox/index.ts (3 hunks)
  • packages/hdwallet-core/package.json (1 hunks)
  • packages/hdwallet-core/src/bitcoin.ts (1 hunks)
  • packages/hdwallet-core/src/networks.ts (1 hunks)
  • packages/hdwallet-core/src/utils.ts (1 hunks)
  • packages/hdwallet-keepkey/package.json (1 hunks)
  • packages/hdwallet-ledger/package.json (1 hunks)
  • packages/hdwallet-native/package.json (1 hunks)
  • packages/hdwallet-native/src/bitcoin.ts (3 hunks)
  • packages/hdwallet-phantom/package.json (1 hunks)
  • packages/hdwallet-portis/package.json (1 hunks)
  • packages/hdwallet-vultisig/package.json (1 hunks)
  • patches/@shapeshiftoss+bitcoinjs-lib+7.0.0-shapeshift.0.patch (0 hunks)
💤 Files with no reviewable changes (1)
  • patches/@shapeshiftoss+bitcoinjs-lib+7.0.0-shapeshift.0.patch
🧰 Additional context used
🧠 Learnings (6)
📚 Learning: 2025-11-20T11:04:44.808Z
Learnt from: gomesalexandre
Repo: shapeshift/hdwallet PR: 737
File: packages/hdwallet-trezor/src/ethereum.ts:122-138
Timestamp: 2025-11-20T11:04:44.808Z
Learning: In packages/hdwallet-trezor/src/ethereum.ts, the ethSignTypedData function correctly returns the signature from res.payload.signature without adding a "0x" prefix. This works correctly in practice and has been tested, despite appearing inconsistent with ethSignMessage which does add the prefix. The Trezor Connect ethereumSignTypedData response already provides the signature in the correct format for consumption.

Applied to files:

  • packages/hdwallet-core/src/bitcoin.ts
  • packages/hdwallet-native/src/bitcoin.ts
📚 Learning: 2025-08-07T15:47:29.207Z
Learnt from: gomesalexandre
Repo: shapeshift/hdwallet PR: 726
File: packages/hdwallet-ledger/src/transport.ts:10-10
Timestamp: 2025-08-07T15:47:29.207Z
Learning: In the shapeshiftoss/hdwallet monorepo, ts-ignore is used instead of ts-expect-error for Ledger transport imports because the code works locally without TypeScript errors but has issues in CI environment. Using ts-expect-error would fail locally since there are no actual errors to suppress.

Applied to files:

  • packages/hdwallet-core/src/bitcoin.ts
  • packages/hdwallet-native/package.json
  • packages/hdwallet-keepkey/package.json
  • packages/hdwallet-phantom/package.json
  • packages/hdwallet-vultisig/package.json
  • packages/hdwallet-core/package.json
  • packages/hdwallet-portis/package.json
  • packages/hdwallet-ledger/package.json
📚 Learning: 2025-08-07T15:23:54.858Z
Learnt from: gomesalexandre
Repo: shapeshift/hdwallet PR: 726
File: packages/hdwallet-coinbase/package.json:18-18
Timestamp: 2025-08-07T15:23:54.858Z
Learning: In the shapeshiftoss/hdwallet monorepo, package version bumps are done in PRs before publishing. The packages are published after the PR is merged, so dependency versions may reference unpublished versions during the PR review phase. This is expected behavior in their release workflow.

Applied to files:

  • packages/hdwallet-native/package.json
  • packages/hdwallet-keepkey/package.json
  • packages/hdwallet-phantom/package.json
  • packages/hdwallet-vultisig/package.json
  • packages/hdwallet-core/package.json
  • packages/hdwallet-portis/package.json
  • packages/hdwallet-ledger/package.json
📚 Learning: 2025-08-07T15:27:03.179Z
Learnt from: gomesalexandre
Repo: shapeshift/hdwallet PR: 726
File: packages/hdwallet-ledger/package.json:36-36
Timestamp: 2025-08-07T15:27:03.179Z
Learning: In the shapeshiftoss/hdwallet monorepo, the ledgerhq/hw-transport dependency in packages/hdwallet-ledger/package.json is pinned to an exact version (without caret) due to type mismatches that occur with newer versions. Other Ledger dependencies can safely use caret ranges.

Applied to files:

  • packages/hdwallet-native/package.json
  • packages/hdwallet-keepkey/package.json
  • packages/hdwallet-phantom/package.json
  • packages/hdwallet-vultisig/package.json
  • packages/hdwallet-core/package.json
  • packages/hdwallet-portis/package.json
  • packages/hdwallet-ledger/package.json
📚 Learning: 2025-08-07T15:24:19.530Z
Learnt from: gomesalexandre
Repo: shapeshift/hdwallet PR: 726
File: packages/hdwallet-ledger-webusb/package.json:3-3
Timestamp: 2025-08-07T15:24:19.530Z
Learning: In the shapeshiftoss/hdwallet monorepo, the team runs `yarn build` before bumping versions and also before publishing packages. This ensures that dist/ artifacts (including UMD bundles) are properly regenerated after dependency updates.

Applied to files:

  • packages/hdwallet-native/package.json
  • packages/hdwallet-keepkey/package.json
  • packages/hdwallet-phantom/package.json
  • packages/hdwallet-vultisig/package.json
  • packages/hdwallet-core/package.json
  • packages/hdwallet-portis/package.json
  • packages/hdwallet-ledger/package.json
📚 Learning: 2025-08-07T15:47:26.835Z
Learnt from: gomesalexandre
Repo: shapeshift/hdwallet PR: 726
File: packages/hdwallet-ledger-webusb/src/transport.ts:12-12
Timestamp: 2025-08-07T15:47:26.835Z
Learning: In the shapeshiftoss/hdwallet monorepo, ts-ignore is used instead of ts-expect-error for Ledger transport imports because the CI environment has different type checking behavior than local development. The code works locally without errors, but CI reports type issues, so ts-ignore is necessary to suppress the inconsistent type checking across environments.

Applied to files:

  • packages/hdwallet-keepkey/package.json
  • packages/hdwallet-core/package.json
  • packages/hdwallet-ledger/package.json
🧬 Code graph analysis (1)
packages/hdwallet-native/src/bitcoin.ts (1)
packages/hdwallet-ledger/src/bitcoin.ts (1)
  • supportedCoins (16-16)
🔇 Additional comments (20)
packages/hdwallet-core/src/utils.ts (1)

144-144: LGTM!

The SLIP-44 coin type 133 for Zcash is correct per the official SLIP-0044 registry.

packages/hdwallet-core/src/bitcoin.ts (1)

521-524: LGTM!

This is a TypeScript type-safety improvement. The explicit cast ensures proper type inference when accessing bitcoin.script.OPS keys. The logic remains functionally equivalent.

examples/sandbox/index.ts (3)

730-738: LGTM!

The Zcash public key input configuration is correct:

  • Derivation path m/44'/133'/0' uses the correct SLIP-44 coin type for Zcash
  • SpendAddress script type is appropriate for Zcash transparent P2PKH addresses

3683-3706: LGTM!

The Zcash address retrieval flow correctly mirrors the pattern used for other UTXO coins, using the appropriate BIP-44 path with coin type 133.


3740-3744: Verify omission of version and locktime is intentional.

Unlike other UTXO coin transaction examples in this file (e.g., BTC, LTC, DOGE), the Zcash btcSignTx call omits version and locktime parameters. Zcash v5 transactions use a different structure, so this may be handled internally by the signing logic, but please verify this is intentional.

examples/sandbox/index.html (2)

161-161: LGTM!

The Zcash Xpubs button follows the established naming convention (coin-Zcash) used by other cryptocurrencies in this section.


391-396: LGTM!

The Zcash UI container is correctly structured with matching IDs (zecAddr, zecTx, zecResults) that correspond to the handlers defined in index.ts.

packages/hdwallet-core/src/networks.ts (1)

130-150: Zcash network constants are correct.

The address prefixes are verified: 0x1cb8 for t1 (P2PKH) and 0x1cbd for t3 (P2SH) transparent addresses match Zcash mainnet specifications. The empty bech32 field is appropriate since Zcash transparent addresses use base58 encoding. The bip32 derivation values align with standard Zcash configuration.

packages/hdwallet-phantom/package.json (1)

17-17: Dependency version bump aligned across packages.

This aligns with the broader bitcoinjs-lib update to 7.0.0-shapeshift.2 across all wallet packages (hdwallet-core, hdwallet-keepkey, hdwallet-ledger, hdwallet-native, hdwallet-portis, hdwallet-vultisig).

packages/hdwallet-portis/package.json (1)

18-18: Consistent dependency bump.

Version update matches other wallet packages in this PR.

packages/hdwallet-vultisig/package.json (1)

19-19: Consistent dependency bump across wallet packages.

packages/hdwallet-core/package.json (1)

17-17: Core package dependency update.

This core dependency bump should be reflected in all dependent wallet packages—confirmed in hdwallet-keepkey, hdwallet-ledger, hdwallet-native, hdwallet-phantom, hdwallet-portis, and hdwallet-vultisig.

packages/hdwallet-native/package.json (1)

19-19: Dependency update consistent with other packages.

packages/hdwallet-keepkey/package.json (1)

23-23: Consistent dependency update.

packages/hdwallet-ledger/package.json (1)

29-29: Consistent dependency update.

Note: Zcash support in this PR is scoped to the native wallet implementation; Ledger's supportedCoins correctly excludes zcash.

packages/hdwallet-native/src/bitcoin.ts (5)

9-9: Zcash support initialization looks correct.

The constants and supportedCoins addition are properly configured for Zcash integration. Lowercase "zcash" in supportedCoins aligns with the .toLowerCase() comparison pattern used throughout the module.

Also applies to: 13-18


89-89: Zcash account paths correctly scoped to legacy BIP44.

Zcash does not support segwit paths (bip49/bip84); bip44-only is the correct configuration.


201-210: ForkCoin resolution is well-structured.

The switch statement correctly maps bitcoincash and zcash to their respective forkCoin identifiers ("bch" and "zec"), with "none" as the default to preserve existing behavior for other coins.


286-298: Input signing logic unchanged.

The signing loop remains consistent; Zcash-specific handling is delegated to the PSBT object (via forkCoin and version settings configured earlier).


212-226: The concern about missing PSBT methods is unfounded.

The code at lines 221–222 already calls setVersionGroupId() and setConsensusBranchId() on the PSBT object. Since the package uses TypeScript with strict type checking enabled, any missing methods would cause a compilation error. The fact that this code is already committed and merged indicates these methods are available in @shapeshiftoss/bitcoinjs-lib@7.0.0-shapeshift.2. No verification action is needed.

Likely an incorrect or invalid review comment.

@gomesalexandre gomesalexandre self-requested a review December 4, 2025 11:47
Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conceptually happy w this! Happy to stamp/merge once web PR is opened and tested

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/hdwallet-ledger-webhid/package.json (1)

1-100: yarn build has not been executed—dist/ artifacts are missing from all packages.

The dist/ directories and tsconfig.tsbuildinfo files are absent from the ledger-webhid, ledger-webusb, ledger, coinbase, and other packages. Run yarn build to regenerate the build artifacts before this PR is ready for merge.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 9c75e22 and caea8ae.

📒 Files selected for processing (28)
  • examples/sandbox/index.ts (3 hunks)
  • examples/sandbox/package.json (2 hunks)
  • integration/package.json (2 hunks)
  • lerna.json (1 hunks)
  • packages/hdwallet-coinbase/package.json (2 hunks)
  • packages/hdwallet-core/package.json (2 hunks)
  • packages/hdwallet-gridplus/package.json (2 hunks)
  • packages/hdwallet-keepkey-chromeusb/package.json (2 hunks)
  • packages/hdwallet-keepkey-electron/package.json (2 hunks)
  • packages/hdwallet-keepkey-nodehid/package.json (2 hunks)
  • packages/hdwallet-keepkey-nodewebusb/package.json (2 hunks)
  • packages/hdwallet-keepkey-tcp/package.json (2 hunks)
  • packages/hdwallet-keepkey-webusb/package.json (2 hunks)
  • packages/hdwallet-keepkey/package.json (2 hunks)
  • packages/hdwallet-keplr/package.json (2 hunks)
  • packages/hdwallet-ledger-webhid/package.json (2 hunks)
  • packages/hdwallet-ledger-webusb/package.json (2 hunks)
  • packages/hdwallet-ledger/package.json (2 hunks)
  • packages/hdwallet-metamask-multichain/package.json (2 hunks)
  • packages/hdwallet-native-vault/package.json (2 hunks)
  • packages/hdwallet-native/package.json (2 hunks)
  • packages/hdwallet-phantom/package.json (2 hunks)
  • packages/hdwallet-portis/package.json (2 hunks)
  • packages/hdwallet-trezor-connect/package.json (2 hunks)
  • packages/hdwallet-trezor/package.json (2 hunks)
  • packages/hdwallet-vultisig/package.json (2 hunks)
  • packages/hdwallet-walletconnect/package.json (2 hunks)
  • packages/hdwallet-walletconnectV2/package.json (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/hdwallet-walletconnect/package.json
🚧 Files skipped from review as they are similar to previous changes (5)
  • packages/hdwallet-ledger/package.json
  • packages/hdwallet-portis/package.json
  • packages/hdwallet-keepkey/package.json
  • packages/hdwallet-core/package.json
  • packages/hdwallet-native/package.json
🧰 Additional context used
🧠 Learnings (7)
📚 Learning: 2025-08-07T15:27:03.179Z
Learnt from: gomesalexandre
Repo: shapeshift/hdwallet PR: 726
File: packages/hdwallet-ledger/package.json:36-36
Timestamp: 2025-08-07T15:27:03.179Z
Learning: In the shapeshiftoss/hdwallet monorepo, the ledgerhq/hw-transport dependency in packages/hdwallet-ledger/package.json is pinned to an exact version (without caret) due to type mismatches that occur with newer versions. Other Ledger dependencies can safely use caret ranges.

Applied to files:

  • packages/hdwallet-keepkey-nodewebusb/package.json
  • integration/package.json
  • packages/hdwallet-trezor/package.json
  • packages/hdwallet-keplr/package.json
  • packages/hdwallet-ledger-webusb/package.json
  • packages/hdwallet-vultisig/package.json
  • packages/hdwallet-keepkey-nodehid/package.json
  • packages/hdwallet-metamask-multichain/package.json
  • packages/hdwallet-coinbase/package.json
  • packages/hdwallet-ledger-webhid/package.json
  • packages/hdwallet-native-vault/package.json
  • packages/hdwallet-keepkey-tcp/package.json
  • packages/hdwallet-phantom/package.json
  • packages/hdwallet-walletconnectV2/package.json
  • packages/hdwallet-keepkey-webusb/package.json
  • packages/hdwallet-keepkey-chromeusb/package.json
  • examples/sandbox/index.ts
  • packages/hdwallet-trezor-connect/package.json
  • packages/hdwallet-gridplus/package.json
  • examples/sandbox/package.json
  • packages/hdwallet-keepkey-electron/package.json
📚 Learning: 2025-08-07T15:23:54.858Z
Learnt from: gomesalexandre
Repo: shapeshift/hdwallet PR: 726
File: packages/hdwallet-coinbase/package.json:18-18
Timestamp: 2025-08-07T15:23:54.858Z
Learning: In the shapeshiftoss/hdwallet monorepo, package version bumps are done in PRs before publishing. The packages are published after the PR is merged, so dependency versions may reference unpublished versions during the PR review phase. This is expected behavior in their release workflow.

Applied to files:

  • packages/hdwallet-keepkey-nodewebusb/package.json
  • integration/package.json
  • packages/hdwallet-trezor/package.json
  • packages/hdwallet-keplr/package.json
  • packages/hdwallet-ledger-webusb/package.json
  • packages/hdwallet-vultisig/package.json
  • packages/hdwallet-keepkey-nodehid/package.json
  • packages/hdwallet-metamask-multichain/package.json
  • packages/hdwallet-coinbase/package.json
  • packages/hdwallet-ledger-webhid/package.json
  • packages/hdwallet-native-vault/package.json
  • packages/hdwallet-keepkey-tcp/package.json
  • packages/hdwallet-phantom/package.json
  • packages/hdwallet-walletconnectV2/package.json
  • packages/hdwallet-keepkey-webusb/package.json
  • packages/hdwallet-keepkey-chromeusb/package.json
  • packages/hdwallet-trezor-connect/package.json
  • packages/hdwallet-gridplus/package.json
  • examples/sandbox/package.json
  • packages/hdwallet-keepkey-electron/package.json
📚 Learning: 2025-08-07T15:24:19.530Z
Learnt from: gomesalexandre
Repo: shapeshift/hdwallet PR: 726
File: packages/hdwallet-ledger-webusb/package.json:3-3
Timestamp: 2025-08-07T15:24:19.530Z
Learning: In the shapeshiftoss/hdwallet monorepo, the team runs `yarn build` before bumping versions and also before publishing packages. This ensures that dist/ artifacts (including UMD bundles) are properly regenerated after dependency updates.

Applied to files:

  • packages/hdwallet-keepkey-nodewebusb/package.json
  • integration/package.json
  • packages/hdwallet-trezor/package.json
  • packages/hdwallet-keplr/package.json
  • packages/hdwallet-ledger-webusb/package.json
  • packages/hdwallet-vultisig/package.json
  • packages/hdwallet-keepkey-nodehid/package.json
  • packages/hdwallet-metamask-multichain/package.json
  • packages/hdwallet-coinbase/package.json
  • packages/hdwallet-ledger-webhid/package.json
  • packages/hdwallet-native-vault/package.json
  • packages/hdwallet-keepkey-tcp/package.json
  • packages/hdwallet-phantom/package.json
  • packages/hdwallet-walletconnectV2/package.json
  • packages/hdwallet-keepkey-webusb/package.json
  • packages/hdwallet-keepkey-chromeusb/package.json
  • packages/hdwallet-trezor-connect/package.json
  • packages/hdwallet-gridplus/package.json
  • examples/sandbox/package.json
  • packages/hdwallet-keepkey-electron/package.json
📚 Learning: 2025-08-07T15:47:29.207Z
Learnt from: gomesalexandre
Repo: shapeshift/hdwallet PR: 726
File: packages/hdwallet-ledger/src/transport.ts:10-10
Timestamp: 2025-08-07T15:47:29.207Z
Learning: In the shapeshiftoss/hdwallet monorepo, ts-ignore is used instead of ts-expect-error for Ledger transport imports because the code works locally without TypeScript errors but has issues in CI environment. Using ts-expect-error would fail locally since there are no actual errors to suppress.

Applied to files:

  • packages/hdwallet-keepkey-nodewebusb/package.json
  • integration/package.json
  • packages/hdwallet-trezor/package.json
  • packages/hdwallet-keplr/package.json
  • packages/hdwallet-ledger-webusb/package.json
  • packages/hdwallet-vultisig/package.json
  • packages/hdwallet-keepkey-nodehid/package.json
  • packages/hdwallet-metamask-multichain/package.json
  • packages/hdwallet-coinbase/package.json
  • packages/hdwallet-ledger-webhid/package.json
  • packages/hdwallet-native-vault/package.json
  • packages/hdwallet-keepkey-tcp/package.json
  • packages/hdwallet-phantom/package.json
  • packages/hdwallet-walletconnectV2/package.json
  • packages/hdwallet-keepkey-webusb/package.json
  • packages/hdwallet-keepkey-chromeusb/package.json
  • examples/sandbox/index.ts
  • packages/hdwallet-trezor-connect/package.json
  • packages/hdwallet-gridplus/package.json
  • examples/sandbox/package.json
  • packages/hdwallet-keepkey-electron/package.json
📚 Learning: 2025-08-07T15:47:26.835Z
Learnt from: gomesalexandre
Repo: shapeshift/hdwallet PR: 726
File: packages/hdwallet-ledger-webusb/src/transport.ts:12-12
Timestamp: 2025-08-07T15:47:26.835Z
Learning: In the shapeshiftoss/hdwallet monorepo, ts-ignore is used instead of ts-expect-error for Ledger transport imports because the CI environment has different type checking behavior than local development. The code works locally without errors, but CI reports type issues, so ts-ignore is necessary to suppress the inconsistent type checking across environments.

Applied to files:

  • packages/hdwallet-keepkey-nodewebusb/package.json
  • integration/package.json
  • packages/hdwallet-trezor/package.json
  • packages/hdwallet-keplr/package.json
  • packages/hdwallet-ledger-webusb/package.json
  • packages/hdwallet-vultisig/package.json
  • packages/hdwallet-keepkey-nodehid/package.json
  • packages/hdwallet-metamask-multichain/package.json
  • packages/hdwallet-coinbase/package.json
  • packages/hdwallet-ledger-webhid/package.json
  • packages/hdwallet-native-vault/package.json
  • packages/hdwallet-keepkey-tcp/package.json
  • packages/hdwallet-phantom/package.json
  • packages/hdwallet-walletconnectV2/package.json
  • packages/hdwallet-keepkey-webusb/package.json
  • packages/hdwallet-keepkey-chromeusb/package.json
  • examples/sandbox/index.ts
  • packages/hdwallet-trezor-connect/package.json
  • packages/hdwallet-gridplus/package.json
  • examples/sandbox/package.json
  • packages/hdwallet-keepkey-electron/package.json
📚 Learning: 2025-11-20T11:04:44.808Z
Learnt from: gomesalexandre
Repo: shapeshift/hdwallet PR: 737
File: packages/hdwallet-trezor/src/ethereum.ts:122-138
Timestamp: 2025-11-20T11:04:44.808Z
Learning: In packages/hdwallet-trezor/src/ethereum.ts, the ethSignTypedData function correctly returns the signature from res.payload.signature without adding a "0x" prefix. This works correctly in practice and has been tested, despite appearing inconsistent with ethSignMessage which does add the prefix. The Trezor Connect ethereumSignTypedData response already provides the signature in the correct format for consumption.

Applied to files:

  • examples/sandbox/index.ts
📚 Learning: 2025-08-07T15:24:34.076Z
Learnt from: gomesalexandre
Repo: shapeshift/hdwallet PR: 726
File: examples/sandbox/package.json:15-31
Timestamp: 2025-08-07T15:24:34.076Z
Learning: Lerna v6+ supports workspace protocol syntax (workspace:*) but does not automatically convert exact versions to workspace protocol during version bumps. It only preserves existing workspace protocol syntax. Teams using Lerna for automated version bumps would need manual conversion to use workspace protocol, which negates automation benefits.

Applied to files:

  • lerna.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build and Release
🔇 Additional comments (24)
packages/hdwallet-keepkey-nodewebusb/package.json (1)

3-3: Version and dependency updates are consistent.

The version bump to 1.62.22-alpha.0 and corresponding updates to @shapeshiftoss/hdwallet-core and @shapeshiftoss/hdwallet-keepkey dependencies are properly aligned. Based on learnings from this monorepo, referencing unpublished versions during PR review is expected during the release workflow.

Verify that yarn build was run to regenerate dist/ artifacts after the version bump, as per the monorepo's standard release process.

Also applies to: 17-18

packages/hdwallet-keepkey-electron/package.json (1)

3-3: Version and dependency bumps look good.

The version is consistently bumped to 1.62.22-alpha.0 across both the package version and the internal @shapeshiftoss/hdwallet-keepkey dependency. The prerelease format is valid, and the coordinated bumping across the monorepo aligns with the Zcash support feature being added in this PR.

Also applies to: 17-17

packages/hdwallet-keepkey-chromeusb/package.json (1)

3-3: Standard alpha pre-release version bump—looks good.

Version and dependency updates are consistent and follow the monorepo's established versioning pattern for feature PRs. All internal dependencies are synchronized to the alpha pre-release (1.62.22-alpha.0), which aligns with the Zcash support feature additions.

Per your monorepo learnings, please verify that yarn build was executed before this version bump (as learnings from PR #726 indicate this should happen before versioning). Can you confirm the dist artifacts were regenerated?

Also applies to: 17-18

packages/hdwallet-keepkey-nodehid/package.json (1)

3-3: Version and dependency alignment look good for the pre-release Zcash feature.

The version bump to 1.62.22-alpha.0 and the corresponding dependency update to the same version are properly aligned. This follows the expected pattern for coordinated pre-release updates in this monorepo, as noted in prior PRs.

Please ensure that yarn build has been run for this package as part of the PR changes, as per the monorepo's standard pre-release workflow. You can verify this by checking that dist/ artifacts have been regenerated with the updated dependencies.

Also applies to: 17-17

packages/hdwallet-native-vault/package.json (1)

3-3: Version bump and dependency pinning look good.

The alpha pre-release bump to 1.62.22-alpha.0 is appropriate for the Zcash support feature work. The exact version pinning for the internal @shapeshiftoss/hdwallet-native dependency follows monorepo best practices and ensures consistent versioning across all 23 packages in the hdwallet monorepo.

packages/hdwallet-gridplus/package.json (2)

3-3: Version and dependency bumps are consistent.

The package version and @shapeshiftoss/hdwallet-core dependency are both updated to 1.62.22-alpha.0, maintaining alignment across the monorepo. The alpha prerelease version is appropriate for the Zcash feature addition prior to stable release.

Also applies to: 23-23


3-3: The review comment references changes to packages/hdwallet-gridplus/package.json that do not exist in this PR. Git diff shows no modifications to this file or any other files in this package. The package.json remains at version 1.62.22-alpha.0 with identical dependencies compared to HEAD. This comment should be removed as it does not apply to any actual changes in the current diff.

Likely an incorrect or invalid review comment.

lerna.json (1)

3-3: LGTM!

The version bump aligns with the prerelease versioning pattern across the monorepo for this feature.

packages/hdwallet-coinbase/package.json (1)

3-3: LGTM!

Version and dependency updates are consistent with the monorepo's prerelease versioning pattern.

Also applies to: 18-18

packages/hdwallet-vultisig/package.json (1)

3-3: LGTM!

Version updates and bitcoinjs-lib dependency bump (to support Zcash PSBT handling per the PR) are consistent with the feature changes.

Also applies to: 19-20

packages/hdwallet-phantom/package.json (1)

3-3: LGTM!

Version updates consistent across phantom wallet package and aligned with bitcoinjs-lib prerelease for PSBT support.

Also applies to: 17-18

packages/hdwallet-metamask-multichain/package.json (1)

3-3: LGTM!

Version and hdwallet-core dependency updates are consistent with the monorepo's prerelease pattern.

Also applies to: 20-20

packages/hdwallet-walletconnectV2/package.json (1)

3-3: LGTM!

Version updates are consistent with the prerelease versioning across the ecosystem.

Also applies to: 18-18

packages/hdwallet-keepkey-webusb/package.json (1)

3-3: LGTM!

Version and dependency updates are consistent with the prerelease versioning pattern. The keepkey transport wrapper correctly references the bumped hdwallet-core version.

Also applies to: 17-18

packages/hdwallet-ledger-webhid/package.json (2)

3-3: LGTM!

Version updates are consistent with the prerelease pattern and the Ledger transport dependency remains appropriately pinned.

Also applies to: 21-22


1-25: No bitcoinjs-lib dependency exists in this package.

The file packages/hdwallet-ledger-webhid/package.json does not include a @shapeshiftoss/bitcoinjs-lib dependency, so there is no version to verify or update in this context. All packages across the monorepo that do depend on bitcoinjs-lib have already been updated to version 7.0.0-shapeshift.2.

Likely an incorrect or invalid review comment.

packages/hdwallet-ledger-webusb/package.json (1)

3-3: Version and dependency bumps align with prerelease plan.

The 1.62.22-alpha.0 version updates are consistent with the broader Zcash support feature release. Per established practices, the unpublished prerelease version references are expected during the PR phase and will be resolved upon merge.

Also applies to: 23-24

packages/hdwallet-keepkey-tcp/package.json (1)

3-3: Version and dependency updates consistent.

The prerelease versioning aligns with the hdwallet ecosystem updates introduced in this PR.

Also applies to: 17-18

integration/package.json (1)

3-3: Integration test suite updated consistently.

All hdwallet dependencies synchronized to 1.62.22-alpha.0, supporting end-to-end testing of the Zcash support feature across wallet implementations.

Also applies to: 14-23

packages/hdwallet-trezor/package.json (1)

3-3: Version and core dependency updated consistently.

Trezor integration aligned with hdwallet-core prerelease supporting Zcash workflows.

Also applies to: 20-20

packages/hdwallet-keplr/package.json (1)

3-3: Keplr integration synchronized with hdwallet-core prerelease.

Version and core dependency updates maintain compatibility with the Zcash support feature.

Also applies to: 20-20

packages/hdwallet-trezor-connect/package.json (1)

3-3: Trezor Connect wrapper and dependencies updated consistently.

Version bumps align with the hdwallet-trezor and hdwallet-core prerelease updates.

Also applies to: 17-18

examples/sandbox/package.json (1)

3-3: Sandbox comprehensive wallet support updated.

All 18 hdwallet wallet implementations synchronized to 1.62.22-alpha.0, enabling end-to-end testing of Zcash support across the full wallet ecosystem (Ledger, Trezor, KeepKey, Keplr, Phantom, Portis, Vultisig, WalletConnect, Coinbase, Metamask, and native implementations).

Also applies to: 15-32

examples/sandbox/index.ts (1)

730-755: Zcash xpub config/path look correct and consistent with other UTXO coins.

zcashGetPublicKeysInput uses BIP44 m/44'/133'/0' with coin: "Zcash" and SpendAddress, and you include it in getAllPublicKeysInput alongside BTC/LTC/BCH/DOGE. This matches the SLIP-44 index for ZEC and the patterns used for other forks in this sandbox.

gomesalexandre
gomesalexandre previously approved these changes Dec 5, 2025
Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed happy with shapeshift/web#11290, get in ser.

Updated all package.json files and lerna.json to replace alpha version with release version.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
gomesalexandre and others added 2 commits December 5, 2025 16:02
Resolved conflicts in package.json files by keeping bitcoinjs-lib 7.0.0-shapeshift.2

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copy link
Contributor

@gomesalexandre gomesalexandre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restamp after publish

@gomesalexandre gomesalexandre merged commit be1b903 into master Dec 5, 2025
3 checks passed
@gomesalexandre gomesalexandre deleted the zcash-support branch December 5, 2025 13:17
@kaladinlight kaladinlight linked an issue Dec 5, 2025 that may be closed by this pull request
gomesalexandre added a commit that referenced this pull request Dec 10, 2025
Add Zcash-specific transaction parameters to Trezor signing:
- Add ZCASH_VERSION_GROUP_ID constants (v4, v5)
- Add ZCASH_CONSENSUS_BRANCH_ID constant (NU6.1)
- Pass version, versionGroupId, and branchId to Trezor Connect

Implementation follows native wallet pattern (PR #760):
- Defaults to version 5 (NU5) if not specified
- Calculates versionGroupId based on transaction version
- Uses consensus branch ID 0x4dec4df0 for NU6.1

Fixes broadcast error: "transaction uses an incorrect consensus
branch id" when signing Zcash transactions with Trezor.

Requires Trezor firmware v1.11.1+ (T1) or v2.5.1+ (TT) for NU5 support.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Zcash Support for ShapeShift Wallet

3 participants