Repository navigation
Conversation
Add createEddsaMPCv2KeyGenCallbacks to walletGenerationCallbacks.ts, implementing the SDK's EddsaMPCv2KeyGenCallbacks four-callback contract (initialize, round1, round2, finalize). Each callback drives both the user and backup AWM through the single shareType-parameterized keygen route via the WCI-893 client method. The counterparty round-2 signed messages — which finalize needs but the SDK does not pass into finalizeCallback — are carried in the factory closure (the finalize bridge). The per-party keygen state (encrypted data key, encrypted GPG private key, round-1/round-2 sessions, GPG pub keys) is threaded through the SDK's ExternalSignerMpcState as a packed JSON blob. Ticket: WCI-895
This branch has not been deployed
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
createEddsaMPCv2KeyGenCallbacks(awmUserClient, awmBackupClient)tosrc/masterBitgoExpress/handlers/walletGenerationCallbacks.ts, returning the SDK'sEddsaMPCv2KeyGenCallbacksfour-callback contract:initializeCallback— both AWMs generate GPG pairs; returns pubs + packed stateround1Callback— both AWMs run DKG round 1; returns signed msg1s + updated stateround2Callback— both AWMs run DKG round 2; returns signed msg2s + updated statefinalizeCallback— both AWMs finalize; asserts commonKeychain match; returns{ commonKeychain }Design notes
finalizeCallbackparams do not includeuserSignedMsg2/backupSignedMsg2, but the user's finalize needs the backup's signed msg2 (and vice versa) — they are carried in the factory closure (same pattern as the ECDSA factory's inter-party messages)ExternalSignerMpcStateas a JSON blob inencryptedDataWCI-895-pt1/pt2branches, which collapsed SDK round 1 into initialize and SDK round 2 into round1)Why
EddsaMPCv2Utils.createKeychainsWithExternalSigner) drives the callbacks; this factory wires them to the AWM via the WCI-893 client methodDependencies
Test plan
tsc --noEmitclean; ESLint cleanTicket: WCI-895