feat(sdk-coin-ada): support MPCv2 signed hot recovery - #9499
Draft
ralph-bitgo[bot] wants to merge 1 commit into
Draft
feat(sdk-coin-ada): support MPCv2 signed hot recovery#9499ralph-bitgo[bot] wants to merge 1 commit into
ralph-bitgo[bot] wants to merge 1 commit into
Conversation
Update Ada.recover() to detect MPCv2 CBOR keycards alongside the existing MPCv1 JSON path, using the shared getEddsaSigningMaterial and signEddsaMpcV2RecoveryTx helpers from @bitgo/sdk-core (already on master). Both helpers are wrapped as protected methods so sinon can stub them in tests. Parameter guards now use assert() instead of manual if/throw to narrow types without non-null assertions. Wallets migrated to Silence Labs EdDSA MPCv2 key generation could not previously complete non-BitGo recovery because recover() only knew how to sign with MPCv1 shares. Detection is automatic based on the decrypted keycard format, so no new RecoveryOptions params or WRW changes are needed. Ticket: WCI-1222 Session-Id: 1dbe3038-f6eb-4e72-88dc-7e8ed59d252a Task-Id: 84b98c0a-b935-4f44-a6fc-e6df8bc5bfb8
Contributor
bitgo-ai-agent-dev
Bot
force-pushed
the
wci-1222-ada-mpcv2-signed-hot-recovery
branch
from
August 13, 2026 15:31
12c5fe0 to
c091c47
Compare
ralph-bitgo
Bot
force-pushed
the
wci-1222-ada-mpcv2-signed-hot-recovery
branch
from
August 13, 2026 15:31
c091c47 to
d743de9
Compare
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.
What
Ada.recover()now detects MPCv2 (CBOR keycard) signing material inaddition to the existing MPCv1 (JSON keycard) path, using shared
helpers from
@bitgo/sdk-core:getEddsaSigningMaterial(formatdetection) and
signEddsaMpcV2RecoveryTx(local MPS DSG signing).(
getEddsaSigningMaterial,signAdaMpcV2Recovery) onAdaso testscan stub them, per the pattern already established for
Ton/Sol.Dispatch is via the
EddsaSigningMaterialdiscriminated union(
version: 'v1' | 'v2'), not a boolean flag.userKey/backupKey/walletPassphraseswitchedfrom manual
if (!x) throwtoassert(), narrowing types withoutnon-null assertions. Backup keychain decryption now goes through the
shared
decryptKeychainPrivateKeyhelper instead of a bespoketry/catch around
bitgo.decrypt.DOT/TON MPCv2 suites: MPCv2 keycard routes to the v2 path (regression
guard:
getTSSSignaturenot called), MPCv1 keycard still routes tothe v1 path, missing passphrase still produces an unsigned sweep, and
a mismatched
bitgoKeyvs. keycardcommonKeyChainthrows.RecoveryOptions, WRW, orrecoverConsolidations()—detection is fully automatic from the decrypted keycard format.
Why
Wallets migrated to the Silence Labs EdDSA MPCv2 key generation scheme
could not complete non-BitGo (hot) recovery on ADA, because
Ada.recover()only knew how to sign with legacy MPCv1 key shares viaEDDSAMethods.getTSSSignature(). This brings ADA recovery in line withthe DOT (WCI-1227) and SOL (WCI-398) MPCv2 recovery support already on
master.
Test plan
nix develop . --command npx tsc --build --force modules/sdk-coin-ada/tsconfig.jsonpassesnix develop . --command npx eslint --quiet modules/sdk-coin-ada/src/ada.ts modules/sdk-coin-ada/test/unit/ada.tspassesBITGOJS_TEST_PASSWORD=... npx mochainmodules/sdk-coin-ada— 171 passing, 0 failing (includes 4 new MPCv2 tests + unmodified MPCv1 regression tests)Ticket: WCI-1222