Skip to content

feat: adds webauthn client tests #1563

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from
Draft

feat: adds webauthn client tests #1563

wants to merge 20 commits into from

Conversation

linnall
Copy link
Collaborator

@linnall linnall commented Apr 24, 2025

Pull Request Checklist


PR-Codex overview

This PR introduces a new webauthnGasEstimator middleware for estimating gas usage in user operations with Modular Account V2 WebAuthn accounts. It enhances the account creation process and adds support for accounts without a signer.

Detailed summary

  • Added webauthnGasEstimator to index.ts.
  • Implemented webauthnGasEstimator in webauthnGasEstimator.ts.
  • Updated createModularAccountV2Client to support WebAuthn mode.
  • Introduced CreateModularAccountV2ParamsNoSigner type.
  • Enhanced createMAv2Base to handle WebAuthn parameters.
  • Added webauthnSigningFunctions for signing operations in signer.ts.
  • Updated tests to include scenarios for WebAuthn accounts.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Apr 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
aa-sdk-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 15, 2025 5:59pm
aa-sdk-ui-demo ❌ Failed (Inspect) May 15, 2025 5:59pm

Copy link

graphite-app bot commented Apr 24, 2025

How to use the Graphite Merge Queue

Add the label graphite-merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

Copy link

github-actions bot commented Apr 24, 2025

🌿 Documentation Preview

Name Status Preview Updated (UTC)
Alchemy Docs ✅ Ready 🔗 Visit Preview May 15, 2025, 5:55 PM

@github-actions github-actions bot temporarily deployed to docs-preview April 24, 2025 22:19 Inactive
// connect session key
let sessionKeyClient = await createModularAccountV2Client({
chain: instance.chain,
signer: webAuthnSigningMethodsSessionKey,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

should be passing in instance of SmartAccountSigner here

name: "backUp",
});

const webAuthnSigningMethods: SmartAccountSigner = new WebAuthnSigningMethods(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think I am mistakenly treating this like an instance of SmartAccountSigner when this is a standalone collection of webauthn signing methods, so it would get access to the WebAuthnCredentials via the account

Copy link
Collaborator

Choose a reason for hiding this comment

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

I left comments in the spec about this. It's not a smart account signer, it's what's used to create the various sign* methods on the account itself. the account doesn't take a signer as input anymore, and just takes in the credential

@linnall linnall force-pushed the linna/webauth-tests branch from 36cd477 to 7549458 Compare May 12, 2025 20:21
@github-actions github-actions bot temporarily deployed to docs-preview May 12, 2025 20:21 Inactive
@github-actions github-actions bot temporarily deployed to docs-preview May 12, 2025 20:28 Inactive
@github-actions github-actions bot temporarily deployed to docs-preview May 13, 2025 00:03 Inactive
@github-actions github-actions bot temporarily deployed to docs-preview May 15, 2025 16:01 Inactive
@github-actions github-actions bot temporarily deployed to docs-preview May 15, 2025 17:54 Inactive
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.

3 participants