-
Notifications
You must be signed in to change notification settings - Fork 173
feat: adds webauthn session key support #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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
How to use the Graphite Merge QueueAdd 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. |
🌿 Documentation Preview
|
36cd477
to
7549458
Compare
account-kit/smart-contracts/src/ma-v2/actions/install-validation/installValidation.ts
Outdated
Show resolved
Hide resolved
account-kit/smart-contracts/src/ma-v2/actions/install-validation/installValidation.ts
Outdated
Show resolved
Hide resolved
account-kit/smart-contracts/src/ma-v2/actions/install-validation/installValidation.ts
Show resolved
Hide resolved
account-kit/smart-contracts/src/ma-v2/actions/install-validation/installValidation.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some nits otherwise LGTM!
* chore: adds wip of webauthn client tests * chore: updates webauthn test to use mocked window.credentials.get response * chore: adds credential and mock response from self generated credential on try-webauthn.appspot.com * fix: rename webAuthnCredentials to webAuthnAccountParams * chore: adds to do * feat: add ability to create a webauthn ModularAccountV2 without a signer * chore: removes unused code * fix: ensures presence of signer is explicit * fix: refactor to not destructure * feat: adds account functions for webauthn * feat: add webauthn gas estimator * chore: fix lint, change to use type narrowing instead * feat: add webauthn signer * chore: update dummy sig * feat: modifies mav2 smart account client and mav2 client tests to work together * fix: add documenting comment for webauthn gas estimator usage * fix: adds documentation comment for webauthnGasEstimator usage * chore: wip deploy webauthn account then sign message * fix: prepend signatures with 0xff * fix: prepend signature regardless of deferred actions data presence * chore: wip debugging * fix: debug * chore: adds updated mock authenticator response * fix: prefixes signature with offset * chore: update credentials and mocked authenticator response * chore: updates credentials and authenticator response * chore: fix merge issues with main * test: update tests using mock webauthn device (#1639) * chore: wip format message to be EIP-712 and add lint fixes * fix: inline documentation Co-authored-by: Michael Moldoveanu <[email protected]> * chore: removes debugging statements and linting fixes * chore: rename types * fix: refactor * chore: remove debug statement Co-authored-by: Michael Moldoveanu <[email protected]> * fix: update return type Co-authored-by: Michael Moldoveanu <[email protected]> * fix: adds strongly typed errors * chore: removes debug statements * fix: fixes example in docs * chore: add todo comment, removes debug statement * chore: remove lint warnings * refactor: encode sign parameters as a struct * feat: enables installValidation to take a Modular Account with no signer (#1663) * fix: run api spec generate as part of aa-sdk deploy (#1654) * fix: run api spec generate as part of aa-sdk deploy * ci: create aa-sdk copy of setup-pnpm composite action * ci: remove unnecessary install node in pnpm composite action * ci: try installing pnpm with exact action version * ci: test with pnpm moved out of its own composite * ci: fuck you install pnpm * ci: ?????? * revert: install pnpm in its own setup composite * ci: specify package.json for pnpm --------- Co-authored-by: dslovinsky <[email protected]> * feat(rn-signer): support passkeys in React Native (#1653) * chore(release): publish v4.37.0 [skip-ci] * feat: add erc20 sponsorship card (#1631) * fix: remove trailing slash from alchemy rpc url (#1657) * chore(release): publish v4.38.0 [skip-ci] * fix: update copy (#1658) * feat: add alchemy_requestPaymasterTokenQuote to aa-sdk (#1659) * feat: add alchemy_requestPaymasterTokenQuote to aa-sdk * fix: typo * chore(release): publish v4.39.0 [skip-ci] * feat: enables installValidation to take a Modular Account with no signer * fix: test thank you howy * test: update the rundler version we use in prool (#1646) * chore: experimenting with types (#1665) * chore: modifies types --------- Co-authored-by: Daniel Slovinsky <[email protected]> Co-authored-by: dslovinsky <[email protected]> Co-authored-by: David Philipson <[email protected]> Co-authored-by: Alchemy Bot <[email protected]> Co-authored-by: Blake Duncan <[email protected]> Co-authored-by: jakehobbs <[email protected]> Co-authored-by: Andy <[email protected]> Co-authored-by: Michael Moldoveanu <[email protected]> Co-authored-by: howy <[email protected]> * chore: lint * feat: export WebAuthnValidationModule * fix: typing for install validation decorator * fix: typing on creation of clients to support alchemy configs * fix: updates tests to retry transaction, updates hook with new InstallValidation params * chore: removes unused import * fix: uses session key provider * fix: narrow account type to a modular account v2 * chore: adds wip of webauthn client tests * chore: updates webauthn test to use mocked window.credentials.get response * chore: adds credential and mock response from self generated credential on try-webauthn.appspot.com * fix: rename webAuthnCredentials to webAuthnAccountParams * chore: adds to do * feat: add ability to create a webauthn ModularAccountV2 without a signer * chore: removes unused code * fix: ensures presence of signer is explicit * fix: refactor to not destructure * feat: adds account functions for webauthn * feat: add webauthn gas estimator * chore: fix lint, change to use type narrowing instead * feat: add webauthn signer * chore: update dummy sig * feat: modifies mav2 smart account client and mav2 client tests to work together * fix: add documenting comment for webauthn gas estimator usage * fix: adds documentation comment for webauthnGasEstimator usage * chore: wip deploy webauthn account then sign message * fix: prepend signatures with 0xff * fix: prepend signature regardless of deferred actions data presence * chore: wip debugging * fix: debug * chore: adds updated mock authenticator response * fix: prefixes signature with offset * chore: update credentials and mocked authenticator response * chore: updates credentials and authenticator response * chore: fix merge issues with main * test: update tests using mock webauthn device (#1639) * chore: wip format message to be EIP-712 and add lint fixes * fix: inline documentation Co-authored-by: Michael Moldoveanu <[email protected]> * chore: removes debugging statements and linting fixes * chore: rename types * fix: refactor * chore: remove debug statement Co-authored-by: Michael Moldoveanu <[email protected]> * fix: update return type Co-authored-by: Michael Moldoveanu <[email protected]> * fix: adds strongly typed errors * chore: removes debug statements * fix: fixes example in docs * chore: add todo comment, removes debug statement * chore: remove lint warnings * refactor: encode sign parameters as a struct * feat: export WebAuthnValidationModule * fix: typing on creation of clients to support alchemy configs * fix: cleans up tests * chore: removes unused import * fix: webauthn session key test * fix: removes duplicate identifier * fix: remove unnecessary arg * chore: removes to do comment * chore: removes unnecessary account type check * chore: updates yarn.lock and docs.yml * fix: add back necessary account type checks * fix: restore yarn.lock file * fix: adds more granular errors * chore: updates error docs * fix: refactor --------- Co-authored-by: howydev <[email protected]> Co-authored-by: Michael Moldoveanu <[email protected]> Co-authored-by: Daniel Slovinsky <[email protected]> Co-authored-by: dslovinsky <[email protected]> Co-authored-by: David Philipson <[email protected]> Co-authored-by: Alchemy Bot <[email protected]> Co-authored-by: Blake Duncan <[email protected]> Co-authored-by: jakehobbs <[email protected]> Co-authored-by: Andy <[email protected]>
* chore: adds wip of webauthn client tests * chore: updates webauthn test to use mocked window.credentials.get response * chore: adds credential and mock response from self generated credential on try-webauthn.appspot.com * fix: rename webAuthnCredentials to webAuthnAccountParams * chore: adds to do * feat: add ability to create a webauthn ModularAccountV2 without a signer * chore: removes unused code * fix: ensures presence of signer is explicit * fix: refactor to not destructure * feat: adds account functions for webauthn * feat: add webauthn gas estimator * chore: fix lint, change to use type narrowing instead * feat: add webauthn signer * chore: update dummy sig * feat: modifies mav2 smart account client and mav2 client tests to work together * fix: add documenting comment for webauthn gas estimator usage * fix: adds documentation comment for webauthnGasEstimator usage * chore: wip deploy webauthn account then sign message * fix: prepend signatures with 0xff * fix: prepend signature regardless of deferred actions data presence * chore: wip debugging * fix: debug * chore: adds updated mock authenticator response * fix: prefixes signature with offset * chore: update credentials and mocked authenticator response * chore: updates credentials and authenticator response * chore: fix merge issues with main * test: update tests using mock webauthn device (#1639) * chore: wip format message to be EIP-712 and add lint fixes * fix: inline documentation Co-authored-by: Michael Moldoveanu <[email protected]> * chore: removes debugging statements and linting fixes * chore: rename types * fix: refactor * chore: remove debug statement Co-authored-by: Michael Moldoveanu <[email protected]> * fix: update return type Co-authored-by: Michael Moldoveanu <[email protected]> * fix: adds strongly typed errors * chore: removes debug statements * fix: fixes example in docs * chore: add todo comment, removes debug statement * chore: remove lint warnings * refactor: encode sign parameters as a struct * feat: enables installValidation to take a Modular Account with no signer (#1663) * fix: run api spec generate as part of aa-sdk deploy (#1654) * fix: run api spec generate as part of aa-sdk deploy * ci: create aa-sdk copy of setup-pnpm composite action * ci: remove unnecessary install node in pnpm composite action * ci: try installing pnpm with exact action version * ci: test with pnpm moved out of its own composite * ci: fuck you install pnpm * ci: ?????? * revert: install pnpm in its own setup composite * ci: specify package.json for pnpm --------- Co-authored-by: dslovinsky <[email protected]> * feat(rn-signer): support passkeys in React Native (#1653) * chore(release): publish v4.37.0 [skip-ci] * feat: add erc20 sponsorship card (#1631) * fix: remove trailing slash from alchemy rpc url (#1657) * chore(release): publish v4.38.0 [skip-ci] * fix: update copy (#1658) * feat: add alchemy_requestPaymasterTokenQuote to aa-sdk (#1659) * feat: add alchemy_requestPaymasterTokenQuote to aa-sdk * fix: typo * chore(release): publish v4.39.0 [skip-ci] * feat: enables installValidation to take a Modular Account with no signer * fix: test thank you howy * test: update the rundler version we use in prool (#1646) * chore: experimenting with types (#1665) * chore: modifies types --------- Co-authored-by: Daniel Slovinsky <[email protected]> Co-authored-by: dslovinsky <[email protected]> Co-authored-by: David Philipson <[email protected]> Co-authored-by: Alchemy Bot <[email protected]> Co-authored-by: Blake Duncan <[email protected]> Co-authored-by: jakehobbs <[email protected]> Co-authored-by: Andy <[email protected]> Co-authored-by: Michael Moldoveanu <[email protected]> Co-authored-by: howy <[email protected]> * chore: lint * feat: export WebAuthnValidationModule * fix: typing for install validation decorator * fix: typing on creation of clients to support alchemy configs * fix: updates tests to retry transaction, updates hook with new InstallValidation params * chore: removes unused import * fix: uses session key provider * fix: narrow account type to a modular account v2 * chore: adds wip of webauthn client tests * chore: updates webauthn test to use mocked window.credentials.get response * chore: adds credential and mock response from self generated credential on try-webauthn.appspot.com * fix: rename webAuthnCredentials to webAuthnAccountParams * chore: adds to do * feat: add ability to create a webauthn ModularAccountV2 without a signer * chore: removes unused code * fix: ensures presence of signer is explicit * fix: refactor to not destructure * feat: adds account functions for webauthn * feat: add webauthn gas estimator * chore: fix lint, change to use type narrowing instead * feat: add webauthn signer * chore: update dummy sig * feat: modifies mav2 smart account client and mav2 client tests to work together * fix: add documenting comment for webauthn gas estimator usage * fix: adds documentation comment for webauthnGasEstimator usage * chore: wip deploy webauthn account then sign message * fix: prepend signatures with 0xff * fix: prepend signature regardless of deferred actions data presence * chore: wip debugging * fix: debug * chore: adds updated mock authenticator response * fix: prefixes signature with offset * chore: update credentials and mocked authenticator response * chore: updates credentials and authenticator response * chore: fix merge issues with main * test: update tests using mock webauthn device (#1639) * chore: wip format message to be EIP-712 and add lint fixes * fix: inline documentation Co-authored-by: Michael Moldoveanu <[email protected]> * chore: removes debugging statements and linting fixes * chore: rename types * fix: refactor * chore: remove debug statement Co-authored-by: Michael Moldoveanu <[email protected]> * fix: update return type Co-authored-by: Michael Moldoveanu <[email protected]> * fix: adds strongly typed errors * chore: removes debug statements * fix: fixes example in docs * chore: add todo comment, removes debug statement * chore: remove lint warnings * refactor: encode sign parameters as a struct * feat: export WebAuthnValidationModule * fix: typing on creation of clients to support alchemy configs * fix: cleans up tests * chore: removes unused import * fix: webauthn session key test * fix: removes duplicate identifier * fix: remove unnecessary arg * chore: removes to do comment * chore: removes unnecessary account type check * chore: updates yarn.lock and docs.yml * fix: add back necessary account type checks * fix: restore yarn.lock file * fix: adds more granular errors * chore: updates error docs * fix: refactor --------- Co-authored-by: howydev <[email protected]> Co-authored-by: Michael Moldoveanu <[email protected]> Co-authored-by: Daniel Slovinsky <[email protected]> Co-authored-by: dslovinsky <[email protected]> Co-authored-by: David Philipson <[email protected]> Co-authored-by: Alchemy Bot <[email protected]> Co-authored-by: Blake Duncan <[email protected]> Co-authored-by: jakehobbs <[email protected]> Co-authored-by: Andy <[email protected]>
Pull Request Checklist
yarn test
)site
folder, and guidelines for updating/adding docs can be found in the contribution guide)feat!: breaking change
)yarn lint:check
) and fix any issues? (yarn lint:write
)PR-Codex overview
This PR introduces the
NotAModularAccountV2Error
class and updates various components to support modular account functionalities. It enhances error handling and modifies type definitions for better clarity and usability within the account validation process.Detailed summary
NotAModularAccountV2Error
class inaa-sdk/core/src/errors/account.ts
.aa-sdk/core/src/index.ts
to includeNotAModularAccountV2Error
.NotAModularAccountV2Error
indocs/pages/reference/aa-sdk/core/classes/NotAModularAccountV2Error/constructor.mdx
.examples/ui-demo/src/hooks/useModularAccountV2Client.ts
to useModularAccountV2
.account-kit/smart-contracts/src/ma-v2/actions/install-validation/installValidation.ts
to throwNotAModularAccountV2Error
when applicable.isModularAccountV2
to check account type inaccount-kit/smart-contracts/src/ma-v2/account/common/modularAccountV2Base.ts
.account-kit/smart-contracts/src/ma-v2/client/client.test.ts
to cover new validation scenarios involvingWebAuthn
.