Skip to content

feat: add use send calls hook #1649

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: moldy/wallet-api-base
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 a new mode parameter to various configurations and updates related hooks and types to support it. It enhances the useSmartWalletClient and useSendUserOperation functions, while also refining error handling and simplifying type definitions.

Detailed summary

  • Added mode parameter to createConfig.ts and types.ts with types "local" | "remote".
  • Updated useSmartWalletClient to accept a generic type for account.
  • Refined GetSmartWalletClientParams to include mode.
  • Improved error handling in useSendUserOperation.
  • Introduced useSendCalls hook for managing call sending.
  • Removed some redundant imports and type definitions.

✨ 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:18pm

Copy link
Collaborator Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


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.

TEntryPointVersion extends EntryPointVersion = EntryPointVersion,
> = {
id: Hex;
// TODO: deprecate this
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... not sure if we should deprecate this. we will need it for drop and replace unless we come up with a better API for drop and replace

});

return {
id: preparedCallIds[0],
Copy link
Contributor

Choose a reason for hiding this comment

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

this might be a problem if we introduce sending multiple UOs in one request, as proposed here: https://github.com/alchemyplatform/wallet-server/pull/199/files#diff-c00cc16915cfc4387914060aa01512d771fe33d56927f69c95111ceebebc45abR123

Comment on lines +113 to +120
const signature = await client.signSignatureRequest(
preparedCalls.signatureRequest,
);

const { preparedCallIds } = await client.sendPreparedCalls({
...preparedCalls,
signature,
});
Copy link
Contributor

Choose a reason for hiding this comment

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

i assume we are going to need to handle the 7702 stuff in here too, and include the eip7702Auth in the returned request below.

Copy link
Contributor

@jakehobbs jakehobbs Jun 2, 2025

Choose a reason for hiding this comment

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

if we end up doing the "multi" signature type though, i think it would work w/ no changes here other than how we construct the returned request: https://github.com/alchemyplatform/wallet-server/pull/187/files#diff-f9efb2f119f513d936133e68e1f0faa125d4b2b5400ec33cbc170c5ba4fcc406R46

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