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

Merged
merged 1 commit into from
Jun 9, 2025

Conversation

moldy530
Copy link
Contributor

@moldy530 moldy530 commented May 29, 2025

Pull Request Checklist


PR-Codex overview

This PR introduces a new mode property for configuration, updates the @account-kit/wallet-client version, and refines the useSmartWalletClient and useSendUserOperation hooks to support the new mode. It also enhances type definitions and error handling in user operations.

Detailed summary

  • Added mode property in createConfig.ts with a default value of "local".
  • Updated @account-kit/wallet-client version from 0.1.0-alpha.4 to 0.1.0-alpha.6.
  • Modified useSmartWalletClient to accept a generic type for accounts.
  • Enhanced getSmartWalletClient to utilize the new mode parameter.
  • Refined useSendUserOperation to handle new logic for user operations.
  • Introduced useSendCalls hook for handling calls with Smart Wallet.
  • Updated type definitions to include mode as either "local" or "remote".

✨ 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 Jun 9, 2025 5:30pm

Copy link
Contributor Author

moldy530 commented May 29, 2025

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.

Comment on lines 113 to 118
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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah yea this is gonna have to be updated with the breaking changes we've made for 7702

@moldy530 moldy530 merged commit ed3fd7b into moldy/wallet-api-base Jun 9, 2025
6 checks passed
@moldy530 moldy530 deleted the moldy/add-exp-use-send-calls-hook branch June 9, 2025 18:11
moldy530 added a commit that referenced this pull request Jun 9, 2025
moldy530 added a commit that referenced this pull request Jun 19, 2025
moldy530 added a commit that referenced this pull request Jun 23, 2025
moldy530 added a commit that referenced this pull request Jun 23, 2025
moldy530 added a commit that referenced this pull request Jun 25, 2025
moldy530 added a commit that referenced this pull request Jun 30, 2025
adamegyed pushed a commit that referenced this pull request Jul 11, 2025
adamegyed added a commit that referenced this pull request Jul 14, 2025
* feat: add initial smart wallet client actions

