Skip to content

feat: add eddsa mpcv2 signing orchestration and routing - #281

Open
vibhavgo wants to merge 1 commit into
WCI-925-eddsa-mpcv2-custom-signersfrom
WCI-926-eddsa-mpcv2-signing-orchestration
Open

vibhavgo wants to merge 1 commit into
WCI-925-eddsa-mpcv2-custom-signersfrom
WCI-926-eddsa-mpcv2-signing-orchestration

Conversation

@vibhavgo

Copy link
Copy Markdown
Contributor

Summary

Wire the EdDSA MPCv2 signing path through Master Express:

  • eddsa.ts: new signAndSendEddsaMPCv2FromTxRequest() mirroring the ECDSA MPCv2 orchestrator — instantiates EddsaMPCv2Utils, builds round generators via createEddsaMPCv2CustomSigners(), and drives signEddsaMPCv2TssUsingExternalSigner(..., RequestType.tx)
  • transactionRequests.ts: EdDSA branch dispatches to the MPCv2 orchestrator when wallet.multisigTypeVersion?.() === 'MPCv2'; otherwise the existing MPCv1 commitment/r/g flow; ECDSA path unchanged
  • handleSendMany.ts: createMPCSendParamsWithCustomSigningFns() now takes the wallet and returns the customEddsaMPCv2SigningRound1/2/3GenerationFunction set for MPCv2 wallets — required because the SDK's signTransaction dispatches by presence of the custom functions (MPCv2 wallets given only v1 functions would run the wrong flow); MPCv1 wallets keep commitment/r/g; helper exported for unit testing

Backward compatible: wallets without multisigTypeVersion: 'MPCv2' behave exactly as before.

Testing

  • Orchestrator test (nock): /client/constants fixture extended with a real ed25519 bitgoEddsaMpcv2PublicKey (the constant the SDK reads for EdDSA MPCv2); AWM round nocks assert curveType: 'eddsa' via a new expectedCurveType body filter on nockEcdsaMpcv2SigningFlow; signed TxRequest returned and all sign/send nocks consumed
  • Routing test (supertest, full Master Express app): EdDSA MPCv2 wallet fixture → 200 with txid/tx; MPCv1 routing test unchanged
  • handleSendMany dispatch unit test: MPCv2 wallet → v2 functions present / v1 absent; MPCv1 wallet → reverse
  • Suites (eddsaMpcv2Signing + signAndSendTxRequest + ecdsa + eddsa): 459 passing, 0 failing

Ticket: WCI-926
Linear: https://linear.app/bitgo/issue/WCI-926

@linear-code

linear-code Bot commented Oct 13, 2026

Copy link
Copy Markdown

WCI-926

@vibhavgo
vibhavgo added this pull request to stack #280 October 13, 2026 11:41
@vibhavgo
vibhavgo force-pushed the WCI-926-eddsa-mpcv2-signing-orchestration branch from 760eb2f to b86be22 Compare October 13, 2026 11:47
@vibhavgo
vibhavgo marked this pull request as ready for review October 13, 2026 12:01
@vibhavgo
vibhavgo requested review from a team as code owners October 13, 2026 12:01
@vibhavgo
vibhavgo force-pushed the WCI-926-eddsa-mpcv2-signing-orchestration branch from b86be22 to 7d5e64c Compare October 14, 2026 10:19
@vibhavgo
vibhavgo force-pushed the WCI-926-eddsa-mpcv2-signing-orchestration branch from 7d5e64c to dbc2d1c Compare October 15, 2026 18:21
Add signAndSendEddsaMPCv2FromTxRequest() to master express eddsa.ts,
mirroring the ECDSA MPCv2 orchestrator: instantiate EddsaMPCv2Utils, build
round generators via createEddsaMPCv2CustomSigners(), and drive
signEddsaMPCv2TssUsingExternalSigner with RequestType.tx.

Route EdDSA signing in transactionRequests.ts: wallets with
multisigTypeVersion MPCv2 dispatch to the new orchestrator; wallets
without it keep the MPCv1 commitment/r/g flow. ECDSA path unchanged.

Extend createMPCSendParamsWithCustomSigningFns() in handleSendMany.ts:
the SDK's signTransaction dispatches by presence of the custom signing
functions, so EdDSA MPCv2 wallets must receive the
customEddsaMPCv2SigningRound1/2/3GenerationFunction set; MPCv1 wallets
keep commitment/r/g. The helper now takes the wallet and is exported for
unit testing.

Ticket: WCI-926
@vibhavgo
vibhavgo force-pushed the WCI-926-eddsa-mpcv2-signing-orchestration branch from dbc2d1c to b3bd1f8 Compare October 16, 2026 06:16

This branch has not been deployed

No deployments
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