Repository navigation
feat: sign and share ed25519 multisig safe wallets - #10146
Merged
Merged
Conversation
Safe owners of ALGO, XLM and HBAR wallets could neither sign nor share spend: the shared safe key resolver rejected every ed25519 family because it only knew secp256k1 BIP32 derivation. Add an ed25519 branch to the resolver. It SLIP-0010 hardened-derives the user child from the root at the registered path, encodes the derived pub for the coin and requires it to equal the registered child pub, and returns only the child seed encoded the way the coin signs with it. The root is never returned or placed in a share payload. Move the per-coin ed25519 encoders out of recovery into sdk-lib-safes so recovery, owner signing and sharing use one registry. MPC safe children already carry their own encrypted signing share and share through the ordinary TSS path. Keep a fail-closed error for a public-only TSS child and drop the wording that claimed a missing derive ceremony. TICKET: WCN-2431 TICKET: WCN-4257
Contributor
Author
Contributor
Contributor
|
|
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
Contributor
Author
|
@claude review |
danielpeng1
approved these changes
Nov 9, 2026
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
Safe owners of ALGO, XLM and HBAR (
ed25519Multisig) wallets could neither sign nor share spend. The shared safe key resolver rejected every ed25519 family, because it only knew secp256k1 BIP32 derivation.This adds an ed25519 branch to that resolver, used by both owner signing and wallet sharing:
SafeDerivedPublicKeyMismatchError. A bareG...strkey is not accepted for ALGO or HBAR.S...). The root is never returned or placed in a share payload.@bitgo/sdk-lib-safes(ed25519CoinEncoders.ts), so recovery, owner signing and sharing use one registry. Recovery behavior is unchanged.MPC safe children (
ecdsaMpc,eddsaMpc) already carry their own encrypted signing share and share through the ordinary TSS path. No change there, apart from fixtures and wording: a public-only TSS child (an invalid state) still fails closed, and the error text no longer claims a missing derive ceremony.Issue Number
WCN-2431, WCN-4257
Type of change
SafeOwnerSigningNotImplementedErrorandSafeShareNotImplementedErrorkeep their names and are now thrown only for a public-only TSS child.ResolveSafeChildPrvForSharingParams.mpcAlgorithmis removed; nothing passed it.How Has This Been Tested?
From the module directories, with
sdk-lib-safesrebuilt first:sdk-lib-safes:npx mocha --recursive test- 99 passing (new pinned encoder vectors for ALGO, HBAR, XLM, plus the existing hardened vector)sdk-core:npx mocha test/unit/bitgo/wallet/safeShareWallet.ts test/unit/bitgo/wallet/safeGetUserPrv.ts- 68 passingsdk-core:npx mocha --recursive test/unit/bitgo/safe- 158 passingyarn buildin both modules, andyarn lintin both: cleanCovered: pinned SLIP-0010 child seed and coin-encoded prv for txlm, talgo, thbar; registered pub mismatch fails closed;
m/0'single-level path fails closed; wrong passphrase; share payload hasskipKeychainfalse,keychain.pubequal to the stored child pub, and no root material; ECDH round trip to the coin-encoded child seed; MPC child withencryptedPrvtakes the ordinary path without fetching the root.Not covered: a live staging send or share-and-sign. That needs the platform side deployed.
Checklist