feat(sdk-coin-dot): add MPCv2 signed hot recovery support - #9484
Open
ralph-bitgo[bot] wants to merge 1 commit into
Open
feat(sdk-coin-dot): add MPCv2 signed hot recovery support#9484ralph-bitgo[bot] wants to merge 1 commit into
ralph-bitgo[bot] wants to merge 1 commit into
Conversation
Contributor
bitgo-ai-agent-dev
Bot
force-pushed
the
wci-1227-dot-mpcv2-recovery
branch
from
August 12, 2026 11:32
0a4c3b5 to
02798b6
Compare
ralph-bitgo
Bot
force-pushed
the
wci-1227-dot-mpcv2-recovery
branch
from
August 12, 2026 11:32
02798b6 to
a079856
Compare
vibhavgo
force-pushed
the
wci-1227-dot-mpcv2-recovery
branch
2 times, most recently
from
August 13, 2026 06:36
edfac9b to
47b6045
Compare
Detect CBOR (MPCv2) vs JSON (MPCv1) keycards in Dot.recover() using the shared getEddsaSigningMaterial/signDotMpcV2Recovery helpers from sdk-core. Uses assert() for guards in newly introduced recovery code. Ticket: WCI-1227
vibhavgo
force-pushed
the
wci-1227-dot-mpcv2-recovery
branch
from
August 13, 2026 06:43
47b6045 to
5b6afb7
Compare
vibhavgo
marked this pull request as ready for review
August 13, 2026 07:08
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
isMpcv2SigningMaterial()andaddRecoverySignature()private methods toDot(modules/sdk-coin-dot/src/dot.ts), and updatesrecover()to detect the keycard format once (MPCv1 JSON vs MPCv2 CBOR) and dispatch signing accordingly.@bitgo/sdk-core(getEddsaSigningMaterial,signEddsaMpcV2RecoveryTx) rather than duplicating logic — same pattern assdk-coin-sol(WCI-398) andabstract-substrate(WCI-1276/WCI-1239).0x00Substrate discriminant, becauseTransaction#constructSignedPayloadalready prepends it unconditionally for every signature (the same mechanism the pre-existing MPCv1 path relies on). Manually prepending it, as literally described in the ticket and mirrored from the already-mergedabstract-substratecode, double-prefixes and corrupts the signature — verified empirically by round-tripping a signed transaction through decode.describe('Recover Transactions (MPCv2):')test block covering: MPCv2 signed recovery returning{ serializedTx, scanIndex }, MPCv1 regression (still usesgetTSSSignature), mismatchedbitgoKeyvs keycardcommonKeyChainthrowing, and a cryptographic verification (vianacl.sign.detached.verifyagainst the transaction's signable payload and derived pubkey) that the extrinsic signature is exactly 64 bytes with the discriminant applied once — not just a length check, which would not catch the double-prefix corruption class.recoverConsolidations()MPCv2 support is intentionally out of scope here — tracked separately in WCI-1236.Why
Wallets are migrating EdDSA MPC from the Zengo implementation (MPCv1) to Silence Labs (MPCv2). DOT's
recover()only handled MPCv1 keycards, so self-custody hot recovery would fail for any wallet backed by an MPCv2 keycard. This closes that gap for DOT, matching the detection + signing path already shipped for SOL (WCI-398) and the shared helpers extracted for Substrate coins (WCI-1276/WCI-1239).Test plan
yarn unit-testinmodules/sdk-coin-dot— 205 passing, 0 failing (includes the 5 new MPCv2 tests)yarn build:cjs(tsc --build) — compiles cleanlyyarn eslint --quiet src/dot.ts test/unit/dot.ts— no errorsTicket: WCI-1227