feat: add plasma chain support#759
Conversation
- Add _supportsPlasma flag to ETHWallet interface - Add supportsPlasma() support detection function - Implement Plasma support in hdwallet-native (true) - Add Plasma support flag to all other wallet implementations (false) Plasma uses SLIP44:60 (Ethereum derivation path) and is EVM-compatible. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Warning Rate limit exceeded@gomesalexandre has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 15 minutes and 23 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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. 📒 Files selected for processing (27)
📝 WalkthroughWalkthroughAdds two new capability flags Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
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. Comment |
Restore lerna.json and package.json files to origin/master versions, removing Plasma-specific version bumps. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
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.
📒 Files selected for processing (14)
packages/hdwallet-coinbase/src/coinbase.ts(1 hunks)packages/hdwallet-core/src/ethereum.ts(1 hunks)packages/hdwallet-core/src/wallet.ts(1 hunks)packages/hdwallet-gridplus/src/gridplus.ts(1 hunks)packages/hdwallet-keepkey/src/keepkey.ts(1 hunks)packages/hdwallet-ledger/src/ledger.ts(1 hunks)packages/hdwallet-metamask-multichain/src/shapeshift-multichain.ts(1 hunks)packages/hdwallet-native/src/ethereum.ts(1 hunks)packages/hdwallet-phantom/src/phantom.ts(1 hunks)packages/hdwallet-portis/src/portis.ts(1 hunks)packages/hdwallet-trezor/src/trezor.ts(1 hunks)packages/hdwallet-vultisig/src/vultisig.ts(1 hunks)packages/hdwallet-walletconnect/src/walletconnect.ts(1 hunks)packages/hdwallet-walletconnectV2/src/walletconnectV2.ts(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (11)
- packages/hdwallet-vultisig/src/vultisig.ts
- packages/hdwallet-walletconnect/src/walletconnect.ts
- packages/hdwallet-keepkey/src/keepkey.ts
- packages/hdwallet-metamask-multichain/src/shapeshift-multichain.ts
- packages/hdwallet-ledger/src/ledger.ts
- packages/hdwallet-walletconnectV2/src/walletconnectV2.ts
- packages/hdwallet-trezor/src/trezor.ts
- packages/hdwallet-gridplus/src/gridplus.ts
- packages/hdwallet-core/src/wallet.ts
- packages/hdwallet-phantom/src/phantom.ts
- packages/hdwallet-coinbase/src/coinbase.ts
⏰ 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 (2)
packages/hdwallet-core/src/ethereum.ts (1)
197-211: ETHWallet:_supportsPlasmaflag is consistent with existing capability patternThe new readonly
_supportsPlasma: booleanfits cleanly with the existing_supports*chain-capability flags onETHWalletand keeps Plasma detection aligned with the other EVM networks. No issues here as long as all ETHWallet implementors define this property, which the PR appears to handle.packages/hdwallet-portis/src/portis.ts (1)
123-140: PortisHDWallet:_supportsPlasma = falsecorrectly satisfies new ETH capabilityAdding
readonly _supportsPlasma = false;keeps Portis in sync with the updatedETHWalletinterface and accurately reflects lack of Plasma support. Placement with the other_supports*flags is clear and consistent.
2fe2693 to
b4abc7d
Compare
There was a problem hiding this comment.
Actionable comments posted: 7
♻️ Duplicate comments (2)
packages/hdwallet-core/src/utxoUtils.ts (1)
1-1: Same bs58check default import issue as in tron.ts.This file has the same import change as
packages/hdwallet-native/src/crypto/isolation/adapters/tron.ts. The bs58check library may not support default exports, which would cause runtime errors.See the verification script in the comment for
packages/hdwallet-native/src/crypto/isolation/adapters/tron.ts.packages/hdwallet-gridplus/src/constants.ts (1)
32-38: Switch fall-through now routes Litecoin/Dogecoin to Bitcoin mappingSame concern as above: with the
Litecoin/Dogecoincases commented, those coins (if still passed in) now hit thedefaultbranch and receive Bitcoin versions instead of their own or an explicit error. Align this switch with whatever you decide for unsupported coins (fail-fast vs. guaranteed absence of such calls).
🧹 Nitpick comments (5)
packages/hdwallet-gridplus/src/constants.ts (1)
49-51: Commented-out UTXO params: ensure no remaining Doge/LTC/BCH consumersCommenting out
UTXO_NETWORK_PARAMSentries for Dogecoin, Litecoin, and BitcoinCash will make any remaining usages of those keys returnundefinedand likely throw at first access.Please double-check that:
- GridPlus no longer exposes or attempts to use these coins anywhere, or
- Callers are updated to guard against missing entries and treat them as unsupported.
If the intent is permanent de-support, you may also want to fully remove these entries (and any related code paths) rather than leaving commented stubs.
packages/hdwallet-ledger/src/bitcoin.ts (2)
354-380: Good documentation of Zcash-specific requirements.The comments clearly explain why blockHeight is critical for Ledger's consensusBranchId calculation. The monkey patch activation pattern (attaching
_customZcashTxIdand_customZcashAmountto transaction objects) is well-structured.Consider adding validation that Zcash inputs have required fields:
if (msg.coin === "Zcash") { const missingFields = msg.inputs.filter((input, i) => { const zi = input as ZcashInput; return !zi.txid || !zi.amount; }); if (missingFields.length > 0) { throw new Error("Zcash inputs require txid and amount fields"); } }
19-24: Consider centralizing Zcash constants in hdwallet-core.These constants are duplicated in
packages/hdwallet-native/src/bitcoin.ts. Extracting them to@shapeshiftoss/hdwallet-corewould ensure consistency and simplify future updates (e.g., when Zcash upgrades to a new network version).ZCASH_LEDGER_IMPLEMENTATION.md (2)
37-66: Monkey patch solution is well-documented but represents technical debt.Issues 1–3 have straightforward solutions. Issue 4 (ZIP-244 TXID mismatch) requires a monkey patch on
getTrustedInputBIP143because the Ledger library uses SHA256d instead of ZIP-244 hashing. While the patch is clearly scoped (guarded to Zcash only, usingrequirefor mutability), monkey patching third-party libraries is fragile and can break on library updates.Ensure the implementation in
bitcoin.tsis clearly documented with a comment linking to this guide and consider opening an issue upstream with LedgerHQ for a proper fix.
69-79: Known limitations are reasonable for v1 but expiry height is worth revisiting.The transparent-address-only constraint is acceptable for an initial implementation. The expiry height limitation (hardcoded to 0 = no expiry) is valid per ZIP-203 but may not align with best practices. Document whether expiry height can be made configurable in a future iteration.
📜 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.
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (62)
ZCASH_LEDGER_IMPLEMENTATION.md(1 hunks)examples/sandbox/index.html(2 hunks)examples/sandbox/index.ts(3 hunks)examples/sandbox/package.json(2 hunks)integration/jest.config.js(1 hunks)integration/package.json(2 hunks)lerna.json(1 hunks)packages/hdwallet-coinbase/package.json(2 hunks)packages/hdwallet-coinbase/src/coinbase.ts(1 hunks)packages/hdwallet-core/package.json(2 hunks)packages/hdwallet-core/src/bitcoin.ts(1 hunks)packages/hdwallet-core/src/ethereum.ts(1 hunks)packages/hdwallet-core/src/networks.ts(1 hunks)packages/hdwallet-core/src/utils.ts(2 hunks)packages/hdwallet-core/src/utxoUtils.ts(2 hunks)packages/hdwallet-core/src/wallet.ts(1 hunks)packages/hdwallet-gridplus/package.json(2 hunks)packages/hdwallet-gridplus/src/constants.ts(3 hunks)packages/hdwallet-gridplus/src/gridplus.ts(3 hunks)packages/hdwallet-gridplus/src/utils.ts(1 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-keepkey/src/eos.ts(1 hunks)packages/hdwallet-keepkey/src/keepkey.ts(1 hunks)packages/hdwallet-keepkey/src/osmosis.ts(1 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-ledger/src/bitcoin.ts(7 hunks)packages/hdwallet-ledger/src/currencies.ts(1 hunks)packages/hdwallet-ledger/src/ledger.ts(1 hunks)packages/hdwallet-ledger/src/solana.ts(1 hunks)packages/hdwallet-ledger/src/utils.ts(2 hunks)packages/hdwallet-metamask-multichain/package.json(2 hunks)packages/hdwallet-metamask-multichain/src/shapeshift-multichain.ts(1 hunks)packages/hdwallet-native-vault/package.json(2 hunks)packages/hdwallet-native/package.json(3 hunks)packages/hdwallet-native/src/bitcoin.ts(3 hunks)packages/hdwallet-native/src/crypto/isolation/adapters/tron.ts(1 hunks)packages/hdwallet-native/src/crypto/isolation/engines/dummy/bip39.ts(1 hunks)packages/hdwallet-native/src/ethereum.ts(1 hunks)packages/hdwallet-phantom/package.json(2 hunks)packages/hdwallet-phantom/src/phantom.ts(1 hunks)packages/hdwallet-portis/package.json(2 hunks)packages/hdwallet-portis/src/portis.ts(1 hunks)packages/hdwallet-trezor-connect/package.json(2 hunks)packages/hdwallet-trezor/package.json(2 hunks)packages/hdwallet-trezor/src/bitcoin.ts(2 hunks)packages/hdwallet-trezor/src/trezor.ts(1 hunks)packages/hdwallet-vultisig/package.json(2 hunks)packages/hdwallet-vultisig/src/vultisig.ts(1 hunks)packages/hdwallet-walletconnect/package.json(2 hunks)packages/hdwallet-walletconnect/src/walletconnect.ts(1 hunks)packages/hdwallet-walletconnectV2/package.json(2 hunks)packages/hdwallet-walletconnectV2/src/walletconnectV2.ts(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
✅ Files skipped from review due to trivial changes (2)
- packages/hdwallet-keepkey-nodewebusb/package.json
- packages/hdwallet-trezor-connect/package.json
🚧 Files skipped from review as they are similar to previous changes (10)
- packages/hdwallet-portis/src/portis.ts
- packages/hdwallet-core/src/wallet.ts
- packages/hdwallet-coinbase/src/coinbase.ts
- packages/hdwallet-metamask-multichain/src/shapeshift-multichain.ts
- packages/hdwallet-native/src/ethereum.ts
- packages/hdwallet-walletconnectV2/src/walletconnectV2.ts
- packages/hdwallet-gridplus/src/gridplus.ts
- packages/hdwallet-core/src/ethereum.ts
- packages/hdwallet-ledger/src/ledger.ts
- packages/hdwallet-vultisig/src/vultisig.ts
🧰 Additional context used
🧠 Learnings (10)
📚 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-tcp/package.jsonpackages/hdwallet-walletconnect/package.jsonpackages/hdwallet-portis/package.jsonpackages/hdwallet-vultisig/package.jsonpackages/hdwallet-keepkey-webusb/package.jsonpackages/hdwallet-trezor/package.jsonpackages/hdwallet-ledger/src/solana.tsintegration/package.jsonpackages/hdwallet-keepkey-nodehid/package.jsonpackages/hdwallet-walletconnectV2/package.jsonpackages/hdwallet-ledger-webusb/package.jsonpackages/hdwallet-keepkey/package.jsonpackages/hdwallet-coinbase/package.jsonexamples/sandbox/package.jsonpackages/hdwallet-phantom/package.jsonpackages/hdwallet-keepkey-electron/package.jsonpackages/hdwallet-native/package.jsonpackages/hdwallet-keplr/package.jsonpackages/hdwallet-native/src/crypto/isolation/engines/dummy/bip39.tspackages/hdwallet-native-vault/package.jsonZCASH_LEDGER_IMPLEMENTATION.mdpackages/hdwallet-core/package.jsonpackages/hdwallet-ledger-webhid/package.jsonpackages/hdwallet-gridplus/package.jsonpackages/hdwallet-metamask-multichain/package.jsonpackages/hdwallet-keepkey/src/osmosis.tspackages/hdwallet-keepkey-chromeusb/package.jsonpackages/hdwallet-ledger/src/bitcoin.tspackages/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-keepkey-tcp/package.jsonpackages/hdwallet-walletconnect/package.jsonpackages/hdwallet-portis/package.jsonpackages/hdwallet-vultisig/package.jsonpackages/hdwallet-keepkey-webusb/package.jsonpackages/hdwallet-trezor/package.jsonintegration/package.jsonpackages/hdwallet-keepkey-nodehid/package.jsonpackages/hdwallet-walletconnectV2/package.jsonpackages/hdwallet-ledger-webusb/package.jsonpackages/hdwallet-keepkey/package.jsonpackages/hdwallet-coinbase/package.jsonexamples/sandbox/package.jsonpackages/hdwallet-phantom/package.jsonpackages/hdwallet-keepkey-electron/package.jsonpackages/hdwallet-native/package.jsonpackages/hdwallet-keplr/package.jsonpackages/hdwallet-native-vault/package.jsonpackages/hdwallet-core/package.jsonpackages/hdwallet-ledger-webhid/package.jsonpackages/hdwallet-gridplus/package.jsonpackages/hdwallet-metamask-multichain/package.jsonpackages/hdwallet-keepkey-chromeusb/package.jsonpackages/hdwallet-ledger/package.json
📚 Learning: 2025-12-09T13:48:55.139Z
Learnt from: gomesalexandre
Repo: shapeshift/hdwallet PR: 764
File: packages/hdwallet-gridplus/package.json:0-0
Timestamp: 2025-12-09T13:48:55.139Z
Learning: In the shapeshiftoss/hdwallet monorepo, the dist/ directory is not version controlled (not tracked in git). Build artifacts are generated during the build/publish workflow, not committed to the repository.
Applied to files:
packages/hdwallet-keepkey-tcp/package.jsonpackages/hdwallet-walletconnect/package.jsonpackages/hdwallet-portis/package.jsonpackages/hdwallet-vultisig/package.jsonpackages/hdwallet-keepkey-webusb/package.jsonpackages/hdwallet-trezor/package.jsonintegration/package.jsonpackages/hdwallet-keepkey-nodehid/package.jsonpackages/hdwallet-walletconnectV2/package.jsonpackages/hdwallet-ledger-webusb/package.jsonpackages/hdwallet-keepkey/package.jsonpackages/hdwallet-coinbase/package.jsonexamples/sandbox/package.jsonpackages/hdwallet-phantom/package.jsonpackages/hdwallet-keepkey-electron/package.jsonpackages/hdwallet-native/package.jsonpackages/hdwallet-keplr/package.jsonpackages/hdwallet-native/src/crypto/isolation/engines/dummy/bip39.tspackages/hdwallet-native-vault/package.jsonpackages/hdwallet-core/package.jsonpackages/hdwallet-ledger-webhid/package.jsonpackages/hdwallet-gridplus/package.jsonpackages/hdwallet-metamask-multichain/package.jsonpackages/hdwallet-keepkey-chromeusb/package.jsonpackages/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-keepkey-tcp/package.jsonpackages/hdwallet-walletconnect/package.jsonpackages/hdwallet-portis/package.jsonpackages/hdwallet-vultisig/package.jsonpackages/hdwallet-keepkey-webusb/package.jsonpackages/hdwallet-trezor/package.jsonintegration/package.jsonpackages/hdwallet-keepkey-nodehid/package.jsonpackages/hdwallet-walletconnectV2/package.jsonpackages/hdwallet-ledger-webusb/package.jsonpackages/hdwallet-keepkey/package.jsonpackages/hdwallet-coinbase/package.jsonexamples/sandbox/package.jsonpackages/hdwallet-phantom/package.jsonpackages/hdwallet-keepkey-electron/package.jsonpackages/hdwallet-native/package.jsonpackages/hdwallet-keplr/package.jsonpackages/hdwallet-native/src/crypto/isolation/engines/dummy/bip39.tspackages/hdwallet-native-vault/package.jsonpackages/hdwallet-core/package.jsonpackages/hdwallet-ledger-webhid/package.jsonpackages/hdwallet-gridplus/package.jsonpackages/hdwallet-metamask-multichain/package.jsonpackages/hdwallet-keepkey-chromeusb/package.jsonpackages/hdwallet-ledger/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-tcp/package.jsonpackages/hdwallet-walletconnect/package.jsonpackages/hdwallet-portis/package.jsonintegration/jest.config.jspackages/hdwallet-vultisig/package.jsonpackages/hdwallet-keepkey-webusb/package.jsonpackages/hdwallet-trezor/package.jsonpackages/hdwallet-ledger/src/solana.tsintegration/package.jsonpackages/hdwallet-keepkey-nodehid/package.jsonpackages/hdwallet-native/src/crypto/isolation/adapters/tron.tspackages/hdwallet-walletconnectV2/package.jsonpackages/hdwallet-ledger-webusb/package.jsonpackages/hdwallet-core/src/bitcoin.tspackages/hdwallet-keepkey/package.jsonpackages/hdwallet-coinbase/package.jsonexamples/sandbox/package.jsonpackages/hdwallet-phantom/package.jsonpackages/hdwallet-keepkey-electron/package.jsonpackages/hdwallet-native/package.jsonpackages/hdwallet-keplr/package.jsonpackages/hdwallet-native/src/crypto/isolation/engines/dummy/bip39.tspackages/hdwallet-gridplus/src/constants.tspackages/hdwallet-keepkey/src/eos.tspackages/hdwallet-native-vault/package.jsonpackages/hdwallet-core/src/utxoUtils.tspackages/hdwallet-core/package.jsonpackages/hdwallet-ledger-webhid/package.jsonpackages/hdwallet-gridplus/package.jsonpackages/hdwallet-metamask-multichain/package.jsonpackages/hdwallet-keepkey/src/osmosis.tspackages/hdwallet-walletconnect/src/walletconnect.tspackages/hdwallet-keepkey-chromeusb/package.jsonpackages/hdwallet-ledger/src/bitcoin.tspackages/hdwallet-trezor/src/trezor.tspackages/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-tcp/package.jsonpackages/hdwallet-walletconnect/package.jsonpackages/hdwallet-keepkey-webusb/package.jsonpackages/hdwallet-trezor/package.jsonpackages/hdwallet-ledger/src/solana.tsintegration/package.jsonpackages/hdwallet-keepkey-nodehid/package.jsonpackages/hdwallet-native/src/crypto/isolation/adapters/tron.tspackages/hdwallet-walletconnectV2/package.jsonpackages/hdwallet-ledger-webusb/package.jsonpackages/hdwallet-core/src/bitcoin.tspackages/hdwallet-keepkey/package.jsonpackages/hdwallet-coinbase/package.jsonexamples/sandbox/package.jsonpackages/hdwallet-phantom/package.jsonpackages/hdwallet-keepkey-electron/package.jsonpackages/hdwallet-native/package.jsonpackages/hdwallet-keplr/package.jsonpackages/hdwallet-native/src/crypto/isolation/engines/dummy/bip39.tspackages/hdwallet-gridplus/src/constants.tspackages/hdwallet-keepkey/src/eos.tspackages/hdwallet-native-vault/package.jsonpackages/hdwallet-ledger-webhid/package.jsonpackages/hdwallet-gridplus/package.jsonpackages/hdwallet-metamask-multichain/package.jsonpackages/hdwallet-keepkey/src/osmosis.tspackages/hdwallet-keepkey-chromeusb/package.jsonpackages/hdwallet-ledger/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:
packages/hdwallet-native/src/crypto/isolation/adapters/tron.tspackages/hdwallet-core/src/bitcoin.tspackages/hdwallet-gridplus/src/utils.tspackages/hdwallet-gridplus/src/constants.tspackages/hdwallet-keepkey/src/eos.tspackages/hdwallet-core/src/utxoUtils.tspackages/hdwallet-native/src/bitcoin.tspackages/hdwallet-trezor/src/bitcoin.tspackages/hdwallet-keepkey/src/osmosis.tspackages/hdwallet-ledger/src/bitcoin.tspackages/hdwallet-trezor/src/trezor.ts
📚 Learning: 2025-10-14T20:59:48.768Z
Learnt from: gomesalexandre
Repo: shapeshift/hdwallet PR: 731
File: packages/hdwallet-gridplus/src/ethereum.ts:117-124
Timestamp: 2025-10-14T20:59:48.768Z
Learning: In packages/hdwallet-gridplus/src/ethereum.ts, the GridPlus SDK's sign method returns v as a number (integer), not a Buffer, so the Buffer.isBuffer(v) check is always false and vRaw = v is used directly.
Applied to files:
packages/hdwallet-native/src/crypto/isolation/adapters/tron.tspackages/hdwallet-gridplus/src/utils.tspackages/hdwallet-native/src/crypto/isolation/engines/dummy/bip39.ts
📚 Learning: 2025-10-15T23:22:26.842Z
Learnt from: gomesalexandre
Repo: shapeshift/hdwallet PR: 731
File: packages/hdwallet-gridplus/src/thormaya.ts:99-105
Timestamp: 2025-10-15T23:22:26.842Z
Learning: In packages/hdwallet-gridplus/src/thormaya.ts, the GridPlus SDK (gridplus-sdk) automatically pads the r and s signature components to 32 bytes, so explicit padding in the code may be redundant but is not required. The thorchainSignTx implementation works without explicit padding because the SDK handles it.
Applied to files:
packages/hdwallet-gridplus/src/utils.tspackages/hdwallet-gridplus/package.json
📚 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
🧬 Code graph analysis (3)
packages/hdwallet-core/src/utxoUtils.ts (1)
packages/hdwallet-gridplus/src/constants.ts (1)
accountTypeToVersion(13-43)
packages/hdwallet-native/src/bitcoin.ts (1)
packages/hdwallet-ledger/src/bitcoin.ts (1)
supportedCoins(84-93)
packages/hdwallet-ledger/src/bitcoin.ts (1)
packages/hdwallet-core/src/bitcoin.ts (1)
BTCSignTxInputLedger(135-139)
⏰ 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 (63)
packages/hdwallet-coinbase/package.json (1)
3-3: Version bumps are consistent and properly aligned.The package version and @shapeshiftoss/hdwallet-core dependency are both bumped to 1.62.27, maintaining consistency across the monorepo interdependency. The exact version pinning (without caret) is appropriate for core monorepo packages. Based on learnings, version bumps in PRs before publishing is expected behavior in this monorepo's release workflow.
Also applies to: 18-18
packages/hdwallet-keplr/package.json (1)
3-3: Version bump consistency is correct.The package version and
@shapeshiftoss/hdwallet-coredependency are both updated to 1.62.27, maintaining alignment. This patch bump is appropriate for the new capability flags being added across the monorepo.Per the retrieved learnings, please verify that
yarn buildwas run to regenerate dist/ artifacts after this version bump, as is standard in your monorepo's release workflow.Also applies to: 20-20
packages/hdwallet-walletconnectV2/package.json (1)
3-3: Version bump synchronized across internal and public versions.The package version and
@shapeshiftoss/hdwallet-coredependency are properly synchronized at 1.62.27, aligning with the PR's objective to add Plasma support. The version bump follows the monorepo's expected workflow where versions are updated before publishing.Also applies to: 18-18
packages/hdwallet-metamask-multichain/package.json (1)
3-3: Version and dependency updates look good.The coordinated version bump to 1.62.27 aligns with the feature release for Plasma support, and the exact-pinned hdwallet-core dependency correctly reflects the monorepo's internal dependency structure.
Per the learnings from your team, version bumps are handled in PRs before publishing with unpublished dependency versions expected during review. Verify that all other packages in the repo have been consistently updated to 1.62.27 to maintain monorepo alignment.
Also applies to: 20-20
packages/hdwallet-keepkey-tcp/package.json (1)
3-3: LGTM — version bump consistent with monorepo workflow.The version updates align with coordinated dependency changes across the monorepo. Based on learnings, bumping versions in PRs before publishing and referencing unpublished versions during review is expected in this repository's release workflow.
Per the coding guidelines from PR 726, please confirm that
yarn buildhas been run to regenerate build artifacts in thedist/directory before finalizing this PR, as this ensures UMD bundles and type declarations are up to date with the new dependency versions.Also applies to: 17-18
examples/sandbox/index.html (2)
161-161: Mismatch between PR objectives and file changes.The PR objectives focus exclusively on Plasma chain support, but this file adds Zcash UI elements. The broader PR may include multiple feature additions, but it would help to clarify the scope in the PR description.
Additionally, the AI summary mentions "duplication: the sandbox UI includes two identical Zcash blocks," but only one Zcash block is visible in the provided changes (lines 391-396). Please verify if duplication exists elsewhere in the file.
Also applies to: 391-396
161-161: HTML structure follows existing patterns.The Zcash UI additions (button in the Xpubs section at line 161 and dedicated container block at lines 391-396) are well-integrated and follow the established conventions used for other cryptocurrencies throughout the sandbox.
Also applies to: 391-396
packages/hdwallet-portis/package.json (2)
3-3: Version bump alignment is correct.The package version has been incremented from 1.62.21 to 1.62.27, which is consistent with the hdwallet-core dependency upgrade. This aligns with the PR's goal of adding plasma and HyperEVM capability flags. Based on learnings from the monorepo workflow, version bumps to unpublished versions during PR review are expected.
18-19: Bitcoinjs-lib and hdwallet-core versions are properly aligned across all packages.The bitcoinjs-lib dependency version
7.0.0-shapeshift.2is consistently applied across all 7 packages that depend on it (vultisig, portis, phantom, native, ledger, keepkey, and core), and hdwallet-core version1.62.27is uniformly referenced across all 19 dependent packages. The exact pinning strategy is applied consistently throughout the monorepo.packages/hdwallet-ledger/src/solana.ts (1)
3-3: The default import pattern for bs58 is consistent with existing usage across the codebase.The import style
import bs58 from "bs58"is already used in packages/hdwallet-keepkey/src/eos.ts and packages/hdwallet-gridplus/src/solana.ts. The usage patternbs58.encode()works correctly with this import style. No changes needed.packages/hdwallet-gridplus/package.json (2)
3-3: LGTM! Version bumps are consistent.The package version and hdwallet-core dependency are bumped in sync to 1.62.27, which aligns with the monorepo versioning pattern.
Also applies to: 23-23
26-26: Both bs58 and bs58check dependencies are needed—they serve different purposes.The bs58 dependency is still required: it's used in
solana.tsfor standard base58 encoding of public keys (bs58.encode(pubkey)). The new bs58check dependency (version 4.0.0, which is the latest) provides base58 encoding with checksum validation, a distinct capability used inutils.ts. These libraries are not interchangeable.packages/hdwallet-gridplus/src/utils.ts (1)
3-3: Correctness improvement: bs58check adds checksum validation and aligns with other wallet implementations.The change from
bs58tobs58checkis appropriate and correct. Extended public keys (xpub/ypub/zpub) are base58check-encoded per BIP32 specification, andbs58check.decode()properly validates checksums on these keys. TheBuffer.from()wrapper ensures a consistent Buffer return type.This change is also consistent with how other wallet packages in the codebase (ledger, keepkey, native) decode extended keys. The function is used across thorchain, mayachain, cosmos, and bitcoin modules, all passing xpub strings from device APIs which are guaranteed to have valid checksums. Adding this validation is a correctness improvement with no breaking impact.
packages/hdwallet-ledger-webhid/package.json (2)
3-3: Version alignment is correct.The package version (1.62.27) and internal dependency versions (@shapeshiftoss/hdwallet-core and @shapeshiftoss/hdwallet-ledger both at 1.62.27) are properly synchronized.
The prepublishOnly script (
yarn clean && yarn build) will automatically regenerate dist/ artifacts during the publish workflow after the PR is merged, so no manual build verification is needed in the PR phase.
17-20: @ledgerhq/hw-app-eth 7.0.0 upgrade is coordinated across related packages with known compatibility handling in place.The major version upgrade to 7.0.0 is consistently applied across all ledger packages in the monorepo. The eth.signTransaction API incompatibility noted by the @ts-ignore comment in packages/hdwallet-ledger/src/ethereum.ts is pre-existing (not introduced by this upgrade), with a documented workaround referencing the LedgerHQ documentation. The coordinated rollout across hdwallet-ledger, hdwallet-ledger-webhid, and hdwallet-ledger-webusb packages indicates this version has been tested with the existing codebase and type mismatches.
packages/hdwallet-core/src/utxoUtils.ts (1)
73-81: Usage updated consistently with the import change.The function correctly updates all bs58check usages to match the default import pattern. If the import issue is resolved (either by confirming default export support or reverting to named imports), these changes will work correctly.
However, ensure this refactoring is intentional and belongs in this PR, as it appears unrelated to Plasma chain support.
packages/hdwallet-native/src/crypto/isolation/adapters/tron.ts (1)
3-3: Revert this import change to match the library's actual export structure.The original review comment is incorrect. The bs58check library (v4.0.0) does expose a default export and the import statement
import bs58check from "bs58check"is valid. The usagebs58check.encode(addressBytes)will work correctly with this default export.However, the broader concern about this change's relevance to the PR objectives remains open—if adding TRON chain support is unrelated to the Plasma chain support mentioned as the PR goal, this file modification should be addressed separately or the PR scope clarified.
packages/hdwallet-trezor/src/bitcoin.ts (2)
149-150: LGTM: Clean version defaulting logic.The logic correctly detects Zcash and defaults to version 5 when not explicitly provided, which aligns with modern Zcash transactions.
34-39: Fix ZCASH_CONSENSUS_BRANCH_ID: Currently uses wrong network upgrade value.The version group IDs are correct (0x892f2085 for v4, 0x26a7270a for v5), but
ZCASH_CONSENSUS_BRANCH_IDis set to 0x4dec4df0, which is the NU6.1 test consensus branch ID, not the correct ID for transaction versions 4 and 5. For NU5/v5 transactions, the branch ID should be 0x37519621.Since Zcash has different consensus branch IDs for different network upgrades,
ZCASH_CONSENSUS_BRANCH_IDshould be a version-dependent mapping (likeZCASH_VERSION_GROUP_ID) rather than a single hardcoded value. Update the constant to correctly map transaction versions to their respective consensus branch IDs.⛔ Skipped due to learnings
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.examples/sandbox/index.ts (2)
730-755: Zcash xpub path and aggregation look correctThe added
zcashGetPublicKeysInputentry usesm/44'/133'/0'withSpendAddress, which matches the expected BIP44/SLIP44 setup for Zcash transparent accounts and mirrors how other BTC-like coins are wired intogetAllPublicKeysInput. No issues from a sandbox/Xpub perspective.
3675-3750: Zcash sandbox address/tx flow is consistent with existing UTXO patternsThe new Zcash section reuses the BTC-style APIs (
btcGetAddress/btcSignTx) withcoin: "Zcash"and am/44'/133'/0'/0/0derivation, aligned with the BIP44 Zcash coin type and the way other BTC-like coins (LTC, DOGE, BCH, etc.) are modeled here. Usingcore.supportsBTC(wallet)as the capability guard is also consistent with the rest of the sandbox. Looks good.packages/hdwallet-ledger-webusb/package.json (2)
17-24: Version pinning and monorepo sync pattern confirmed.All internal ShapeshiftOS hdwallet packages are correctly synchronized to 1.62.27, and Ledger dependencies are pinned to exact versions (no caret/tilde ranges), which aligns with the established monorepo patterns and mitigates Ledger type issues (as noted in prior PR 726).
19-19: @ledgerhq/hw-app-eth 7.0.0 lacks public documentation—verify compatibility through build and tests.This is a major version update from 6.45.13 to 7.0.0, but no official release notes or breaking changes documentation are publicly available. The version does resolve in yarn.lock successfully, but confirm that the code is compatible by running the full build and test suite locally. If 7.0.0 is still pre-release or unstable, consider pinning to a documented stable version (6.x) until 7.0.0 is officially released with clear migration guidance.
packages/hdwallet-keepkey-chromeusb/package.json (1)
3-19: Version bump and dependency alignment look consistentPackage version and internal hdwallet dependencies are updated to 1.62.27 in line with the monorepo’s coordinated release workflow; no issues from this diff alone. Based on learnings, unpublished internal versions during PR review are expected.
Please confirm the usual
yarn build(or monorepo build) passes before publishing, to ensure dist artifacts are up to date.packages/hdwallet-keepkey/src/eos.ts (1)
4-4: bs58 import style change appears safeSwitching to a default import for
bs58while still callingbs58.encode(...)should preserve behavior under typicalesModuleInterop/ moduleInterop settings; no other logic is affected.Please confirm your TypeScript config has appropriate module interop enabled (e.g.
esModuleInteroporallowSyntheticDefaultImports) so this default import compiles and runs as expected.packages/hdwallet-vultisig/package.json (1)
3-26: vultisig version and bitcoinjs-lib/core bumps look alignedUpdating the package version and internal deps (
@shapeshiftoss/bitcoinjs-libto7.0.0-shapeshift.2and@shapeshiftoss/hdwallet-coreto1.62.27) is consistent with the global version bump; no structural/package.json issues spotted.Given the bitcoinjs-lib fork revision change, please ensure the vultisig signing/UTXO flows still pass unit/integration tests against this version.
packages/hdwallet-core/src/utils.ts (1)
133-174: New SLIP‑0044 entries for Zcash and Plasma are consistentAdding
Zcash: 133andPlasma: 60toslip44Tablematches the SLIP‑0044 assignment for Zcash and the intent that Plasma reuses the Ethereum coin type (60) for derivation. The genericSlip44ByCoinandslip44ByCoinhelpers remain correct and automatically support the new entries.packages/hdwallet-walletconnect/package.json (1)
3-22: WalletConnect package and core dependency bump look goodThe package version and
@shapeshiftoss/hdwallet-coredependency are updated to 1.62.27 in line with the rest of the monorepo; no script or external dependency changes are introduced here.Please confirm
yarn build(or the package’s build in the monorepo pipeline) completes successfully so WalletConnect compiles cleanly against the updated core types/capabilities.packages/hdwallet-keepkey/src/osmosis.ts (1)
8-8: bs58check default import keeps Osmosis pubkey logic intactUsing a default import for
bs58checkand continuing to call.decode(...)should preserve existing behavior with standard TS module interop; the Osmosis signing flow and xpub parsing are otherwise untouched.Please verify that your TypeScript module interop settings are compatible with default‑importing
bs58checkand that Osmosis address/pubkey derivation still works in integration tests.examples/sandbox/package.json (1)
3-51: Sandbox version and hdwallet dependency updates are coherentThe sandbox app version and all
@shapeshiftoss/hdwallet-*dependencies are bumped to 1.62.27, keeping the example environment in sync with the core libraries; scripts remain the same.Please run the sandbox build (
yarn buildfor this package or the documented command) once against these new versions to ensure there are no unexpected breaking changes in the example app.packages/hdwallet-keepkey-electron/package.json (1)
3-26: KeepKey Electron package and dependency bump align with coreBumping this package and its
@shapeshiftoss/hdwallet-keepkeydependency to 1.62.27 keeps the Electron integration in lockstep with the main KeepKey package; no script or Electron version changes are introduced.Please confirm the Electron integration still builds/loads correctly with the updated KeepKey version in your target Electron runtime.
packages/hdwallet-core/src/bitcoin.ts (1)
521-524: LGTM: Type assertion for compiler satisfaction.The explicit type assertion
as keyof typeof bitcoin.script.OPScorrectly narrows the type without changing runtime behavior. The logic remains semantically identical.lerna.json (1)
3-3: Clarify scope: version jump suggests bundled changes.The version bump from 1.62.21 to 1.62.27 represents 6 minor releases. However, the PR objectives describe adding Plasma chain support (a single feature), while the AI summary mentions Plasma, HyperEvm flags, and Zcash support. Please confirm whether this PR intentionally bundles multiple features or if the scope differs from the stated objectives.
packages/hdwallet-phantom/package.json (1)
3-3: LGTM: Standard version bump and dependency updates.The package version and dependency updates align with the monorepo release strategy.
Also applies to: 17-18
integration/jest.config.js (1)
15-15: LGTM: Jest module resolution for musig library.The moduleNameMapper entry correctly resolves the
@brandonblack/musig/base_cryptoimport to its compiled artifact during tests.packages/hdwallet-keepkey-webusb/package.json (1)
3-3: LGTM: Coordinated version updates.Standard version bump across package and dependencies.
Also applies to: 17-18
packages/hdwallet-keepkey-nodehid/package.json (1)
3-3: LGTM: Standard version and dependency update.Version bump aligns with monorepo release workflow.
Also applies to: 17-17
packages/hdwallet-keepkey/package.json (2)
3-3: LGTM: Version and core dependency updates.Standard version bump and bitcoinjs-lib update align with the release workflow.
Also applies to: 23-24
28-29: These Base58 dependencies are already extensively used in the keepkey package.bs58 and bs58check are actively imported and used in thorchain.ts, osmosis.ts, mayachain.ts, cosmos.ts, and eos.ts for legitimate chain-specific operations (public key decoding and signature encoding). They are not undocumented additions but rather established dependencies supporting non-EVM chains. If the concern is about scope — whether a Plasma (EVM) PR should include dependencies for other chain types — clarify the PR's full scope of changes beyond Plasma support.
integration/package.json (1)
3-3: LGTM: Version bump and hdwallet dependency updates.The coordinated version updates across hdwallet packages follow the standard monorepo release workflow.
Also applies to: 15-24
packages/hdwallet-core/src/networks.ts (1)
130-150: LGTM! Zcash network configuration is correct.The 2-byte version prefixes (0x1cb8 for pubKeyHash, 0x1cbd for scriptHash) are correct for Zcash mainnet transparent addresses. Appropriately omits segwit script types since Zcash doesn't support native segwit.
packages/hdwallet-native/src/bitcoin.ts (2)
201-225: Clean implementation of Zcash transaction handling.The forkCoin IIFE pattern is readable and extensible. Zcash-specific PSBT configuration correctly sets version, versionGroupId, and consensusBranchId with appropriate error handling for unsupported versions.
89-89: Correct path configuration for Zcash.Only BIP44 (legacy) path is appropriate since Zcash doesn't support segwit.
packages/hdwallet-ledger/src/bitcoin.ts (2)
286-295: Potential version mismatch: VERSION4_BRANCH_NU6_1 with v5 version group ID.Line 232 creates PSBT with
VERSION4_BRANCH_NU6_1, but Line 292 setsversionGroupId = ZCASH_VERSION_GROUP_ID[5](0x26a7270a, the v5 group ID). This appears inconsistent—v4 transactions should useZCASH_VERSION_GROUP_ID[4](0x892f2085).Verify which version group ID is correct for your use case:
- (psbt as unknown as ExposedZcashPsbt).tx.versionGroupId = ZCASH_VERSION_GROUP_ID[5]; // NU6 version group ID + (psbt as unknown as ExposedZcashPsbt).tx.versionGroupId = ZCASH_VERSION_GROUP_ID[4]; // v4 version group ID
84-114: LGTM! Correct Zcash coin and script type support.Zcash correctly supports only
SpendAddress(legacy P2PKH) since it doesn't have native segwit.packages/hdwallet-native-vault/package.json (1)
3-18: LGTM! Version bump aligns with monorepo release.Package version and hdwallet-native dependency both updated to 1.62.27, consistent with the monorepo-wide version bump. Based on learnings, this is expected behavior in the release workflow.
packages/hdwallet-trezor/package.json (1)
3-20: LGTM! Version bump aligns with monorepo release.Package version and hdwallet-core dependency both updated to 1.62.27, consistent with the monorepo-wide version bump. Based on learnings, this is expected behavior in the release workflow.
packages/hdwallet-ledger/src/currencies.ts (1)
22-25: LGTM!The Zcash currency entry correctly uses
0x0488b21efor the xpub version, which is the standard BIP32 mainnet public key prefix (same as Bitcoin). This is appropriate for Zcash transparent addresses.packages/hdwallet-core/package.json (1)
17-20: LGTM!The dependency updates align with the Zcash support being added:
@shapeshiftoss/bitcoinjs-libbump to7.0.0-shapeshift.2likely includes Zcash-related changesbs58checkis needed for Zcash address encoding with checksumsBased on learnings, package version bumps before publishing are expected in this monorepo workflow.
packages/hdwallet-native/package.json (1)
19-29: LGTM!The dependency updates are consistent with
hdwallet-core:
- Internal dependency
@shapeshiftoss/hdwallet-corecorrectly updated to match the new versionbs58checkadded as runtime dependency for Zcash address handlingBased on learnings, the version references to unpublished packages during PR review is expected in this release workflow.
packages/hdwallet-keepkey/src/keepkey.ts (1)
547-548: LGTM!The new capability flags follow the established pattern for chain support declarations. Setting both to
falseis correct per PR objectives - Plasma support is only enabled inhdwallet-native.packages/hdwallet-trezor/src/trezor.ts (1)
288-289: LGTM!Capability flags correctly added to TrezorHDWallet, consistent with other wallet implementations and PR objectives.
packages/hdwallet-phantom/src/phantom.ts (1)
191-192: LGTM!Capability flags correctly added to PhantomHDWallet, following the established pattern and PR objectives.
packages/hdwallet-walletconnect/src/walletconnect.ts (1)
130-131: LGTM!Capability flags correctly added to WalletConnectHDWallet, consistent with the pattern across all wallet implementations.
packages/hdwallet-ledger/src/utils.ts (1)
602-602: LGTM!The slip44 mapping
133 -> "Zcash"correctly maps the Zcash coin type to its Ledger app name.ZCASH_LEDGER_IMPLEMENTATION.md (3)
1-35: Technical specifications are clear and well-documented.The overview, BIP44 path, transaction formats, consensus branch IDs, and address formats are accurately presented. The NU6.1 (0x4DEC4DF0) upgrade details are current as of the PR date.
82-89: File modifications are accurately summarized.The three files identified (bitcoin.ts, utils.ts, currencies.ts) align with the documented changes and the broader PR context. The characterization of bitcoin.ts as a "Major Update" is appropriate given the monkey patch and Zcash-specific logic.
92-101: Testing checklist is comprehensive and appropriately marked.All critical signing and broadcast paths are covered. The pending "Swap works end-to-end" is reasonable to defer to integration testing with the web PR (#11275 mentioned in objectives).
packages/hdwallet-ledger/package.json (5)
18-31: Verify @bitgo/utxo-lib versioning strategy.All
@ledgerhq/*dependencies are correctly pinned to exact versions (per prior learnings about type mismatches). However,@bitgo/utxo-libuses a caret range (^11.18.0). This is inconsistent with the strict pinning approach for Ledger dependencies.Question: Is this caret range intentional, or should
@bitgo/utxo-libalso be pinned to11.18.0for stability?Based on learnings, this may require explicit pinning if there are known compatibility issues with newer minor/patch versions.
30-30: Verify bitcoinjs-lib patch update for Zcash support.The update from
7.0.0-shapeshift.0to7.0.0-shapeshift.2is a patch-level bump within the prerelease. Confirm thatv.2includes any necessary Zcash-related updates or fixes required for proper transaction signing.
3-3: Package version synchronization is correct.The version bump from 1.62.21 to 1.62.27 is consistent with the
@shapeshiftoss/hdwallet-coredependency update, which is expected in a monorepo structure. Per learnings, version bumps are done in PRs before publishing, with packages published after merge.Also applies to: 31-31
17-48: Dependency upgrade strategy is sound overall, but bs58check migration requires validation.The package.json updates align well with the Zcash support goals:
@ledgerhq/hw-app-btcpinned to 10.13.0 ✓ (matches ZCASH_LEDGER_IMPLEMENTATION.md requirement)@bitgo/utxo-libadded for Zcash UTXO handling ✓- All other Ledger dependencies updated consistently ✓
The major concern is the bs58check jump from 2.x to 4.x, which may introduce breaking API changes. The removal of
@types/bs58checkis correct if v4.0.0 has built-in types, but the migration path must be validated across all usages in the codebase.Ensure a full test pass is run before merging to catch any bs58check compatibility issues.
36-36: bs58check 4.0.0 upgrade is valid—built-in types provided by the package.Verification confirms that bs58check v4.0.0 includes built-in TypeScript definitions (
src/cjs/index.d.ts), justifying the removal of@types/bs58checkfrom devDependencies. The single usage inpackages/hdwallet-ledger/src/utils.ts(theencode()method) is compatible with v4.0.0, and no other packages in the monorepo depend on bs58check.
2923477 to
d5701b1
Compare
Description
Testing
Test with web fren
Plasma uses SLIP44:60 (Ethereum derivation path) and is EVM-compatible.
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com
Summary by CodeRabbit
New Features
Bug Fixes / Changes
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.