v4 follow-up: banners + v5 rewrites for low-level-infra and smart-contracts#1328
Open
jakehobbs wants to merge 23 commits into
Open
v4 follow-up: banners + v5 rewrites for low-level-infra and smart-contracts#1328jakehobbs wants to merge 23 commits into
jakehobbs wants to merge 23 commits into
Conversation
Adds two shared snippets — v4-code-banner.mdx (for pages whose code examples still use Account Kit v4) and v4-concept-banner.mdx (for concept pages like middleware/types that are largely abstracted away in v5 wallet-apis). Applies them via <Markdown /> imports across 39 pages: recipes, troubleshooting, bundler-api, supported-chains, middleware, types, plus 27 orphan v4 pages still served via direct URL. No code changes — just flags the v4-ness for readers while we work through the rewrites in follow-up PRs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
🔗 Preview Mode
|
Replaces v4 @account-kit/* + @aa-sdk/* code in 13 NAV'd/orphan pages
with verified v5 patterns: @alchemy/smart-accounts for account impls,
@alchemy/aa-infra estimateFeesPerGas helper, viem's createBundlerClient
for the bundler RPC. Pages affected:
Low-level Infra (5 NAV'd):
- low-level-infra/{overview,quickstart}.mdx
- low-level-infra/bundler/{overview,sdk}.mdx
- bundler-api/bundler-sponsored-operations.mdx
Low-level Infra 3rd-party (3 orphans):
- low-level-infra/third-party-infrastructure/{bundlers,paymasters,chains}.mdx
Smart Contracts (5 NAV'd):
- smart-contracts/modular-account-v2/getting-started.mdx
- smart-contracts/other-accounts/light-account/{getting-started,multi-owner-light-account,transfer-ownership-light-account}.mdx
- third-party/smart-contracts.mdx
Shared snippet:
- shared/infra/mav2-client.mdx → v5 MAv2 client setup
All code typechecks against @alchemy/aa-infra@5.0.1,
@alchemy/smart-accounts@5.0.1, @alchemy/wallet-apis@5.0.1, viem@2.50.4
in a sandbox at ~/dev/jakehobbs/wallet-v5-dogfooding/docs-rewrites/.
v4-code-banner.mdx is removed from each rewritten page since the code
is now v5.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Per "low-level pages use viem, higher-level use wallet-apis" — the
bundler-sponsored-operations page documents the bundler API directly,
so it should use viem's createBundlerClient. Two correctness fixes
that came from cross-checking against ws-tools (the canonical BSO
demo at apps/cli + scripts/bundler-sponsored-demo.ts):
- preVerificationGas must also be 0n. All three gas fields are the
signal to the bundler that it should cover gas.
- The policy ID rides on the bundler transport's fetchOptions, not
inside a capabilities.gasParamsOverride object.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Cross-checked against ~/dev/OMGWINNING/ws-tools (apps/cli sendops,
send7702ops, senderc20op + packages/lib/src/clients/smart-account-client).
Three style/correctness updates across all v5 rewrites:
- createClient (not createPublicClient) for the rpc client passed to
toModularAccountV2 / toLightAccount / toMultiOwnerLightAccount and
to createBundlerClient. Matches the canonical ws-tools style and
avoids pulling in unused PublicActions.
- import { estimateFeesPerGas } from '@alchemy/aa-infra' without
aliasing; pass it directly as userOperation.estimateFeesPerGas.
Matches the canonical ws-tools imports.
- Pass client: rpcClient to every createBundlerClient call.
Without it viem uses the bundler transport for non-bundler reads,
which is fine for plain Alchemy infra but breaks once the bundler
transport carries a BSO header or hits a third-party RPC.
Also renames the shared mav2-client snippet's exported helper from
createClient → getClient to avoid colliding with the viem
createClient import; quickstart.mdx updated to match.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Per review feedback: @alchemy/common exports alchemyTransport which
takes { apiKey } and handles the chain-aware URL automatically. Much
cleaner than every snippet hardcoding the eth-sepolia / worldchain URL
string with the API key interpolated in. Matches the canonical
pattern used in ws-tools' bundler-sponsored-demo.ts and ws-sendop.ts.
For BSO, the policy-id header still rides on the same transport via
fetchOptions — alchemyTransport extends viem's HttpTransportConfig so
this works identically.
Bundler/overview prose updated to reference alchemyTransport too.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…rship to v5 - Add v4-signer-banner.mdx (signer SDK sunsetting → Privy) and apply to 14 signer/login-method pages - Add v4-react-banner.mdx (no v5 react pkg → wallet-apis quickstart) and apply to 18 react pages - Rewrite tutorials/getting-started/alchemy-quickstart-guide.mdx to use createSmartWalletClient + alchemyWalletTransport + sendCalls - Rewrite smart-contracts/modular-account-v2/managing-ownership.mdx to use toModularAccountV2 + viem encodeFunctionData against semiModularAccountV2StaticImpl.accountAbi (typecheck-verified in sandbox) - Drop the leftover "v5 in beta" Info banner from the 4 third-party signer pages Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…eads as deliberate Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…d lists Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…only line Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ready covers these links Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tead of @account-kit/infra Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…n rewritten Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ate backlog Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…a future v5 React pkg Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tead of just noting absence Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… advanced path Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…lient.encode{Install,Uninstall}Validation + sendUserOperation)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…py tweaks Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…4 React in react banner Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 748c99f645
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…it from package root yet) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…re policyId through paymaster; fix v4-signer-banner Privy link Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two passes on the v4-flavored pages identified in the follow-up doc.
Pass 1 (commit 1) — Banners (39 pages)
Adds two shared snippets and applies them via
<Markdown />imports.<v4-code-banner>→ 33 pages (after rewrites in pass 2 removed 4): recipes, troubleshooting/ssr, supported-chains, plus orphan v4 pages (core/, infra/, signer/, react/getting-started/, react-native/getting-started/, smart-contracts/modular-account-v2/session-keys/, smart-contracts/other-accounts/modular-account/**, smart-contracts/overview).<v4-concept-banner>→ 2 pages: concepts/middleware, resources/types.Pass 2 (commit 2) — v5 rewrites (13 pages + 1 shared snippet)
Replaces v4
@account-kit/*+@aa-sdk/*code with verified v5 patterns. Removes the v4 banner from each rewritten page since the code is now v5.low-level-infra/{overview,quickstart},low-level-infra/bundler/{overview,sdk},bundler-api/bundler-sponsored-operations.low-level-infra/third-party-infrastructure/{bundlers,paymasters,chains}.smart-contracts/modular-account-v2/getting-started,smart-contracts/other-accounts/light-account/{getting-started,multi-owner-light-account,transfer-ownership-light-account},third-party/smart-contracts.shared/infra/mav2-client.mdx→ v5 MAv2 client setup.How v5 code was verified
Every code pattern in this PR typechecks against published v5 packages in a sandbox at
~/dev/jakehobbs/wallet-v5-dogfooding/docs-rewrites/:@alchemy/aa-infra@5.0.1@alchemy/smart-accounts@5.0.1@alchemy/wallet-apis@5.0.1viem@2.50.4The doc patterns mirror those test snippets (08 files in the sandbox, each
bun run typecheckclean).Out of scope (deferred)
@alchemy/wallet-apis+ Privy as signer). Eventually the entire "Account Kit (v4)" nav section should be hidden away.concepts/middleware.mdxandresources/types.mdx(currently justv4-conceptbanner) — these need conceptual rework, not a mechanical swap.Test plan
/docs/wallets/smart-contracts/modular-account-v2/getting-started,/docs/wallets/low-level-infra/quickstart) renders cleanly./docs/wallets/recipes/hyperliquid-wallets,/docs/wallets/concepts/middleware) shows the banner.🤖 Generated with Claude Code