diff --git a/plugins/alchemy/skills/alchemy-api/references/node-websocket-subscriptions.md b/plugins/alchemy/skills/alchemy-api/references/node-websocket-subscriptions.md index 292cae8..d6faab6 100644 --- a/plugins/alchemy/skills/alchemy-api/references/node-websocket-subscriptions.md +++ b/plugins/alchemy/skills/alchemy-api/references/node-websocket-subscriptions.md @@ -10,7 +10,7 @@ tags: related: - node-json-rpc.md - webhooks-details.md -updated: 2026-04-22 +updated: 2026-05-27 --- # WebSocket Subscriptions @@ -205,6 +205,15 @@ ws.on("message", (data) => { - `newPendingTransactions` is very high volume. Use tight filters if available, or switch to `alchemy_pendingTransactions` with `addresses` and `hashesOnly: true` to keep bandwidth (and billing) predictable. - If WebSockets are unavailable, fall back to HTTP polling with coarse intervals and backoff. +## Non-EVM chains + +Same WebSocket scheme (`wss://.g.alchemy.com/v2/$ALCHEMY_API_KEY`), different message protocols: + +- **Solana subscriptions** (`accountSubscribe`, `programSubscribe`, `logsSubscribe`, `signatureSubscribe`, `slotSubscribe`, `rootSubscribe`) — Solana-specific RPC, different envelope from `eth_subscribe`. See [Solana Subscription API](https://www.alchemy.com/docs/reference/subscription-api). +- **UTXO chains (Bitcoin / BCH / LTC / DOGE)** — Trezor Blockbook protocol passed through unchanged. JSON envelope is `{ "id", "method", "params" }`. Push subscriptions: `subscribeNewBlock`, `subscribeNewTransaction`, `subscribeAddresses`, `subscribeFiatRates`. Only one active subscription per event type per connection. See the per-chain "UTXO WebSockets" reference page under each Bitcoin-ecosystem chain in the docs. + - **`subscribeNewTransaction`** requires Blockbook's `-enablesubnewtx` flag on the backend — may not be enabled everywhere. Fall back to `subscribeAddresses` if you see no events. + ## Official Docs - [Subscription API Overview](https://www.alchemy.com/docs/reference/subscription-api) - [eth_subscribe](https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-subscribe) +- [UTXO WebSockets (Bitcoin)](https://www.alchemy.com/docs/chains/bitcoin/utxo-websockets) diff --git a/plugins/alchemy/skills/alchemy-api/references/solana-das-api.md b/plugins/alchemy/skills/alchemy-api/references/solana-das-api.md index 1b3ceb6..20a2777 100644 --- a/plugins/alchemy/skills/alchemy-api/references/solana-das-api.md +++ b/plugins/alchemy/skills/alchemy-api/references/solana-das-api.md @@ -7,7 +7,7 @@ tags: - solana related: - solana-rpc.md -updated: 2026-02-23 +updated: 2026-05-27 --- # Solana DAS (Digital Asset Standard) API @@ -28,9 +28,11 @@ Returns metadata for a single asset by its ID. | `id` | string | Yes | Asset ID (mint address, base58) | | `displayOptions.showUnverifiedCollections` | boolean | No | Include unverified collections | | `displayOptions.showCollectionMetadata` | boolean | No | Include collection metadata | +| `displayOptions.showZeroBalance` | boolean | No | Include assets with zero balance | +| `displayOptions.showInscription` | boolean | No | Include inscription details (singular — `showInscriptions` is rejected) | | `displayOptions.showFungible` | boolean | No | Include fungible token details | -| `displayOptions.showNativeBalance` | boolean | No | Include native SOL balance | -| `displayOptions.showInscriptions` | boolean | No | Include inscription data | + +> The server accepts `options` as an alias of `displayOptions`. Send only one — including both returns a `duplicate field` error. `showNativeBalance` and `showGrandTotal` are NOT supported (rejected with `unknown field`). ### Request @@ -311,6 +313,19 @@ curl -s -X POST https://solana-mainnet.g.alchemy.com/v2/$ALCHEMY_API_KEY \ - Pagination is required for large wallets. Use `page` and `limit`. - Compressed assets require `getAssetProof` for on-chain operations. +### Shared `displayOptions` / `options` shaping flags +The same `DisplayOptions` schema is accepted on `getAsset`, `getAssets`, `getAssetsByOwner`, `getAssetsByAuthority`, `getAssetsByCreator`, `getAssetsByGroup`, and `searchAssets`. All flags are boolean and default to `false`: + +| Flag | Effect | +|------|--------| +| `showUnverifiedCollections` | Include unverified collections instead of skipping them. | +| `showCollectionMetadata` | Include collection metadata. | +| `showZeroBalance` | Include assets with zero balance. | +| `showInscription` | Include inscription details. Spelled singular — `showInscriptions` (plural) is rejected. | +| `showFungible` | Include fungible assets in the result. | + +The server accepts `options` as an alias of `displayOptions`. Send only one — including both returns a `duplicate field` error. `showNativeBalance` and `showGrandTotal` are NOT supported and return `unknown field`. + ## Official Docs - [DAS APIs for Solana](https://www.alchemy.com/docs/chains/solana/das-api) - [getAsset](https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/getasset) diff --git a/plugins/alchemy/skills/alchemy-api/references/wallets-account-kit.md b/plugins/alchemy/skills/alchemy-api/references/wallets-account-kit.md index e36052d..6517699 100644 --- a/plugins/alchemy/skills/alchemy-api/references/wallets-account-kit.md +++ b/plugins/alchemy/skills/alchemy-api/references/wallets-account-kit.md @@ -1,35 +1,55 @@ --- id: references/wallets-account-kit.md -name: 'Account Kit' -description: 'Account Kit is Alchemy''s wallet SDK for onboarding users and managing wallet UX. Use it for embedded wallet flows or seamless authentication.' +name: 'Account Kit (v4) and the v5 stack' +description: 'Account Kit v4 is the legacy SDK for signer + smart-account UX (still maintained for signer-only flows). New builds should target the v5 stack: @alchemy/wallet-apis + Privy as signer.' tags: - alchemy - wallets related: + - wallets-wallet-apis.md - wallets-smart-wallets.md - wallets-gas-manager.md - operational-auth-and-keys.md -updated: 2026-02-05 +updated: 2026-05-27 --- -# Account Kit +# Account Kit (v4) and the v5 stack ## Summary -Account Kit is Alchemy's wallet SDK for onboarding users and managing wallet UX. Use it for embedded wallet flows or seamless authentication. +"Account Kit" now refers to the **v4** SDK family (`@account-kit/*`, `@aa-sdk/*`). Wallet APIs **v5** is the recommended stack for new builds. The docs site labels the legacy nav section "Account Kit (v4)" to make this explicit. -## Primary Use Cases -- Email/social login wallet creation. -- Embedded wallet UX in web apps. -- Signing and sending transactions with minimal setup. +## v4 vs v5 routing + +| Use case | Recommended package(s) | Notes | +|---|---|---| +| New smart-account integration (EVM or Solana) | `@alchemy/wallet-apis@^5` + `@alchemy/smart-accounts@^5` | The v5 stack. Solana support landed via `wallet_prepareCalls` + `wallet_sendPreparedCalls` (CAIP-2 IDs `solana:mainnet`, `solana:devnet`). | +| Low-level bundler client | `@alchemy/aa-infra@^5` | Replaces `@account-kit/infra` from the v4 era. | +| Embedded signer / auth UX (passkey, email, social, EOA) | Account Kit v4 (`@account-kit/react`, `@account-kit/signer`) | v5 has no signer SDK yet. For new builds, Alchemy's recommended pairing is **Wallet APIs v5 + Privy as signer**. | +| Existing Account Kit v4 app | Stay on v4 for now | v4 is still maintained. The `aa-sdk` repo dropped v4 reference docs from `main`; use `aa-sdk@v4.x.x` branch for source. | +| Migration off Account Kit v4 → v5 | See [v5 migration guide](https://www.alchemy.com/docs/wallets/resources/migration-v5) | Plus the v4 banner on each affected page in `/docs/wallets/...`. | + +## What changed in v5 (highlights) +- Package surface renamed: `@account-kit/*` and `@aa-sdk/*` → `@alchemy/wallet-apis`, `@alchemy/smart-accounts`, `@alchemy/aa-infra`. +- Solana transactions go through Wallet APIs alongside EVM (anyOf-style param schema; the same `wallet_prepareCalls` / `wallet_sendPreparedCalls` methods). +- BSO (Bundler Sponsored Operations) now requires three zero fields, not two — see `wallets-gas-manager.md` and `wallets-bundler.md`. +- v5 SDKs use viem-style `bigint` for amounts (`fromAmount`, `minimumToAmount`). Raw JSON-RPC still uses `0x`-hex strings. +- Beta notices have been removed across the wallets section — Wallet APIs v5 is GA. + +## Primary Use Cases (Account Kit v4) +- Embedded wallet UX in web apps (signer-driven authentication). +- Email/social/passkey wallet creation. +- Signing flows that don't yet have a v5 equivalent. ## Integration Notes -- Typically used client-side with a wallet UI layer. - Pair with `wallets-gas-manager.md` for sponsored transactions. +- For v5 builds, route most "Account Kit"-shaped questions to `wallets-wallet-apis.md`. ## Gotchas & Edge Cases -- Ensure you store session/auth tokens securely. -- Keep wallet creation flows resilient to network errors. +- `aa-sdk` reference URLs on `main` now 404 — use the `v4.x.x` branch. +- Account Kit v4 has no Solana support; use v5 Wallet APIs for Solana. +- Mixing v4 and v5 packages in the same app is not supported. ## Related Files +- `wallets-wallet-apis.md` (v5 surface) - `wallets-smart-wallets.md` - `wallets-gas-manager.md` - `operational-auth-and-keys.md` @@ -37,3 +57,5 @@ Account Kit is Alchemy's wallet SDK for onboarding users and managing wallet UX. ## Official Docs - [Account Kit Core Reference](https://www.alchemy.com/docs/wallets/reference/account-kit/core) - [Intro to Account Kit](https://www.alchemy.com/docs/wallets/concepts/intro-to-account-kit) +- [v5 migration guide](https://www.alchemy.com/docs/wallets/resources/migration-v5) +- [aa-sdk v4.x.x branch](https://github.com/alchemyplatform/aa-sdk/tree/v4.x.x) — source of truth for v4 reference symbols. diff --git a/plugins/alchemy/skills/alchemy-api/references/wallets-bundler.md b/plugins/alchemy/skills/alchemy-api/references/wallets-bundler.md index a6974a8..bff30c3 100644 --- a/plugins/alchemy/skills/alchemy-api/references/wallets-bundler.md +++ b/plugins/alchemy/skills/alchemy-api/references/wallets-bundler.md @@ -8,7 +8,8 @@ tags: related: - wallets-smart-wallets.md - wallets-gas-manager.md -updated: 2026-04-22 + - wallets-wallet-apis.md +updated: 2026-05-27 --- # Bundler @@ -25,18 +26,42 @@ When configuring the bundler, ensure you target the correct EntryPoint version f ## Primary Use Cases - AA transaction submission via standard ERC-4337 JSON-RPC endpoints. - UserOperation lifecycle handling (submit, track, drop-and-replace). +- BSO (Bundler Sponsored Operations) for gas-free smart-account flows — see `wallets-gas-manager.md`. + +## v5 client SDK +Bundler APIs are available in `@alchemy/aa-infra` (v5; replaces `@account-kit/infra` from the v4 era). For higher-level abstractions, use `@alchemy/wallet-apis` (Wallet APIs v5). + +```ts +import { createAlchemySmartAccountClient } from "@alchemy/aa-infra"; +// pair with @alchemy/smart-accounts for the account factory +``` + +## BSO request shape +Bundler Sponsored Operations require **all three** gas fields zeroed (not just two): + +```ts +await bundlerClient.sendUserOperation({ + calls: [{ to, data, value }], + maxFeePerGas: 0n, + maxPriorityFeePerGas: 0n, + preVerificationGas: 0n, +}); +``` + +The `x-alchemy-policy-id` header goes on the bundler transport via `fetchOptions.headers` — no `createPaymasterClient` needed, BSO does not use a paymaster contract. If you forget `preVerificationGas`, the bundler returns `precheck failed: preVerificationGas too low`. ## Integration Notes - Ensure correct chain configuration and EntryPoint version. - Monitor bundler latency and failures. - Use `eth_getUserOperationByHash` to poll UserOp status; if still null after timeout, drop and replace with higher fees. - For `Replacement Underpriced` errors, increase both `maxFeePerGas` and `maxPriorityFeePerGas` by at least 10%. -- Bundler APIs are available in `@account-kit/infra`. For higher-level abstractions, use Wallet APIs or aa-sdk. ## Related Files - `wallets-smart-wallets.md` - `wallets-gas-manager.md` +- `wallets-wallet-apis.md` ## Official Docs -- [Bundler Overview](https://www.alchemy.com/docs/wallets/transactions/low-level-infra/bundler/overview) +- [Bundler Overview](https://www.alchemy.com/docs/wallets/low-level-infra/bundler/overview) +- [Bundler Sponsored Operations](https://www.alchemy.com/docs/wallets/bundler-api/bundler-sponsored-operations) - [Bundler FAQs](https://www.alchemy.com/docs/wallets/reference/bundler-faqs) diff --git a/plugins/alchemy/skills/alchemy-api/references/wallets-gas-manager.md b/plugins/alchemy/skills/alchemy-api/references/wallets-gas-manager.md index 02ca0ec..33e4e71 100644 --- a/plugins/alchemy/skills/alchemy-api/references/wallets-gas-manager.md +++ b/plugins/alchemy/skills/alchemy-api/references/wallets-gas-manager.md @@ -8,7 +8,8 @@ tags: related: - wallets-smart-wallets.md - wallets-bundler.md -updated: 2026-04-22 + - wallets-wallet-apis.md +updated: 2026-05-27 --- # Gas Manager @@ -19,14 +20,33 @@ Gas Manager (paymaster) enables gas sponsorship and cost control for smart walle - Gasless user onboarding. - Sponsoring specific methods or contracts. - ERC-20 token gas payments (pay gas with any supported token). -- BSO (Bundler Sponsorship) policies for EIP-7702 undelegation. +- BSO (Bundler Sponsorship) policies for EIP-7702 undelegation and other native-gas-free flows. + +## Live Source of Truth — Dashboard +The list of supported ERC-20 tokens and networks rotates more often than docs can keep up. Treat the **Tokens & Networks** panel of the [Gas Manager Dashboard](https://dashboard.alchemy.com/gas-manager) as the authoritative source for what's available right now. The published docs FAQ enumerates the same tokens but lags by a release or two. + +## ERC-20 Gas Payment Supported Networks +Native USDC/USDT/wETH coverage spans Ethereum mainnet/Sepolia, Arbitrum (Mainnet, Sepolia, **Nova**), Optimism, Base, Polygon, BNB, Celo, Worldchain, Stable mainnet, Stable testnet, and Monad testnet. Any token supported by Alchemy's [Token Prices By Address API](https://www.alchemy.com/docs/data/prices-api/prices-api-endpoints/prices-api-endpoints/get-token-prices-by-address) can be enabled via the [Admin API `create-policy`](https://www.alchemy.com/docs/wallets/api/gas-manager-admin-api/admin-api-endpoints/create-policy) endpoint even if it's not in the Dashboard preset list. + +For a token or network that isn't supported, contact `wallets@alchemy.com`. ## BSO Chain Support Bundler Sponsored Operations (BSOs) are a bundler feature and are supported on **every chain that has both bundler and gas sponsorship support**, with the exception of **MegaETH** (coming soon). Always confirm against the live [Wallet APIs supported chains](https://www.alchemy.com/docs/wallets/supported-chains) matrix before launch. -## Integration Notes -- Define strict sponsorship policies. -- Monitor for abuse and enforce caps. +### BSO request shape (triple-zero gas fields) +To opt into BSO on a user operation, set ALL THREE of `maxFeePerGas`, `maxPriorityFeePerGas`, **and** `preVerificationGas` to `0n` (client SDK) or `"0x0"` (raw JSON-RPC). The bundler treats triple-zero as the signal to cover gas under the BSO policy. The `x-alchemy-policy-id` header goes on the **bundler** transport (no `createPaymasterClient` — BSO does not use a paymaster contract). + +```ts +// v5 client SDK +await bundlerClient.sendUserOperation({ + calls: [{ to: "0x000000000000000000000000000000000000dEaD", data: "0x" }], + maxFeePerGas: 0n, + maxPriorityFeePerGas: 0n, + preVerificationGas: 0n, +}); +``` + +If you forget `preVerificationGas`, the bundler returns `precheck failed: preVerificationGas too low` (`-32000`). ## ERC-20 Token Gas Payment — Revert Risk When using **post-operation** mode for ERC-20 gas payments: @@ -35,10 +55,17 @@ When using **post-operation** mode for ERC-20 gas payments: - **Use post-operation** when operations are unlikely to revert (works with all ERC-20 tokens). - **Use pre-operation** when operations may revert — the token transfer happens before execution so the paymaster is always compensated. +## Integration Notes +- Define strict sponsorship policies. +- Monitor for abuse and enforce caps. + ## Related Files - `wallets-smart-wallets.md` - `wallets-bundler.md` +- `wallets-wallet-apis.md` ## Official Docs - [Gas Manager Admin API](https://www.alchemy.com/docs/wallets/low-level-infra/gas-manager/policy-management/api-endpoints) - [Pay Gas With Any Token](https://www.alchemy.com/docs/wallets/transactions/pay-gas-with-any-token) +- [Bundler Sponsored Operations](https://www.alchemy.com/docs/wallets/bundler-api/bundler-sponsored-operations) +- [Gas Manager FAQs](https://www.alchemy.com/docs/wallets/gas-manager-admin-api/gas-manager-faqs) diff --git a/plugins/alchemy/skills/alchemy-api/references/wallets-solana-notes.md b/plugins/alchemy/skills/alchemy-api/references/wallets-solana-notes.md index fa5ebfd..d3136f6 100644 --- a/plugins/alchemy/skills/alchemy-api/references/wallets-solana-notes.md +++ b/plugins/alchemy/skills/alchemy-api/references/wallets-solana-notes.md @@ -1,27 +1,44 @@ --- id: references/wallets-solana-notes.md name: 'Solana Wallet Notes' -description: 'Solana wallet integration differs from EVM. Use Solana-specific tooling and RPC semantics.' +description: 'Solana wallet integration via the v5 Wallet APIs (wallet_prepareCalls / wallet_sendPreparedCalls). Also covers Solana RPC and DAS routing.' tags: - alchemy - wallets + - solana related: + - wallets-wallet-apis.md - solana-rpc.md - solana-das-api.md -updated: 2026-02-05 +updated: 2026-05-27 --- # Solana Wallet Notes ## Summary -Solana wallet integration differs from EVM. Use Solana-specific tooling and RPC semantics. +Wallet APIs **v5** (GA) supports Solana alongside EVM via the same `wallet_prepareCalls` and `wallet_sendPreparedCalls` methods. The request schema is `anyOf`-shaped — same RPC endpoint, different fields based on whether you target EVM or Solana. Account Kit v4 has no Solana support; v5 Wallet APIs is the path. -## Guidance -- Use Solana JSON-RPC for account data and program interactions. -- Use DAS for NFT and compressed asset data. +## Request shape (Solana) +- `chainId` is CAIP-2: `"solana:mainnet"` or `"solana:devnet"`. +- `from` is a base58-encoded Solana address (32–44 chars). Validation rejects `0x`-style hex. +- Send `instructions` (an array of raw Solana instructions: `{ programId, accounts, data }`) instead of EVM's `calls`. +- Prepared response carries `type: "solana-transaction-v0"` (Solana v0 versioned transaction). EVM responses use `type: "user-operation-v0.7"` and similar. +- Sign the returned tx with the user's Solana keypair, then submit it back through `wallet_sendPreparedCalls`. + +## Routing +- Wallet onboarding + smart-account flows on Solana → `wallets-wallet-apis.md` (v5). +- Solana JSON-RPC (account data, transactions, signatures, block info) → `solana-rpc.md`. +- Solana NFT / compressed-asset / DAS data → `solana-das-api.md`. + +## Gotchas +- Don't mix CAIP-2 IDs and decimal `chainId` — Solana payloads MUST use `solana:`. +- The same Wallet API method namespace (`wallet_*`) handles both EVM and Solana; ensure your transport/headers (especially `x-alchemy-policy-id` for sponsorship) are correct for the network you're targeting. +- Sponsored gas on Solana is gated differently than EVM — confirm with Alchemy support if you need sponsored Solana flows. ## Related Files +- `wallets-wallet-apis.md` - `solana-rpc.md` - `solana-das-api.md` ## Official Docs +- [Wallet APIs Solana support](https://www.alchemy.com/docs/wallets/api/wallet-api-endpoints/wallet-prepare-calls) - [Solana API Quickstart](https://www.alchemy.com/docs/reference/solana-api-quickstart) diff --git a/plugins/alchemy/skills/alchemy-api/references/wallets-supported-chains.md b/plugins/alchemy/skills/alchemy-api/references/wallets-supported-chains.md index 2e3c13f..ad351a7 100644 --- a/plugins/alchemy/skills/alchemy-api/references/wallets-supported-chains.md +++ b/plugins/alchemy/skills/alchemy-api/references/wallets-supported-chains.md @@ -1,25 +1,41 @@ --- id: references/wallets-supported-chains.md name: 'Wallet Supported Chains' -description: 'Wallet tooling may support a subset of chains compared to raw RPC. Always confirm chain support before launch.' +description: 'Wallet tooling supports a different chain set than raw RPC. Confirm chain support against the live dashboard before launch.' tags: - alchemy - wallets related: + - wallets-gas-manager.md - operational-supported-networks.md -updated: 2026-02-05 +updated: 2026-05-27 --- # Wallet Supported Chains ## Summary -Wallet tooling may support a subset of chains compared to raw RPC. Always confirm chain support before launch. +Wallet tooling (Wallet APIs v5, bundler, paymaster, Gas Manager) supports a subset / superset of chains compared to raw RPC. Always confirm against live sources before launch. + +## Sources of truth +- [Wallet APIs supported chains matrix](https://www.alchemy.com/docs/wallets/supported-chains) — chain-by-chain capability axes (bundler, paymaster, ERC-20 gas payments, BSOs). +- **Tokens & Networks** panel of the [Gas Manager Dashboard](https://dashboard.alchemy.com/gas-manager) — authoritative live list of which networks have ERC-20 gas payments enabled and which tokens are preset. +- For tokens that aren't preset, the Admin API can enable any token supported by Alchemy's [Token Prices By Address API](https://www.alchemy.com/docs/data/prices-api/prices-api-endpoints/prices-api-endpoints/get-token-prices-by-address). + +## Recently added wallet chains (capability axis) +- **Arbitrum Nova** — re-added to the ERC-20 paymaster supported list. +- **BNB Smart Chain** — ERC-20 gas payments (USDC, DAI). +- **Celo** — ERC-20 gas payments (USDC, USDT, CELO). +- **Stable mainnet / testnet** — ERC-20 gas payments (USDT0). + +These additions don't replace the docs/dashboard matrix — check there before assuming a chain × capability cell is live. ## Guidance -- Check Alchemy dashboard for wallet-specific chain availability. - Test on testnet before enabling production. +- A chain having bundler ≠ that chain having gas sponsorship. Cross-reference both columns. ## Related Files +- `wallets-gas-manager.md` - `operational-supported-networks.md` ## Official Docs -- [Supported Chains](https://www.alchemy.com/docs/reference/node-supported-chains) +- [Wallet APIs supported chains](https://www.alchemy.com/docs/wallets/supported-chains) +- [Supported Networks (RPC)](https://www.alchemy.com/docs/reference/node-supported-chains) diff --git a/plugins/alchemy/skills/alchemy-api/references/wallets-wallet-apis.md b/plugins/alchemy/skills/alchemy-api/references/wallets-wallet-apis.md index abcf9c0..fef1ccf 100644 --- a/plugins/alchemy/skills/alchemy-api/references/wallets-wallet-apis.md +++ b/plugins/alchemy/skills/alchemy-api/references/wallets-wallet-apis.md @@ -8,17 +8,43 @@ tags: related: - wallets-account-kit.md - operational-auth-and-keys.md -updated: 2026-04-22 +updated: 2026-05-27 --- # Wallet APIs ## Summary -High-level wallet APIs enable programmatic wallet operations such as signing, transaction preparation, account management, and EIP-7702 delegation/undelegation. This guide stays minimal and focuses on integration awareness. +High-level wallet APIs (Wallet APIs **v5**, GA) enable programmatic wallet operations: signing, transaction preparation, account management, EIP-7702 delegation/undelegation, and (new in v5) Solana transactions. This is the recommended stack for new builds; Account Kit v4 stays for signer-only flows. See `wallets-account-kit.md` for v4 vs v5 routing. ## Primary Use Cases -- Server-side transaction preparation. +- Server-side transaction preparation (EVM and Solana). - Delegated signing or session-based flows (including existing session keys — see [Legacy session keys with Wallet APIs](https://www.alchemy.com/docs/wallets/smart-wallets/session-keys/legacy-session-keys) for migrating pre-existing session-key setups). - EIP-7702 account delegation and undelegation. +- Cross-chain swaps and ERC-20 gas payments via `wallet_prepareCalls` capabilities. + +## v5 SDK package surface +The v5 stack lives under the `@alchemy/*` scope. Common imports: + +| Package | Use | +|---|---| +| `@alchemy/wallet-apis` | High-level client SDK (`createWalletClient`, `prepareCalls`, `sendPreparedCalls`). | +| `@alchemy/smart-accounts` | MAv2 / Light Account / smart contract account factories. | +| `@alchemy/aa-infra` | Low-level bundler client; replaces `@account-kit/infra`. | +| `viem` | Underlying chain primitives (`parseEther`, `parseUnits`, `bigint` helpers). | + +## Solana support +`wallet_prepareCalls` and `wallet_sendPreparedCalls` accept Solana payloads alongside EVM via an `anyOf` schema: + +- `chainId` uses CAIP-2 form: `"solana:mainnet"` (mainnet) or `"solana:devnet"` (devnet). +- `from` is a base58-encoded Solana address (32–44 chars), not a `0x` hex string. +- The prepared transaction is returned with `type: "solana-transaction-v0"` (Solana v0 versioned transaction). EVM responses still use `type: "user-operation-v0.7"` etc. +- Sign the returned tx with the user's Solana keypair, then submit it back through `wallet_sendPreparedCalls`. +- Request shape: a single positional object with `calls` (EVM) **or** `instructions` (Solana, an array of raw Solana instructions); the call's `to`/`from`/encoding fields and the response shape are gated on whether you sent EVM or Solana inputs. + +## Encoding: bigint vs hex +- **Client SDK (`@alchemy/wallet-apis` v5)**: takes `bigint` for amount fields like `fromAmount`, `minimumToAmount`, `value`. Use viem helpers: `parseEther("1.5")`, `parseUnits("100", 6)`. +- **Raw JSON-RPC**: amounts and gas fields are `0x`-prefixed hex strings (e.g., `"value": "0x16345785d8a0000"`). + +If you see `expected bigint, got string`, you're passing a hex string to the SDK — convert via `BigInt(hex)` or use viem helpers. ## EIP-7702 Undelegation Undelegation removes smart contract delegation from an EIP-7702 account by delegating to the zero address (`0x0000...0000`), restoring it to a plain EOA. Key details: @@ -54,7 +80,9 @@ When users report Wallet API failures, check for these common error patterns: **Key pattern:** Most `precheck failed` errors (-32000) resolve by re-preparing the call immediately before sending — minimize delay between `wallet_prepareCalls` and `wallet_sendPreparedCalls`. ## Related Files -- `wallets-account-kit.md` +- `wallets-account-kit.md` (v4 vs v5 routing) +- `wallets-solana-notes.md` +- `wallets-gas-manager.md` - `operational-auth-and-keys.md` ## Official Docs @@ -62,3 +90,4 @@ When users report Wallet API failures, check for these common error patterns: - [Wallet API Errors](https://www.alchemy.com/docs/wallets/troubleshooting/wallet-apis-errors) - [Legacy session keys with Wallet APIs](https://www.alchemy.com/docs/wallets/smart-wallets/session-keys/legacy-session-keys) — use existing session keys with Wallet APIs. - [v5 migration guide](https://www.alchemy.com/docs/wallets/resources/migration-v5) +- [Swap Tokens (v5)](https://www.alchemy.com/docs/wallets/transactions/swap-tokens) — bigint amount conventions for the client SDK. diff --git a/skills/alchemy-api/references/node-websocket-subscriptions.md b/skills/alchemy-api/references/node-websocket-subscriptions.md index 292cae8..d6faab6 100644 --- a/skills/alchemy-api/references/node-websocket-subscriptions.md +++ b/skills/alchemy-api/references/node-websocket-subscriptions.md @@ -10,7 +10,7 @@ tags: related: - node-json-rpc.md - webhooks-details.md -updated: 2026-04-22 +updated: 2026-05-27 --- # WebSocket Subscriptions @@ -205,6 +205,15 @@ ws.on("message", (data) => { - `newPendingTransactions` is very high volume. Use tight filters if available, or switch to `alchemy_pendingTransactions` with `addresses` and `hashesOnly: true` to keep bandwidth (and billing) predictable. - If WebSockets are unavailable, fall back to HTTP polling with coarse intervals and backoff. +## Non-EVM chains + +Same WebSocket scheme (`wss://.g.alchemy.com/v2/$ALCHEMY_API_KEY`), different message protocols: + +- **Solana subscriptions** (`accountSubscribe`, `programSubscribe`, `logsSubscribe`, `signatureSubscribe`, `slotSubscribe`, `rootSubscribe`) — Solana-specific RPC, different envelope from `eth_subscribe`. See [Solana Subscription API](https://www.alchemy.com/docs/reference/subscription-api). +- **UTXO chains (Bitcoin / BCH / LTC / DOGE)** — Trezor Blockbook protocol passed through unchanged. JSON envelope is `{ "id", "method", "params" }`. Push subscriptions: `subscribeNewBlock`, `subscribeNewTransaction`, `subscribeAddresses`, `subscribeFiatRates`. Only one active subscription per event type per connection. See the per-chain "UTXO WebSockets" reference page under each Bitcoin-ecosystem chain in the docs. + - **`subscribeNewTransaction`** requires Blockbook's `-enablesubnewtx` flag on the backend — may not be enabled everywhere. Fall back to `subscribeAddresses` if you see no events. + ## Official Docs - [Subscription API Overview](https://www.alchemy.com/docs/reference/subscription-api) - [eth_subscribe](https://www.alchemy.com/docs/chains/ethereum/ethereum-api-endpoints/eth-subscribe) +- [UTXO WebSockets (Bitcoin)](https://www.alchemy.com/docs/chains/bitcoin/utxo-websockets) diff --git a/skills/alchemy-api/references/solana-das-api.md b/skills/alchemy-api/references/solana-das-api.md index 1b3ceb6..20a2777 100644 --- a/skills/alchemy-api/references/solana-das-api.md +++ b/skills/alchemy-api/references/solana-das-api.md @@ -7,7 +7,7 @@ tags: - solana related: - solana-rpc.md -updated: 2026-02-23 +updated: 2026-05-27 --- # Solana DAS (Digital Asset Standard) API @@ -28,9 +28,11 @@ Returns metadata for a single asset by its ID. | `id` | string | Yes | Asset ID (mint address, base58) | | `displayOptions.showUnverifiedCollections` | boolean | No | Include unverified collections | | `displayOptions.showCollectionMetadata` | boolean | No | Include collection metadata | +| `displayOptions.showZeroBalance` | boolean | No | Include assets with zero balance | +| `displayOptions.showInscription` | boolean | No | Include inscription details (singular — `showInscriptions` is rejected) | | `displayOptions.showFungible` | boolean | No | Include fungible token details | -| `displayOptions.showNativeBalance` | boolean | No | Include native SOL balance | -| `displayOptions.showInscriptions` | boolean | No | Include inscription data | + +> The server accepts `options` as an alias of `displayOptions`. Send only one — including both returns a `duplicate field` error. `showNativeBalance` and `showGrandTotal` are NOT supported (rejected with `unknown field`). ### Request @@ -311,6 +313,19 @@ curl -s -X POST https://solana-mainnet.g.alchemy.com/v2/$ALCHEMY_API_KEY \ - Pagination is required for large wallets. Use `page` and `limit`. - Compressed assets require `getAssetProof` for on-chain operations. +### Shared `displayOptions` / `options` shaping flags +The same `DisplayOptions` schema is accepted on `getAsset`, `getAssets`, `getAssetsByOwner`, `getAssetsByAuthority`, `getAssetsByCreator`, `getAssetsByGroup`, and `searchAssets`. All flags are boolean and default to `false`: + +| Flag | Effect | +|------|--------| +| `showUnverifiedCollections` | Include unverified collections instead of skipping them. | +| `showCollectionMetadata` | Include collection metadata. | +| `showZeroBalance` | Include assets with zero balance. | +| `showInscription` | Include inscription details. Spelled singular — `showInscriptions` (plural) is rejected. | +| `showFungible` | Include fungible assets in the result. | + +The server accepts `options` as an alias of `displayOptions`. Send only one — including both returns a `duplicate field` error. `showNativeBalance` and `showGrandTotal` are NOT supported and return `unknown field`. + ## Official Docs - [DAS APIs for Solana](https://www.alchemy.com/docs/chains/solana/das-api) - [getAsset](https://www.alchemy.com/docs/chains/solana/solana-api-endpoints/getasset) diff --git a/skills/alchemy-api/references/wallets-account-kit.md b/skills/alchemy-api/references/wallets-account-kit.md index e36052d..6517699 100644 --- a/skills/alchemy-api/references/wallets-account-kit.md +++ b/skills/alchemy-api/references/wallets-account-kit.md @@ -1,35 +1,55 @@ --- id: references/wallets-account-kit.md -name: 'Account Kit' -description: 'Account Kit is Alchemy''s wallet SDK for onboarding users and managing wallet UX. Use it for embedded wallet flows or seamless authentication.' +name: 'Account Kit (v4) and the v5 stack' +description: 'Account Kit v4 is the legacy SDK for signer + smart-account UX (still maintained for signer-only flows). New builds should target the v5 stack: @alchemy/wallet-apis + Privy as signer.' tags: - alchemy - wallets related: + - wallets-wallet-apis.md - wallets-smart-wallets.md - wallets-gas-manager.md - operational-auth-and-keys.md -updated: 2026-02-05 +updated: 2026-05-27 --- -# Account Kit +# Account Kit (v4) and the v5 stack ## Summary -Account Kit is Alchemy's wallet SDK for onboarding users and managing wallet UX. Use it for embedded wallet flows or seamless authentication. +"Account Kit" now refers to the **v4** SDK family (`@account-kit/*`, `@aa-sdk/*`). Wallet APIs **v5** is the recommended stack for new builds. The docs site labels the legacy nav section "Account Kit (v4)" to make this explicit. -## Primary Use Cases -- Email/social login wallet creation. -- Embedded wallet UX in web apps. -- Signing and sending transactions with minimal setup. +## v4 vs v5 routing + +| Use case | Recommended package(s) | Notes | +|---|---|---| +| New smart-account integration (EVM or Solana) | `@alchemy/wallet-apis@^5` + `@alchemy/smart-accounts@^5` | The v5 stack. Solana support landed via `wallet_prepareCalls` + `wallet_sendPreparedCalls` (CAIP-2 IDs `solana:mainnet`, `solana:devnet`). | +| Low-level bundler client | `@alchemy/aa-infra@^5` | Replaces `@account-kit/infra` from the v4 era. | +| Embedded signer / auth UX (passkey, email, social, EOA) | Account Kit v4 (`@account-kit/react`, `@account-kit/signer`) | v5 has no signer SDK yet. For new builds, Alchemy's recommended pairing is **Wallet APIs v5 + Privy as signer**. | +| Existing Account Kit v4 app | Stay on v4 for now | v4 is still maintained. The `aa-sdk` repo dropped v4 reference docs from `main`; use `aa-sdk@v4.x.x` branch for source. | +| Migration off Account Kit v4 → v5 | See [v5 migration guide](https://www.alchemy.com/docs/wallets/resources/migration-v5) | Plus the v4 banner on each affected page in `/docs/wallets/...`. | + +## What changed in v5 (highlights) +- Package surface renamed: `@account-kit/*` and `@aa-sdk/*` → `@alchemy/wallet-apis`, `@alchemy/smart-accounts`, `@alchemy/aa-infra`. +- Solana transactions go through Wallet APIs alongside EVM (anyOf-style param schema; the same `wallet_prepareCalls` / `wallet_sendPreparedCalls` methods). +- BSO (Bundler Sponsored Operations) now requires three zero fields, not two — see `wallets-gas-manager.md` and `wallets-bundler.md`. +- v5 SDKs use viem-style `bigint` for amounts (`fromAmount`, `minimumToAmount`). Raw JSON-RPC still uses `0x`-hex strings. +- Beta notices have been removed across the wallets section — Wallet APIs v5 is GA. + +## Primary Use Cases (Account Kit v4) +- Embedded wallet UX in web apps (signer-driven authentication). +- Email/social/passkey wallet creation. +- Signing flows that don't yet have a v5 equivalent. ## Integration Notes -- Typically used client-side with a wallet UI layer. - Pair with `wallets-gas-manager.md` for sponsored transactions. +- For v5 builds, route most "Account Kit"-shaped questions to `wallets-wallet-apis.md`. ## Gotchas & Edge Cases -- Ensure you store session/auth tokens securely. -- Keep wallet creation flows resilient to network errors. +- `aa-sdk` reference URLs on `main` now 404 — use the `v4.x.x` branch. +- Account Kit v4 has no Solana support; use v5 Wallet APIs for Solana. +- Mixing v4 and v5 packages in the same app is not supported. ## Related Files +- `wallets-wallet-apis.md` (v5 surface) - `wallets-smart-wallets.md` - `wallets-gas-manager.md` - `operational-auth-and-keys.md` @@ -37,3 +57,5 @@ Account Kit is Alchemy's wallet SDK for onboarding users and managing wallet UX. ## Official Docs - [Account Kit Core Reference](https://www.alchemy.com/docs/wallets/reference/account-kit/core) - [Intro to Account Kit](https://www.alchemy.com/docs/wallets/concepts/intro-to-account-kit) +- [v5 migration guide](https://www.alchemy.com/docs/wallets/resources/migration-v5) +- [aa-sdk v4.x.x branch](https://github.com/alchemyplatform/aa-sdk/tree/v4.x.x) — source of truth for v4 reference symbols. diff --git a/skills/alchemy-api/references/wallets-bundler.md b/skills/alchemy-api/references/wallets-bundler.md index a6974a8..bff30c3 100644 --- a/skills/alchemy-api/references/wallets-bundler.md +++ b/skills/alchemy-api/references/wallets-bundler.md @@ -8,7 +8,8 @@ tags: related: - wallets-smart-wallets.md - wallets-gas-manager.md -updated: 2026-04-22 + - wallets-wallet-apis.md +updated: 2026-05-27 --- # Bundler @@ -25,18 +26,42 @@ When configuring the bundler, ensure you target the correct EntryPoint version f ## Primary Use Cases - AA transaction submission via standard ERC-4337 JSON-RPC endpoints. - UserOperation lifecycle handling (submit, track, drop-and-replace). +- BSO (Bundler Sponsored Operations) for gas-free smart-account flows — see `wallets-gas-manager.md`. + +## v5 client SDK +Bundler APIs are available in `@alchemy/aa-infra` (v5; replaces `@account-kit/infra` from the v4 era). For higher-level abstractions, use `@alchemy/wallet-apis` (Wallet APIs v5). + +```ts +import { createAlchemySmartAccountClient } from "@alchemy/aa-infra"; +// pair with @alchemy/smart-accounts for the account factory +``` + +## BSO request shape +Bundler Sponsored Operations require **all three** gas fields zeroed (not just two): + +```ts +await bundlerClient.sendUserOperation({ + calls: [{ to, data, value }], + maxFeePerGas: 0n, + maxPriorityFeePerGas: 0n, + preVerificationGas: 0n, +}); +``` + +The `x-alchemy-policy-id` header goes on the bundler transport via `fetchOptions.headers` — no `createPaymasterClient` needed, BSO does not use a paymaster contract. If you forget `preVerificationGas`, the bundler returns `precheck failed: preVerificationGas too low`. ## Integration Notes - Ensure correct chain configuration and EntryPoint version. - Monitor bundler latency and failures. - Use `eth_getUserOperationByHash` to poll UserOp status; if still null after timeout, drop and replace with higher fees. - For `Replacement Underpriced` errors, increase both `maxFeePerGas` and `maxPriorityFeePerGas` by at least 10%. -- Bundler APIs are available in `@account-kit/infra`. For higher-level abstractions, use Wallet APIs or aa-sdk. ## Related Files - `wallets-smart-wallets.md` - `wallets-gas-manager.md` +- `wallets-wallet-apis.md` ## Official Docs -- [Bundler Overview](https://www.alchemy.com/docs/wallets/transactions/low-level-infra/bundler/overview) +- [Bundler Overview](https://www.alchemy.com/docs/wallets/low-level-infra/bundler/overview) +- [Bundler Sponsored Operations](https://www.alchemy.com/docs/wallets/bundler-api/bundler-sponsored-operations) - [Bundler FAQs](https://www.alchemy.com/docs/wallets/reference/bundler-faqs) diff --git a/skills/alchemy-api/references/wallets-gas-manager.md b/skills/alchemy-api/references/wallets-gas-manager.md index 02ca0ec..33e4e71 100644 --- a/skills/alchemy-api/references/wallets-gas-manager.md +++ b/skills/alchemy-api/references/wallets-gas-manager.md @@ -8,7 +8,8 @@ tags: related: - wallets-smart-wallets.md - wallets-bundler.md -updated: 2026-04-22 + - wallets-wallet-apis.md +updated: 2026-05-27 --- # Gas Manager @@ -19,14 +20,33 @@ Gas Manager (paymaster) enables gas sponsorship and cost control for smart walle - Gasless user onboarding. - Sponsoring specific methods or contracts. - ERC-20 token gas payments (pay gas with any supported token). -- BSO (Bundler Sponsorship) policies for EIP-7702 undelegation. +- BSO (Bundler Sponsorship) policies for EIP-7702 undelegation and other native-gas-free flows. + +## Live Source of Truth — Dashboard +The list of supported ERC-20 tokens and networks rotates more often than docs can keep up. Treat the **Tokens & Networks** panel of the [Gas Manager Dashboard](https://dashboard.alchemy.com/gas-manager) as the authoritative source for what's available right now. The published docs FAQ enumerates the same tokens but lags by a release or two. + +## ERC-20 Gas Payment Supported Networks +Native USDC/USDT/wETH coverage spans Ethereum mainnet/Sepolia, Arbitrum (Mainnet, Sepolia, **Nova**), Optimism, Base, Polygon, BNB, Celo, Worldchain, Stable mainnet, Stable testnet, and Monad testnet. Any token supported by Alchemy's [Token Prices By Address API](https://www.alchemy.com/docs/data/prices-api/prices-api-endpoints/prices-api-endpoints/get-token-prices-by-address) can be enabled via the [Admin API `create-policy`](https://www.alchemy.com/docs/wallets/api/gas-manager-admin-api/admin-api-endpoints/create-policy) endpoint even if it's not in the Dashboard preset list. + +For a token or network that isn't supported, contact `wallets@alchemy.com`. ## BSO Chain Support Bundler Sponsored Operations (BSOs) are a bundler feature and are supported on **every chain that has both bundler and gas sponsorship support**, with the exception of **MegaETH** (coming soon). Always confirm against the live [Wallet APIs supported chains](https://www.alchemy.com/docs/wallets/supported-chains) matrix before launch. -## Integration Notes -- Define strict sponsorship policies. -- Monitor for abuse and enforce caps. +### BSO request shape (triple-zero gas fields) +To opt into BSO on a user operation, set ALL THREE of `maxFeePerGas`, `maxPriorityFeePerGas`, **and** `preVerificationGas` to `0n` (client SDK) or `"0x0"` (raw JSON-RPC). The bundler treats triple-zero as the signal to cover gas under the BSO policy. The `x-alchemy-policy-id` header goes on the **bundler** transport (no `createPaymasterClient` — BSO does not use a paymaster contract). + +```ts +// v5 client SDK +await bundlerClient.sendUserOperation({ + calls: [{ to: "0x000000000000000000000000000000000000dEaD", data: "0x" }], + maxFeePerGas: 0n, + maxPriorityFeePerGas: 0n, + preVerificationGas: 0n, +}); +``` + +If you forget `preVerificationGas`, the bundler returns `precheck failed: preVerificationGas too low` (`-32000`). ## ERC-20 Token Gas Payment — Revert Risk When using **post-operation** mode for ERC-20 gas payments: @@ -35,10 +55,17 @@ When using **post-operation** mode for ERC-20 gas payments: - **Use post-operation** when operations are unlikely to revert (works with all ERC-20 tokens). - **Use pre-operation** when operations may revert — the token transfer happens before execution so the paymaster is always compensated. +## Integration Notes +- Define strict sponsorship policies. +- Monitor for abuse and enforce caps. + ## Related Files - `wallets-smart-wallets.md` - `wallets-bundler.md` +- `wallets-wallet-apis.md` ## Official Docs - [Gas Manager Admin API](https://www.alchemy.com/docs/wallets/low-level-infra/gas-manager/policy-management/api-endpoints) - [Pay Gas With Any Token](https://www.alchemy.com/docs/wallets/transactions/pay-gas-with-any-token) +- [Bundler Sponsored Operations](https://www.alchemy.com/docs/wallets/bundler-api/bundler-sponsored-operations) +- [Gas Manager FAQs](https://www.alchemy.com/docs/wallets/gas-manager-admin-api/gas-manager-faqs) diff --git a/skills/alchemy-api/references/wallets-solana-notes.md b/skills/alchemy-api/references/wallets-solana-notes.md index fa5ebfd..d3136f6 100644 --- a/skills/alchemy-api/references/wallets-solana-notes.md +++ b/skills/alchemy-api/references/wallets-solana-notes.md @@ -1,27 +1,44 @@ --- id: references/wallets-solana-notes.md name: 'Solana Wallet Notes' -description: 'Solana wallet integration differs from EVM. Use Solana-specific tooling and RPC semantics.' +description: 'Solana wallet integration via the v5 Wallet APIs (wallet_prepareCalls / wallet_sendPreparedCalls). Also covers Solana RPC and DAS routing.' tags: - alchemy - wallets + - solana related: + - wallets-wallet-apis.md - solana-rpc.md - solana-das-api.md -updated: 2026-02-05 +updated: 2026-05-27 --- # Solana Wallet Notes ## Summary -Solana wallet integration differs from EVM. Use Solana-specific tooling and RPC semantics. +Wallet APIs **v5** (GA) supports Solana alongside EVM via the same `wallet_prepareCalls` and `wallet_sendPreparedCalls` methods. The request schema is `anyOf`-shaped — same RPC endpoint, different fields based on whether you target EVM or Solana. Account Kit v4 has no Solana support; v5 Wallet APIs is the path. -## Guidance -- Use Solana JSON-RPC for account data and program interactions. -- Use DAS for NFT and compressed asset data. +## Request shape (Solana) +- `chainId` is CAIP-2: `"solana:mainnet"` or `"solana:devnet"`. +- `from` is a base58-encoded Solana address (32–44 chars). Validation rejects `0x`-style hex. +- Send `instructions` (an array of raw Solana instructions: `{ programId, accounts, data }`) instead of EVM's `calls`. +- Prepared response carries `type: "solana-transaction-v0"` (Solana v0 versioned transaction). EVM responses use `type: "user-operation-v0.7"` and similar. +- Sign the returned tx with the user's Solana keypair, then submit it back through `wallet_sendPreparedCalls`. + +## Routing +- Wallet onboarding + smart-account flows on Solana → `wallets-wallet-apis.md` (v5). +- Solana JSON-RPC (account data, transactions, signatures, block info) → `solana-rpc.md`. +- Solana NFT / compressed-asset / DAS data → `solana-das-api.md`. + +## Gotchas +- Don't mix CAIP-2 IDs and decimal `chainId` — Solana payloads MUST use `solana:`. +- The same Wallet API method namespace (`wallet_*`) handles both EVM and Solana; ensure your transport/headers (especially `x-alchemy-policy-id` for sponsorship) are correct for the network you're targeting. +- Sponsored gas on Solana is gated differently than EVM — confirm with Alchemy support if you need sponsored Solana flows. ## Related Files +- `wallets-wallet-apis.md` - `solana-rpc.md` - `solana-das-api.md` ## Official Docs +- [Wallet APIs Solana support](https://www.alchemy.com/docs/wallets/api/wallet-api-endpoints/wallet-prepare-calls) - [Solana API Quickstart](https://www.alchemy.com/docs/reference/solana-api-quickstart) diff --git a/skills/alchemy-api/references/wallets-supported-chains.md b/skills/alchemy-api/references/wallets-supported-chains.md index 2e3c13f..ad351a7 100644 --- a/skills/alchemy-api/references/wallets-supported-chains.md +++ b/skills/alchemy-api/references/wallets-supported-chains.md @@ -1,25 +1,41 @@ --- id: references/wallets-supported-chains.md name: 'Wallet Supported Chains' -description: 'Wallet tooling may support a subset of chains compared to raw RPC. Always confirm chain support before launch.' +description: 'Wallet tooling supports a different chain set than raw RPC. Confirm chain support against the live dashboard before launch.' tags: - alchemy - wallets related: + - wallets-gas-manager.md - operational-supported-networks.md -updated: 2026-02-05 +updated: 2026-05-27 --- # Wallet Supported Chains ## Summary -Wallet tooling may support a subset of chains compared to raw RPC. Always confirm chain support before launch. +Wallet tooling (Wallet APIs v5, bundler, paymaster, Gas Manager) supports a subset / superset of chains compared to raw RPC. Always confirm against live sources before launch. + +## Sources of truth +- [Wallet APIs supported chains matrix](https://www.alchemy.com/docs/wallets/supported-chains) — chain-by-chain capability axes (bundler, paymaster, ERC-20 gas payments, BSOs). +- **Tokens & Networks** panel of the [Gas Manager Dashboard](https://dashboard.alchemy.com/gas-manager) — authoritative live list of which networks have ERC-20 gas payments enabled and which tokens are preset. +- For tokens that aren't preset, the Admin API can enable any token supported by Alchemy's [Token Prices By Address API](https://www.alchemy.com/docs/data/prices-api/prices-api-endpoints/prices-api-endpoints/get-token-prices-by-address). + +## Recently added wallet chains (capability axis) +- **Arbitrum Nova** — re-added to the ERC-20 paymaster supported list. +- **BNB Smart Chain** — ERC-20 gas payments (USDC, DAI). +- **Celo** — ERC-20 gas payments (USDC, USDT, CELO). +- **Stable mainnet / testnet** — ERC-20 gas payments (USDT0). + +These additions don't replace the docs/dashboard matrix — check there before assuming a chain × capability cell is live. ## Guidance -- Check Alchemy dashboard for wallet-specific chain availability. - Test on testnet before enabling production. +- A chain having bundler ≠ that chain having gas sponsorship. Cross-reference both columns. ## Related Files +- `wallets-gas-manager.md` - `operational-supported-networks.md` ## Official Docs -- [Supported Chains](https://www.alchemy.com/docs/reference/node-supported-chains) +- [Wallet APIs supported chains](https://www.alchemy.com/docs/wallets/supported-chains) +- [Supported Networks (RPC)](https://www.alchemy.com/docs/reference/node-supported-chains) diff --git a/skills/alchemy-api/references/wallets-wallet-apis.md b/skills/alchemy-api/references/wallets-wallet-apis.md index abcf9c0..fef1ccf 100644 --- a/skills/alchemy-api/references/wallets-wallet-apis.md +++ b/skills/alchemy-api/references/wallets-wallet-apis.md @@ -8,17 +8,43 @@ tags: related: - wallets-account-kit.md - operational-auth-and-keys.md -updated: 2026-04-22 +updated: 2026-05-27 --- # Wallet APIs ## Summary -High-level wallet APIs enable programmatic wallet operations such as signing, transaction preparation, account management, and EIP-7702 delegation/undelegation. This guide stays minimal and focuses on integration awareness. +High-level wallet APIs (Wallet APIs **v5**, GA) enable programmatic wallet operations: signing, transaction preparation, account management, EIP-7702 delegation/undelegation, and (new in v5) Solana transactions. This is the recommended stack for new builds; Account Kit v4 stays for signer-only flows. See `wallets-account-kit.md` for v4 vs v5 routing. ## Primary Use Cases -- Server-side transaction preparation. +- Server-side transaction preparation (EVM and Solana). - Delegated signing or session-based flows (including existing session keys — see [Legacy session keys with Wallet APIs](https://www.alchemy.com/docs/wallets/smart-wallets/session-keys/legacy-session-keys) for migrating pre-existing session-key setups). - EIP-7702 account delegation and undelegation. +- Cross-chain swaps and ERC-20 gas payments via `wallet_prepareCalls` capabilities. + +## v5 SDK package surface +The v5 stack lives under the `@alchemy/*` scope. Common imports: + +| Package | Use | +|---|---| +| `@alchemy/wallet-apis` | High-level client SDK (`createWalletClient`, `prepareCalls`, `sendPreparedCalls`). | +| `@alchemy/smart-accounts` | MAv2 / Light Account / smart contract account factories. | +| `@alchemy/aa-infra` | Low-level bundler client; replaces `@account-kit/infra`. | +| `viem` | Underlying chain primitives (`parseEther`, `parseUnits`, `bigint` helpers). | + +## Solana support +`wallet_prepareCalls` and `wallet_sendPreparedCalls` accept Solana payloads alongside EVM via an `anyOf` schema: + +- `chainId` uses CAIP-2 form: `"solana:mainnet"` (mainnet) or `"solana:devnet"` (devnet). +- `from` is a base58-encoded Solana address (32–44 chars), not a `0x` hex string. +- The prepared transaction is returned with `type: "solana-transaction-v0"` (Solana v0 versioned transaction). EVM responses still use `type: "user-operation-v0.7"` etc. +- Sign the returned tx with the user's Solana keypair, then submit it back through `wallet_sendPreparedCalls`. +- Request shape: a single positional object with `calls` (EVM) **or** `instructions` (Solana, an array of raw Solana instructions); the call's `to`/`from`/encoding fields and the response shape are gated on whether you sent EVM or Solana inputs. + +## Encoding: bigint vs hex +- **Client SDK (`@alchemy/wallet-apis` v5)**: takes `bigint` for amount fields like `fromAmount`, `minimumToAmount`, `value`. Use viem helpers: `parseEther("1.5")`, `parseUnits("100", 6)`. +- **Raw JSON-RPC**: amounts and gas fields are `0x`-prefixed hex strings (e.g., `"value": "0x16345785d8a0000"`). + +If you see `expected bigint, got string`, you're passing a hex string to the SDK — convert via `BigInt(hex)` or use viem helpers. ## EIP-7702 Undelegation Undelegation removes smart contract delegation from an EIP-7702 account by delegating to the zero address (`0x0000...0000`), restoring it to a plain EOA. Key details: @@ -54,7 +80,9 @@ When users report Wallet API failures, check for these common error patterns: **Key pattern:** Most `precheck failed` errors (-32000) resolve by re-preparing the call immediately before sending — minimize delay between `wallet_prepareCalls` and `wallet_sendPreparedCalls`. ## Related Files -- `wallets-account-kit.md` +- `wallets-account-kit.md` (v4 vs v5 routing) +- `wallets-solana-notes.md` +- `wallets-gas-manager.md` - `operational-auth-and-keys.md` ## Official Docs @@ -62,3 +90,4 @@ When users report Wallet API failures, check for these common error patterns: - [Wallet API Errors](https://www.alchemy.com/docs/wallets/troubleshooting/wallet-apis-errors) - [Legacy session keys with Wallet APIs](https://www.alchemy.com/docs/wallets/smart-wallets/session-keys/legacy-session-keys) — use existing session keys with Wallet APIs. - [v5 migration guide](https://www.alchemy.com/docs/wallets/resources/migration-v5) +- [Swap Tokens (v5)](https://www.alchemy.com/docs/wallets/transactions/swap-tokens) — bigint amount conventions for the client SDK.