feat(dkg): add EdDSA MPCv2 AWM client methods and ME callback factory#256
Draft
bitgo-ai-agent-dev[bot] wants to merge 2 commits into
Conversation
48a0e2e to
d5bc087
Compare
Add io-ts request/response types and three new route entries to
AdvancedWalletManagerApiSpec for the EdDSA MPCv2 DKG protocol:
- POST /api/{coin}/eddsampcv2/keygen/initialize
- POST /api/{coin}/eddsampcv2/keygen/round1
- POST /api/{coin}/eddsampcv2/keygen/finalize
Each route is wired in createKeyGenRouter with a NotImplementedError
stub; the real handlers land in WCI-892. The type exports are needed
by the ME client added in the next PR (WCI-893).
Ticket: WCI-895
Session-Id: 4df43c40-1cea-4bcc-ae92-080304169427
Task-Id: 04666b37-650f-4c07-97b0-76a62e98f1ad
0b9c357 to
c13f9e0
Compare
Add three methods to AdvancedWalletManagerClient (WCI-893): - eddsaMPCv2KeyGenInitialize - eddsaMPCv2KeyGenRound1 - eddsaMPCv2KeyGenFinalize Each method calls the corresponding AWM endpoint added in the previous PR, with mTLS agent support. Add createEddsaMPCv2KeyGenCallbacks factory in walletGenerationCallbacks.ts (WCI-895): wraps user and backup AWM clients into an EddsaMPCv2KeyGenCallbacks object whose initialize, round1, and finalize callbacks fan both clients out in parallel and merge results for the SDK orchestrator (WCI-916). This replaces the inline WASM/GPG/DKG key gen logic with AWM-delegated calls, enabling hardware-backed key generation in the AKM pattern. Local EddsaMPCv2KeyGenCallbacks type mirrors the WCI-894 shape; it will be replaced by the SDK import once published. Three unit tests verify parallel fan-out and result merging for each callback phase using nock. Ticket: WCI-895 Session-Id: 4df43c40-1cea-4bcc-ae92-080304169427 Task-Id: 04666b37-650f-4c07-97b0-76a62e98f1ad
5f093c1 to
b758edc
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.
What
AdvancedWalletManagerClient(WCI-893):eddsaMPCv2KeyGenInitialize— callsPOST /api/{coin}/eddsampcv2/keygen/initializeeddsaMPCv2KeyGenRound1— callsPOST /api/{coin}/eddsampcv2/keygen/round1eddsaMPCv2KeyGenFinalize— callsPOST /api/{coin}/eddsampcv2/keygen/finalizecreateEddsaMPCv2KeyGenCallbacksfactory inwalletGenerationCallbacks.ts(WCI-895): wraps user + backup AWM clients into anEddsaMPCv2KeyGenCallbacksobjectEddsaMPCv2KeyGenCallbackstype definitions (mirrors WCI-894 shape; replaced by SDK import once published)Why
createKeychainsWithExternalSigner(WCI-916). This PR wires the ME side of that contract.Test plan
npm run tsc -- --noEmitpassesnpm test— all 403 tests pass (400 existing + 3 new)npm run lint— no errorsStack
This PR is part 2 of 2 in a stack. Review and merge in order:
master)pt1) ← you are hereTicket: WCI-895