Skip to content

feat: allow webauthn info to be passed in wallet creation#8481

Open
weldon-bitgo wants to merge 1 commit intomasterfrom
WP-8495/webauthn-in-wallet-creation
Open

feat: allow webauthn info to be passed in wallet creation#8481
weldon-bitgo wants to merge 1 commit intomasterfrom
WP-8495/webauthn-in-wallet-creation

Conversation

@weldon-bitgo
Copy link
Copy Markdown

@weldon-bitgo weldon-bitgo commented Apr 10, 2026

Ticket: WP-8495

Description

This PR allows webauthn information to be passed during wallet creation. Ultimately, this enables passkeys to be added to wallets during wallet creation; otherwise, passkeys must be added to wallets after they have been created. This change will allow us to introduce an optional passkey addition step during the wallet creation process.

Issue Number

WP-8495

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Two new test files are added for this change.
walletsWebauthn.ts contains unit tests for Wallets.generateWallet and tests that:

  • webauthnDevices is populated with correct device metadata and PRF-encrypted private key
  • both the wallet passphrase and PRF passphrase produce separate encrypt calls
  • webauthnDevices is omitted when webauthnInfo is absent or no private key is available

generateWallet.ts contains Express route tests and tests that:

  • the happy path passes webauthnInfo through to generateWallet and returns a status code of 200
  • requests with missing otpDeviceId, prfSalt, or passphrase each return a status code of 400

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My code compiles correctly for both Node and Browser environments
  • I have commented my code, particularly in hard-to-understand areas
  • My commits follow Conventional Commits and I have properly described any BREAKING CHANGES
  • The ticket or github issue was included in the commit message as a reference
  • I have made corresponding changes to the documentation and on any new/updated functions and/or methods - jsdoc
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@weldon-bitgo weldon-bitgo force-pushed the WP-8495/webauthn-in-wallet-creation branch from 8900663 to 28d7c68 Compare April 10, 2026 15:30
@weldon-bitgo weldon-bitgo marked this pull request as ready for review April 10, 2026 15:33
@weldon-bitgo weldon-bitgo requested review from a team as code owners April 10, 2026 15:33
}

userKeychainParams.reqId = reqId;
const newUserKeychain = await this.baseCoin.keychains().add(userKeychainParams);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to update this

add(params?: AddKeychainOptions): Promise<Keychain>;

@pranavjain97 pranavjain97 self-requested a review April 10, 2026 20:03
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.

2 participants