feat(sdk-core): extract isMpcV2Keycard and signEddsaMpcV2RecoveryTx into shared utils - #9449
Draft
vibhavgo wants to merge 2 commits into
Draft
Conversation
vibhavgo
marked this pull request as draft
August 7, 2026 10:18
vibhavgo
force-pushed
the
feat/sdk-core/extract-mpcv2-recovery-helper
branch
from
August 10, 2026 05:21
1340716 to
32bab87
Compare
vibhavgo
force-pushed
the
feat/sdk-core/extract-mpcv2-recovery-helper
branch
from
August 10, 2026 05:34
32bab87 to
37ba5b1
Compare
Ticket: WCI-1276 Add EddsaSigningMaterial discriminated union, isMpcV2Keycard, and signEddsaMpcV2RecoveryTx to eddsaMPCv2.ts. Replace duplicated inline implementations in abstract-substrate and sdk-coin-sol with these shared helpers. sjcl fallback retained for optional bitgo parameter. Export all new symbols from sdk-core package root. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Ticket: WCI-1276 Replace inline isMpcV2Keycard and addRecoverySignature MPCv2 block in sdk-coin-ton with shared helpers from sdk-core. Removes TonSigningMaterial local type in favour of EddsaSigningMaterial. Drop-in — no behaviour change, no test modifications. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
vibhavgo
force-pushed
the
feat/sdk-core/extract-mpcv2-recovery-helper
branch
from
August 10, 2026 06:17
cba5249 to
541f899
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.
Summary
EddsaSigningMaterialdiscriminated union (v1 | v2) toeddsaMPCv2.tsisMpcV2Keycard(userKey, walletPassphrase, bitgo?)— detects v1 (JSON/SJCL) vs v2 (CBOR) keycard, returns typed signing material; sjcl fallback retained for optionalbitgosignEddsaMpcV2RecoveryTx(params)— full MPCv2 recovery signing: decrypt key shares → validatecommonKeyChain→ MPS DSGsdk-corepackage rootabstract-substrateandsdk-coin-solwith the shared helpers — drop-in, no behaviour change, no test modificationsContext
WCI-1276 —
isMpcV2KeycardandsignEddsaMpcV2RecoveryTxwere duplicated inline across coin modules (Substrate/DOT/POLYX, SOL). This PR extracts them intosdk-coreand replaces all call sites.This branch is based on
feat/abstract-substrate/WCI-1239and should be merged after that branch lands.Modules changed
@bitgo/sdk-core@bitgo/abstract-substrateisMpcV2Keycardto shared helper; removes localSubstrateSigningMaterialtype@bitgo/sdk-coin-solisMpcv2SigningMaterialand MPCv2 signing block to shared helpersTest plan
yarn testinmodules/sdk-core— 18 passingyarn buildinmodules/abstract-substrate— cleanyarn testinmodules/sdk-coin-sol— 482 passing (3 pre-existing env-var failures unrelated to this PR)🤖 Generated with Claude Code