Skip to content

feat(sdk-coin-ada): support MPCv2 signed hot recovery - #9499

Draft
ralph-bitgo[bot] wants to merge 1 commit into
masterfrom
wci-1222-ada-mpcv2-signed-hot-recovery
Draft

feat(sdk-coin-ada): support MPCv2 signed hot recovery#9499
ralph-bitgo[bot] wants to merge 1 commit into
masterfrom
wci-1222-ada-mpcv2-signed-hot-recovery

Conversation

@ralph-bitgo

@ralph-bitgo ralph-bitgo Bot commented Aug 13, 2026

Copy link
Copy Markdown

What

  • Ada.recover() now detects MPCv2 (CBOR keycard) signing material in
    addition to the existing MPCv1 (JSON keycard) path, using shared
    helpers from @bitgo/sdk-core: getEddsaSigningMaterial (format
    detection) and signEddsaMpcV2RecoveryTx (local MPS DSG signing).
  • Both helpers are wrapped as new protected methods
    (getEddsaSigningMaterial, signAdaMpcV2Recovery) on Ada so tests
    can stub them, per the pattern already established for Ton/Sol.
    Dispatch is via the EddsaSigningMaterial discriminated union
    (version: 'v1' | 'v2'), not a boolean flag.
  • Parameter guards for userKey/backupKey/walletPassphrase switched
    from manual if (!x) throw to assert(), narrowing types without
    non-null assertions. Backup keychain decryption now goes through the
    shared decryptKeychainPrivateKey helper instead of a bespoke
    try/catch around bitgo.decrypt.
  • Added a "Recover Transactions (MPCv2):" unit test suite mirroring the
    DOT/TON MPCv2 suites: MPCv2 keycard routes to the v2 path (regression
    guard: getTSSSignature not called), MPCv1 keycard still routes to
    the v1 path, missing passphrase still produces an unsigned sweep, and
    a mismatched bitgoKey vs. keycard commonKeyChain throws.
  • No changes to RecoveryOptions, WRW, or recoverConsolidations()
    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 via
EDDSAMethods.getTSSSignature(). This brings ADA recovery in line with
the 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.json passes
  • nix develop . --command npx eslint --quiet modules/sdk-coin-ada/src/ada.ts modules/sdk-coin-ada/test/unit/ada.ts passes
  • BITGOJS_TEST_PASSWORD=... npx mocha in modules/sdk-coin-ada — 171 passing, 0 failing (includes 4 new MPCv2 tests + unmodified MPCv1 regression tests)

Ticket: WCI-1222

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
@linear-code

linear-code Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

WCI-1222

@bitgo-ai-agent-dev
bitgo-ai-agent-dev Bot force-pushed the wci-1222-ada-mpcv2-signed-hot-recovery branch from 12c5fe0 to c091c47 Compare August 13, 2026 15:31
@ralph-bitgo
ralph-bitgo Bot force-pushed the wci-1222-ada-mpcv2-signed-hot-recovery branch from c091c47 to d743de9 Compare August 13, 2026 15:31
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.

1 participant