Skip to content

feat(sdk-core): wire eddsaMPCv2Callbacks into generateWalletWithExternalSigner#9200

Draft
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
masterfrom
wci-917-wire-eddsampcv2callbacks-into-generate-wallet-with-external-signer
Draft

feat(sdk-core): wire eddsaMPCv2Callbacks into generateWalletWithExternalSigner#9200
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
masterfrom
wci-917-wire-eddsampcv2callbacks-into-generate-wallet-with-external-signer

Conversation

@bitgo-ai-agent-dev

Copy link
Copy Markdown

What

  • Add eddsaMPCv2Callbacks?: EddsaMPCv2KeyGenCallbacks to GenerateWalletWithExternalSignerOptions in iWallets.ts
  • Update hasMpcCallbacks in wallets.ts to include eddsaMPCv2Callbacks so createKeychainCallback + MPCv2 callbacks is rejected
  • Add EdDSA MPCv2 routing branch in generateMpcWalletWithExternalSigner: dispatches to EddsaMPCv2Utils.createKeychainsWithExternalSigner when eddsaMPCv2Callbacks is set; rejects if both eddsaMPCv2Callbacks and eddsaCallbacks are provided; falls through to the existing MPCv1 path otherwise
  • Add tests covering: routing to EddsaMPCv2Utils, mutual-exclusion rejection, no-callbacks rejection, MPCv1 path unchanged

Why

  • EdDSA MPCv2 wallet generation (Silence Labs DKG) requires its own key generation callbacks distinct from the existing MPCv1 path
  • This wires the newly-defined EddsaMPCv2KeyGenCallbacks type (WCI-894) into the external signer flow so consumers can opt into MPCv2 by passing eddsaMPCv2Callbacks
  • Part of the EdDSA upgrade from Zengo to Silence Labs implementation (WCI-888)

Dependencies

  • Base branch wci-894-define-eddsa-mpcv2-keygen-callback-types contains the EddsaMPCv2KeyGenCallbacks type definitions (WCI-894)
  • EddsaMPCv2Utils.createKeychainsWithExternalSigner is added by WCI-916; the implementation uses an as any cast until that lands and the type annotation will resolve when these branches are merged together

Test plan

  • All 474 tests in walletsExternalSigner.ts pass
  • New generateWalletWithExternalSigner - EdDSA MPCv2 TSS describe block (7 tests) all pass
  • eddsaMPCv2Callbacks routes to EddsaMPCv2Utils.createKeychainsWithExternalSigner with correct params
  • eddsaMPCv2Callbacks + eddsaCallbacks together is rejected
  • No callbacks for EdDSA coin is rejected with the existing MPCv1 error
  • Providing only eddsaCallbacks still routes to the MPCv1 EddsaUtils path (not MPCv2)
  • createKeychainCallback + eddsaMPCv2Callbacks together is rejected

Ticket: WCI-917

…nalSigner

Add eddsaMPCv2Callbacks field to GenerateWalletWithExternalSignerOptions
and add routing in generateMpcWalletWithExternalSigner to dispatch to
EddsaMPCv2Utils.createKeychainsWithExternalSigner when the field is set.

Changes:
- iWallets.ts: add eddsaMPCv2Callbacks?: EddsaMPCv2KeyGenCallbacks to
  GenerateWalletWithExternalSignerOptions
- wallets.ts: update hasMpcCallbacks to include eddsaMPCv2Callbacks; add
  an EdDSA MPCv2 branch that calls EddsaMPCv2Utils; guard against passing
  both eddsaMPCv2Callbacks and eddsaCallbacks simultaneously
- walletsExternalSigner.ts: new test block covering routing to
  EddsaMPCv2Utils, mutual-exclusion rejection, no-callbacks rejection,
  and MPCv1 path unchanged verification

Ticket: WCI-917
Session-Id: 23a5c77a-c909-407f-bf3e-a820c9e88aea
Task-Id: 38b68db1-6599-4911-9635-d408663b0d82
@linear-code

linear-code Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

WCI-917

@bitgo-ai-agent-dev bitgo-ai-agent-dev Bot force-pushed the wci-917-wire-eddsampcv2callbacks-into-generate-wallet-with-external-signer branch from 7997d9a to 5a10bf9 Compare July 7, 2026 18:18
Base automatically changed from wci-894-define-eddsa-mpcv2-keygen-callback-types to master July 8, 2026 06:39
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