* feat: add use send calls hook (#1649)

* fix: address PR comments

* fix(ui-demo): update the demo app to handle correct proxy for wallet api methods

* feat: add wallet client hooks (#1733)

* feat(core): leverage the signer proxy for chain agnostic routes (#1742)

- [ ] Did you add new tests and confirm existing tests pass? (`yarn test`)
- [ ] Did you update relevant docs? (docs are found in the `site` folder, and guidelines for updating/adding docs can be found in the [contribution guide](https://github.com/alchemyplatform/aa-sdk/blob/main/CONTRIBUTING.md))
- [ ] Do your commits follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard?
- [ ] Does your PR title also follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard?
- [ ] If you have a breaking change, is it [correctly reflected in your commit message](https://www.conventionalcommits.org/en/v1.0.0/#examples)? (e.g. `feat!: breaking change`)
- [ ] Did you run lint (`yarn lint:check`) and fix any issues? (`yarn lint:write`)
- [ ] Did you follow the [contribution guidelines](https://github.com/alchemyplatform/aa-sdk/blob/main/CONTRIBUTING.md)?

<!-- start pr-codex -->

---

This PR focuses on enhancing the configuration management for transport connections in the `createConfig.ts` file by adding a `chainAgnosticUrl` property to the transport configuration, allowing for better handling of RPC URLs.

- Added `chainAgnosticUrl` to the transport configuration in `createConfig.ts`.
- Updated logic to set `chainAgnosticUrl` based on `signerConnection.rpcUrl`.
- Modified tests in `store.test.ts` to verify the presence of `chainAgnosticUrl` in various configurations.
- Ensured backward compatibility by using existing transport configurations when necessary.

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

<!-- end pr-codex -->

* fix: misc fixes from dogfooding wallet apis (#1748)

* feat: port over wallet client (#1753)

* chore: new package template

* feat: port over client

* chore: update to latest

* docs: lint cleanup

* test: attempt to exclude wallet client e2e from unit test runner

* Revert "test: attempt to exclude wallet client e2e from unit test runner"

This reverts commit a4a0fd4.

* test: try to exclude bun tests again

* docs: attempt at docsgen

* fix: add index.mdx

* fix: remove ai slop

* docs: cleanup signSignatureRequest

* fix: omit internal export

* docs: fix session signer hoisting

* fix: docs fixes

* fix: fix default client retries (#1761)

* fix: use workspace version of wallet client (#1762)

* docs: cleanup todo

* feat: support policyIds array on wallet client

* feat: support multiple policyIds in wallet client (#1763)

* feat: support multiple policyIds in wallet client

* chore: bump wallet types

---------

Co-authored-by: jakehobbs <[email protected]>
Co-authored-by: Adam Egyed <[email protected]>
Co-authored-by: adam <[email protected]>
trevoraron pushed a commit to trevoraron/aa-sdk that referenced this pull request Jul 24, 2025
* feat: add initial smart wallet client actions

* feat: add use send calls hook (alchemyplatform#1649)

* fix: address PR comments

* fix(ui-demo): update the demo app to handle correct proxy for wallet api methods

* feat: add wallet client hooks (alchemyplatform#1733)

* feat(core): leverage the signer proxy for chain agnostic routes (alchemyplatform#1742)

- [ ] Did you add new tests and confirm existing tests pass? (`yarn test`)
- [ ] Did you update relevant docs? (docs are found in the `site` folder, and guidelines for updating/adding docs can be found in the [contribution guide](https://github.com/alchemyplatform/aa-sdk/blob/main/CONTRIBUTING.md))
- [ ] Do your commits follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard?
- [ ] Does your PR title also follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard?
- [ ] If you have a breaking change, is it [correctly reflected in your commit message](https://www.conventionalcommits.org/en/v1.0.0/#examples)? (e.g. `feat!: breaking change`)
- [ ] Did you run lint (`yarn lint:check`) and fix any issues? (`yarn lint:write`)
- [ ] Did you follow the [contribution guidelines](https://github.com/alchemyplatform/aa-sdk/blob/main/CONTRIBUTING.md)?

<!-- start pr-codex -->

---

This PR focuses on enhancing the configuration management for transport connections in the `createConfig.ts` file by adding a `chainAgnosticUrl` property to the transport configuration, allowing for better handling of RPC URLs.

- Added `chainAgnosticUrl` to the transport configuration in `createConfig.ts`.
- Updated logic to set `chainAgnosticUrl` based on `signerConnection.rpcUrl`.
- Modified tests in `store.test.ts` to verify the presence of `chainAgnosticUrl` in various configurations.
- Ensured backward compatibility by using existing transport configurations when necessary.

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

<!-- end pr-codex -->

* fix: misc fixes from dogfooding wallet apis (alchemyplatform#1748)

* feat: port over wallet client (alchemyplatform#1753)

* chore: new package template

* feat: port over client

* chore: update to latest

* docs: lint cleanup

* test: attempt to exclude wallet client e2e from unit test runner

* Revert "test: attempt to exclude wallet client e2e from unit test runner"

This reverts commit a4a0fd4.

* test: try to exclude bun tests again

* docs: attempt at docsgen

* fix: add index.mdx

* fix: remove ai slop

* docs: cleanup signSignatureRequest

* fix: omit internal export

* docs: fix session signer hoisting

* fix: docs fixes

* fix: fix default client retries (alchemyplatform#1761)

* fix: use workspace version of wallet client (alchemyplatform#1762)

* docs: cleanup todo

* feat: support policyIds array on wallet client

* feat: support multiple policyIds in wallet client (alchemyplatform#1763)

* feat: support multiple policyIds in wallet client

* chore: bump wallet types

---------

Co-authored-by: jakehobbs <[email protected]>
Co-authored-by: Adam Egyed <[email protected]>
Co-authored-by: adam <[email protected]>
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