Repository navigation
WCN-3936 Verify addresses under the per-wallet derivation prefix - #10107
Draft
davidkaplanbitgo wants to merge 1 commit into
Draft
davidkaplanbitgo wants to merge 1 commit into
davidkaplanbitgo wants to merge 1 commit into
Conversation
Contributor
Contributor
|
|
Address verification and derivation read coinSpecific.derivationPrefix: absent means legacy, present must equal the canonical prefix recomputed from the three keys and the statics coin type. PSBT outputs take their prefix from the parsed derivation path so bip44 change is not reported as external. Express codecs accept derivationPrefix, the statics test pins every UTXO coin type, and the abstract-utxo README documents the two schemes. Ticket: WCN-3936
davidkaplanbitgo
force-pushed
the
davidkaplan/wcn-3936-bitgojs-sdk-scheme-aware-address-verification-wasm-utxo-bump
branch
from
October 31, 2026 12:03
9c8fdc6 to
dc6915c
Compare
Contributor
Author
Contributor
Review of #10107: verify addresses under the per-wallet derivation prefixOverall this is a solid, security-conscious change. The prefix is never trusted: it is recomputed from the three keys and the coin type, and the check is strict in both directions. The "undefined coin type throws" path is covered, and the Internal information leakage (please fix before merge)
Suggestions
Questions
Good practices
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Part of the BIP-0044 style wallet derivation project (spike WCN-3907): wallets that share root xpubs get a second, per-wallet derivation scheme
44/<coin_type>/<h1>/<h2>/<chain>/<index>;h1/h2are recomputed from the three wallet keys.AddressCoinSpecific.derivationPrefix(sdk-core). Address verification andderiveAddressread it: absent means legacy; present must equal the canonical prefix recomputed withfixedScriptWallet.deriveWalletPrefixfrom the three keys and the staticsbip44CoinType. A server-supplied non-canonical prefix is never trusted (recovery only scans the legacy and canonical subtrees). An undefined coin type with a prefix throws;allowSkipVerifyAddressdoes not skip prefixed addresses.derivationPath(all components except the last two) so bip44 change is not reported as external.deriveAddress/isWalletAddresscodecs acceptcoinSpecific.derivationPrefix(andchainon isWalletAddress).bip44CoinTypefor every UTXO coin; README section on the two schemes and how they differ from Safes.Already-released SDKs throw
UnexpectedAddressErrorfor a bip44 address and nothing here can change that; the rollout gates enabling per enterprise.Issue Number
WCN-3936
Type of change
How Has This Been Tested?
Not yet. Nothing was built or run: this needs the unreleased
@bitgo/wasm-utxo(deriveWalletPrefix, fullderivationPathon parsed outputs) and a version bump inabstract-utxo,utxo-core,utxo-bin,utxo-descriptors,utxo-ordandutxo-staking. Unit tests were written for address verification, output prefix forwarding, sdk-core forwarding and the Express codecs, but have not run.