Skip to content

feat: add initial smart wallet client actions #1648

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 1 commit into
base: main
Choose a base branch
from

Conversation

moldy530
Copy link
Collaborator

@moldy530 moldy530 commented May 29, 2025

Pull Request Checklist


PR-Codex overview

This PR introduces an experimental namespace for actions utilizing Wallet APIs and adds a SignerNotConnectedError class. It enhances the state management for smart wallet clients and updates the configuration and account creation processes to integrate with the new smart wallet functionality.

Detailed summary

  • Added # Experimental section in README.md.
  • Introduced SignerNotConnectedError class in errors.ts.
  • Updated index.ts to export new actions for smart wallet clients.
  • Modified store.ts and types.ts to manage smartWalletClients state.
  • Updated package.json for wallet-client dependencies.
  • Created watchSmartWalletClient action in watchSmartWalletClient.ts.
  • Enhanced createConfig to include accountCreationHint.
  • Implemented useSmartWalletClient hook in hooks/useSmartWalletClient.ts.
  • Refactored getSmartWalletClient to handle connection checks and state management.
  • Updated account creation logic in createAccount.ts to utilize smart wallet client.

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

Copy link

vercel bot commented May 29, 2025

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

Name Status Preview Comments Updated (UTC)
aa-sdk-ui-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 29, 2025 9:17pm

Copy link
Collaborator Author

moldy530 commented May 29, 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.

This stack of pull requests is managed by Graphite. Learn more about stacking.

},
// TODO: we can probably do away with some of the if-else logic here and just convert the params to creation hints
// and pass them to the client
return smartWalletClient
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is probably the most beneficial place to add support for wallet apis because it means accounts will be index correctly. everything downstream will the touch this flow which is what we want

@moldy530 moldy530 force-pushed the moldy/wallet-api-base branch 2 times, most recently from 6ae679e to 03078f3 Compare May 29, 2025 19:29
TAccount extends JsonRpcAccount<Address> | undefined =
| JsonRpcAccount<Address>
| undefined,
> = { mode?: "local" | "remote" } & (IsUndefined<TAccount> extends true
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

actually, we should move the mode into the config rather than here

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 do this in a later pr

@moldy530 moldy530 force-pushed the moldy/wallet-api-base branch from 895fe14 to 85be9fa Compare May 29, 2025 21:06
Copy link

github-actions bot commented May 29, 2025

🌿 Documentation Preview

Name Status Preview Updated (UTC)
Alchemy Docs ✅ Ready 🔗 Visit Preview May 29, 2025, 9:08 PM

@github-actions github-actions bot temporarily deployed to docs-preview May 29, 2025 21:07 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.

1 participant