Skip to content

fix(sdk-core): route EdDSA MPCv2 hot wallets to full apiVersion#8719

Closed
bitgo-ai-agent-dev[bot] wants to merge 1 commit intomasterfrom
WCI-156/stitch-signrequestbase-signtransactiontss
Closed

fix(sdk-core): route EdDSA MPCv2 hot wallets to full apiVersion#8719
bitgo-ai-agent-dev[bot] wants to merge 1 commit intomasterfrom
WCI-156/stitch-signrequestbase-signtransactiontss

Conversation

@bitgo-ai-agent-dev
Copy link
Copy Markdown

Summary

Fixes 3 gaps that prevent the hot-wallet EdDSA MPCv2 signing flow (sendCoinssignTransactionTssEddsaMPCv2Utils.signTxRequest) from working correctly. All changes are in modules/sdk-core.

1. getTxRequestApiVersion (txRequest.ts)
EdDSA MPCv2 hot wallets were falling through to the wallet.type() === 'hot' branch and getting 'lite'. EddsaMPCv2Utils.signRequestBase requires apiVersion: 'full' to access txRequest.transactions[0].unsignedTx; the 'lite' response omits that field, causing an assertion failure. Fix: add || wallet.multisigTypeVersion() === 'MPCv2' to the existing ECDSA 'full' branch.

2. validateTxRequestApiVersion (txRequest.ts)
A caller explicitly passing apiVersion: 'lite' on an EdDSA MPCv2 wallet received no validation error, silently propagating the wrong version. Fix: merge ECDSA and MPCv2 into a single guard that asserts 'full' for both, with an updated error message.

3. supportedTxRequestVersions (baseTSSUtils.ts)
The EdDSA hot-wallet branch returned ['lite', 'full'] regardless of MPCv2 version. EdDSA MPCv2 only supports 'full'. Fix: check multisigTypeVersion() === 'MPCv2' and return ['full']; v1 hot wallets are unchanged.

Tests

  • modules/sdk-core/test/unit/bitgo/utils/txRequest.ts: added multisigTypeVersion to all wallet stubs; new cases for MPCv2+hot+'lite' → throws and MPCv2+hot+undefined'full'; updated EdDSA v1 stub with explicit multisigTypeVersion: () => undefined.
  • modules/bitgo/test/v2/unit/internal/tssUtils/eddsa.ts: new test EddsaMPCv2Utils.supportedTxRequestVersions returns ['full'] for MPCv2 hot wallet; updated v1 hot wallet test with explicit multisigTypeVersion: undefined.

What does NOT change

  • wallet.ts constructor, signTransactionTss routing, signMessageTss, getUserPrvAsync, sendSignatureShareV2 — all already correct for EdDSA MPCv2.

Ticket: WCI-156

@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 8, 2026

WCI-156

@bitgo-ai-agent-dev bitgo-ai-agent-dev Bot force-pushed the WCI-156/stitch-signrequestbase-signtransactiontss branch from 5a04e89 to 6f0cdae Compare May 8, 2026 11:47
- `getTxRequestApiVersion`: add `|| wallet.multisigTypeVersion() === 'MPCv2'`
  to the `'full'` branch so EdDSA MPCv2 hot wallets are not incorrectly
  returned `'lite'`, which causes `signRequestBase` to fail with
  "Missing signableHex in unsignedTx" at runtime.
- `validateTxRequestApiVersion`: merge ECDSA and MPCv2 check so that
  passing `apiVersion: 'lite'` on any MPCv2 wallet throws immediately.
- `baseTSSUtils.supportedTxRequestVersions`: return `['full']` (not
  `['lite', 'full']`) for EdDSA MPCv2 hot wallets; v1 hot wallets are
  unchanged.
- Tests: add `multisigTypeVersion` to all txRequest wallet stubs; add
  two new cases (MPCv2 throws on `'lite'`, MPCv2 defaults to `'full'`);
  add `EddsaMPCv2Utils.supportedTxRequestVersions` test for MPCv2 hot
  wallet returning `['full']`.

Ticket: WCI-156
Session-Id: ac2678cb-270b-48ab-851f-7787f697cba9
Task-Id: 77a26d69-dcc5-43cf-b339-dace5e08c890
@bitgo-ai-agent-dev bitgo-ai-agent-dev Bot force-pushed the WCI-156/stitch-signrequestbase-signtransactiontss branch from 6f0cdae to 965429e Compare May 8, 2026 12:12
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