Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
4959cda
Flag v4 pages with shared warning banners
jakehobbs May 22, 2026
0f1f0f4
Rewrite low-level-infra and smart-contracts pages for v5
jakehobbs May 22, 2026
4a9daa8
BSO: switch to canonical viem pattern, zero preVerificationGas too
jakehobbs May 22, 2026
327219c
Align v5 rewrites with canonical ws-tools patterns
jakehobbs May 22, 2026
cf02358
Use alchemyTransport from @alchemy/common, drop hardcoded RPC URLs
jakehobbs May 22, 2026
5f2a3b9
v4 banners on signer/react pages + rewrite quickstart + managing-owne…
jakehobbs May 22, 2026
92bdb39
Note MultiOwnerLightAccount is v2-only so the missing version param r…
jakehobbs May 23, 2026
ac85110
Fix MDX lint: replace autolink with markdown link, use * for unordere…
jakehobbs May 23, 2026
ea606d5
Soften v4 signer banner: 'Alchemy signer' + 'we recommend using' Privy
jakehobbs May 23, 2026
9420d4a
Reword v4 concept banner: call out AA-SDK explicitly, drop reference-…
jakehobbs May 23, 2026
9250d6a
Drop Next steps section from low-level-infra quickstart — left-nav al…
jakehobbs May 23, 2026
a125ced
Drop v4 banner from supported-chains; point chain imports at viem ins…
jakehobbs May 23, 2026
dca2939
Point users at @alchemy/common/chains for chains viem doesn't ship
jakehobbs May 23, 2026
1a2ebfc
Drop 'yet' from v4-code banner — some pages may be retired rather tha…
jakehobbs May 23, 2026
a3cfed6
Reframe v4-code banner around new-project audience instead of our upd…
jakehobbs May 23, 2026
94511e8
Soften v4 React banner: 'does not currently include' leaves room for …
jakehobbs May 23, 2026
7f740b5
v4 React banner: highlight that wallet-apis is framework-agnostic ins…
jakehobbs May 23, 2026
5ec24be
Front-load wallet-apis recommendation on MAv2 page; frame this as the…
jakehobbs May 23, 2026
6a42c8b
Rewrite MAv2 session-keys pages for v5 (toModularAccountV2 + bundlerC…
jakehobbs May 23, 2026
748c99f
Add wallet-apis Tip to Light Account getting-started; minor banner co…
jakehobbs May 23, 2026
86c64f2
Flag v4-code-banner pages with no inbound /content links + call out v…
jakehobbs May 23, 2026
e61871b
Inline HookType const in session-keys docs (SDK doesn't value-export …
jakehobbs May 23, 2026
276cd4f
Address codex review: include @alchemy/common in install, actually wi…
jakehobbs May 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 19 additions & 22 deletions content/tutorials/getting-started/alchemy-quickstart-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -109,35 +109,32 @@ Ship smart wallets in minutes with the Account Kit SDK:

Ship for web and mobile with React, React Native, or other JS frameworks.

Check out the [Smart Wallets quickstart](/docs/wallets/react/quickstart) to get started.
Check out the [Smart Wallets quickstart](/docs/wallets/quickstart) to get started.

### Send a gas-free smart wallet transaction

```ts
// yarn add @account-kit/infra @account-kit/smart-contracts
import {
alchemy,
createAlchemySmartAccountClient,
sepolia,
} from "@account-kit/infra";
import { createLightAccount } from "@account-kit/smart-contracts";
import { LocalAccountSigner } from "@aa-sdk/core";
import { generatePrivateKey } from "viem/accounts";

const alchemyTransport = alchemy({
apiKey: "YOUR_API_KEY", // from Alchemy dashboard
// yarn add @alchemy/wallet-apis viem
import { createSmartWalletClient, alchemyWalletTransport } from "@alchemy/wallet-apis";
import { arbitrumSepolia } from "viem/chains";
import { privateKeyToAccount, generatePrivateKey } from "viem/accounts";
import { zeroAddress } from "viem";

export const client = createSmartWalletClient({
transport: alchemyWalletTransport({
apiKey: "YOUR_API_KEY", // from Alchemy dashboard
}),
chain: arbitrumSepolia,
signer: privateKeyToAccount(generatePrivateKey()),
paymaster: {
policyId: "YOUR_POLICY_ID", // create a gas policy in the dashboard
},
});

export const client = createAlchemySmartAccountClient({
transport: alchemyTransport,
policyId: "YOUR_POLICY_ID", // create a gas policy in the dashboard
chain: sepolia,
account: await createLightAccount({
chain: sepolia,
transport: alchemyTransport,
signer: LocalAccountSigner.privateKeyToAccountSigner(generatePrivateKey()),
}),
const { id } = await client.sendCalls({
calls: [{ to: zeroAddress, value: BigInt(0) }],
});
const status = await client.waitForCallsStatus({ id });
```

***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ description: Integrate your existing authentication system with Wallet APIs usin
slug: wallets/authentication/login-methods/bring-your-own-auth
---

<Markdown src="../../../shared/v4-signer-banner.mdx" />

Integrate your existing authentication provider and add smart wallet functionality to your app without changing your users' login experience. Wallet APIs supports JWT-based and OIDC-compliant authentication providers.

## Prerequisites
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ description: How to implement Email Magic Link authentication across different f
slug: wallets/authentication/login-methods/email-magic-link
---

<Markdown src="../../../shared/v4-signer-banner.mdx" />

Email magic link authentication is a two-step process:

1. The user enters their email address and requests a magic link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ description: How to implement Email OTP authentication across different framewor
slug: wallets/authentication/login-methods/email-otp
---

<Markdown src="../../../shared/v4-signer-banner.mdx" />

Email OTP (One-Time Password) authentication is a two-step process:

1. The user enters their email address and requests a verification code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ description: How to implement Passkey Signup authentication across different fra
slug: wallets/authentication/login-methods/passkey-signup
---

<Markdown src="../../../shared/v4-signer-banner.mdx" />

Passkeys provide a secure, passwordless authentication method that can be used to create wallets for your users without going through email verification flows. You can implement passkey signup with or without an associated email address.

<Markdown src="../../../shared/passkey-email-warning.mdx" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ description: How to authenticate users with phone number and SMS OTP code
slug: wallets/authentication/login-methods/sms-login
---

<Markdown src="../../../shared/v4-signer-banner.mdx" />

<Info>
SMS auth is currently in closed alpha. If you'd like early access please reach
out to [wallets@alchemy.com](mailto:wallets@alchemy.com).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ description: How to implement Social Login authentication across different frame
slug: wallets/authentication/login-methods/social-login
---

<Markdown src="../../../shared/v4-signer-banner.mdx" />

Social login authentication allows users to authenticate using OAuth providers like Google, Facebook, or custom providers through Auth0. There are two authentication flows available:

1. **Redirect flow**: Redirects the user to the provider's login page and back to your application
Expand Down
107 changes: 49 additions & 58 deletions content/wallets/pages/bundler-api/bundler-sponsored-operations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,77 +67,68 @@ For more details, see the [Compute Unit Costs documentation](/docs/reference/com
To enable bundler sponsorship, you need to:

1. **Create a Bundler Sponsored Operations policy** in your dashboard with the required Max Spend Per UO configuration
2. **Include the policy ID** in your requests via the `x-alchemy-policy-id` header
3. **Set gas fees to zero** in your user operation overrides
2. **Include the policy ID** in your requests via the `x-alchemy-policy-id` header on the bundler transport
3. **Zero out `maxFeePerGas`, `maxPriorityFeePerGas`, and `preVerificationGas`** on the user operation

### Example implementation

Here's a complete example using Wallet APIs to send a sponsored user operation:
Below is the low-level (viem) pattern. The policy ID rides on the bundler transport's `fetchOptions.headers`; the bundler fills in the actual gas values server-side when it sees the zeroed fields.

```typescript
import { LocalAccountSigner } from "@aa-sdk/core";
import { alchemy, worldChain } from "@account-kit/infra";
import { createModularAccountV2Client } from "@account-kit/smart-contracts";
```ts
import { createClient, type Hex } from "viem";
import { createBundlerClient } from "viem/account-abstraction";
import { privateKeyToAccount } from "viem/accounts";
import { worldchain } from "viem/chains";
import { alchemyTransport } from "@alchemy/common";
import { toModularAccountV2 } from "@alchemy/smart-accounts";
import { estimateFeesPerGas } from "@alchemy/aa-infra";

const RPC_URL = process.env.RPC_URL!;
const ALCHEMY_API_KEY = process.env.ALCHEMY_API_KEY!;
const POLICY_ID = process.env.POLICY_ID!;
const PRIVATE_KEY = process.env.PRIVATE_KEY!;

(async () => {
try {
const chain = worldChain;

// Configure transport with bundler sponsorship header
const transport = alchemy({
rpcUrl: RPC_URL,
fetchOptions: {
headers: {
"x-alchemy-policy-id": POLICY_ID
}
}
});

const signer = LocalAccountSigner.privateKeyToAccountSigner(
PRIVATE_KEY as `0x${string}`
);

const client = await createModularAccountV2Client({
chain,
transport,
signer,
});

// Send user operation with bundler sponsorship
const uo = await client.sendUserOperation({
overrides: {
maxFeePerGas: "0x0",
maxPriorityFeePerGas: "0x0",
},
uo: {
target: "0x0000000000000000000000000000000000000000",
data: "0x",
},
});

const txHash = await client.waitForUserOperationTransaction({
hash: uo.hash,
});

console.log("Tx Hash: ", txHash);

} catch (err) {
console.error("Error:", err);
}
})();
const PRIVATE_KEY = process.env.PRIVATE_KEY! as Hex;

// The policy ID rides on the transport's fetch options.
const transport = alchemyTransport({
apiKey: ALCHEMY_API_KEY,
fetchOptions: {
headers: { "x-alchemy-policy-id": POLICY_ID },
},
});

const rpcClient = createClient({ chain: worldchain, transport });

const account = await toModularAccountV2({
client: rpcClient,
owner: privateKeyToAccount(PRIVATE_KEY),
});

const bundlerClient = createBundlerClient({
account,
client: rpcClient,
chain: worldchain,
transport,
userOperation: { estimateFeesPerGas },
});

// Zero ALL three gas fields — the bundler fills them in.
const hash = await bundlerClient.sendUserOperation({
calls: [{ to: "0x000000000000000000000000000000000000dEaD", data: "0x" }],
maxFeePerGas: 0n,
maxPriorityFeePerGas: 0n,
preVerificationGas: 0n,
});

const receipt = await bundlerClient.waitForUserOperationReceipt({ hash });
console.log("Tx:", receipt.receipt.transactionHash);
```

### Key configuration points

1. **Policy Type**: Ensure you've created a policy of type "Bundler Sponsored Operations" with Max Spend Per UO configured.

2. **Transport Configuration**: The `x-alchemy-policy-id` header must be included in the transport configuration's `fetchOptions.headers`.
2. **Transport Configuration**: The `x-alchemy-policy-id` header must be included on the **bundler** transport via `fetchOptions.headers`. No `createPaymasterClient` needed — BSO does not use a paymaster contract.

3. **Gas Fee Overrides**: Set both `maxFeePerGas` and `maxPriorityFeePerGas` to `"0x0"` to indicate that the bundler should sponsor all gas costs.
3. **Gas Fee Overrides**: Set `maxFeePerGas`, `maxPriorityFeePerGas`, **and** `preVerificationGas` to `0n` on the user operation. All three must be zero — the bundler treats that as the signal to cover gas under the BSO policy.

## Requirements

Expand Down
2 changes: 2 additions & 0 deletions content/wallets/pages/concepts/middleware.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ description: What is Middleware?
slug: wallets/concepts/middleware
---

<Markdown src="../../shared/v4-concept-banner.mdx" />

The [Smart Account Client](/docs/wallets/concepts/smart-account-client) is extended with a series of middleware. When building transactions for signing and sending, the flow can be involved.
Sending a transaction requires getting the latest nonce for an account, checking if the account is deployed to set the `initCode` or `factory` and `factoryData`, estimating fees, estimating gas, and then signing the transaction.
If you want to sponsor gas, you need to generate some `dummyPaymasterAndData` to use during gas estimation, and after estimating gas you can request gas sponsorship.
Expand Down
2 changes: 2 additions & 0 deletions content/wallets/pages/core/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ description: How to use Wallet APIs with other JavaScript frameworks
slug: wallets/core/overview
---

<Markdown src="../../shared/v4-code-banner.mdx" />

There are no current plans to support other JavaScript front-end frameworks such as Vue, Angular, or Svelte. However, there are a number of different ways to integrate Wallet APIs within your application if you're using one of these JavaScript frameworks.

<Tip>
Expand Down
3 changes: 3 additions & 0 deletions content/wallets/pages/core/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ description: Learn how to get started with the Wallet APIs Core package
slug: wallets/core/quickstart
---

{/* No inbound links from other /content pages as of 2026-05-22 — candidate for retirement rather than v5 rewrite. */}
<Markdown src="../../shared/v4-code-banner.mdx" />

If you're not using React, but still want a number of the abstractions that make the React package straightforward to use, leverage the `@account-kit/core` package directly.

In this guide, learn how to use this package to send a transaction, while using the reactive utilities exported by this package.
Expand Down
2 changes: 2 additions & 0 deletions content/wallets/pages/infra/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ description: Get started with Wallet APIs infrastructure
slug: wallets/infra/quickstart
---

<Markdown src="../../shared/v4-code-banner.mdx" />

Wallet APIs is composed of some lower-level libraries if you're looking for further customization of your stack or want more control over how you build your application.
One of these libraries is `@account-kit/infra` which allows you to interact with our infrastructure directly, while bringing your own smart contracts or signer.
In this guide, learn how to get started with `@account-kit/infra` and send a transaction. For smart contracts, the guide leverages `@account-kit/smart-contracts` to use `LightAccount`,
Expand Down
7 changes: 4 additions & 3 deletions content/wallets/pages/low-level-infra/bundler/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ description: Raw EIP-4337 Bundler APIs for advanced developers
slug: wallets/transactions/low-level-infra/bundler/overview
---

The Bundler is a key component in the ERC-4337 stack, responsible for collecting, validating, and bundling UserOperations (UserOps) into transactions that are submitted to the EntryPoint contract on the blockchain. The Bundler APIs provide direct access to high-performance, scalable infrastructure (powered by Rundler), enabling developers to interact with a production-grade ERC-4337 bundler for reliable onchain submission of UserOps.
These APIs are part of the `@account-kit/infra` library, allowing advanced customization when building smart wallet applications. They follow the standard ERC-4337 JSON-RPC endpoints and support versions v0.6, v0.7, and v0.8 of the protocol, with optimizations for gas estimation, validation, and error handling to ensure UserOps land efficiently while protecting against attacks.
The Bundler is a key component in the ERC-4337 stack, responsible for collecting, validating, and bundling UserOperations (UserOps) into transactions submitted to the EntryPoint contract on the blockchain. The Bundler APIs provide direct access to Alchemy's high-performance, scalable infrastructure (powered by Rundler), letting developers interact with a production-grade ERC-4337 bundler for reliable onchain submission of UserOps.

For full control, bring your own smart contracts or authentication providers while leveraging the bundler for scalability. If you prefer a higher-level abstraction, use the Wallet APIs or aa-sdk instead.
These endpoints follow the standard ERC-4337 JSON-RPC interface and support v0.6, v0.7, and v0.8 of the protocol, with optimizations for gas estimation, validation, and error handling.

If you want SDK-level access, use viem's [`createBundlerClient`](https://viem.sh/account-abstraction/clients/bundler) with `alchemyTransport({ apiKey })` from [`@alchemy/common`](/docs/wallets/reference/common) as the transport, and pass [`@alchemy/aa-infra`](/docs/wallets/reference/aa-infra)'s `estimateFeesPerGas` helper as the fee estimator. For a higher-level abstraction, use [`@alchemy/wallet-apis`](/docs/wallets/quickstart) instead.

<Markdown src="../../../shared/infra/api-endpoints/bundler.mdx" />
Loading
Loading