Skip to content

Conversation

avarobinson
Copy link
Collaborator

@avarobinson avarobinson commented Sep 17, 2025

Pull Request Checklist


PR-Codex overview

This PR focuses on updating documentation related to the Smart Account Client, enhancing clarity and usability for developers interacting with smart wallets.

Detailed summary

  • Updated title and description for the Smart Account Client documentation.
  • Added a new section on how to configure the client.
  • Introduced a new SmartWalletClient description and its functionalities.
  • Added implementation details for both React and JavaScript usage.
  • Included advanced topics like account type overrides and connecting to existing accounts.
  • Provided next steps with links to related actions like sending transactions and sponsoring gas.

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

Copy link

vercel bot commented Sep 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
aa-sdk-ui-demo Ready Ready Preview Comment Sep 26, 2025 8:34pm

Copy link

github-actions bot commented Sep 17, 2025

🌿 Documentation Preview

Name Status Preview Updated (UTC)
Alchemy Docs ✅ Ready 🔗 Visit Preview Sep 26, 2025, 8:31 PM

Comment on lines 61 to 67
transport: alchemy({ apiKey: "your-alchemy-api-key"}),
chain: sepolia,
signer: LocalAccountSigner.privateKeyToAccountSigner(
"0x-your-wallet-private-key",
),
policyId: "your-policy-id",
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missing indentation here, looks funny in the preview.

import React from "react";
import { useSmartAccountClient } from "@account-kit/react";

const { client } = useSmartAccountClient({});
Copy link
Collaborator

Choose a reason for hiding this comment

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

We don't want this to be the "client" that the end-user is using, we want it to either be wrapped in a specific action like the useSendCalls hook, or wrapped in the useSmartWalletClient hook. If we end the guide here, they will likely assune this client is what they should use, and try to call .sendUserOperation or similar.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hmm okay. Then what would you suggest we use as the example for react and react native? No client example?

I don't rlly know what the recommendation is for this case i guess

import React from "react";
import { useSmartAccountClient } from "@account-kit/react";

const { client } = useSmartAccountClient({});
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here as above

- `"ModularAccountV2"` (recommended and default)
- `"LightAccount"`
- `"MultiOwnerLightAccount"`
- `"MultiOwnerModularAccount"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should remove MultiOwnerModularAccount from the list here

Comment on lines 115 to 119
| Simulate user operations before sending (i.e. use [`alchemyUserOperationSimulator`](/wallets/reference/account-kit/infra/functions/alchemyUserOperationSimulator)) | `useSimulation` | `boolean` |
| Custom middleware to run before requesting sponsorship | `customMiddleware` | `ClientMiddlewareFn` |
| Override fee estimation middleware (if you are using our RPCs, it's important to use the default [`alchemyFeeEstimator`](/wallets/reference/account-kit/infra/functions/alchemyFeeEstimator)) | `feeEstimator` | `ClientMiddlewareFn` |
| Override gas estimation middleware (the default middleware calls the underlying bundler RPC to `eth_estimateUserOperationGas`) | `gasEstimator` | `ClientMiddlewareFn` |
| Override middleware that signs user operation(s) | `signUserOperation` | `ClientMiddlewareFn` |
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think any of these are valid options - they won't change the behavior of the resulting SmartWalletClient.

Copy link
Collaborator

Choose a reason for hiding this comment

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

And actually, these aren't valid options to pass to the JS client at all

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh really? we used to have these documented - when did that change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Are the advanced account params still valid like passing 7702?

docs/docs.yml Outdated
Comment on lines 181 to 182
- page: Set up client
path: wallets/pages/concepts/smart-account-client.mdx
Copy link
Collaborator

Choose a reason for hiding this comment

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

Imo we should leave this at the bottom - the setup provided in all of the other examples is more direct and gets the job done, I'd rather people view those first. This doc goes deeper into client config, which is likely a follow-up action after getting it to work at all.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Interesting. Would you rename this to something like Congifure client then? My concern was that we throw people into example and they have to look at the client.ts file and use it but dont actually know what it is

@github-actions github-actions bot temporarily deployed to docs-preview September 26, 2025 16:41 Inactive
@avarobinson avarobinson enabled auto-merge (squash) September 26, 2025 17:24
adamegyed
adamegyed previously approved these changes Sep 26, 2025
Copy link
Collaborator

@adamegyed adamegyed left a comment

Choose a reason for hiding this comment

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

Looks good!

@github-actions github-actions bot temporarily deployed to docs-preview September 26, 2025 20:25 Inactive
@github-actions github-actions bot temporarily deployed to docs-preview September 26, 2025 20:25 Inactive
@avarobinson avarobinson merged commit de34972 into main Sep 26, 2025
12 of 13 checks passed
@avarobinson avarobinson deleted the ava/update-sa-client branch September 26, 2025 20:46
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