Skip to content

feat(sdk-core): add webauthnInfo support to createMpc#8607

Open
mohammadalfaiyazbitgo wants to merge 3 commits intomasterfrom
wal-761-webauthn-info-create-mpc
Open

feat(sdk-core): add webauthnInfo support to createMpc#8607
mohammadalfaiyazbitgo wants to merge 3 commits intomasterfrom
wal-761-webauthn-info-create-mpc

Conversation

@mohammadalfaiyazbitgo
Copy link
Copy Markdown
Contributor

** Summary

  • Introduces MpcWebauthnInfo interface ({ otpDeviceId, prfSalt, passphrase }) in iKeychains.ts for passing a PRF-derived passphrase into MPC key creation
  • Adds optional webauthnInfo?: MpcWebauthnInfo to CreateMpcOptions and threads it through all four createKeychains implementations (EDDSA, EdDSA MPCv2, ECDSA, ECDSA MPCv2)
  • When provided, each implementation stores an additional webauthnDevices entry on the user keychain encrypted with the PRF-derived passphrase
  • Wires webauthnInfo from GenerateWalletOptions through generateMpcWalletcreateMpc for the TSS wallet creation path
  • Adds tests verifying webauthnInfo is correctly forwarded to the underlying createKeychains for both EDDSA and ECDSA TSS

Test plan

  • Run yarn run unit-test --scope bitgo and verify new "should pass webauthnInfo to createKeychains" tests pass
  • Verify existing "Create TSS Keychains" tests still pass
  • Verify createParticipantKeychain tests in ecdsaMPCv2 and ecdsa still pass

Closes WAL-761

🤖 Generated with Claude Code

Add MpcWebauthnInfo parameter to CreateMpcOptions and thread it through
all four createKeychains implementations (EDDSA, EdDSA MPCv2, ECDSA,
ECDSA MPCv2). When provided, the user keychain is registered with an
additional webauthnDevices entry containing a PRF-encrypted copy of the
user private share, avoiding the need for a separate PUT /key/{id} call
post-wallet-creation.

Also wires webauthnInfo from generateWallet through generateMpcWallet
so TSS wallet creation passes the authenticator info end-to-end.

Ticket: WAL-761
@linear
Copy link
Copy Markdown

linear Bot commented Apr 22, 2026

The recipientKeychainParams object in createParticipantKeychain used a
prv field not present in AddKeychainOptions. Remove the explicit type
annotation so TypeScript infers the broader object literal type, and
inline the webauthnDevices conditional to keep the declaration atomic.

Ticket: WAL-761
MpcWebauthnInfo and GenerateWalletWebauthnInfo were identical shapes.
Promote GenerateWalletWebauthnInfo to iKeychains.ts as the single
canonical type, re-export it from iWallets.ts, and drop the duplicate
definition. All createKeychains implementations and CreateMpcOptions
now reference the shared type.

The onchain hot wallet path in generateWallet already wires webauthnInfo
through userKeychainPromise; no additional changes are needed there.

Ticket: WAL-761
@mohammadalfaiyazbitgo mohammadalfaiyazbitgo force-pushed the wal-761-webauthn-info-create-mpc branch from e9c8790 to 0636e4f Compare April 23, 2026 19:16
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