` elements must have `display: "flex"` or `display: "none"`. If you see a 500 error when accessing `/share/[username]`, check your ImageResponse JSX structure.
-
-
-
-
-Build a page route that uses the username to generate `fc:miniapp` metadata pointing to your image endpoint.
-
-```tsx lines expandable wrap app/share/[username]/page.tsx
-import { minikitConfig } from "../../../minikit.config";
-import { Metadata } from "next";
-
-export async function generateMetadata(
- { params }: { params: Promise<{ username: string }> }
-): Promise {
- try {
- const { username } = await params;
-
- return {
- title: minikitConfig.miniapp.name,
- description: minikitConfig.miniapp.description,
- other: {
- "fc:miniapp": JSON.stringify({
- version: minikitConfig.miniapp.version,
- imageUrl: `${minikitConfig.miniapp.homeUrl}/api/og/${username}`,
- button: {
- title: `Join the ${minikitConfig.miniapp.name} Waitlist`,
- action: {
- name: `Launch ${minikitConfig.miniapp.name}`,
- type: "launch_miniapp",
- url: `${minikitConfig.miniapp.homeUrl}`,
- },
- },
- }),
- },
- };
- } catch (e) {
- const errorMessage = e instanceof Error ? e.message : 'Unknown error';
- console.log(JSON.stringify({
- timestamp: new Date().toISOString(),
- level: 'error',
- message: 'Failed to generate metadata',
- error: errorMessage
- }));
-
- return {
- title: minikitConfig.miniapp.name,
- description: minikitConfig.miniapp.description,
- };
- }
-}
-
-export default async function SharePage(
- { params }: { params: Promise<{ username: string }> }
-) {
- const { username } = await params;
-
- return (
-
-
Share Page - {username}
-
- );
-}
-```
-When someone visits `/share/alice`, the metadata points to `/api/og/alice` for the embed image.
-
-
-
-Create a button that opens Farcaster's compose window with the user's personalized share link.
-
-```tsx lines expandable wrap app/page.tsx highlight={6, 9-15}
-import { useMiniKit, useComposeCast } from "@coinbase/onchainkit/minikit";
-import { minikitConfig } from "./minikit.config";
-
-export default function HomePage() {
- const { context } = useMiniKit();
- const { composeCast } = useComposeCast();
-
-
- const handleShareApp = () => {
- const userName = context?.user?.displayName || 'anonymous';
- composeCast({
- text: `Check out ${minikitConfig.miniapp.name}!`,
- embeds: [`${window.location.origin}/share/${userName}`]
- });
- };
-
- return (
-
-
-
- );
-}
-```
-
-When you click the button, it opens the compose window with `/share/alice` as the embed. The embed displays the dynamic image from `/api/og/alice`.
-
-
-
-Verify the complete sharing flow works.
-
-```bash lines wrap
-# Start your app
-npm run dev
-
-# Test the image endpoint directly
-curl http://localhost:3000/api/og/testuser > test.png
-open test.png
-
-# Visit the share page to verify metadata
-curl http://localhost:3000/share/testuser | grep "fc:miniapp"
-```
-
-Click the share button in your app to test the full experience. You should see the compose window open with your personalized share link, and the embed should display your custom generated image.
-
-
-
-## Related Concepts
-
-
-
- Troubleshooting tips for embeds not displaying.
-
-
diff --git a/docs/mini-apps/technical-guides/sharing-and-social-graph.mdx b/docs/mini-apps/technical-guides/sharing-and-social-graph.mdx
index f24ea5352..91e88f844 100644
--- a/docs/mini-apps/technical-guides/sharing-and-social-graph.mdx
+++ b/docs/mini-apps/technical-guides/sharing-and-social-graph.mdx
@@ -14,7 +14,7 @@ export default function ComposeCastButton() {
const { composeCast } = useComposeCast();
const handleCompose = () => {
- composeCast({ text: 'Just minted an awesome NFT using @coinbase OnchainKit!' });
+ composeCast({ text: 'Just minted an awesome NFT!' });
};
const handleComposeWithEmbed = () => {
@@ -42,8 +42,8 @@ Strategic sharing moments include: post‑achievement, post‑mint, after beatin
Link users into casts and profiles directly from your app via MiniKit hooks.
-
-
+
+
## Best Practices
diff --git a/docs/mini-apps/troubleshooting/base-app-compatibility.mdx b/docs/mini-apps/troubleshooting/base-app-compatibility.mdx
index be190c1d5..9d555fa2d 100644
--- a/docs/mini-apps/troubleshooting/base-app-compatibility.mdx
+++ b/docs/mini-apps/troubleshooting/base-app-compatibility.mdx
@@ -29,17 +29,16 @@ Base App is working towards full compatibility with the Farcaster Mini App SDK.
To detect if the app is running in the Base App, you can use the `clientFid` property of the `context` object.
```tsx App.tsx
-import { useMiniKit } from '@coinbase/onchainkit/minikit';
+import { sdk } from '@farcaster/miniapp-sdk';
function MyComponent() {
- const { context } = useMiniKit();
- const isBaseApp = context.client.clientFid === 309857;
+ const isBaseApp = sdk.context.client.clientFid === 309857;
if (isBaseApp) {
// Use Base App-specific features
console.log('Running in Base App');
}
-
+
return
{/* Your component */}
;
}
```
diff --git a/docs/mini-apps/troubleshooting/common-issues.mdx b/docs/mini-apps/troubleshooting/common-issues.mdx
index 8929ea8fc..95f3a9703 100644
--- a/docs/mini-apps/troubleshooting/common-issues.mdx
+++ b/docs/mini-apps/troubleshooting/common-issues.mdx
@@ -112,7 +112,7 @@ Solution: Use `name="fc:miniapp"` meta tag in `` and validate using the Em
### 4. Wallet Connection Problems
-Always use the user's connected wallet for optimal experience. You can do this either by using [OnchainKit's Wallet component](/onchainkit/wallet/wallet) or Wagmi hooks. Below is a Wagmi hook example:
+Always use the user's connected wallet for optimal experience. You can do this using Wagmi hooks. Below is an example:
```tsx App.tsx
import { useAccount } from 'wagmi';
diff --git a/docs/onchainkit/api/build-deposit-to-morpho-tx.mdx b/docs/onchainkit/api/build-deposit-to-morpho-tx.mdx
deleted file mode 100644
index d533a0924..000000000
--- a/docs/onchainkit/api/build-deposit-to-morpho-tx.mdx
+++ /dev/null
@@ -1,28 +0,0 @@
----
-title: buildDepositToMorphoTx
----
-
-
-The `buildDepositToMorphoTx` function is used to build [Calls](/onchainkit/transaction/types#calls) for depositing an asset to Morpho. These calls can be passed the `
` component to send a transaction.
-
-## Usage
-
-```tsx code
-import { buildDepositToMorphoTx } from '@coinbase/onchainkit/earn';
-
-const calls = await buildDepositToMorphoTx({
- vaultAddress: '0x...', // Morpho vault address on Base
- tokenAddress: '0x...', // Address of the token to deposit
- amount: 1000000000000000000n, // Amount of tokens to deposit
- recipientAddress: '0x...', // Address of the recipient
-});
-```
-
-## Returns
-
-[`Call[]`](/onchainkit/transaction/types#calls)
-
-## Parameters
-
-[`DepositToMorphoParams`](/onchainkit/earn/types#deposittomorphoparams)
-
diff --git a/docs/onchainkit/api/build-mint-transaction.mdx b/docs/onchainkit/api/build-mint-transaction.mdx
deleted file mode 100644
index 6c80cb2d3..000000000
--- a/docs/onchainkit/api/build-mint-transaction.mdx
+++ /dev/null
@@ -1,51 +0,0 @@
----
-title: buildMintTransaction
-openapi: post /BuildMintTransaction
----
-
-
-The `buildMintTransaction` function is used to get an unsigned transaction for minting an NFT.
-
-Before using them, make sure to obtain a [Client API Key](https://portal.cdp.coinbase.com/projects/api-keys/client-key) from Coinbase Developer Platform.
-
-{/* ## Usage */}
-
-{/*
-```tsx code
-import { setOnchainKitConfig } from '@coinbase/onchainkit';
-import { buildMintTransaction } from '@coinbase/onchainkit/api';
-
-const response = await buildMintTransaction({
- mintAddress: '0x...',
- takerAddress: '0x...',
- tokenId: '1',
- quantity: 1,
- network: 'networks/base-mainnet',
-});
-```
-
-```json return value
-{
- "call_data": {
- "from": "0x...",
- "to": "0x...",
- "data": "0x...",
- "value": "0x000000000001"
- }
-}
-```
- */}
-
-## Returns
-
-[`Promise
`](/onchainkit/api/types#buildminttransactionresponse)
-
-## Parameters
-
-[`BuildMintTransactionParams`](/onchainkit/api/types#buildminttransactionparams)
-
-## Types
-
-- [`BuildMintTransactionResponse`](/onchainkit/api/types#buildminttransactionresponse)
-- [`BuildMintTransactionParams`](/onchainkit/api/types#buildminttransactionparams)
-
diff --git a/docs/onchainkit/api/build-swap-transaction.mdx b/docs/onchainkit/api/build-swap-transaction.mdx
deleted file mode 100644
index cf6a73454..000000000
--- a/docs/onchainkit/api/build-swap-transaction.mdx
+++ /dev/null
@@ -1,132 +0,0 @@
----
-title: buildSwapTransaction
-openapi: post /buildSwapTransaction
----
-
-
-The `buildSwapTransaction` function is used to get an unsigned transaction for a swap between two Tokens.
-
-Before using this function, make sure to obtain a [Client API Key](https://portal.cdp.coinbase.com/projects/api-keys/client-key) from Coinbase Developer Platform.
-
-{/* ## Usage */}
-
-{/*
-```tsx code
-import { setOnchainKitConfig } from '@coinbase/onchainkit';
-import { buildSwapTransaction } from '@coinbase/onchainkit/api';
-import type { Token } from '@coinbase/onchainkit/token';
-
-setOnchainKitConfig({ apiKey: 'YOUR_API_KEY' });
-
-const fromToken: Token = {
- name: 'ETH',
- address: '',
- symbol: 'ETH',
- decimals: 18,
- image: 'https://wallet-api-production.s3.amazonaws.com/uploads/tokens/eth_288.png',
- chainId: 8453,
-};
-
-const toToken: Token = {
- name: 'USDC',
- address: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913',
- symbol: 'USDC',
- decimals: 6,
- image:
- 'https://d3r81g40ycuhqg.cloudfront.net/wallet/wais/44/2b/442b80bd16af0c0d9b22e03a16753823fe826e5bfd457292b55fa0ba8c1ba213-ZWUzYjJmZGUtMDYxNy00NDcyLTg0NjQtMWI4OGEwYjBiODE2',
- chainId: 8453,
-};
-
-const response = await buildSwapTransaction({
- fromAddress: '0x...',
- from: fromToken,
- to: toToken,
- amount: '0.1',
- useAggregator: false,
-});
-```
-
-```json return value
-{
- "approveTransaction": {
- "chainId": 8453,
- "data": "",
- "gas": 0,
- "to": "",
- "value": 0
- },
- "fee": {
- "baseAsset": {
- "name": "USDC",
- "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
- "currencyCode": "USDC",
- "decimals": 6,
- "imageURL": "https://d3r81g40ycuhqg.cloudfront.net/wallet/wais/44/2b/442b80bd16af0c0d9b22e03a16753823fe826e5bfd457292b55fa0ba8c1ba213-ZWUzYjJmZGUtMDYxNy00NDcyLTg0NjQtMWI4OGEwYjBiODE2",
- "blockchain": "eth",
- "aggregators": [Array],
- "swappable": true,
- "unverified": false,
- "chainId": 8453
- },
- "percentage": "1",
- "amount": "3517825"
- },
- "quote": {
- "from": {
- "address": "",
- "chainId": 8453,
- "decimals": 18,
- "image": "https://wallet-api-production.s3.amazonaws.com/uploads/tokens/eth_288.png",
- "name": "ETH",
- "symbol": "ETH"
- },
- "to": {
- "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
- "chainId": 8453,
- "decimals": 6,
- "image": "https://d3r81g40ycuhqg.cloudfront.net/wallet/wais/44/2b/442b80bd16af0c0d9b22e03a16753823fe826e5bfd457292b55fa0ba8c1ba213-ZWUzYjJmZGUtMDYxNy00NDcyLTg0NjQtMWI4OGEwYjBiODE2",
- "name": "USDC",
- "symbol": "USDC"
- },
- "fromAmount": "100000000000000000",
- "toAmount": "348264739",
- "amountReference": "from",
- "priceImpact": "",
- "chainId": 8453,
- "highPriceImpact": false,
- "slippage": "3",
- "warning": {
- "type": "warning",
- "message": "This transaction has a very high likelihood of failing if submitted",
- "description": "failed with 500000000 gas: insufficient funds for gas * price + value: address 0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed have 0 want 100000000000000000"
- }
- },
- "transaction": {
- "chainId": 8453,
- "data": "0x...",
- "gas": 419661,
- "to": "0xdef1c0ded9bec7f1a1670819833240f027b25eff",
- "value": 100000000000000000
- },
- "warning": {
- "type": "warning",
- "message": "This transaction has a very high likelihood of failing if submitted",
- "description": "failed with 500000000 gas: insufficient funds for gas * price + value: address 0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed have 0 want 100000000000000000"
- }
-}
-```
- */}
-
-## Returns
-
-[`Promise`](/onchainkit/api/types#buildswaptransactionresponse)
-
-## Parameters
-
-[`BuildSwapTransactionParams`](/onchainkit/api/types#buildswaptransactionparams)
-
-## Types
-
-- [`BuildSwapTransactionResponse`](/onchainkit/api/types#buildswaptransactionresponse)
-- [`BuildSwapTransactionParams`](/onchainkit/api/types#buildswaptransactionparams)
-
diff --git a/docs/onchainkit/api/build-withdraw-from-morpho-tx.mdx b/docs/onchainkit/api/build-withdraw-from-morpho-tx.mdx
deleted file mode 100644
index f540d5e45..000000000
--- a/docs/onchainkit/api/build-withdraw-from-morpho-tx.mdx
+++ /dev/null
@@ -1,28 +0,0 @@
----
-title: buildWithdrawFromMorphoTx
----
-
-
-The `buildWithdrawFromMorphoTx` function is used to build [Calls](/onchainkit/transaction/types#calls) for withdrawing an asset from Morpho. These calls can be passed the `` component to send a transaction.
-
-## Usage
-
-```tsx code
-import { buildWithdrawFromMorphoTx } from '@coinbase/onchainkit/earn';
-
-const calls = await buildWithdrawFromMorphoTx({
- vaultAddress: '0x...', // Morpho vault address on Base
- amount: 1000000000000000000n, // Amount of tokens to withdraw
- recipientAddress: '0x...', // Address of the recipient
-});
-```
-
-
-## Returns
-
-[`Call[]`](/onchainkit/transaction/types#calls)
-
-## Parameters
-
-[`WithdrawFromMorphoParams`](/onchainkit/earn/types#withdrawfrommorphoparams)
-
diff --git a/docs/onchainkit/api/get-mint-details.mdx b/docs/onchainkit/api/get-mint-details.mdx
deleted file mode 100644
index 5c92adb4b..000000000
--- a/docs/onchainkit/api/get-mint-details.mdx
+++ /dev/null
@@ -1,65 +0,0 @@
----
-title: getMintDetails
-openapi: get /getMintDetails
----
-
-
-The `getMintDetails` function returns data required to view an NFT to be minted
-
-Before using them, make sure to obtain a [Client API Key](https://portal.cdp.coinbase.com/projects/api-keys/client-key) from Coinbase Developer Platform.
-
-{/* ## Usage
-
-
-```tsx code
-import { setOnchainKitConfig } from '@coinbase/onchainkit';
-import { getMintDetails } from '@coinbase/onchainkit/api';
-
-const response = await getMintDetails({
- contractAddress: '0x...',
- takerAddress: '0x...',
- tokenId: '1',
-});
-```
-
-```json return value
-{
- "name": "NFT Name",
- "description": "NFT description",
- "imageUrl": "https://example.com/image.png",
- "animationUrl": "",
- "mimeType": "image/png",
- "contractType": "ERC721",
- "price": {
- "amount": "0.0001",
- "currency": "ETH",
- "amountUSD": "0.242271"
- },
- "mintFee": {
- "amount": "0",
- "currency": "ETH",
- "amountUSD": "0"
- },
- "maxMintsPerWallet": 100,
- "isEligibleToMint": true,
- "creatorAddress": "0x...",
- "network": "",
- "totalTokens": "300",
- "totalOwners": "200"
-}
-```
- */}
-
-## Returns
-
-[`Promise`](/onchainkit/api/types#getmintdetailsresponse)
-
-## Parameters
-
-[`GetMintDetailsParams`](/onchainkit/api/types#getmintdetailsparams)
-
-## Types
-
-- [`GetMintDetailsResponse`](/onchainkit/api/types#getmintdetailsresponse)
-- [`GetMintDetailsParams`](/onchainkit/api/types#getmintdetailsparams)
-
diff --git a/docs/onchainkit/api/get-portfolios.mdx b/docs/onchainkit/api/get-portfolios.mdx
deleted file mode 100644
index 23a27a1fa..000000000
--- a/docs/onchainkit/api/get-portfolios.mdx
+++ /dev/null
@@ -1,63 +0,0 @@
----
-title: getPortfolios
-openapi: get /getPortfolios
----
-
-
-The `getPortfolios` function returns an object containing an array of
-portfolios for the provided addresses. Each portfolio is an object with the address
-of the wallet, the fiat value of the portfolio, and an array of tokens held by the
-provided address.
-
-
-Before using this endpoint, make sure to obtain a [Client API Key](https://portal.cdp.coinbase.com/projects/api-keys/client-key)
-from Coinbase Developer Platform.
-
-
-
-
-Please note: `getPortfolios` is only available for Base mainnet and Ethereum mainnet.
-You can control the network in the `OnchainKitProvider` by setting the `chain` prop.
-
-
-
-{/* ## Usage
-
-
-```tsx code
-import { setOnchainKitConfig } from '@coinbase/onchainkit';
-import { getPortfolios } from '@coinbase/onchainkit/api';
-
-const response = await getPortfolios({
- addresses: ['0x...'],
-});
-```
-
-```json return value
- "portfolios": [
- {
- "address": "0x...",
- "portfolioBalanceInUsd": 100,
- "tokenBalances": [{
- "address": "0x...",
- "chainId": 1,
- "decimals": 18,
- "image": "https://example.com/image.png",
- "name": "Token Name",
- "symbol": "TKN",
- "cryptoBalance": 10,
- "fiatBalance": 100
- }]
- }
- ]
-```
- */}
-
-## Returns
-
-[`Promise`](/onchainkit/api/types#getportfoliosresponse)
-
-## Parameters
-
-[`GetPortfoliosParams`](/onchainkit/api/types#getportfoliosparams)
-
diff --git a/docs/onchainkit/api/get-swap-quote.mdx b/docs/onchainkit/api/get-swap-quote.mdx
deleted file mode 100644
index a8cc651e8..000000000
--- a/docs/onchainkit/api/get-swap-quote.mdx
+++ /dev/null
@@ -1,93 +0,0 @@
----
-title: getSwapQuote
-openapi: get /getSwapQuote
----
-
-
-The `getSwapQuote` function is used to get a quote for a swap between two Tokens.
-
-Before using them, make sure to obtain a [Client API Key](https://portal.cdp.coinbase.com/projects/api-keys/client-key) from Coinbase Developer Platform.
-
-{/* ## Usage
-
-
-```tsx code
-import { setOnchainKitConfig } from '@coinbase/onchainkit';
-import { getSwapQuote } from '@coinbase/onchainkit/api';
-import type { Token } from '@coinbase/onchainkit/token';
-
-setOnchainKitConfig({ apiKey: 'YOUR_API_KEY' });
-
-const fromToken: Token = {
- name: 'ETH',
- address: '',
- symbol: 'ETH',
- decimals: 18,
- image: 'https://wallet-api-production.s3.amazonaws.com/uploads/tokens/eth_288.png',
- chainId: 8453,
-};
-
-const toToken: Token = {
- name: 'USDC',
- address: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913',
- symbol: 'USDC',
- decimals: 6,
- image:
- 'https://d3r81g40ycuhqg.cloudfront.net/wallet/wais/44/2b/442b80bd16af0c0d9b22e03a16753823fe826e5bfd457292b55fa0ba8c1ba213-ZWUzYjJmZGUtMDYxNy00NDcyLTg0NjQtMWI4OGEwYjBiODE2',
- chainId: 8453,
-};
-
-const quote = await getSwapQuote({
- from: fromToken,
- to: toToken,
- amount: '0.001',
- useAggregator: false,
-});
-```
-
-```json return value
-{
- "amountReference": "from",
- "chainId": 8453,
- "from": {
- "address": "",
- "chainId": 8453,
- "decimals": 18,
- "image": "https://wallet-api-production.s3.amazonaws.com/uploads/tokens/eth_288.png",
- "name": "ETH",
- "symbol": "ETH"
- },
- "to": {
- "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
- "chainId": 8453,
- "decimals": 6,
- "image": "https://d3r81g40ycuhqg.cloudfront.net/wallet/wais/…-ZWUzYjJmZGUtMDYxNy00NDcyLTg0NjQtMWI4OGEwYjBiODE2",
- "name": "USDC",
- "symbol": "USDC"
- },
- "fromAmount": "1000000000000000",
- "fromAmountUSD": "2.6519265340000002",
- "toAmount": "2650405",
- "toAmountUSD": "2.64980125",
- "amountReference": "from",
- "priceImpact": "0",
- "chainId": 8453,
- "highPriceImpact": false,
- "slippage": "3"
-}
-```
- */}
-
-## Returns
-
-[`Promise`](/onchainkit/api/types#getswapquoteresponse)
-
-## Parameters
-
-[`GetSwapQuoteParams`](/onchainkit/api/types#getswapquoteparams)
-
-## Types
-
-- [`GetSwapQuoteResponse`](/onchainkit/api/types#getswapquoteresponse)
-- [`GetSwapQuoteParams`](/onchainkit/api/types#getswapquoteparams)
-
diff --git a/docs/onchainkit/api/get-token-details.mdx b/docs/onchainkit/api/get-token-details.mdx
deleted file mode 100644
index 442ce2e87..000000000
--- a/docs/onchainkit/api/get-token-details.mdx
+++ /dev/null
@@ -1,54 +0,0 @@
----
-title: getTokenDetails
-openapi: get /getTokenDetails
----
-
-
-The `getTokenDetails` function returns data required to view an NFT
-
-Before using them, make sure to obtain a [Client API Key](https://portal.cdp.coinbase.com/projects/api-keys/client-key) from Coinbase Developer Platform.
-
-{/* ## Usage */}
-
-{/*
-```tsx code
-import { setOnchainKitConfig } from '@coinbase/onchainkit';
-import { getTokenDetails } from '@coinbase/onchainkit/api';
-
-const response = await getTokenDetails({
- contractAddress: '0x...',
- tokenId: '1',
-});
-```
-
-```json return value
- "collectionName": "NFT Collection Name",
- "collectionDescription": "NFT Collection Description",
- "name": "NFT Name",
- "description": "NFT Description",
- "imageUrl": "https://example.com/image.png",
- "animationUrl": "",
- "ownerAddress": "0x...",
- "lastSoldPrice": {
- "amount": "0.0001",
- "currency": "ETH",
- "amountUSD": "0.242271"
- },
- "mimeType": "image/png",
- "contractType": "ERC721"
-```
- */}
-
-## Returns
-
-[`Promise`](/onchainkit/api/types#gettokendetailsresponse)
-
-## Parameters
-
-[`GetTokenDetailsParams`](/onchainkit/api/types#gettokendetailsparams)
-
-## Types
-
-- [`GetTokenDetailsResponse`](/onchainkit/api/types#gettokendetailsresponse)
-- [`GetTokenDetailsParams`](/onchainkit/api/types#gettokendetailsparams)
-
diff --git a/docs/onchainkit/api/get-tokens.mdx b/docs/onchainkit/api/get-tokens.mdx
deleted file mode 100644
index 9f6dcb32d..000000000
--- a/docs/onchainkit/api/get-tokens.mdx
+++ /dev/null
@@ -1,109 +0,0 @@
----
-title: getTokens
-openapi: get /getTokens
----
-
-
-The `getTokens` function retrieves a list of tokens on Base by searching for the name, symbol, or address of a token.
-
-Before using them, make sure to obtain a [Client API Key](https://portal.cdp.coinbase.com/projects/api-keys/client-key) from Coinbase Developer Platform.
-
-{/* ## Usage
-
-Search by symbol
-
-
-```tsx code
-import { setOnchainKitConfig } from '@coinbase/onchainkit';
-import { getTokens } from '@coinbase/onchainkit/api'; // [!code focus]
-
-setOnchainKitConfig({ apiKey: 'YOUR_API_KEY' });
-
-const tokens = await getTokens({ limit: '1', search: 'degen' }); // [!code focus]
-```
-
-```ts return value
-[
- {
- address: '0x4ed4e862860bed51a9570b96d89af5e1b0efefed',
- chainId: 8453,
- decimals: 18,
- image:
- 'https://d3r81g40ycuhqg.cloudfront.net/wallet/wais/3b/bf/3bbf118b5e6dc2f9e7fc607a6e7526647b4ba8f0bea87125f971446d57b296d2-MDNmNjY0MmEtNGFiZi00N2I0LWIwMTItMDUyMzg2ZDZhMWNm',
- name: 'DEGEN',
- symbol: 'DEGEN',
- },
-];
-```
-
-
-Search by name
-
-
-```tsx code
-import { setOnchainKitConfig } from '@coinbase/onchainkit';
-import { getTokens } from '@coinbase/onchainkit/api'; // [!code focus]
-
-setOnchainKitConfig({ apiKey: 'YOUR_API_KEY' });
-
-const tokens = await getTokens({ limit: '1', search: 'Wrapped Ether' }); // [!code focus]
-```
-
-```ts return value
-[
- {
- address: '0x4200000000000000000000000000000000000006',
- chainId: 8453,
- decimals: 18,
- image:
- 'https://d3r81g40ycuhqg.cloudfront.net/wallet/wais/47/bc/47bc3593c2dec7c846b66b7ba5f6fa6bd69ec34f8ebb931f2a43072e5aaac7a8-YmUwNmRjZDUtMjczYy00NDFiLWJhZDUtMzgwNjFmYWM0Njkx',
- name: 'Wrapped Ether',
- symbol: 'WETH',
- },
-];
-```
-
-
-Search by address
-
-
-```tsx code
-import { setOnchainKitConfig } from '@coinbase/onchainkit';
-import { getTokens } from '@coinbase/onchainkit/api'; // [!code focus]
-
-setOnchainKitConfig({ apiKey: 'YOUR_API_KEY' });
-
-const tokens = await getTokens({
- limit: '1',
- search: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913',
-}); // [!code focus]
-```
-
-```ts return value
-[
- {
- address: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913',
- chainId: 8453,
- decimals: 6,
- image:
- 'https://d3r81g40ycuhqg.cloudfront.net/wallet/wais/44/2b/442b80bd16af0c0d9b22e03a16753823fe826e5bfd457292b55fa0ba8c1ba213-ZWUzYjJmZGUtMDYxNy00NDcyLTg0NjQtMWI4OGEwYjBiODE2',
- name: 'USDC',
- symbol: 'USDC',
- },
-];
-```
- */}
-
-## Returns
-
-[`Promise`](/onchainkit/api/types#gettokensresponse)
-
-## Parameters
-
-[`GetTokensOptions`](/onchainkit/api/types#gettokensoptions)
-
-## Types
-
-- [`GetTokensResponse`](/onchainkit/api/types#gettokensresponse)
-- [`GetTokensOptions`](/onchainkit/api/types#gettokensoptions)
-
diff --git a/docs/onchainkit/api/types.mdx b/docs/onchainkit/api/types.mdx
deleted file mode 100644
index 7b53fdd34..000000000
--- a/docs/onchainkit/api/types.mdx
+++ /dev/null
@@ -1,159 +0,0 @@
----
-title: API types
-sidebarTitle: API
-description: Glossary of Types in APIs.
----
-
-## `APIError`
-
-```ts
-type APIError = {
- code: string; // The Error code
- error: string; // The Error long message
- message: string; // The Error short message
-};
-```
-
-## `BuildPayTransactionParams`
-
-```ts
-type BuildPayTransactionParams = {
- address: Address; // The address of the wallet paying
- chainId: number; // The Chain ID of the payment Network (only Base is supported)
- chargeId: string; // The ID of the Commerce Charge to be paid
-};
-```
-
-## `BuildPayTransactionResponse`
-
-```ts
-type BuildPayTransactionResponse = PayTransaction | APIError;
-```
-
-## `BuildSwapTransaction`
-
-```ts
-type BuildSwapTransaction = {
- approveTransaction?: Transaction; // ERC20 approve transaction which allows token holders to authorize spending
- fee: Fee; // The fee for the swap
- quote: SwapQuote; // The quote for the swap
- transaction: Transaction; // The object developers should pass into Wagmi's signTransaction
- warning?: QuoteWarning; // The warning associated with the swap
-};
-```
-
-## `BuildSwapTransactionParams`
-
-```ts
-type BuildSwapTransactionParams = GetSwapQuoteParams & {
- fromAddress: Address; // The address of the user
-};
-```
-
-## `BuildSwapTransactionResponse`
-
-```ts
-type BuildSwapTransactionResponse = BuildSwapTransaction | APIError;
-```
-
-## `GetSwapQuoteParams`
-
-```ts
-type GetSwapQuoteParams = {
- amount: string; // The amount to be swapped
- amountReference?: string; // The reference amount for the swap
- from: Token; // The source token for the swap
- isAmountInDecimals?: boolean; // Whether the amount is in decimals
- maxSlippage?: string; // The slippage of the swap
- to: Token; // The destination token for the swap
- useAggregator: boolean; // Whether to use a DEX aggregator
-};
-```
-
-## `GetSwapQuoteResponse`
-
-```ts
-type GetSwapQuoteResponse = SwapQuote | APIError;
-```
-
-## `GetTokensOptions`
-
-```ts
-type GetTokensOptions = {
- limit?: string; // The maximum number of tokens to return (default: 50)
- page?: string; // The page number to return (default: 1)
- search?: string; // A string to search for in the token name, symbol or address
-};
-```
-
-## `GetTokensResponse`
-
-```ts
-type GetTokensResponse = Token[] | APIError;
-```
-
-## `GetTokenDetailsParams`
-
-```ts
-type GetTokenDetailsParams = {
- contractAddress: Address;
- tokenId?: string;
-};
-```
-
-## `GetTokenDetailsResponse`
-
-```ts
-type GetTokenDetailsResponse = TokenDetails | APIError;
-```
-
-## `GetMintDetailsParams`
-
-```ts
-type GetMintDetailsParams = {
- contractAddress: Address;
- takerAddress?: Address;
- tokenId?: string;
-};
-```
-
-## `GetMintDetailsResponse`
-
-```ts
-type GetMintDetailsResponse = MintDetails | APIError;
-```
-
-## `BuildMintTransactionParams`
-
-```ts
-type BuildMintTransactionParams = {
- mintAddress: Address;
- takerAddress: Address;
- tokenId?: string;
- quantity: number;
- network?: string;
-};
-```
-
-## `BuildMintTransactionResponse`
-
-```ts
-type BuildMintTransactionResponse = MintTransaction | APIError;
-```
-
-## `GetPortfoliosParams`
-
-```ts
-type GetPortfoliosParams = {
- addresses: Address[] | null | undefined;
-};
-```
-
-## `GetPortfoliosResponse`
-
-```ts
-type GetPortfoliosResponse = {
- portfolios: Portfolio[];
-};
-```
-
diff --git a/docs/onchainkit/buy/buy.mdx b/docs/onchainkit/buy/buy.mdx
deleted file mode 100644
index 17dc01e15..000000000
--- a/docs/onchainkit/buy/buy.mdx
+++ /dev/null
@@ -1,117 +0,0 @@
----
-title: · OnchainKit
-sidebarTitle:
-description: Buy components & utilities
----
-
-import { Danger } from "/snippets/danger.mdx";
-
-
-
-
-
-The `Buy` components provide a comprehensive interface for users to purchase [Tokens](/onchainkit/token/types#token).
-
-The `Buy` component supports token swaps from USDC and ETH by default with the option to provide an additional token of choice using the `fromToken` prop. In addition, users are able to purchase tokens using their Coinbase account, Apple Pay, or debit card.
-
-
-The Apple Pay and Debit Card onramp options are only available for Coinbase supported assets.
-
-
-
-Before using, ensure you've completed all [Getting Started steps](/onchainkit/getting-started).
-
-
-This component requires a `projectId` to be set in the `OnchainKitProvider`. You can find your `projectId` on [Coinbase Developer Platform](https://portal.cdp.coinbase.com/products/onchainkit).
-
-
-
-## Usage
-
-Example using `@coinbase/onchainkit/buy`.
-
-```tsx
-import { Buy } from '@coinbase/onchainkit/buy'; // [!code focus]
-import type { Token } from '@coinbase/onchainkit/token';
-
-export default function BuyComponents() { // [!code focus]
- const degenToken: Token = {
- name: 'DEGEN',
- address: '0x4ed4e862860bed51a9570b96d89af5e1b0efefed',
- symbol: 'DEGEN',
- decimals: 18,
- image:
- 'https://d3r81g40ycuhqg.cloudfront.net/wallet/wais/3b/bf/3bbf118b5e6dc2f9e7fc607a6e7526647b4ba8f0bea87125f971446d57b296d2-MDNmNjY0MmEtNGFiZi00N2I0LWIwMTItMDUyMzg2ZDZhMWNm',
- chainId: 8453,
- };
-
- return ( // [!code focus]
- // [!code focus]
- ) // [!code focus]
-} // [!code focus]
-
-```
-
-
-
-{/*
-
- {({ address, toToken }) => {
- return (
-
- )
- }}
-
- */}
-
-
-**Note: This interface is for demonstration purposes only.**
-
-Swap and Onramp flows will execute and work out of the box when you implement the component in your own app.
-
-
-
-### Sponsor gas with Paymaster
-
-To sponsor swap transactions for your users, toggle the Paymaster using the `isSponsored` prop.
-
-By default, this will use the [Coinbase Developer Platform](https://portal.cdp.coinbase.com/products/bundler-and-paymaster) Paymaster.
-
-You can configure sponsorship settings on the [Paymaster](https://portal.cdp.coinbase.com/products/bundler-and-paymaster) page.
-For security reasons, we recommend setting up a contract allowlist in the Portal. Without a contract allowlist defined, your Paymaster will only be able to sponsor up to $1.
-
-The contract used in our Swap API is Uniswap's [Universal Router](https://basescan.org/address/0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD), which is deployed on Base at `0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD`.
-
-Note that gas sponsorship will only work for Smart Wallets.
-
-```tsx
-import { Buy } from '@coinbase/onchainkit/buy'; // [!code focus]
-import type { Token } from '@coinbase/onchainkit/token';
-
-export default function BuyComponents() { // [!code focus]
- const degenToken: Token = {
- name: 'DEGEN',
- address: '0x4ed4e862860bed51a9570b96d89af5e1b0efefed',
- symbol: 'DEGEN',
- decimals: 18,
- image:
- 'https://d3r81g40ycuhqg.cloudfront.net/wallet/wais/3b/bf/3bbf118b5e6dc2f9e7fc607a6e7526647b4ba8f0bea87125f971446d57b296d2-MDNmNjY0MmEtNGFiZi00N2I0LWIwMTItMDUyMzg2ZDZhMWNm',
- chainId: 8453,
- };
-
- return ( // [!code focus]
- // [!code focus]
- ) // [!code focus]
-} // [!code focus]
-```
-
-## Props
-
-- [`BuyReact`](/onchainkit/buy/types#buyreact)
-
diff --git a/docs/onchainkit/buy/types.mdx b/docs/onchainkit/buy/types.mdx
deleted file mode 100644
index 96131eedc..000000000
--- a/docs/onchainkit/buy/types.mdx
+++ /dev/null
@@ -1,31 +0,0 @@
----
-title: Buy components & utilities Types
-sidebarTitle: Buy
-description: Glossary of Types in Buy components & utilities.
----
-
-## `BuyReact`
-
-```ts
-type BuyReact = {
- className?: string; // Optional className override for top div element.
- config?: {
- maxSlippage: number; // Maximum acceptable slippage for a swap (e.g., 3 for 3%). This is a percentage, not basis points.
- };
- experimental?: {
- /**
- * Whether to use a DEX aggregator.
- * true - 0x Aggregator
- * false - Uniswap V3
- * @default false
- */
- useAggregator: boolean;
- };
- isSponsored?: boolean; // An optional setting to sponsor swaps with a Paymaster. (default: false)
- onError?: (error: SwapError) => void; // An optional callback function that handles errors within the provider.
- onStatus?: (lifecycleStatus: LifecycleStatus) => void; // An optional callback function that exposes the component lifecycle state.
- onSuccess?: (transactionReceipt?: TransactionReceipt) => void; // An optional callback function that exposes the transaction receipt.
- fromToken?: Token; // An optional token to swap from. (USDC and ETH supported by default)
- toToken: Token; // The token to purchase.
-};
-```
diff --git a/docs/onchainkit/checkout/checkout.mdx b/docs/onchainkit/checkout/checkout.mdx
deleted file mode 100644
index 2ae912d9c..000000000
--- a/docs/onchainkit/checkout/checkout.mdx
+++ /dev/null
@@ -1,491 +0,0 @@
----
-title: · OnchainKit
-sidebarTitle:
-description: One-click checkout for onchain commerce
----
-import { Danger } from "/snippets/danger.mdx";
-
-The `Checkout` component provides a one-click checkout experience for onchain commerce - all for free.
-
-Our all-in-one solution simplifies payment processing for onchain developers, removing complex integrations, high fees, and onboarding friction. Whether you're selling digital goods, services, or in-game items, this tool is for you.
-
-
-
-
-
-## Features
-
-- **Plug-and-Play Integration:** Add our `Checkout` button with just a few lines of code. No backend required.
-- **Seamless Onboarding:** Support Passkey wallets to eliminate onboarding drop-offs.
-- **Real-time Merchant Tooling:** Get instant payment tracking, analytics, and reporting.
-- **Dynamic Payment Flows:** Generate charges on the fly, handle variable pricing, and pass in custom metadata.
-
-## Prerequisites
-
-Before using the `Checkout` component, ensure you've completed the [Getting Started](/onchainkit/getting-started) steps.
-
-
-To use the `Checkout` component, you'll need to provide a Client API Key in `OnchainKitProvider`. You can get one following our [Getting Started](/onchainkit/getting-started#get-your-client-api-key) steps.
-
-
-
-### Starting a new project
-
-If you're starting a new project, we recommend using `create onchain` to scaffold your project.
-
-```bash
-npm create onchain@latest
-```
-
-### Adding to an existing project
-
-If you're adding `Checkout` to an existing project, simply install OnchainKit.
-
-
-```bash npm
-npm install @coinbase/onchainkit
-```
-
-```bash yarn
-yarn add @coinbase/onchainkit
-```
-
-```bash pnpm
-pnpm add @coinbase/onchainkit
-```
-
-```bash bun
-bun add @coinbase/onchainkit
-```
-
-
-Wrap the `` around your app, following the steps in [Getting Started](/onchainkit/getting-started#add-providers).
-
-## Quickstart
-
-### Option 1: Simple Product Checkout
-
-Ideal for fixed-price items. Get started with minimal setup.
-
-
-
- Head to [Coinbase Commerce](https://beta.commerce.coinbase.com/) and sign up. This is where you’ll manage transactions, view reports, and configure payments.
-
-
- In the Coinbase Commerce dashboard, create a new product and copy the `productId`.
-
-
- ```tsx
- import { Checkout, CheckoutButton, CheckoutStatus } from '@coinbase/onchainkit/checkout';
-
-
- // set coinbaseBranded for branding
-
-
- ```
-
-
-
-
-### Option 2: Dynamic Charges
-
-For variable pricing, custom metadata, or multi-product checkouts, use backend-generated charges.
-
-
-
- Head to [Coinbase Commerce](https://beta.commerce.coinbase.com/) and sign up. This is where you’ll manage transactions, view reports, and configure payments.
-
-
- In the [Coinbase Commerce dashboard](https://beta.commerce.coinbase.com/settings/security), create a new API Key under `Security` in `Settings`.
-
-
- See [Using chargeHandler](/onchainkit/checkout/checkout#using-chargehandler) for a code example.
-
-
- ```tsx
- const chargeHandler = async () => {
- const response = await fetch('/createCharge', { method: 'POST' });
- const { id } = await response.json();
- return id; // Return charge ID
- };
-
-
-
-
- ```
-
-
-
-That's it! Start selling onchain with just a few lines of code.
-
-## Usage
-
-### Configuring a checkout
-
-#### Using `productId`
-
-You can create products on the Coinbase Commerce Portal and use them in the `Checkout` component through the `productId` prop.
-
-```tsx
-import { Checkout, CheckoutButton } from '@coinbase/onchainkit/checkout';
-
-export default function PayComponents() {
- return (
-// ---cut-before---
-
-
-
-// ---cut-after---
-);
-}
-```
-
-{/*
-
-
-
- */}
-
-
-
-#### Using `chargeHandler`
-
-Alternatively, you can create charges dynamically using the Coinbase Commerce API [Create Charge](https://docs.cdp.coinbase.com/commerce-onchain/reference/creates-a-charge) endpoint by passing the chargeID into Checkout via the `chargeHandler` prop.
-
-This function must have the signature `() => Promise` and must return a valid chargeId created by the create charge endpoint.
-
-
-To create charges, you'll need a Coinbase Commerce [API Key](https://docs.cdp.coinbase.com/commerce-onchain/docs/getting-started).
-
-
-
-
-**⚠️ Warning**
-
-You should protect your Coinbase Commerce API Key by only creating charges server-side.
-
-
-
-
-```ts backend.ts
-// This backend endpoint should create a charge and return the response.
-app.post('/createCharge', async (req: Request, res: Response) => {
- const options = {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- 'Accept': 'application/json',
- 'X-CC-Api-Key': 'your_api_key_here' // Replace this with your Coinbase Commerce API Key
- },
- body: JSON.stringify({
- local_price: { amount: '1', currency: 'USDC' },
- pricing_type: 'fixed_price',
- metadata: { some_field: "some_value" } // Optional: Attach metadata like order ID or customer details
- }),
- };
-
- const response = await fetch('https://api.commerce.coinbase.com/charges', options);
- const data = await response.json();
-
- res.json(data);
-});
-
-```
-
-```tsx frontend.tsx
-import { Checkout, CheckoutButton } from '@coinbase/onchainkit/checkout';
-
-const chargeHandler = async () => {
- const response = await fetch('https://your-backend.com/createCharge', { method: 'POST' });
- const { id } = await response.json();
- return id; // Return charge ID
-};
-
-
-
-
-```
-
-
-Note that `productId` and `chargeHandler` are mutually exclusive and only one can be provided as a prop to Checkout.
-
-### Handling a successful checkout
-
-To handle successful checkouts, use the `onStatus` prop to listen for the `success` callback.
-
-This callback will return a [LifecycleStatusData](/onchainkit/checkout/checkout#advanced-usage) object including the [TransactionReceipt](https://github.com/wevm/viem/blob/main/src/types/transaction.ts#L38) and `chargeId`.
-
-For idempotent actions, like rendering your own success screen, you can simply check that the `statusName` is equal to `success`.
-
-For non-idempotent actions, like order fulfillment, we recommend one of the following approaches to verify a charge has been fully paid.
-
-1. (**Recommended**) Check the status of the `chargeId` using the [Coinbase Commerce API](https://docs.cdp.coinbase.com/commerce-onchain/docs/web3-payments-faq#how-can-i-verify-if-a-charge-has-been-fully-paid).
-2. Set up a [Coinbase Commerce Webhook](https://docs.cdp.coinbase.com/commerce-onchain/docs/webhooks) which will notify you for successful payments.
-
-```tsx
-import { Checkout, CheckoutButton } from '@coinbase/onchainkit/checkout';
-// ---cut-before---
-import type { LifecycleStatus } from '@coinbase/onchainkit/checkout'; // [!code focus]
-
-const statusHandler = async (status: LifecycleStatus) => { // [!code focus]
- const { statusName, statusData } = status; // [!code focus]
- switch (statusName) { // [!code focus]
- case 'success': // [!code focus]
- // handle success // [!code focus]
- const { chargeId } = statusData; // [!code focus]
- // use the charges api to verify the chargeId // [!code focus]
- const options = { // [!code focus]
- method: 'GET', // [!code focus]
- headers: { // [!code focus]
- 'Content-Type': 'application/json', // [!code focus]
- 'Accept': 'application/json', // [!code focus]
- 'X-CC-Api-Key': 'your_api_key_here' // Replace this with your Coinbase Commerce API Key // [!code focus]
- } // [!code focus]
- }; // [!code focus]
- const response = await fetch(`https://api.commerce.coinbase.com/charges/${chargeId}`); // [!code focus]
- } // [!code focus]
-} // [!code focus]
-
-
-
-
-// ---cut-after---
-```
-
-
-To verify charges, you'll need a Coinbase Commerce [API Key](https://docs.cdp.coinbase.com/commerce-onchain/docs/getting-started).
-
-
-
-
-**⚠️ Warning**
-
-You should protect your Coinbase Commerce API Key by verifying charges server-side. This client-side code is only provided as an example.
-
-
-
-### Viewing successful checkouts
-
-You can view successful checkouts on the [Coinbase Commerce Merchant Dashboard](https://beta.commerce.coinbase.com/payments).
-
-
-
-
-
-## Customization
-
-### Add name and logo
-
-To customize the name and logo of your application rendered in the popup, set the `name` and `logo` values inside [OnchainKitProvider](/onchainkit/config/onchainkit-provider#usage).
-
-```tsx providers.tsx
-// @noErrors: 2304 - Cannot find name 'children'
-import { base } from 'wagmi/chains';
-// ---cut-before---
-import { OnchainKitProvider } from '@coinbase/onchainkit';
-
-
- {children}
-
-// ---cut-after---
-```
-
-
-
-

-
-
-
-### Add Coinbase branding
-
-You can add Coinbase branding to the component by using the `coinbaseBranded` prop on `CheckoutButton`.
-
-```tsx
-import { Checkout, CheckoutButton } from '@coinbase/onchainkit/checkout';
-
-export default function PayComponents() {
- return (
-// ---cut-before---
-
-
-
-// ---cut-after---
-);
-}
-```
-
-{/*
-
-
-
- */}
-
-
-
-### Disabling the button
-
-You can disable the button using the `disabled` prop on `CheckoutButton`.
-
-```tsx
-
-import { Checkout, CheckoutButton } from '@coinbase/onchainkit/checkout';
-
-export default function PayComponents() {
- return (
-// ---cut-before---
-
-
-
-// ---cut-after---
-);
-}
-```
-
-{/*
-
-
-
- */}
-
-
-
-### Customize button
-
-You can customize the button text using the `text` prop on `CheckoutButton`.
-
-```tsx
-
-import { Checkout, CheckoutButton } from '@coinbase/onchainkit/checkout';
-
-export default function PayComponents() {
- return (
-// ---cut-before---
-
-
-
-// ---cut-after---
-);
-}
-```
-
-{/*
-
-
-
- */}
-
-
-
-### Override styles
-
-We recommend style customization by setting a custom [OnchainKit theme](/onchainkit//guides/themes#custom-theme). You can also override individual component styles using `className`.
-
-```tsx
-
-import { Checkout, CheckoutButton } from '@coinbase/onchainkit/checkout';
-
-export default function PayComponents() {
- return (
-// ---cut-before---
-
-
-
-// ---cut-after---
-);
-}
-```
-
-{/*
-
-
-
- */}
-
-
-
-## Advanced Usage
-
-### Listening to the component lifecycle
-
-You can use our Checkout [`LifecycleStatus`](/onchainkit/checkout/types#lifecyclestatus) and the `onStatus` prop to listen to transaction states.
-
-```tsx
-import { Checkout, CheckoutButton } from '@coinbase/onchainkit/checkout';
-// ---cut-before---
-import type { LifecycleStatus } from '@coinbase/onchainkit/checkout'; // [!code focus]
-
-const statusHandler = (status: LifecycleStatus) => { // [!code focus]
- const { statusName, statusData } = status; // [!code focus]
- switch (statusName) { // [!code focus]
- case 'success': // handle success // [!code focus]
- case 'pending': // handle payment pending // [!code focus]
- case 'error': // handle error // [!code focus]
- default: // [!code focus]
- // handle 'init' state
- } // [!code focus]
-} // [!code focus]
-
-
-
-
-// ---cut-after---
-```
-
-## Example use cases
-
-- **Demand-based pricing:** Allow users to select seats or ticket types for events, and dynamically calculate charges based on availability and demand.
-- **Product bundles:** Provide users with the option to create custom product bundles, applying discounts or special pricing based on the selected items.
-- **Freelance Services:** Allow clients to specify project details such as hours, deliverables, and deadlines, and generate charges based on these custom inputs.
-
-## Components
-
-The components are designed to work together hierarchically. For each component, ensure the following:
-
-- `` - Sets the `productId` or `chargeHandler` prop.
-- `` - Branding and customization of the payment button.
-- `` - The status of the payment.
-
-## Props
-
-- [`LifecycleStatus`](/onchainkit/checkout/types#lifecyclestatus)
-- [`CheckoutReact`](/onchainkit/checkout/types#checkoutreact)
-- [`CheckoutButtonReact`](/onchainkit/checkout/types#checkoutbuttonreact)
-- [`CheckoutStatusReact`](/onchainkit/checkout/types#checkoutstatusreact)
-
diff --git a/docs/onchainkit/checkout/types.mdx b/docs/onchainkit/checkout/types.mdx
deleted file mode 100644
index 3cf9846f6..000000000
--- a/docs/onchainkit/checkout/types.mdx
+++ /dev/null
@@ -1,73 +0,0 @@
----
-title: Checkout components & utilities Types
-sidebarTitle: Checkout
-description: Glossary of Types in Checkout components & utilities.
----
-
-## `LifecycleStatus`
-
-```ts
-type LifecycleStatus =
- | {
- statusName: 'init';
- statusData: LifecycleStatusDataShared;
- }
- | {
- statusName: 'error';
- statusData: TransactionError;
- }
- | {
- statusName: 'fetchingData';
- statusData: LifecycleStatusDataShared;
- }
- | {
- statusName: 'ready';
- statusData: {
- chargeId: string;
- contracts: ContractFunctionParameters[];
- };
- }
- | {
- statusName: 'pending';
- statusData: LifecycleStatusDataShared;
- }
- | {
- statusName: 'success'; // if the last mutation attempt was successful
- statusData: {
- transactionReceipts: TransactionReceipt[];
- chargeId: string;
- receiptUrl: string;
- };
- };
-```
-
-## `CheckoutButtonReact`
-
-```ts
-type CheckoutButtonReact = {
- className?: string;
- coinbaseBranded?: boolean;
- disabled?: boolean;
- icon?: React.ReactNode;
- text?: string;
-};
-```
-
-## `CheckoutReact`
-
-```ts
-type CheckoutReact = {
- chargeHandler?: () => Promise;
- children: React.ReactNode;
- className?: string;
- isSponsored?: boolean;
- onStatus?: (status: LifecycleStatus) => void;
- productId?: string;
-};
-```
-
-## `CheckoutStatusReact`
-
-```ts
-type CheckoutStatusReact = { className?: string };
-```
diff --git a/docs/onchainkit/config/is-base.mdx b/docs/onchainkit/config/is-base.mdx
deleted file mode 100644
index e7e6b6772..000000000
--- a/docs/onchainkit/config/is-base.mdx
+++ /dev/null
@@ -1,38 +0,0 @@
----
-title: isBase
----
-
-
-The `isBase` utility is designed to verify if the chain id is a valid Base or Base Sepolia chain id.
-
-## Usage
-
-
-```tsx code
-import { isBase } from '@coinbase/onchainkit';
-
-// Base Mainnet (chain ID: 8453)
-isBase({ chainId: 8453 }); // returns true
-
-// Base Sepolia (chain ID: 84532)
-isBase({ chainId: 84532 }); // returns true
-
-// Ethereum (chain ID: 1)
-isBase({ chainId: 1 }); // returns false
-```
-
-```ts return value
-true; // When chainId is 8453 (Base Mainnet) or 84532 (Base Sepolia)
-false; // For all other chain IDs
-```
-
-
-## Returns
-
-`boolean` - Returns `true` if the chain id is Base or Base Sepolia, otherwise `false`.
-
-## Parameters
-
-[`IsBaseOptions`](./types#isbaseoptions) - See [`IsBaseOptions`](./types#isbaseoptions) for more details.
-
-
diff --git a/docs/onchainkit/config/is-ethereum.mdx b/docs/onchainkit/config/is-ethereum.mdx
deleted file mode 100644
index 2833a9308..000000000
--- a/docs/onchainkit/config/is-ethereum.mdx
+++ /dev/null
@@ -1,38 +0,0 @@
----
-title: isEthereum
----
-
-
-The `isEthereum` utility is designed to verify if the chain id is a valid Ethereum Mainnet or Ethereum Sepolia chain id.
-
-## Usage
-
-
-```tsx code
-import { isEthereum } from '@coinbase/onchainkit';
-
-// Ethereum Mainnet (chain ID: 1)
-isEthereum({ chainId: 1 }); // returns true
-
-// Ethereum Sepolia (chain ID: 11155111)
-isEthereum({ chainId: 11155111 }); // returns true
-
-// Base (chain ID: 8453)
-isEthereum({ chainId: 8453 }); // returns false
-```
-
-```ts return value
-true; // When chainId is 1 (Ethereum Mainnet) or 11155111 (Ethereum Sepolia)
-false; // For all other chain IDs
-```
-
-
-## Returns
-
-`boolean` - Returns `true` if the chain id is Ethereum Mainnet or Ethereum Sepolia, otherwise `false`.
-
-## Parameters
-
-[`IsEthereumOptions`]: ./types#isethereumoptions
-
-
diff --git a/docs/onchainkit/config/onchainkit-provider.mdx b/docs/onchainkit/config/onchainkit-provider.mdx
deleted file mode 100644
index dca843a98..000000000
--- a/docs/onchainkit/config/onchainkit-provider.mdx
+++ /dev/null
@@ -1,150 +0,0 @@
----
-title: ""
----
-
-
-Provides the OnchainKit React Context to the app.
-
-## Usage
-
-```tsx app.tsx
-// @noErrors: 2304 - Cannot find name 'MyComponent'
-import { base } from 'viem/chains';
-import { OnchainKitProvider } from '@coinbase/onchainkit';
-
-const App = () => {
- return (
-
-
-
- );
-};
-```
-
-## Props
-
-[`OnchainKitProviderReact`](/onchainkit/config/types#onchainkitproviderreact)
-
-| Prop | Description | Required |
-| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
-| [`chain`](#chain) | The chain that your OnchainKit project supports. | Yes |
-| [`apiKey`](#apikey) | Client API Key from Coinbase Developer Platform. | No |
-| [`rpcUrl`](#rpc-url) | RPC URL for onchain requests. | No |
-| [`projectId`](#project-id) | Your Coinbase Developer Platform Project ID. | No |
-| [`config`](#config) | - `config.appearance` — Customize your OnchainKit project's appearance
- `config.paymaster` — Paymaster URL for gas sponsorship
- `config.wallet` — Wallet configuration options | No |
-| [`schemaId`](#schema-id) | _[Deprecation Pending]_ The schema ID for attestations from the Ethereum Attestation Service (EAS). | No |
-| [`address`](#address) | _[Deprecation Pending]_ This prop is no longer used. | No |
-
-### Chain
-
-`chain` specifies the chain on which your OnchainKit project will operate.
-
-This prop is required for all OnchainKit components.
-
-We recommend importing chain data from [viem](https://viem.sh/docs/chains/introduction).
-
-### `apiKey`
-
-`apiKey` is your Coinbase Developer Platform Client API Key.
-
-This prop is required for most OnchainKit components, including:
-
-- [``](/onchainkit/checkout/checkout)
-- [``](/onchainkit/mint/nft-card)
-- [``](/onchainkit/mint/nft-mint-card)
-- [``](/onchainkit/swap/swap)
-- [``](/onchainkit/transaction/transaction)
-
-You can get a [Client API Key](https://portal.cdp.coinbase.com/projects/project-id/api-keys/client-key)
-from Coinbase Developer Platform.
-
-
-
-
-
-### RPC URL
-
-`rpcUrl` is required for any onchain requests. If you provide your own RPC URL,
-OnchainKit will use it.
-
-If you do not provide your own RPC URL, you must provide an `apiKey`, which
-enables OnchainKit to use the
-[Coinbase Developer Platform Node](https://portal.cdp.coinbase.com/products/node).
-
-### Project ID
-
-`projectId` is your Coinbase Developer Platform Project ID.
-
-This prop is required for the `` component.
-
-You can obtain a Project ID from the [Coinbase Developer Platform](https://portal.cdp.coinbase.com/projects).
-
-
-
-
-
-### Config
-
-`config` is an object that can be used to customize the appearance and behavior
-of the OnchainKit components.
-
-This prop has three keys: `appearance`, `paymaster`, and `wallet`.
-
-#### Appearance
-
-`appearance` manages the appearance of the OnchainKit components and has the following properties:
-
-- `name` — The name of your OnchainKit project
-- `logo` — The URL of the logo for your OnchainKit project
-- `mode` — The mode of the OnchainKit components. Can be `auto`, `dark`, or `light`.
-- `theme` — The theme of the OnchainKit components. Can be `base`, `cyberpunk`, `default`, `hacker`, or a custom theme.
-
-Explore appearance options in the [OnchainKit Playground](https://onchainkit.xyz/playground).
-
-#### Paymaster
-
-`paymaster` represents the Paymaster URL that enables you to sponsor gas for your users.
-
-You can configure your Paymaster and obtain your Paymaster URL from the
-[Coinbase Developer Platform](https://portal.cdp.coinbase.com/products/bundler-and-paymaster).
-
-#### Wallet
-
-`wallet` configures the wallet connection experience and has the following properties:
-
-- `display` — The display mode for the wallet interface. Can be either:
- - `'modal'` — Shows wallet connection in a modal overlay with wallet aggregation
- - `'classic'` — Shows wallet connection in the traditional inline style
-- `termsUrl` — URL to your terms of service
-- `privacyUrl` — URL to your privacy policy
-
-### Address _[Deprecation Pending]_
-
-`address` is no longer used and will be removed in a future version of
-OnchainKit.
-
-### Schema ID _[Deprecation Pending]_
-
-`schemaId` is no longer used as OnchainKit now defaults to using Coinbase
-attestations for the `` component.
-
-This prop will be removed in a future version of OnchainKit.
-
diff --git a/docs/onchainkit/config/supplemental-providers.mdx b/docs/onchainkit/config/supplemental-providers.mdx
deleted file mode 100644
index afb72a975..000000000
--- a/docs/onchainkit/config/supplemental-providers.mdx
+++ /dev/null
@@ -1,87 +0,0 @@
----
-title: Supplemental Providers · OnchainKit
-sidebarTitle: Supplemental Providers
-description: Customize the Wagmi and QueryClient providers
----
-
-import StartBuilding from "/snippets/start-building.mdx";
-
-Under the hood, OnchainKit will create our recommended Wagmi and QueryClient
-providers. If you wish to customize the providers, you can do so by creating
-these providers with your own configuration.
-
-For example, the following code creates custom Wagmi and QueryClient providers:
-
-
-```tsx wagmi.ts
-// @noErrors: 2554
-import { http, cookieStorage, createConfig, createStorage } from 'wagmi';
-import { base } from 'wagmi/chains'; // add baseSepolia for testing // [!code ++]
-import { coinbaseWallet } from 'wagmi/connectors';
-
-export function getConfig() {
- return createConfig({
- chains: [base], // add baseSepolia for testing // [!code ++]
- connectors: [
- coinbaseWallet({
- appName: 'OnchainKit',
- preference: 'smartWalletOnly',
- version: '4',
- }),
- ],
- storage: createStorage({
- storage: cookieStorage,
- }),
- ssr: true,
- transports: {
- [base.id]: http(), // add baseSepolia for testing // [!code ++]
- },
- });
-}
-
-declare module 'wagmi' {
- interface Register {
- config: ReturnType;
- }
-}
-```
-
-```tsx providers.tsx
-// @noErrors: 2307 2580 2339 2554 - cannot find 'process', cannot find './wagmi', cannot find 'import.meta'
-import { OnchainKitProvider } from '@coinbase/onchainkit';
-import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
-import { base } from 'wagmi/chains'; // add baseSepolia for testing // [!code ++]
-import { type ReactNode, useState } from 'react';
-import { type State, WagmiProvider } from 'wagmi';
-
-import { getConfig } from '@/wagmi'; // your import path may vary // [!code ++]
-
-export function Providers(props: {
- children: ReactNode;
- initialState?: State;
-}) {
- const [config] = useState(() => getConfig());
- const [queryClient] = useState(() => new QueryClient());
- const apiKey = // [!code ++]
- typeof window !== 'undefined' // [!code ++]
- ? window.ENV?.PUBLIC_ONCHAINKIT_API_KEY // [!code ++]
- : undefined; // [!code ++]
-
- return (
-
-
-
- {props.children}
-
-
-
- );
-}
-```
-
-
-
-
diff --git a/docs/onchainkit/config/types.mdx b/docs/onchainkit/config/types.mdx
deleted file mode 100644
index 0a2c8f722..000000000
--- a/docs/onchainkit/config/types.mdx
+++ /dev/null
@@ -1,74 +0,0 @@
----
-title: OnchainKit top-level types
-sidebarTitle: Config
-description: Glossary of OnchainKit top-level Types.
----
-
-## `AppConfig`
-
-```ts
-type AppConfig = {
- appearance?: {
- name?: string | null; // The name of your application
- logo?: string | null; // The URL of your application logo
- mode?: Mode | null; // Optionally determines color scheme based on OS preference or user selection
- theme?: ComponentTheme | null; // Optionally sets the visual style for components
- };
- paymaster?: string | null; // Paymaster URL for gas sponsorship
-};
-```
-
-## `isBaseOptions`
-
-```ts
-type isBaseOptions = {
- chainId: number;
- isMainnetOnly?: boolean; // If the chainId check is only allowed on mainnet
-};
-```
-
-## `isEthereumOptions`
-
-```ts
-type isEthereumOptions = {
- chainId: number;
- isMainnetOnly?: boolean; // If the chainId check is only allowed on mainnet
-};
-```
-
-## `OnchainKitConfig`
-
-```ts
-type OnchainKitConfig = {
- address: Address | null; // Address is optional as we may not have an address for new users
- apiKey: string | null; // ApiKey for Coinbase Developer Platform APIs
- chain: Chain; // Chain must be provided as we need to know which chain to use
- config?: AppConfig; // Configuration options for the app
- rpcUrl: string | null; // RPC URL for onchain requests. Defaults to using CDP Node if the API Key is set
- schemaId: EASSchemaUid | null; // SchemaId is optional as not all apps need to use EAS
- projectId: string | null; // ProjectId from Coinbase Developer Platform, only required for Coinbase Onramp support
-};
-```
-
-## `OnchainKitContextType`
-
-```ts
-type OnchainKitContextType = OnchainKitConfig;
-```
-
-## `OnchainKitProviderReact`
-
-```ts
-type OnchainKitProviderReact = {
- address?: Address;
- apiKey?: string;
- chain: Chain;
- children: ReactNode;
- config?: AppConfig;
- rpcUrl?: string;
- schemaId?: EASSchemaUid;
- projectId?: string;
-};
-```
-
-
diff --git a/docs/onchainkit/create-a-basename-profile-component.mdx b/docs/onchainkit/create-a-basename-profile-component.mdx
deleted file mode 100644
index 664303dea..000000000
--- a/docs/onchainkit/create-a-basename-profile-component.mdx
+++ /dev/null
@@ -1,304 +0,0 @@
----
-title: 'Create a Basename Profile Component'
-description: Learn how to create a component that displays social media and profile information for a given basename.
----
-
-Onchain identities often include social media links and profile information stored as text records. In this tutorial, you'll learn how to create a component that fetches and displays this information for a given basename.
-
-## Objectives
-
-By the end of this tutorial you should be able to:
-
-- Fetch ENS text records for a basename
-- Create a React component to display profile information
-- Implement a dropdown to show/hide profile details
-
-## Prerequisites
-
-### React and TypeScript
-
-You should be familiar with React and TypeScript. If you're new to these technologies, consider reviewing the [React official documentation] first.
-
-### OnchainKit
-
-This tutorial uses Coinbase's [OnchainKit]. Familiarity with its basic concepts will be helpful.
-
-### Basename
-
-A basename with a few text records (Github, Twitter, website) is required for this tutorial. If you don't have a Basename. Get one [here](https://www.base.org/names).
-
-## Set a Text Record
-
-
-
-
-
-To set a text record for your basename, start by visiting `https://www.base.org/name/`. Connect your wallet to manage your profile, then click the `Manage profile` button. Add one or more text records, such as your X (formerly Twitter) URL. Once you've added the desired records, click the `Save` button at the bottom of the page. Finally, confirm and sign the transaction to make the changes onchain.
-
-
-
-
-
-## Setting up the Environment
-
-First, clone or fork the [OnchainKit app template]:
-
-```
-git clone git@github.com:coinbase/onchain-app-template.git
-```
-
-Then, install the following dependencies:
-
-```bash
-bun install framer-motion
-bun install lucide-react
-```
-
-Create a `.env` file:
-
-```
-cp .env.local .env
-```
-
-Update the contents of the `.env` file to include a [Reown] (FKA WalletConnect) project ID and a CDP API key:
-
-```
-# ~~~
-NEXT_PUBLIC_GOOGLE_ANALYTICS_ID=
-
-# See https://www.coinbase.com/developer-platform/products/base-node
-NEXT_PUBLIC_CDP_API_KEY=
-
-# ~~~
-NEXT_PUBLIC_ENVIRONMENT=localhost
-
-# See https://cloud.reown.com/
-NEXT_PUBLIC_WC_PROJECT_ID=
-```
-
-## Creating the `Client` File
-
-Create a new file `client.ts` in your project's `src` directory:
-
-```typescript
-import { http, createPublicClient } from 'viem';
-import { mainnet } from 'viem/chains';
-
-export const publicClient = createPublicClient({
- chain: base,
- transport: http(),
-});
-```
-
-This client will be used to interact with Base mainnet.
-
-## Creating the IdentityWrapper Component
-
-Create a new file `IdentityWrapper.tsx` in your `src/components` directory and import the following packages:
-
-```typescript
-import React, { useState, useEffect } from 'react';
-import { Avatar, Name, getName } from '@coinbase/onchainkit/identity';
-import { motion } from 'framer-motion';
-import { Twitter, Github, Globe } from 'lucide-react';
-import { normalize } from 'viem/ens';
-import { publicClient } from '../client';
-
-// Component code will go here
-```
-
-`IdentityWrapper` will fetch and display social media and profile information for a given Base address using OnchainKit and the Ethereum Name Service (ENS). It will query for the ENS name associated with the address and retrieve relevant text records (Twitter, GitHub, and website URL) using the specified resolver, storing this data in both component state and local storage for optimized performance. The component will be designed to present this information in a user-friendly, expandable format.
-
-## Implementing the Component Logic
-
-Add the following code to your `IdentityWrapper.tsx` file:
-
-```typescript
-const IdentityWrapper: React.FC<{ address: string }> = ({ address }) => {
- const [ensText, setEnsText] = useState<{
- twitter: string | null;
- github: string | null;
- url: string | null;
- } | null>(null);
-
- const [isOpen, setIsOpen] = useState(false);
-
- const BASENAME_L2_RESOLVER_ADDRESS = '0xc6d566a56a1aff6508b41f6c90ff131615583bcd';
-
- useEffect(() => {
- const fetchEnsText = async () => {
- if (address) {
- try {
- const name = await getName({ chain: base, address: address });
- const normalizedAddress = normalize(name as string);
- const twitterText = await publicClient.getEnsText({
- name: normalizedAddress,
- key: 'com.twitter',
- universalResolverAddress: BASENAME_L2_RESOLVER_ADDRESS,
- });
- const githubText = await publicClient.getEnsText({
- name: normalizedAddress,
- key: 'com.github',
- universalResolverAddress: BASENAME_L2_RESOLVER_ADDRESS,
- });
- const urlText = await publicClient.getEnsText({
- name: normalizedAddress,
- key: 'url',
- universalResolverAddress: BASENAME_L2_RESOLVER_ADDRESS,
- });
- const fetchedData = {
- twitter: twitterText,
- github: githubText,
- url: urlText,
- };
- setEnsText(fetchedData);
- localStorage.setItem(address, JSON.stringify(fetchedData));
- } catch (error) {
- console.error('Error fetching ENS text:', error);
- }
- }
- };
- fetchEnsText();
- }, [address]);
-
- // Render logic will go here
-};
-
-export default IdentityWrapper;
-```
-
-
-**Possible Basename Text Records:**
-
-The full list of existing text records for a basename:
-
-```
- Description,
- Keywords,
- Url,
- Github,
- Email,
- Phone,
- Twitter,
- Farcaster,
- Lens,
- Telegram,
- Discord,
- Avatar
-```
-
-
-
-## Implementing the Render Logic
-
-Add the following render logic to your `IdentityWrapper` component:
-
-```typescript
-return (
- <>
- {address ? (
-
-
-
- {ensText && (
-
- {ensText.twitter && (
-
- )}
- {ensText.github && (
-
- )}
- {ensText.url && (
-
- )}
-
- )}
-
- ) : (
- Connect your wallet to view your profile card.
- )}
- >
-);
-```
-
-## Using the Component
-
-To use this component in your app, import it into your desired page or component:
-
-```typescript
-import IdentityWrapper from '../components/IdentityWrapper';
-
-// In your render function:
-;
-```
-
-
-
-
-
-Example code snippets are available for:
-
-- [IdentityWrapper component](https://gist.github.com/hughescoin/5e5cd6cbfb3c6d1cada0a9d206b003c6)
-- [Page.tsx](https://gist.github.com/hughescoin/49afc9e999d69d372a67186e804e693b)
-
-## Conclusion
-
-Congratulations! You've created a component that fetches and displays profile information for a given basename. This component can be easily integrated into your onchain app to provide users with a rich, interactive profile display.
-
-[OnchainKit]: https://github.com/coinbase/onchainkit
-[Viem]: https://viem.sh/
-[Framer Motion]: https://www.framer.com/motion/
-[Lucide React]: https://lucide.dev/guide/packages/lucide-react
-[React official documentation]: https://react.dev/
-[OnchainKit app template]: https://github.com/coinbase/onchain-app-template
-[Reown]: https://cloud.reown.com/
-
diff --git a/docs/onchainkit/earn/earn.mdx b/docs/onchainkit/earn/earn.mdx
deleted file mode 100644
index 0fc6843b5..000000000
--- a/docs/onchainkit/earn/earn.mdx
+++ /dev/null
@@ -1,264 +0,0 @@
----
-title: · OnchainKit
-sidebarTitle:
-description: Earn interest on your crypto with OnchainKit
----
-
-The `Earn` component provides a simple interface for earning interest on your crypto via Morpho vaults on Base.
-
-## Prerequisites
-
-Before using the `Earn` component, ensure you've completed the [Getting Started](/onchainkit/getting-started) steps.
-
-### Starting a new project
-
-If you're starting a new project, we recommend using `create onchain` to scaffold your project.
-
-```bash
-npm create onchain@latest
-```
-
-### Adding to an existing project
-
-If you're adding `Earn` to an existing project, simply install OnchainKit.
-
-
-```bash npm
-npm install @coinbase/onchainkit
-```
-
-```bash yarn
-yarn add @coinbase/onchainkit
-```
-
-```bash pnpm
-pnpm add @coinbase/onchainkit
-```
-
-```bash bun
-bun add @coinbase/onchainkit
-```
-
-
-Wrap the `` around your app, following the steps in [Getting Started](/onchainkit/getting-started#add-providers).
-
-## Quickstart
-
-To use `Earn`, you'll need to provide a `vaultAddress` prop. A vault address can be obtained from Morpho's [Vaults page](https://app.morpho.org/base/earn).
-
-```tsx
-// @noErrors: 2307
-import { Earn } from '@coinbase/onchainkit/earn'; // [!code focus]
-
- // [!code focus]
-```
-
-{/* */}
-
-
-
-## Customization
-
-### Custom components and layouts
-
-`Earn` accepts a `children` prop that can be used to render `Earn` subcomponents or custom components.
-
-For instance, you can render the `EarnDeposit` component by itself within the `Earn` component, along with any other custom components you'd like to render.
-
-```tsx
-// @noErrors: 2307
-import { Earn, EarnDeposit } from '@coinbase/onchainkit/earn';
-
-
- Custom header
-
- Custom footer
-
-```
-
-{/* */}
-
-
-
-For more granular control, you can also render lower level subcomponents within `EarnDeposit` and `EarnWithdraw`. These subcomponents accept `className` props to customize their styles.
-
-```tsx
-import { Earn,
- EarnDeposit,
- EarnDetails,
- DepositBalance,
- DepositAmountInput,
- DepositButton } from '@coinbase/onchainkit/earn';
-
-
-
-
-
-
-
-
-
-```
-
-{/* */}
-
-
-
-### Customizing styles
-
-The `Earn` component is best styled via a [OnchainKit theme](/onchainkit/guides/themes#custom-theme). You can also override individual component styles using `className`.
-
-## Advanced Usage
-
-If you'd like to implement your own custom components, you can use `useEarnContext` within an `Earn` component to access context and build your own components.
-
-You can find the full interface for `EarnContextType` on the [Types page](/onchainkit/earn/types#earncontexttype).
-
-Below, we use `useEarnContext` to implement a custom deposit interface by using `useEarnContext` to access the `depositAmount` and `setDepositAmount` context values.
-
-
-```tsx index.tsx
-// @noErrors: 2307
-import { Earn, useEarnContext } from '@coinbase/onchainkit/earn';
-import { CustomDepositButtons } from '@/custom-deposit-buttons';
-
-
-
-
-
-```
-
-```tsx custom-deposit-buttons.tsx
-import {EarnDetails,
- EarnDeposit,
- useEarnContext,
- DepositButton} from '@coinbase/onchainkit/earn';
-
-const predefinedAmounts = ['0.1', '1', '10'];
-
-function CustomDepositButtons() {
- const { depositAmount, setDepositAmount } = useEarnContext();
-
- return (
-
-
-
- {predefinedAmounts.map((amount) => {
- const selected = amount === depositAmount;
- return (
-
- );
- })}
-
-
-
- );
-}
-```
-
-
-{/* */}
-
-
-
-Taking advantage of the data and methods provided by `useEarnContext`, developers can implement fully custom deposit and withdraw interfaces, modifying everything from UI elements to input behavior.
-
-## Examples
-
-### Sponsoring transactions
-
-To sponsor transactions, you can use the `isSponsored` prop.
-
-```tsx
-// @noErrors: 2304
-
-```
-
-Ensure that your `OnchainKitProvider` has a `paymaster` configured:
-
-```tsx
-// @noErrors: 2304 17008 1005
-
-```
-
-
-If you have a contract allowlist set on Coinbase Developer Platform, you'll need to ensure that the following contract functions are allowed:
-
-- `deposit` on the Morpho vault
-- `redeem` on the Morpho vault
-- `approve` on the token being deposited
-
-
-
-## Components
-
-The `Earn` component includes the following subcomponents:
-
-- `` - A fully built Withdraw and Deposit component. Also includes a `children` prop to render custom components and provides `useEarnContext` to access the context values.
-- `` - A headless provider that provides the `useEarnContext` hook to the `Earn` component.
-- `` - A fully built deposit card.
-- `` - A fully built withdraw card.
-- `` - A component that displays the details of the vault.
-- `` - A component that handles the deposit amount input.
-- `` - A component that displays the balance underlying asset in the user's wallet.
-- `` - A component that triggers the deposit transaction.
-- `` - A component that handles the withdraw amount input.
-- `` - A component that displays how much the user can withdraw from a vault.
-- `` - A component that triggers the withdraw transaction.
-- `` - A component that displays the yield details of the vault.
-- `` - A component that displays the vault details.
-
-## Hooks
-
-- [`useEarnContext`](/onchainkit/hooks/use-earn-context) - A hook that provides the context values of the `Earn` component.
-- [`useBuildDepositToMorphoTx`](/onchainkit/hooks/use-build-deposit-to-morpho-tx) - A hook that builds a deposit transaction to Morpho.
-- [`useBuildWithdrawFromMorphoTx`](/onchainkit/hooks/use-build-withdraw-from-morpho-tx) - A hook that builds a withdraw transaction from Morpho.
-- [`useMorphoVault`](/onchainkit/hooks/use-morpho-vault) - A hook that provides the details of a Morpho vault.
-
-## Props
-
-- [`LifecycleStatus`](/onchainkit/earn/types#lifecyclestatus)
-- [`EarnReact`](/onchainkit/earn/types#earnreact)
-- [`EarnProviderReact`](/onchainkit/earn/types#earnproviderreact)
-- [`EarnContextType`](/onchainkit/earn/types#earncontexttype)
-- [`EarnAmountInputReact`](/onchainkit/earn/types#earnamountinputreact)
-- [`DepositAmountInputReact`](/onchainkit/earn/types#depositamountinputreact)
-- [`WithdrawAmountInputReact`](/onchainkit/earn/types#withdrawamountinputreact)
-- [`EarnBalanceReact`](/onchainkit/earn/types#earnbalancereact)
-- [`DepositBalanceReact`](/onchainkit/earn/types#depositbalancereact)
-- [`WithdrawBalanceReact`](/onchainkit/earn/types#withdrawbalancereact)
-- [`EarnDepositReact`](/onchainkit/earn/types#earndepositreact)
-- [`EarnWithdrawReact`](/onchainkit/earn/types#earnwithdrawreact)
-- [`EarnDetailsReact`](/onchainkit/earn/types#earndetailsreact)
-- [`DepositButtonReact`](/onchainkit/earn/types#depositbuttonreact)
-- [`WithdrawButtonReact`](/onchainkit/earn/types#withdrawbuttonreact)
-
diff --git a/docs/onchainkit/earn/types.mdx b/docs/onchainkit/earn/types.mdx
deleted file mode 100644
index a943675b3..000000000
--- a/docs/onchainkit/earn/types.mdx
+++ /dev/null
@@ -1,301 +0,0 @@
----
-title: Earn components & utilities Types
-sidebarTitle: Earn
-description: Glossary of Types in Earn components & utilities.
----
-
-## `LifecycleStatus`
-
-```ts
-export type LifecycleStatus =
- | {
- statusName: 'init';
- statusData: null;
- }
- | {
- statusName: 'amountChange';
- statusData: {
- amount: string;
- token: Token;
- };
- }
- | Extract<
- TransactionLifecycleStatus,
- {
- statusName:
- | 'transactionPending'
- | 'transactionLegacyExecuted'
- | 'success'
- | 'error';
- }
- >;
-```
-
-## `EarnReact`
-
-```ts
-export type EarnReact = {
- children?: React.ReactNode;
- className?: string;
- vaultAddress: Address;
- isSponsored?: boolean;
-};
-```
-
-## `EarnProviderReact`
-
-```ts
-export type EarnProviderReact = {
- children: React.ReactNode;
- vaultAddress: Address;
- isSponsored?: boolean;
-};
-```
-
-## `EarnContextType`
-
-```ts
-export type EarnContextType = {
- /** Warns users if vault address is invalid */
- error: Error | null;
- recipientAddress?: Address;
- /** Balance of the underlying asset in the user's wallet, converted to the asset's decimals */
- walletBalance?: string;
- /** Status of the wallet balance fetch */
- walletBalanceStatus: 'pending' | 'success' | 'error';
- refetchWalletBalance: () => void;
- vaultAddress: Address;
- /** The token that is being deposited or withdrawn (the underlying asset of the vault) */
- vaultToken: Token | undefined;
- vaultName: string | undefined;
- /** Total deposits in the vault */
- deposits: string | undefined;
- /** Total liquidity (available to borrow) in the vault */
- liquidity: string | undefined;
- /** Total APY of the vault, including rewards */
- apy: number | undefined;
- nativeApy: UseMorphoVaultReturnType['nativeApy'];
- vaultFee: UseMorphoVaultReturnType['vaultFee'];
- /** Rewards earned by the user in the vault */
- rewards: UseMorphoVaultReturnType['rewards'];
- /** The amount of underlying asset that has been deposited in the vault by the connected user */
- depositedBalance?: string;
- /** Whether the deposited balance is being fetched */
- depositedBalanceStatus: 'pending' | 'success' | 'error';
- refetchDepositedBalance: () => void;
- /** Interest earned by the user in the vault */
- interestEarned?: string;
- /** Amount that the user has typed into the deposit amount input */
- depositAmount: string;
- setDepositAmount: (amount: string) => void;
- depositAmountError: string | null;
- depositCalls: Call[];
- /** Amount that the user has typed into the withdraw amount input */
- withdrawAmount: string;
- setWithdrawAmount: (amount: string) => void;
- withdrawAmountError: string | null;
- withdrawCalls: Call[];
- lifecycleStatus: LifecycleStatus;
- updateLifecycleStatus: (
- status: LifecycleStatusUpdate,
- ) => void;
-};
-```
-
-## `EarnAmountInputReact`
-
-```ts
-export type EarnAmountInputReact = {
- className?: string;
- onChange: (value: string) => void;
- value: string;
- disabled?: boolean;
- 'aria-label'?: string;
-};
-```
-
-## `DepositAmountInputReact`
-
-```ts
-export type DepositAmountInputReact = {
- className?: string;
-};
-```
-
-## `WithdrawAmountInputReact`
-
-```ts
-export type WithdrawAmountInputReact = {
- className?: string;
-};
-```
-
-## `EarnBalanceReact`
-
-```ts
-export type EarnBalanceReact = {
- className?: string;
- onActionPress: () => void;
- title: React.ReactNode;
- subtitle: string;
- showAction?: boolean;
-};
-```
-
-## `DepositBalanceReact`
-
-```ts
-export type DepositBalanceReact = {
- className?: string;
-};
-```
-
-## `WithdrawBalanceReact`
-
-```ts
-export type WithdrawBalanceReact = {
- className?: string;
-};
-```
-
-## `EarnDepositReact`
-
-```ts
-export type EarnDepositReact = {
- children?: React.ReactNode;
- className?: string;
-};
-```
-
-## `EarnWithdrawReact`
-
-```ts
-export type EarnWithdrawReact = {
- children?: React.ReactNode;
- className?: string;
-};
-```
-
-## `EarnDetailsReact`
-
-```ts
-export type EarnDetailsReact = {
- className?: string;
-};
-```
-
-## `DepositButtonReact`
-
-```ts
-export type DepositButtonReact = {
- className?: string;
-};
-```
-
-## `WithdrawButtonReact`
-
-```ts
-export type WithdrawButtonReact = {
- className?: string;
-};
-```
-
-## `DepositToMorphoParams`
-
-```ts
-export type DepositToMorphoParams = {
- /** The address of the Morpho vault */
- vaultAddress: Address;
- /** The address of the token to deposit */
- tokenAddress: Address;
- /** The amount of tokens to deposit */
- amount: bigint;
- /** The address which can withdraw the deposited tokens */
- recipientAddress: Address;
-};
-```
-
-## `WithdrawFromMorphoParams`
-
-```ts
-export type WithdrawFromMorphoParams = {
- /** The address of the Morpho vault */
- vaultAddress: Address;
- /** The amount of tokens to withdraw */
- amount: bigint;
- /** The address to which the withdrawn funds will be sent */
- recipientAddress: Address;
-};
-```
-
-## `UseBuildDepositToMorphoTxParams`
-
-```ts
-export type UseBuildDepositToMorphoTxParams = {
- vaultAddress: Address;
- recipientAddress?: Address;
- amount: string;
-};
-```
-
-## `UseBuildWithdrawFromMorphoTxParams`
-
-```ts
-export type UseBuildWithdrawFromMorphoTxParams = {
- vaultAddress: Address;
- recipientAddress?: Address;
- amount: string;
- tokenDecimals: number | undefined;
-};
-```
-
-## `UseMorphoVaultParams`
-
-```ts
-export type UseMorphoVaultParams = {
- vaultAddress: Address;
- recipientAddress?: Address;
-};
-```
-
-## `UseMorphoVaultReturnType`
-
-```ts
-export type UseMorphoVaultReturnType = {
- vaultName: string | undefined;
- status: 'pending' | 'success' | 'error';
- /** Warns users if vault address is invalid */
- error: Error | null;
- /** Underlying asset of the vault */
- asset: {
- address: Address;
- symbol: string | undefined;
- decimals: number | undefined;
- };
- /** User's deposits in the vault, adjusted for decimals */
- balance: string | undefined;
- balanceStatus: 'pending' | 'success' | 'error';
- refetchBalance: () => void;
- /** Total net APY of the vault after all rewards and fees */
- totalApy: number | undefined;
- /** Native rewards of the vault (e.g. USDC if the asset is USDC) */
- nativeApy: number | undefined;
- /** Additional rewards (e.g. MORPHO) */
- rewards:
- | {
- asset: Address;
- assetName: string;
- apy: number;
- }[]
- | undefined;
- /** Vault fee, in percent (e.g. 0.03 for 3%) */
- vaultFee: number | undefined;
- /** Number of decimals of the vault's share tokens (not underlying asset) */
- vaultDecimals: number | undefined;
- /** Total deposits in the vault */
- deposits: string | undefined;
- /** Total liquidity available to borrow in the vault */
- liquidity: string | undefined;
-};
-```
-
diff --git a/docs/onchainkit/fund/fetch-onramp-config.mdx b/docs/onchainkit/fund/fetch-onramp-config.mdx
deleted file mode 100644
index 939600882..000000000
--- a/docs/onchainkit/fund/fetch-onramp-config.mdx
+++ /dev/null
@@ -1,59 +0,0 @@
----
-title: fetchOnrampConfig
----
-
-
-The `fetchOnrampConfig` utility fetches the list of countries supported by Coinbase Onramp and their available payment methods. This is useful when you need to validate user eligibility or display available payment options.
-
-## Usage
-
-
-```tsx code
-import { fetchOnrampConfig } from '@coinbase/onchainkit/fund';
-
-// When using with OnchainKitProvider
-const config = await fetchOnrampConfig();
-
-// When using without OnchainKitProvider or in non-React environment
-const config2 = await fetchOnrampConfig('your-api-key');
-```
-
-```js return value
-{
- countries: [
- {
- id: "US",
- subdivisions: ["CA", "NY", "TX"],
- paymentMethods: [
- {
- id: "CARD",
- name: "Credit or debit card",
- description: "Pay with Visa or Mastercard",
- currencies: ["USD", "EUR"],
- minAmount: { value: "10.00", currency: "USD" },
- maxAmount: { value: "1000.00", currency: "USD" }
- }
- ]
- }
- ]
-}
-```
-
-
-## Parameters
-
-```typescript
-/**
- * Optional API key for Coinbase Onramp. If not provided, the API key from
- * OnchainKitProvider will be used. Required when using the utility without
- * OnchainKitProvider or in a non-React environment.
- */
-apiKey?: string;
-```
-
-## Returns
-
-`Promise` - Returns a promise that resolves to the configuration data containing supported countries and their payment methods.
-
-See [`OnrampConfigResponseData`](/onchainkit/fund/types#onrampconfigresponsedata) for response type details.
-
diff --git a/docs/onchainkit/fund/fetch-onramp-options.mdx b/docs/onchainkit/fund/fetch-onramp-options.mdx
deleted file mode 100644
index fbf728a3d..000000000
--- a/docs/onchainkit/fund/fetch-onramp-options.mdx
+++ /dev/null
@@ -1,79 +0,0 @@
----
-title: fetchOnrampOptions
----
-
-
-The `fetchOnrampOptions` utility retrieves supported fiat currencies and available crypto assets for a specific country. This information is essential for determining which assets can be purchased in the user's jurisdiction.
-
-## Usage
-
-
-```tsx code
-import { fetchOnrampOptions } from '@coinbase/onchainkit/fund';
-
-const options = await fetchOnrampOptions({
- country: 'US',
- subdivision: 'CA', // Required for US residents
- apiKey: 'your-api-key', // Required when using without OnchainKitProvider or in non-React environment
-});
-```
-
-```js return value
-{
- fiatCurrencies: [
- {
- id: "USD",
- name: "US Dollar",
- symbol: "$"
- }
- ],
- assets: [
- {
- id: "ETH",
- name: "Ethereum",
- networks: [
- {
- id: "ethereum",
- name: "Ethereum",
- config: {
- chainId: "0x1"
- }
- }
- ]
- }
- ]
-}
-```
-
-
-## Parameters
-
-```typescript
-{
- /**
- * ISO 3166-1 two-letter country code string representing
- * the purchasing user’s country of residence, e.g., US.
- */
- country: string;
- /**
- * ISO 3166-2 two-letter country subdivision code representing
- * the purchasing user’s subdivision of residence within their country,
- * e.g. NY. Required if the country=“US” because certain states (e.g., NY)
- * have state specific asset restrictions.
- */
- subdivision?: string;
- /**
- * Optional API key for Coinbase Onramp. If not provided, the API key from
- * OnchainKitProvider will be used. Required when using the utility without
- * OnchainKitProvider or in a non-React environment.
- */
- apiKey?: string;
-}
-```
-
-## Returns
-
-`Promise` - Returns a promise that resolves to the available options for the specified location.
-
-See [`OnrampOptionsResponseData`](/onchainkit/fund/types#onrampoptionsresponsedata) for full response type details.
-
diff --git a/docs/onchainkit/fund/fetch-onramp-quote.mdx b/docs/onchainkit/fund/fetch-onramp-quote.mdx
deleted file mode 100644
index da4c8eb37..000000000
--- a/docs/onchainkit/fund/fetch-onramp-quote.mdx
+++ /dev/null
@@ -1,113 +0,0 @@
----
-title: fetchOnrampQuote
----
-
-
-The `fetchOnrampQuote` utility provides a quote based on the asset the user would like to purchase, plus the network, fiat payment, payment currency, payment method, and country. This is useful for getting pricing information and fees before initiating a transaction.
-
-## Usage
-
-
-```tsx code
-import { fetchOnrampQuote } from '@coinbase/onchainkit/fund';
-
-const quote = await fetchOnrampQuote({
- purchaseCurrency: 'ETH',
- purchaseNetwork: 'ethereum',
- paymentCurrency: 'USD',
- paymentMethod: 'CARD',
- paymentAmount: '100.00',
- country: 'US',
- subdivision: 'CA', // Required for US residents
- apiKey: 'your-api-key', // Required when using without OnchainKitProvider or in non-React environment
-});
-```
-
-```json return value
-{
- "paymentTotal": {
- "value": "105.00",
- "currency": "USD"
- },
- "paymentSubtotal": {
- "value": "100.00",
- "currency": "USD"
- },
- "purchaseAmount": {
- "value": "0.05",
- "currency": "ETH"
- },
- "coinbaseFee": {
- "value": "3.00",
- "currency": "USD"
- },
- "networkFee": {
- "value": "2.00",
- "currency": "USD"
- },
- "quoteId": "quote_123"
-}
-```
-
-
-## Parameters
-
-```typescript
-{
- /**
- * ID of the crypto asset the user wants to purchase.
- * Retrieved from the options API.
- */
- purchaseCurrency: string;
-
- /**
- * Name of the network that the purchase currency should be purchased on.
- * Retrieved from the options API. If omitted, the default network for
- * the crypto currency is used.
- */
- purchaseNetwork?: string;
-
- /**
- * Fiat currency of the payment amount, e.g., USD.
- */
- paymentCurrency: string;
-
- /**
- * ID of payment method used to complete the purchase.
- * Retrieved from the options API.
- */
- paymentMethod: string;
-
- /**
- * Fiat amount the user wants to spend to purchase the crypto currency,
- * inclusive of fees with two decimals of precision, e.g., "100.00".
- */
- paymentAmount: string;
-
- /**
- * ISO 3166-1 two-digit country code string representing the purchasing
- * user's country of residence, e.g., US.
- */
- country: string;
-
- /**
- * ISO 3166-2 two-digit country subdivision code. Required if country="US"
- * because certain states (e.g., NY) have state specific asset restrictions.
- */
- subdivision?: string;
-
- /**
- * Optional API key for Coinbase Onramp. If not provided, the API key from
- * OnchainKitProvider will be used. Required when using the utility without
- * OnchainKitProvider or in a non-React environment.
- */
- apiKey?: string;
-}
-```
-
-## Returns
-
-`Promise` - Returns a promise that resolves to the quote data containing payment amounts, fees, and quote ID.
-
-See [`OnrampQuoteResponseData`](/onchainkit/fund/types#onrampquoteresponsedata) for full response type details.
-
diff --git a/docs/onchainkit/fund/fetch-onramp-transaction-status.mdx b/docs/onchainkit/fund/fetch-onramp-transaction-status.mdx
deleted file mode 100644
index 1ff75d67f..000000000
--- a/docs/onchainkit/fund/fetch-onramp-transaction-status.mdx
+++ /dev/null
@@ -1,67 +0,0 @@
----
-title: fetchOnrampTransactionStatus
----
-
-
-The `fetchOnrampTransactionStatus` utility retrieves the status of onramp transactions for a specific user. This is useful for tracking the progress of crypto purchases and displaying transaction history.
-
-## Usage
-
-
-```tsx code
-import { fetchOnrampTransactionStatus } from '@coinbase/onchainkit/fund';
-
-const transactions = await fetchOnrampTransactionStatus({
- partnerUserId: 'user123',
- nextPageKey: '',
- pageSize: '10',
- apiKey: 'your-api-key', // Required when using without OnchainKitProvider or in non-React environment
-});
-```
-
-```json return value
-{
- "transactions": [
- {
- "id": "tx123",
- "status": "ONRAMP_TRANSACTION_STATUS_SUCCESS",
- "purchaseAmount": { "value": "0.1", "currency": "ETH" },
- "paymentAmount": { "value": "200.00", "currency": "USD" },
- "network": "ethereum",
- "createdAt": "2024-01-01T12:00:00Z"
- }
- ],
- "nextPageKey": "next_page_token",
- "totalCount": "1"
-}
-```
-
-
-## Parameters
-
-```typescript
-{
- /**
- * A unique identifier that will be associated with any transactions created
- * by the user during their Onramp session. You can use this with the
- * Transaction Status API to check the status of the user's transaction.
- * See https://docs.cdp.coinbase.com/onramp/docs/api-reporting#buy-transaction-status
- */
- partnerUserId: string; // Your unique identifier for the user
- nextPageKey: string; // Token for pagination
- pageSize: string; // Number of transactions per page
- /**
- * Optional API key for Coinbase Onramp. If not provided, the API key from
- * OnchainKitProvider will be used. Required when using the utility without
- * OnchainKitProvider or in a non-React environment.
- */
- apiKey?: string;
-}
-```
-
-## Returns
-
-`Promise` - Returns a promise that resolves to the transaction status data.
-
-See [`OnrampTransactionStatusResponseData`](/onchainkit/fund/types#onramptransactionstatusresponsedata) for full response type details.
-
diff --git a/docs/onchainkit/fund/fund-button.mdx b/docs/onchainkit/fund/fund-button.mdx
deleted file mode 100644
index 4b03c0da2..000000000
--- a/docs/onchainkit/fund/fund-button.mdx
+++ /dev/null
@@ -1,226 +0,0 @@
----
-title:
-sidebarTitle:
-description: The `` component provides a way for users to fund their wallet without leaving your app.
----
-
-# FundButton
-
-The `` component provides a way for users to fund their wallet without leaving your app. It automatically
-detects the user's wallet type (EOA vs Smart Wallet) and directs them to the appropriate funding URL.
-
-If your user connects a Coinbase Smart Wallet, it provides an easy way to access the Coinbase Smart Wallet
-[Fund](https://keys.coinbase.com/fund) flow. Users will be able to buy and receive crypto, or use their Coinbase
-balances onchain with [Magic Spend](https://www.smartwallet.dev/guides/magic-spend).
-
-If your user connects any other EOA wallet, it provides an easy way to access [Coinbase Onramp](https://docs.cdp.coinbase.com/onramp/docs/welcome/)
-where your users will also be able to buy crypto using a fiat payment method, or transfer existing crypto from their
-Coinbase account.
-
-## Walkthrough
-
-
-
- 1. Get your Project ID from the [Coinbase Developer Platform Dashboard](https://portal.cdp.coinbase.com/).
-
-
-
-
-
- 2. Add your Project ID to your `.env` file.
-
- ```tsx .env theme={null}
- NEXT_PUBLIC_ONCHAINKIT_API_KEY=YOUR_PUBLIC_API_KEY
- NEXT_PUBLIC_CDP_PROJECT_ID=YOUR_CDP_PROJECT_ID // [!code ++]
- ```
-
-
-
-
- ```tsx theme={null}
-
- {props.children}
-
- ```
-
-
-
- [Getting session
- token](https://docs.cdp.coinbase.com/onramp-&-offramp/session-token-authentication)
-
-
-
- ```tsx theme={null}
- import { FundButton } from '@coinbase/onchainkit/fund';
-
- const sessionToken = "YOUR_SESSION_TOKEN";
-
- // can use EITHER sessionToken or fundingUrl
-
- ```
-
- {/*
-
- {({ address }) => {
- if (address) {
- return (
-
- )
- }
- return <>
-
-
-
-
-
-
- >;
- }}
-
- */}
-
-
-
-
-## Customizing the funding experience
-
-You can customize the Coinbase Onramp experience by bringing your own Onramp URL and passing it to the ``
-component. We provide the [`getOnrampBuyUrl`](/onchainkit/fund/get-onramp-buy-url) utility to help you generate a Coinbase Onramp
-URL tailored to your use case.
-
-```tsx theme={null}
-import { FundButton, getOnrampBuyUrl } from "@coinbase/onchainkit/fund";
-import { useAccount } from "wagmi";
-
-const projectId = "YOUR_CDP_PROJECT_ID";
-const { address } = useAccount();
-
-const onrampBuyUrl = getOnrampBuyUrl({
- sessionToken: "YOUR_SESSION_TOKEN",
- presetFiatAmount: 20,
- fiatCurrency: "USD",
-});
-
-;
-```
-
-
-
-You can choose to have the funding URL open in a popup or a new tab using the `openIn` prop.
-
-```tsx theme={null}
-
-```
-
-
-
-## Customizing the fund button
-
-You can override the text on the fund button using the `text` prop, and hide the icon with the `hideIcon` prop.
-
-```tsx theme={null}
-
-```
-
-
-
-You can hide the text with the `hideText` prop.
-
-```tsx theme={null}
-
-```
-
-
-
-See [`FundButtonReact`](/onchainkit/fund/types#fundbuttonreact) for the full list of customization options.
-
-## Props
-
-[`FundButtonProps`](#fundbuttonprops)
-
-```ts theme={null}
-export type FundButtonProps = FundButtonBaseProps &
- FundButtonSourceProps &
- FundButtonRenderProps;
-
-type FundButtonBaseProps = {
- /* An optional CSS class name for styling the button component */
- className?: string;
- /* A optional prop to disable the fund button */
- disabled?: boolean;
- /* The state of the button component */
- state?: FundButtonState;
- /* Whether to open the funding flow in a tab or a popup window */
- openIn?: "popup" | "tab";
- /**
- * Size of the popup window if `openIn` is set to `popup`
- * Note: popupSize will be ignored when using a Coinbase Onramp URL (i.e. https://pay.coinbase.com/*) as it requires
- * a fixed popup size.
- */
- popupSize?: "sm" | "md" | "lg";
- /* Where to open the target if `openIn` is set to tab */
- target?: string;
- /* The currency code of the fiat amount provided in the presetFiatAmount param e.g. USD, CAD, EUR. */
- fiatCurrency?: string;
- /* A callback function that will be called when the popup window is closed */
- onPopupClose?: () => void;
- /* A callback function that will be called when the button is clicked */
- onClick?: () => void;
-};
-
-// Require exactly one funding source for FundButton (not both)
-type FundButtonSourceProps =
- | { fundingUrl: string; sessionToken?: string }
- | { sessionToken: string; fundingUrl?: string };
-
-type FundButtonRenderProps =
- | {
- render?: (props: FundButtonRenderParams) => React.ReactNode;
- /* An optional React node to be displayed in the button component */
- children?: never;
- }
- | {
- render?: never;
- /* An optional React node to be displayed in the button component */
- children?: ReactNode;
- };
-
-export type FundButtonRenderParams = {
- /* The state of the button component, only relevant when using FundCardSubmitButton */
- status: FundButtonState;
- /* A callback function that will be called when the button is clicked */
- onClick: (e: React.MouseEvent) => void;
- /* Whether the button is disabled */
- isDisabled: boolean;
-};
-```
-
-
- **Note:** `FundButton` requires either `sessionToken` or `fundingUrl` to be
- provided. If neither is provided, the component will throw an error before
- compiling.
-
-
-## Related Components
-
-- [``](/onchainkit/fund/fund-card)
diff --git a/docs/onchainkit/fund/fund-card.mdx b/docs/onchainkit/fund/fund-card.mdx
deleted file mode 100644
index 98a21b39e..000000000
--- a/docs/onchainkit/fund/fund-card.mdx
+++ /dev/null
@@ -1,298 +0,0 @@
----
-title:
-sidebarTitle:
-description: The `` component provides a complete fiat onramp experience with amount input, currency switching, and payment method selection.
----
-
-
-
-
-
-The `` component provides a complete fiat onramp experience within your app. It includes:
-
-- Amount input with fiat/crypto switching
-- Payment method selection (Coinbase, Apple Pay, Debit Card)
-
- The Apple Pay and Debit Card onramp options are only available for Coinbase
- supported assets.
-
-- Automatic exchange rate updates
-- Smart handling of payment method restrictions (based on country and subdivision)
-
-
-**Session Token Required:** This utility requires a session token generated on your backend server using your CDP API keys. The session token encapsulates user addresses, supported assets, and client IP.
-
-**Note:** Restricting assets and addresses are done during session token creation on your backend.
-
-See [Session Token Authentication](https://docs.cdp.coinbase.com/onramp-&-offramp/session-token-authentication) for implementation details.
-
-
-
- To use the `FundCard` component, you'll need to provide a Client API Key in
- `OnchainKitProvider`. You can get one following our [Getting
- Started](/onchainkit/getting-started#get-your-client-api-key) steps.
-
-This component requires a `projectId` to be set in the `OnchainKitProvider`.
-You can find your `projectId` on [Coinbase Developer
-Platform](https://portal.cdp.coinbase.com/products/onchainkit).
-
-
-
-## Walkthrough
-
-
-
- 1. Get your Project ID from the [Coinbase Developer Platform Dashboard](https://portal.cdp.coinbase.com/).
-
-
-
-
-
-2. Add your Project ID to your `.env` file.
-
-```tsx .env
-NEXT_PUBLIC_ONCHAINKIT_API_KEY = YOUR_PUBLIC_API_KEY;
-NEXT_PUBLIC_CDP_PROJECT_ID = YOUR_CDP_PROJECT_ID; // [!code ++]
-```
-
-
-
- ```tsx
-
- {props.children}
-
- ```
-
-
-
- [Getting session
- token](https://docs.cdp.coinbase.com/onramp-&-offramp/session-token-authentication)
-
-
-
- ```tsx
- import { FundCard } from '@coinbase/onchainkit/fund';
-
-const sessionToken = "YOUR_SESSION_TOKEN";
-
-
-```
-
-
-
-
-
-## Customization
-
-### Custom Header and Button Text
-
-You can customize the header and button text:
-
-```tsx theme={null}
-
-```
-
-
-
-### Custom Currency
-
-You can specify which fiat currency to use:
-
-```tsx theme={null}
-
-```
-
-### Preset Amount Inputs
-
-You can specify preset amount buttons:
-
-```tsx theme={null}
-const presetAmountInputs = ["10", "20", "50"] as const;
-
-;
-```
-
-
- **Note: 3 preset amount inputs are required in order to show the preset amount
- buttons.**
-
-
-### Custom Content
-
-You can provide custom children to completely customize the card content while keeping the fund button functionality:
-
-```tsx theme={null}
-
-
-
Custom Header
-
-
-
-
-```
-
-You can also reuse the existing children from the default implementation and add your own custom content.
-
-```tsx theme={null}
-import {
- FundCardHeader,
- FundCardAmountInput,
- FundCardAmountInputTypeSwitch,
- FundCardPresetAmountInputList,
- FundCardPaymentMethodDropdown,
- FundCardSubmitButton,
-} from "@coinbase/onchainkit/fund";
-
-
- Custom Header instead of the default "FundCardHeader"
-
-
-
- Any custom content
-
-
- Any custom content
-;
-```
-
-
- **Note:** If you are using the custom components then you are going to need to
- access the state of the `FundCard` component. You can do this by using the
- `useFundContext` hook.
-
-
-```tsx theme={null}
-const {
- asset,
- currency,
- selectedPaymentMethod,
- setSelectedPaymentMethod,
- fundAmountFiat,
- setFundAmountFiat,
- fundAmountCrypto,
- setFundAmountCrypto,
- selectedInputType,
- setSelectedInputType,
- exchangeRate,
- setExchangeRate,
- exchangeRateLoading,
- setExchangeRateLoading,
- submitButtonState,
- setSubmitButtonState,
- paymentMethods,
- setPaymentMethods,
- isPaymentMethodsLoading,
- setIsPaymentMethodsLoading,
- headerText,
- buttonText,
- country,
- subdivision,
- lifecycleStatus,
- updateLifecycleStatus,
- presetAmountInputs,
- sessionToken,
-} = useFundContext();
-```
-
-## Props
-
-[`FundCardProps`](#fundcardprops)
-
-```ts theme={null}
-type FundCardProps = {
- children?: ReactNode;
- /** Required session token for authentication */
- sessionToken: string;
- assetSymbol: string;
- placeholder?: string | React.ReactNode;
- headerText?: string;
- buttonText?: string;
- country: string;
- subdivision?: string;
- currency?: string;
- className?: string;
- presetAmountInputs?: PresetAmountInputs;
-} & LifecycleEvents;
-```
-
-### FundCardSubmitButtonProps
-
-```ts theme={null}
-type FundCardSubmitButtonProps =
- | {
- render?: (props: {
- state: "default" | "success" | "error" | "loading";
- onClick: () => void;
- disabled: boolean;
- }) => React.ReactNode; // Custom render function for complete control of submit button rendering
- children?: never;
- }
- | {
- render?: never;
- children?: ReactNode;
- };
-```
-
-## Related Components
-
-- [``](/onchainkit/fund/fund-button)
diff --git a/docs/onchainkit/fund/get-onramp-buy-url.mdx b/docs/onchainkit/fund/get-onramp-buy-url.mdx
deleted file mode 100644
index f6eb2b711..000000000
--- a/docs/onchainkit/fund/get-onramp-buy-url.mdx
+++ /dev/null
@@ -1,61 +0,0 @@
----
-title: getOnrampBuyUrl
----
-
-The `getOnrampBuyUrl` utility is a helper method to generate a Coinbase Onramp URL. It helps you customize the funding
-experience for your users. For example:
-
-- Setting a default buy/send amount, defaultAsset, or defaultNetwork
-- Setting a redirect URL to return your users to your app after they complete the fund flow
-
-
-**Session Token Required:** This utility requires a session token generated on your backend server using your CDP API keys. The session token encapsulates user addresses, supported assets, and client IP.
-
-**Note:** Restricting assets and addresses are done during session token creation on your backend.
-
-See [Session Token Authentication](https://docs.cdp.coinbase.com/onramp-&-offramp/session-token-authentication) for implementation details.
-
-
-
-## Usage
-
-
-```tsx code
-import { getOnrampBuyUrl } from '@coinbase/onchainkit/fund';
-
-// First, generate a session token on your backend server
-// See: https://docs.cdp.coinbase.com/onramp-&-offramp/session-token-authentication
-const sessionToken = 'YOUR_SESSION_TOKEN';
-
-const onrampBuyUrl = getOnrampBuyUrl({
-sessionToken,
-presetFiatAmount: 20,
-fiatCurrency: 'USD',
-redirectUrl: 'https://yourapp.com/onramp-return?param=foo',
-});
-
-````
-
-```json return value
-'https://pay.coinbase.com/buy/select-asset?sessionToken=YOUR_SESSION_TOKEN&fiatCurrency=USD&presetFiatAmount=20&redirectUrl=https%3A%2F%2Fyourapp.com%2Fonramp-return%3Fparam%3Dfoo'
-````
-
-
-
-## Returns
-
-`string` - Returns a full Coinbase Onramp URL that you can redirect your users to, or open in a popup.
-
-## Parameters
-
-[`GetOnrampUrlParams`](/onchainkit/fund/types#getonrampurlparams)
-
-## Session Token Generation
-
-Session tokens must be generated on your backend server using the CDP API. The token encapsulates:
-
-- User wallet addresses
-- Supported assets and blockchains
-- Client IP address
-
-For complete implementation details, see the [Session Token Authentication Guide](https://docs.cdp.coinbase.com/onramp-&-offramp/session-token-authentication).
diff --git a/docs/onchainkit/fund/setup-onramp-event-listeners.mdx b/docs/onchainkit/fund/setup-onramp-event-listeners.mdx
deleted file mode 100644
index a0716ba1e..000000000
--- a/docs/onchainkit/fund/setup-onramp-event-listeners.mdx
+++ /dev/null
@@ -1,61 +0,0 @@
----
-title: setupOnrampEventListeners
----
-
-
-The `setupOnrampEventListeners` utility sets up event listeners for the Coinbase Onramp widget. It helps you handle various events like successful purchases, exits, and other user interactions.
-
-## Usage
-
-
-```tsx code
-// @errors: 2305
-import { setupOnrampEventListeners } from '@coinbase/onchainkit/fund';
-import type { SuccessEventData, OnrampError, EventMetadata } from '@coinbase/onchainkit/fund';
-const unsubscribe = setupOnrampEventListeners({
- onSuccess: (data: SuccessEventData) => {
- console.log('Purchase successful:', data);
- },
- onExit: (error: OnrampError) => {
- if (error) {
- console.error('Exit with error:', error);
- }
- },
- onEvent: (event: EventMetadata) => {
- console.log('Event received:', event);
- },
-});
-
-// Clean up when done
-unsubscribe();
-```
-
-```ts return value
-// Returns an unsubscribe function
-() => void
-```
-
-
-## Parameters
-
-```typescript
-{
- host?: string; // Optional custom host URL
- onSuccess?: (data?: SuccessEventData) => void; // Success callback
- onExit?: (error?: OnrampError) => void; // Exit callback
- onEvent?: (event: EventMetadata) => void; // General event callback
-}
-```
-
-## Returns
-
-`() => void` - Returns an unsubscribe function that removes the event listeners when called.
-
-## Event Types
-
-See the following type definitions for event data:
-
-- [`SuccessEventData`](/onchainkit/fund/types#successeventdata)
-- [`OnrampError`](/onchainkit/fund/types#onramperror)
-- [`EventMetadata`](/onchainkit/fund/types#eventmetadata)
-
diff --git a/docs/onchainkit/fund/types.mdx b/docs/onchainkit/fund/types.mdx
deleted file mode 100644
index ad4c97b61..000000000
--- a/docs/onchainkit/fund/types.mdx
+++ /dev/null
@@ -1,338 +0,0 @@
----
-title: Fund components & utilities types
-description: Glossary of Types.
-sidebarTitle: Fund
----
-
-## `FundCardPropsReact`
-
-```ts
-type FundCardPropsReact = {
- children?: ReactNode;
- assetSymbol: string;
- placeholder?: string | React.ReactNode;
- headerText?: string;
- buttonText?: string;
- country: string;
- subdivision?: string;
- currency?: string;
- className?: string;
- presetAmountInputs?: PresetAmountInputs;
-} & LifecycleEvents;
-```
-
-## `LifecycleStatus`
-
-```ts
-type LifecycleStatus =
- | {
- statusName: "init";
- statusData: null;
- }
- | {
- statusName: "exit";
- statusData: null;
- }
- | {
- statusName: "error";
- statusData: OnrampError;
- }
- | {
- statusName: "transactionSuccess";
- statusData: SuccessEventData;
- }
- | {
- statusName: "transactionPending";
- statusData: null;
- };
-```
-
-## `PresetAmountInputs`
-
-```ts
-type PresetAmountInputItemPropsReact = {
- presetAmountInput: string;
- currency: string;
- onClick: (presetAmountInput: string) => void;
-};
-
-/**
- * To use this type, you must provide a tuple of strings with a length of 3.
- *
- * Example:
- *
- * const presetAmountInputs: PresetAmountInputs = ['100', '200', '300'];
- */
-type PresetAmountInputs = readonly [string, string, string];
-```
-
-## `FundButtonReact`
-
-```ts
-type FundButtonReact = {
- className?: string; // An optional CSS class name for styling the button component
- disabled?: boolean; // An optional prop to disable the fund button
- text?: string; // An optional text to be displayed in the button component
- hideText?: boolean; // An optional prop to hide the text in the button component
- hideIcon?: boolean; // An optional prop to hide the icon in the button component
- fundingUrl?: string; // An optional prop to provide a custom funding URL
- openIn?: "popup" | "tab"; // Whether to open the funding flow in a tab or a popup window
- /**
- * Note: popupSize will be ignored when using a Coinbase Onramp URL
- * (i.e. https://pay.coinbase.com/*) as it requires a fixed popup size.
- */
- popupSize?: "sm" | "md" | "lg"; // Size of the popup window if `openIn` is set to `popup`
- rel?: string; // Specifies the relationship between the current document and the linked document
- target?: string; // Where to open the target if `openIn` is set to tab
-};
-```
-
-## `GetOnrampUrlParams`
-
-Props used to get an Onramp buy URL using a session token created using the Onramp session token API.
-
-See [Session Token Authentication](https://docs.cdp.coinbase.com/onramp-&-offramp/session-token-authentication)
-
-```ts
-type GetOnrampUrlParams = {
- /**
- * A session token created using the Onramp session token API. The token will
- * be linked to the project ID, addresses, and assets params provided in the
- * create session token API request.
- */
- sessionToken: string;
-} & GetOnrampBuyUrlOptionalProps;
-```
-
-## `GetOnrampBuyUrlOptionalProps`
-
-The optional properties that can be used to create an Onramp buy URL.
-
-```ts
-type GetOnrampBuyUrlOptionalProps = {
- /**
- * If specified, this asset will be automatically selected for the user in
- * the Onramp UI. Should be a valid asset symbol e.g. BTC, ETH, USDC.
- */
- defaultAsset?: string;
- /**
- * If specified, this network will be automatically selected for the user in
- * the Onramp UI. Should be a valid network name in lower case e.g. ethereum,
- * base.
- */
- defaultNetwork?: string;
- /**
- * A unique identifier that will be associated with any transactions created
- * by the user during their Onramp session. You can use this with the
- * Transaction Status API to check the status of the user's transaction.
- * See https://docs.cdp.coinbase.com/onramp/docs/api-reporting#buy-transaction-status
- */
- partnerUserId?: string;
- /**
- * This amount will be used to pre-fill the amount of crypto the user is
- * buying or sending. The user can choose to change this amount in the UI.
- * Only one of presetCryptoAmount or presetFiatAmount should be provided.
- */
- presetCryptoAmount?: number;
- /**
- * This amount will be used to pre-fill the fiat value of the crypto the user
- * is buying or sending. The user can choose to change this amount in the UI.
- * Only one of presetCryptoAmount or presetFiatAmount should be provided.
- */
- presetFiatAmount?: number;
- /**
- * The default payment method that will be selected for the user in the
- * Onramp UI. Should be one of the payment methods supported for the user's
- * location.
- */
- defaultPaymentMethod?: string;
- /**
- * The currency code of the fiat amount provided in the presetFiatAmount
- * param e.g. USD, CAD, EUR.
- */
- fiatCurrency?: string;
- /**
- * A URL that the user will be automatically redirected to after a successful
- * buy/send. The domain must match a domain on the domain allowlist in
- * Coinbase Developer Platform (https://portal.cdp.coinbase.com/products/onramp).
- */
- redirectUrl?: string;
- /**
- * The name of the component that is calling the Onramp buy URL. This will
- * be used for analytics.
- */
- originComponentName?: string;
-};
-```
-
-## `OnrampConfigResponseData`
-
-```ts
-type OnrampConfigResponseData = {
- countries: OnrampConfigCountry[];
-};
-
-type OnrampConfigCountry = {
- id: string;
- /**
- * ISO 3166-2 two-digit country subdivision code representing
- * the purchasing user’s subdivision of residence within their country,
- * e.g. NY. Required if the country=“US” because certain states (e.g., NY)
- * have state specific asset restrictions.
- */
- subdivisions: string[];
- paymentMethods: OnrampPaymentMethod[];
-};
-
-type OnrampPaymentMethod = {
- id: string;
-};
-```
-
-## `OnrampOptionsResponseData`
-
-```ts
-type OnrampOptionsResponseData = {
- /**
- * List of supported fiat currencies that can be exchanged for crypto on Onramp in the given location.
- * Each currency contains a list of available payment methods, with min and max transaction limits for that currency.
- */
- paymentCurrencies: OnrampPaymentCurrency[];
- /**
- * List of available crypto assets that can be bought on Onramp in the given location.
- */
- purchaseCurrencies: OnrampPurchaseCurrency[];
-};
-
-type OnrampPurchaseCurrency = {
- id: string;
- name: string;
- symbol: string;
- iconUrl: string;
- networks: OnrampNetwork[];
-};
-
-type OnrampPaymentCurrency = {
- id: string;
- limits: OnrampPaymentMethodLimit[];
- iconUrl: string;
-};
-
-type OnrampNetwork = {
- name: string;
- displayName: string;
- chainId: string;
- contractAddress: string;
-};
-
-type OnrampPaymentMethodLimit = {
- id: string;
- min: number;
- max: number;
-};
-```
-
-## `OnrampTransactionStatusResponseData`
-
-```ts
-type OnrampTransactionStatusResponseData = {
- /** List of `OnrampTransactions` in reverse chronological order. */
- transactions: OnrampTransaction[];
- /** A reference to the next page of transactions. */
- nextPageKey: string;
- /** The total number of transactions made by the user. */
- totalCount: string;
-};
-
-type OnrampTransaction = {
- status: OnrampTransactionStatusName;
- purchaseCurrency: string;
- purchaseNetwork: string;
- purchaseAmount: OnrampAmount;
- paymentTotal: OnrampAmount;
- paymentSubtotal: OnrampAmount;
- coinbaseFee: OnrampAmount;
- networkFee: OnrampAmount;
- exchangeRate: OnrampAmount;
- txHash: string;
- createdAt: string;
- country: string;
- userId: string;
- paymentMethod: string;
- transactionId: string;
-};
-```
-
-## `SuccessEventData`
-
-```ts
-type SuccessEventData = {
- assetImageUrl: string;
- assetName: string;
- assetSymbol: string;
- chainId: string;
-};
-```
-
-## `OnrampError`
-
-```ts
-type OnrampError = {
- errorType:
- | "internal_error"
- | "handled_error"
- | "network_error"
- | "unknown_error";
- code?: string;
- debugMessage?: string;
-};
-```
-
-## `EventMetadata`
-
-```ts
-type EventMetadata =
- | OpenEvent
- | TransitionViewEvent
- | PublicErrorEvent
- | ExitEvent
- | SuccessEvent
- | RequestOpenUrlEvent;
-```
-
-## `OnrampQuoteResponseData`
-
-```ts
-type OnrampQuoteResponseData = {
- /**
- * Object with amount and currency of the total fiat payment required to complete the purchase, inclusive of any fees.
- * The currency will match the `paymentCurrency` in the request if it is supported, otherwise it falls back to USD.
- */
- paymentTotal: OnrampAmount;
- /**
- * Object with amount and currency of the fiat cost of the crypto asset to be purchased, exclusive of any fees.
- * The currency will match the `paymentCurrency`.
- */
- paymentSubtotal: OnrampAmount;
- /**
- * Object with amount and currency of the crypto that to be purchased.
- * The currency will match the `purchaseCurrency` in the request.
- * The number of decimals will be based on the crypto asset.
- */
- purchaseAmount: OnrampAmount;
- /**
- * Object with amount and currency of the fee charged by the Coinbase exchange to complete the transaction.
- * The currency will match the `paymentCurrency`.
- */
- coinbaseFee: OnrampAmount;
- /**
- * Object with amount and currency of the network fee required to send the purchased crypto to the user’s wallet.
- * The currency will match the `paymentCurrency`.
- */
- networkFee: OnrampAmount;
- /**
- * Reference to the quote that should be passed into the initialization parameters when launching the Coinbase Onramp widget via the SDK or URL generator.
- */
- quoteId: string;
-};
-```
diff --git a/docs/onchainkit/getting-started.mdx b/docs/onchainkit/getting-started.mdx
deleted file mode 100644
index 69b3f0d18..000000000
--- a/docs/onchainkit/getting-started.mdx
+++ /dev/null
@@ -1,62 +0,0 @@
----
-title: "Getting Started"
----
-
-import StartBuilding from "/snippets/start-building.mdx";
-import InstallationOptions from '/snippets/installation-options.mdx';
-
-
-OnchainKit is your go-to SDK for building beautiful onchain applications. Ship in minutes, not weeks.
-
-Anyone can build an onchain app in 15 minutes with OnchainKit. No blockchain experience required.
-
-## Why OnchainKit?
-
-OnchainKit streamlines app development by providing a comprehensive toolkit that combines powerful onchain features with developer-friendly design:
-
-- **Ergonomic design:** Full-stack tools that make complex onchain interactions intuitive
-- **Battle-tested patterns:** Industry best practices packaged into ready-to-use solutions
-- **Purpose-built components:** Pre-built modules for common onchain workflows
-- **Framework agnostic:** Compatible with any React-supporting framework
-- **Supercharged by Base:** Deep integration with Base's protocol features and ecosystem
-
-## Automatic Installation
-
-
-
-
-
-We recommend starting a new OnchainKit app using `create onchain`, which sets up everything automatically for you. To create a project, run:
-
-```bash Terminal
-npm create onchain@latest
-```
-
-After the prompts, `create onchain` will create a folder with your project name and install the required dependencies.
-
-You can also checkout our pre-built templates:
-
-- [Onchain Commerce](https://onchain-commerce-template.vercel.app/)
-- [NFT minting](https://ock-mint.vercel.app/)
-- [Funding flow](https://github.com/fakepixels/fund-component)
-- [Social profile](https://github.com/fakepixels/ock-identity)
-
-
- These docs are LLM-friendly—reference [OnchainKit AI Prompting Guide](/onchainkit/guides/ai-prompting-guide) in your code editor to streamline builds and prompt smarter.
-
-
-## Manual Installation
-
-Add OnchainKit to your existing project manually.
-
-
-
-## Testing Your OnchainKit App
-
-Build reliable applications with comprehensive end-to-end testing using [OnchainTestKit](/onchainkit/guides/testing-with-onchaintestkit). Test wallet connections, transactions, and complex user flows with automated browser testing.
-
-
diff --git a/docs/onchainkit/guides/ai-prompting-guide.mdx b/docs/onchainkit/guides/ai-prompting-guide.mdx
deleted file mode 100644
index c60b195cc..000000000
--- a/docs/onchainkit/guides/ai-prompting-guide.mdx
+++ /dev/null
@@ -1,259 +0,0 @@
----
-sidebarTitle: 'AI Prompting Guide'
-title: Developer's Guide to Effective AI Prompting
-description: Learn practical AI prompting techniques to enhance your coding workflow and get better results from AI coding assistants.
----
-
-This guide helps developers leverage AI tools effectively in their coding workflow. Whether you're using Cursor, GitHub Copilot, or other AI assistants,
-these strategies will help you get better results and integrate AI smoothly into your development process.
-
-## Understanding Context Windows
-
-### Why Context Matters
-
-AI coding assistants have what's called a "context window" \- the amount of text they can "see" and consider when generating responses. Think of it as the AI's working memory:
-
-- Most modern AI assistants can process thousands of tokens (roughly 4-5 words per token)
-- Everything you share and everything the AI responds with consumes this limited space
-- Once the context window fills up, parts of your conversational history may be lost.
-
-This is why providing relevant context upfront is crucial \- the AI can only work with what it can "see" in its current context window.
-
-### Optimizing for Context Windows
-
-To get the most out of AI assistants:
-
-1. **Prioritize relevant information**: Focus on sharing the most important details first.
-2. **Remove unnecessary content**: Avoid pasting irrelevant code or documentation.
-3. **Structure your requests**: Use clear sections and formatting to make information easy to process.
-4. **Reference external resources**: For large codebases, consider sharing only the most relevant files.
-
-For larger projects, create and reference a central documentation file that summarizes key information, rather than repeatedly explaining the same context.
-
-## Setting Up AI Tools
-
-### Configuring Cursor Rules
-
-Cursor Rules allow you to provide consistent context to Cursor AI, making it more effective at understanding your codebase and providing relevant suggestions.
-
-#### Creating Cursor Rules
-
-1. Open the Command Palette in Cursor:
- - Mac: `Cmd + Shift + P`
- - Windows/Linux: `Ctrl + Shift + P`
-2. Search for "Cursor Rules" and select the option to create or edit rules
-
-3. Add project-specific rules that help Cursor understand your project:
-
- - [Next.js](https://raw.githubusercontent.com/PatrickJS/awesome-cursorrules/refs/heads/main/rules/nextjs-tailwind-typescript-apps-cursorrules-prompt/.cursorrules)
- - [Astro](https://raw.githubusercontent.com/PatrickJS/awesome-cursorrules/refs/heads/main/rules/astro-typescript-cursorrules-prompt-file/.cursorrules)
- - [Vite](https://raw.githubusercontent.com/PatrickJS/awesome-cursorrules/refs/heads/main/rules/typescript-vite-tailwind-cursorrules-prompt-file/.cursorrules)
-
-4. Save your rules file and Cursor will apply these rules to its AI suggestions
-
-### Setting Up an OnchainKit Project
-
-To create a new OnchainKit project:
-
-```shell
-npm create onchain@latest
-```
-
-After creating your project, prompt to generate comprehensive documentation for your new OnchainKit project.
-
-### Creating Project Documentation
-
-A comprehensive instructions file helps AI tools understand your project better. This should be created early in your project and updated regularly.
-
-**Ready-to-Use Prompt for Creating Instructions.md:**
-
-```
-Create a detailed instructions.md file for my project with the following sections:
-
-1. Overview: Summarize the project goals, problem statements, and core functionality.
-2. Tech Stack: List all technologies, libraries, frameworks with versions.
-3. Project Structure: Document the file organization with explanations.
-4. Coding Standards: Document style conventions, linting rules, and patterns.
-5. User Stories: Key functionality from the user perspective.
-6. APIs and Integrations: External services and how they connect.
-```
-
-
-Note: When planning architecture or making complex design decisions, use AI models with strong reasoning—like o4 mini or Claude 3.7 Sonnet. They excel at thinking through tradeoffs, edge cases, and long-term planning.
-
-
-
-## Effective Prompting Strategies
-
-### Be Specific and Direct
-
-Start with clear commands and be specific about what you want. AI tools respond best to clear, direct instructions.
-
-**Example:** ❌ "Help me with my code"
- ✅ "Refactor this authentication function to use async/await instead of nested then() calls"
-
-### Provide Context for Complex Tasks
-
-**Ready-to-Use Prompt:**
-
-```
- I'm working on a onchainkit project using [frameworks/libraries]. I need your help with:
-
-1. Problem: [describe specific issue]
-2. Current approach: [explain what you've tried]
-3. Constraints: [mention any technical limitations]
-4. Expected outcome: [describe what success looks like]
-
-Here's the relevant documentation @https://docs.base.org/onchainkit/getting-started
-
-Here's the relevant code:
-[paste your code]
-```
-
-### Ask for Iterations
-
-Start simple and refine through iterations rather than trying to get everything perfect in one go.
-
-**Ready-to-Use Prompt:**
-
-```
-Let's approach this step by step:
-1. First, implement a basic version of [feature] with minimal functionality.
-2. Then, we'll review and identify areas for improvement.
-3. Next, let's add error handling and edge cases.
-4. Finally, we'll optimize for performance.
-
-Please start with step 1 now.
-```
-
-## Working with OnchainKit
-
-### Leveraging LLMs.txt for Documentation
-
-The OnchainKit project provides optimized documentation in the form of LLMs.txt files. These files are specifically formatted to be consumed by AI models:
-
-1. Use [OnchainKit Documentation](/onchainkit/getting-started)
-2. Find the component you want to implement
-3. Copy the corresponding LLMs.txt url
-4. Paste it into your prompt to provide context
-
-**Example LLMs.txt Usage:**
-
-```
-I'm implementing a swap component with OnchainKit. Here's the relevant LLMs.txt:
-
-@https://docs.base.org/onchainkit/getting-started
-
-Based on this documentation, please show me how to implement a wallet connector that:
-1. Swap from Base USDC to Base ETH.
-2. Handles connection states properly.
-3. Includes error handling.
-4. Follows best practices for user experience.
-```
-
-### Component Integration Example
-
-**Ready-to-Use Prompt for Token Balance Display:**
-
-```
-I need to implement a new feature in my project.
-
-1. Shows the connected wallet's balance of our {ERC20 token}.
-2. It updates when the balance changes.
-3. Handles loading and error states appropriately.
-4. Follows our project's coding standards.
-5. Update the instructions.md to reflect this new implementation.
-
-```
-
-**_\*update the prompt a token of your choice_**
-
-## Debugging with AI
-
-### Effective Debugging Prompts
-
-**Ready-to-Use Prompt for Bug Analysis:**
-
-```
-I'm encountering an issue with my code:
-
-1. Expected behavior: [what should happen]
-2. Actual behavior: [what's happening instead]
-3. Error messages: [include any errors]
-4. Relevant code: [paste the problematic code]
-
-Please analyze this situation step by step and help me:
-1. Identify potential causes of this issue
-2. Suggest debugging steps to isolate the problem
-3. Propose possible solutions
-```
-
-**Ready-to-Use Prompt for Adding Debug Logs:**
-
-```
-I need to debug the following function. Please add comprehensive logging statements that will help me trace:
-1. Input values and their types
-2. Function execution flow
-3. Intermediate state changes
-4. Output values or errors
-
-Here's my code:
-[paste your code]
-```
-
-### When You're Stuck
-
-If you're uncertain how to proceed:
-
-**Ready-to-Use Clarification Prompt:**
-
-```
-I'm unsure how to proceed with [specific task]. Here's what I know:
-1. [context about the problem]
-2. [what you've tried]
-3. [specific areas where you need guidance]
-
-What additional information would help you provide better assistance?
-```
-
-## Advanced Prompting Techniques
-
-Modern AI assistants have capabilities that you can leverage with these advanced techniques:
-
-1. **Step-by-step reasoning**: Ask the AI to work through problems systematically
-
-```
-Please analyze this code step by step and identify potential issues.
-```
-
-2. **Format specification**: Request specific formats for clarity
-
-```
-Please structure your response as a tutorial with code examples and explanations.
-```
-
-3. **Length guidance**: Indicate whether you want brief or detailed responses
-
-```
-Please provide a concise explanation in 2-3 paragraphs.
-```
-
-4. **Clarify ambiguities**: Help resolve unclear points when you receive multiple options
-
-```
-I notice you suggested two approaches. To clarify, I'd prefer to use the first approach with TypeScript.
-```
-
-## Best Practices Summary
-
-1. **Understand context limitations**: Recognize that AI tools have finite context windows and prioritize information accordingly
-2. **Provide relevant context**: Share code snippets, error messages, and project details that matter for your specific question
-3. **Be specific in requests**: Clear, direct instructions yield better results than vague questions
-4. **Break complex tasks into steps**: Iterative approaches often work better for complex problems
-5. **Request explanations**: Ask the AI to explain generated code or concepts you don't understand
-6. **Use formatting for clarity**: Structure your prompts with clear sections and formatting
-7. **Reference documentation**: When working with specific libraries like OnchainKit, share relevant documentation
-8. **Test and validate**: Always review and test AI-generated code before implementing
-9. **Build on previous context**: Refer to earlier parts of your conversation when iterating
-10. **Provide feedback**: Let the AI know what worked and what didn't to improve future responses
-
diff --git a/docs/onchainkit/guides/build-onchain-apps.mdx b/docs/onchainkit/guides/build-onchain-apps.mdx
deleted file mode 100644
index 5bcfb30c2..000000000
--- a/docs/onchainkit/guides/build-onchain-apps.mdx
+++ /dev/null
@@ -1,106 +0,0 @@
----
-title: Build Onchain Apps with OnchainKit ⛵️ 🌊
-sidebarTitle: Build Onchain Apps
-description: Our onchain app template streamlines your initial app setup and seamlessly integrates onchain components with web2 infrastructure, saving you weeks of effort.
----
-
-Build your first onchain app effortlessly with OnchainKit's **app template**. Save weeks of initial setup
-and easily integrate onchain components with web2 infrastructure.
-
-Our opinionated approach streamlines early decisions, making your development process smoother.
-
-Whether you're a hackathon participant or an ambitious entrepreneur aiming to build the next big thing, this template is tailored for you.
-
-
-
-
-
-Play with it live [here](https://onchain-app-template.vercel.app).
-
-## Out of the box
-
-- Next.js v14 with App routing 🏗️
-- Ethereum L2 support through Base 🔵
-- Easy account creation with Smart Wallet
-- Live examples for Minting and Paymaster experiences with wagmi and Viem 🚀
-- Latest styling best practices with Tailwind CSS 💅
-- Easy maintenance with linting, formatting, and tests ✅
-
-## Getting Started
-
-
-
- Go to https://github.com/coinbase/onchain-app-template and click on the "Use this template" button to create a new repository based on the template.
-
-
-
-
-
-
- Get your [Client API Key](https://portal.cdp.coinbase.com/projects/api-keys/client-key) from Coinbase Developer Platform.
-
-
-
-
-
- In order to use RainbowKit, you'd also need to obtain a Wallet Connector project ID at [WalletConnect](https://cloud.reown.com/app).
-
-
-
- Create a new file in your project's root directory and name it `.env`.
-
-
-
-
-
- ```tsx .env
- NEXT_PUBLIC_CDP_API_KEY=YOUR_PUBLIC_API_KEY
- NEXT_PUBLIC_WC_PROJECT_ID=YOUR_WALLETCONNECT_PROJECT_ID
- ```
-
-
- In your new onchain app repository, run the following commands to install the dependencies:
-
- ```bash
- # Install bun in case you don't have it
- curl -fsSL https://bun.sh/install | bash
-
- # Install packages
- bun i
- ```
-
-
- Now you are ready to run the app and start building onchain experiences!
-
- ```bash
- # Run Next app
- bun run dev
- ```
-
-
-
-## Need more help?
-
-If you have any questions or need help, feel free to reach out to us on [Discord](https://discord.gg/invite/buildonbase)
-or open a [Github issue](https://github.com/coinbase/onchainkit/issues) or DM us
-on X at [@onchainkit](https://x.com/onchainkit), [@zizzamia](https://x.com/zizzamia), [@fkpxls](https://x.com/fkpxls).
-
diff --git a/docs/onchainkit/guides/contribution.mdx b/docs/onchainkit/guides/contribution.mdx
deleted file mode 100644
index 9fa7e40ae..000000000
--- a/docs/onchainkit/guides/contribution.mdx
+++ /dev/null
@@ -1,143 +0,0 @@
----
-title: Contribution Guide · OnchainKit
-sidebarTitle: Contribution Guide
-description: Learn how to contribute to OnchainKit
----
-
-Welcome to OnchainKit! So you want to contribute to this project? You came to the right place.
-
-In this guide, you will learn how to:
-
-- [Set up this project](#setup)
-- [Navigate the codebase](#codebase)
-- [Accomplish various workflows](#workflows)
-- [Submit a feature request](#feature-request)
-
-## Setup
-
-### Clone the repo
-
-```bash
-git clone git@github.com:coinbase/onchainkit.git
-```
-
-### Install Node and pnpm
-
-Use nvm, mise, n or your favorite version manager to install Node.js.
-
-For pnpm, see the installation instructions on the [pnpm website](https://pnpm.io/installation).
-
-### Install dependencies
-
-From the root of the repository:
-
-```bash
-pnpm install
-```
-
-## Codebase
-
-This project is a monorepo managed with pnpm. The `@coinbase/onchainkit` package is located in:
-
-```bash
-packages/onchainkit/
-```
-
-Here is a rough layout of the codebase:
-
-```bash
-packages/onchainkit/
-└── src/
- ├── api/ - API related components and functions
- ├── core/ - Files with zero dependencies
- ├── styles/ - Styles
- │ ├── index-with-tailwind.css - CSS entrypoint
- ├── {Component}/ - Component folder
- │ ├── components/ - React components
- │ │ ├── {Name}.tsx
- │ │ ├── {Name}.test.tsx
- │ │ └── {Name}.css
- │ ├── core/ - Utility functions
- │ ├── index.ts - Entrypoint for the folder
- │ └── types.ts - Export types
- │
- ├── index.ts - Main package entry point
- ├── types.ts - Core types
- └── OnchainKitProvider.tsx - OnchainKit provider
-```
-
-## Workflows
-
-### Development
-
-To work on OnchainKit components with live UI feedback:
-
-```bash
-pnpm f:play dev
-```
-
-This will build the OnchainKit package in watch mode, and start a development environment (the playground) where you can see your components in action.
-
-As you make changes, the playground will update automatically.
-
-Navigate to [http://localhost:3000](http://localhost:3000) to open the playground.
-
-### Building
-
-To build the package:
-
-```bash
-pnpm f:ock build
-```
-
-### Testing
-
-Write and update existing unit tests. You can run tests with:
-
-```bash
-pnpm f:ock test
-```
-
-For watching file changes and rerunning tests automatically:
-
-```bash
-pnpm f:ock test:watch
-```
-
-We expect 100% code coverage for any updates. You can get coverage information with:
-
-```bash
-pnpm f:ock test:coverage
-```
-
-If the coverage drops below 100%, look at the coverage report generated by the above command with:
-
-```bash
-open coverage/index.html
-```
-
-### Updating changelog
-
-To update the change log, run:
-
-```bash
-pnpm changeset
-```
-
-Select `minor` and use the following format for the summary:
-
-```markdown
-- **feat**: feature update information. By @your-github-id #XX (XX is the PR number)
-```
-
-Possible values are:
-
-- `feat`
-- `fix`
-- `docs`
-- `chore`
-
-## Feature request
-
-Have a component in mind that we are not supporting yet? You can submit a feature request to our [Github](https://github.com/coinbase/onchainkit/issues). Create a **"New issue"** and label it "Feature Request: ...".
-
diff --git a/docs/onchainkit/guides/lifecycle-status.mdx b/docs/onchainkit/guides/lifecycle-status.mdx
deleted file mode 100644
index c77f4afa7..000000000
--- a/docs/onchainkit/guides/lifecycle-status.mdx
+++ /dev/null
@@ -1,171 +0,0 @@
----
-title: Lifecycle Status · OnchainKit
-sidebarTitle: Lifecycle Status
-description: How to influence the behavior of your components and onchain data with Lifecycle Status.
----
-
-OnchainKit Lifecycle Status allows you to manage the state of APIs and onchain transactions seamlessly within components.
-
-## How to listen to the Lifecycle Status
-
-The Lifecycle Status is a TypeScript object that provides easy access to the `statusName` and `statusData` properties,
-allowing you to stay informed and responsive.
-
-```tsx
-import { useCallback } from 'react';
-import { Transaction } from '@coinbase/onchainkit/transaction';
-// ---cut-before---
-import type { LifecycleStatus } from '@coinbase/onchainkit/transaction';
-
-const handleOnStatus = useCallback((status: LifecycleStatus) => {
- console.log('LifecycleStatus', status);
-}, []);
-
-
- // omitted component code for brevity
-
-```
-
-## Lifecycle Status
-
-The Lifecycle Status includes 3 states common to all components:
-
-### `init`
-
-The component is initialized and ready for use.
-
-```ts
-{
- statusName: 'init';
- statusData: null;
-}
-```
-
-### `success`
-
-The component has successfully completed its main action, such as `swap` or `transaction`.
-
-```ts
-{
- statusName: 'success';
- statusData: {
- // the data returned from the API or onchain operation
- };
-}
-```
-
-### `error`
-
-The component has encountered an issue while fetching API data, executing an onchain operation,
-or needs to display a visual message to the user.
-
-```ts
-{
- statusName: 'error';
- statusData: {
- code: string; // The error code representing the location of the error
- error: string; // The error message providing developer details
- message: string; // The error message providing user-facing details
- };
-}
-```
-
-Each component brings its own unique experience, and we have explored both the swap and transaction processes.
-
-## Lifecycle Status with [``](/onchainkit/swap/swap)
-
-### `amountChange`
-
-Any of the Swap Input fields have been updated.
-
-```ts
-{
- statusName: 'amountChange';
- statusData: {
- amountFrom: string;
- amountTo: string;
- tokenFrom?: Token;
- tokenTo?: Token;
- isMissingRequiredField: boolean;
- };
-}
-```
-
-### `transactionPending`
-
-The transaction has been submitted to the network but has not yet been confirmed to be included in a block.
-During this pending state, the transaction is waiting to be validated by the network's consensus mechanism.
-
-```ts
-{
- statusName: 'transactionPending';
- statusData: null;
-}
-```
-
-### `transactionApproved`
-
-The transaction has been verified to be valid and it has been included in a block
-however the transaction is not yet finalized.
-
-```ts
-{
- statusName: 'transactionApproved';
- statusData: {
- transactionHash: Hex;
- transactionType: 'Batched' | 'ERC20' | 'Permit2' | 'Swap';
- };
-}
-```
-
-### `success`
-
-The transaction has been added to the blockchain and the transaction is considered final.
-
-```ts
-{
- statusName: 'success';
- statusData: {
- transactionReceipt: TransactionReceipt;
- };
-}
-```
-
-## Lifecycle Status with [``](/onchainkit/transaction/transaction)
-
-### `transactionIdle`
-
-The transaction component is waiting for the user to take action.
-
-```ts
-{
- statusName: 'transactionIdle';
- statusData: null;
-}
-```
-
-### `transactionPending`
-
-The transaction has been submitted to the network but has not yet been confirmed to be included in a block.
-During this pending state, the transaction is waiting to be validated by the network's consensus mechanism.
-
-```ts
-{
- statusName: 'transactionPending';
- statusData: null;
-}
-```
-
-### `success`
-
-The transaction has been added to the blockchain and the transaction is considered final.
-
-```ts
-{
- statusName: 'success';
- statusData: {
- transactionReceipts: TransactionReceipt[];
- };
-}
-```
-
diff --git a/docs/onchainkit/guides/reporting-bug.mdx b/docs/onchainkit/guides/reporting-bug.mdx
deleted file mode 100644
index 6f86bf9fd..000000000
--- a/docs/onchainkit/guides/reporting-bug.mdx
+++ /dev/null
@@ -1,29 +0,0 @@
----
-title: OnchainKit Bug Reporting Guide
-sidebarTitle: Reporting a bug
-description: Help us make OnchainKit better
----
-
-We look at all of your bug reports and will do our best to fix them as quickly as possible.
-
-
-
- Navigate to [Issues tab](https://github.com/coinbase/onchainkit/issues) on Github and click the "New issue" button.
-
-
- Pick the "Bug Report" option and fill out the form to the best of your ability.
-
-
- We'll do our best to respond to your issue on Github as soon as possible.
-
-
-
-### Have a special request?
-You can tag us on [Discord](https://discord.com/channels/1220414409550336183/1253768005863739565) or DM us on [X](https://x.com/Onchainkit).
-
-We're most active on X and Discord, so if you're able to, please create an issue there.
-
-### Found a security vulnerability?
-If you've found a security vulnerability, please report it to our [HackerOne Program](https://hackerone.com/coinbase?type=team). We offer generous rewards for bounties.
-
-
diff --git a/docs/onchainkit/guides/tailwind.mdx b/docs/onchainkit/guides/tailwind.mdx
deleted file mode 100644
index d08a7717d..000000000
--- a/docs/onchainkit/guides/tailwind.mdx
+++ /dev/null
@@ -1,100 +0,0 @@
----
-title: Tailwind CSS Integration Guide · OnchainKit
-sidebarTitle: Tailwind CSS Integration Guide
-description: Learn how to integrate Tailwind CSS with OnchainKit
----
-
-OnchainKit comes with first class support for `tailwindcss`.
-
-
-
- You can use the default styles without any customization.
- Just place this at the top of your application's entry point to have the components work out of the box.
-
- ```javascript
- import '@coinbase/onchainkit/styles.css';
- ```
-
-
- Depending on your dark mode setup, you may have to add `safelist: ['dark']` to your Tailwind config.
-
- ```javascript filename="tailwind.config.js"
- /** @type {import('tailwindcss').Config} */
- export default {
- content: ['./src/**/*.{ts,tsx}'],
- darkMode: ['class'], // [!code focus]
- safelist: ['dark'], // [!code focus]
- theme: {
- fontFamily: {
- sans: ['Inter', 'sans-serif'],
- },
- },
- plugins: [],
- };
- ```
-
-
- There are many ways to handle color mode.
-
- In OnchainKit, toggling color mode works by adding / removing class name `dark` to the root html tag.
-
-
- To override default colorscheme, you need to modify the following css variables:
-
- ```css
- @tailwind base;
-
- @layer base {
- :root {
- --ock-font-family: 'your-custom-value';
- --ock-border-radius: 'your-custom-value';
- --ock-border-radius-inner: 'your-custom-value';
- --ock-text-inverse: 'your-custom-value';
- --ock-text-foreground: 'your-custom-value';
- --ock-text-foreground-muted: 'your-custom-value';
- --ock-text-error: 'your-custom-value';
- --ock-text-primary: 'your-custom-value';
- --ock-text-success: 'your-custom-value';
- --ock-text-warning: 'your-custom-value';
- --ock-text-disabled: 'your-custom-value';
-
- --ock-bg-default: 'your-custom-value';
- --ock-bg-default-hover: 'your-custom-value';
- --ock-bg-default-active: 'your-custom-value';
- --ock-bg-alternate: 'your-custom-value';
- --ock-bg-alternate-hover: 'your-custom-value';
- --ock-bg-alternate-active: 'your-custom-value';
- --ock-bg-inverse: 'your-custom-value';
- --ock-bg-inverse-hover: 'your-custom-value';
- --ock-bg-inverse-active: 'your-custom-value';
- --ock-bg-primary: 'your-custom-value';
- --ock-bg-primary-hover: 'your-custom-value';
- --ock-bg-primary-active: 'your-custom-value';
- --ock-bg-primary-washed: 'your-custom-value';
- --ock-bg-primary-disabled: 'your-custom-value';
- --ock-bg-secondary: 'your-custom-value';
- --ock-bg-secondary-hover: 'your-custom-value';
- --ock-bg-secondary-active: 'your-custom-value';
- --ock-bg-error: 'your-custom-value';
- --ock-bg-warning: 'your-custom-value';
- --ock-bg-success: 'your-custom-value';
- --ock-bg-default-reverse: 'your-custom-value';
-
- --ock-icon-color-primary: 'your-custom-value';
- --ock-icon-color-foreground: 'your-custom-value';
- --ock-icon-color-foreground-muted: 'your-custom-value';
- --ock-icon-color-inverse: 'your-custom-value';
- --ock-icon-color-error: 'your-custom-value';
- --ock-icon-color-success: 'your-custom-value';
- --ock-icon-color-warning: 'your-custom-value';
-
- --ock-line-primary: 'your-custom-value';
- --ock-line-default: 'your-custom-value';
- --ock-line-heavy: 'your-custom-value';
- --ock-line-inverse: 'your-custom-value';
- }
- }
- ```
-
-
-
diff --git a/docs/onchainkit/guides/telemetry.mdx b/docs/onchainkit/guides/telemetry.mdx
deleted file mode 100644
index 35e101dcd..000000000
--- a/docs/onchainkit/guides/telemetry.mdx
+++ /dev/null
@@ -1,80 +0,0 @@
----
-title: Telemetry · OnchainKit
-sidebarTitle: Telemetry
-description: Understanding OnchainKit's anonymous telemetry system and how to configure it.
----
-
-OnchainKit is introducing an anonymous telemetry system to help us better understand how our library is used in the wild. Participation in this anonymous program is optional—if you'd prefer not to share any usage data, you can easily opt out.
-
-### Why Are We Collecting Telemetry?
-
-OnchainKit has quickly become a go-to full‑stack component library for integrating essential onchain functionality (like ``, ``, and ``) in minutes. Until now, our usage insights have been limited to public npm download counts and API endpoint usage. By collecting telemetry data, we can:
-
-- **Gauge Component Usage**: Understand which components (and their variants) are most popular
-- **Data-Informed Improvements**: Help our data science team generate insights that drive future enhancements and refactoring decisions
-- **Proactive Monitoring**: Quickly detect issues with new releases or API changes through a dedicated error event stream (with alerts to oncall engineers)
-
-### What Data Will Be Collected?
-
-Telemetry data is completely anonymous and designed to provide aggregated insights. Specifically, we collect:
-
-- **Command Details**: Which commands (or component events) are being invoked (e.g. walletConnection, swapSuccess)
-- **Version & App Info**: The OnchainKit version, app name (from window.top.document.title), and origin (the app URL)
-- **Usage Metrics**: Information such as the number of unique wallets, transactions, or contracts interacting with OnchainKit
-- **Error Events**: Generic error events along with component context to help us triage any issues
-
-No sensitive data—such as environment variables, file paths, or private keys—is ever collected.
-
-### How Does It Work?
-
-Telemetry is integrated directly into each applicable component via our new `sendAnalytics` function. When a component event occurs (e.g. a successful transaction or a wallet connection), this function automatically fires (provided analytics is enabled in your OnchainKit config).
-
-For example, a telemetry event might be sent as follows:
-
-```bash
-curl -X POST https://api.developer.coinbase.com/rpc/analytics \
- -H "Content-Type: application/json" \
- -H "OnchainKit-Version: 0.37.0" \
- -H "OnchainKit-App-Name: My Example App" \
- -H "Origin: www.example-app.vercel.app" \
- -d '{
- "eventType": "transactionSuccess",
- "apiKey": "ozpCtG8CfD3TIod_1Va7UBsUm5Rn1",
- "data": {
- "address": "0x...",
- "contract": "0x...",
- "transactionHash": "0x...",
- "sponsored": true
- }
- }'
-```
-
-### How Do I Opt Out?
-
-By default, telemetry is opt‑out starting with version 0.37.0. If you'd like to disable telemetry, simply set the `analytics` flag to `false` in your OnchainKit configuration:
-
-```tsx
-// @noErrors: 2304
-export function Providers(props: { children: ReactNode }) {
- return (
-
- {props.children}
-
- );
-}
-```
-
-You can also re‑enable analytics later by toggling this flag to `true`.
-
-We believe that this telemetry initiative will help us make OnchainKit even better for all developers—by focusing our improvements on the most used features and catching issues early. If you have any questions or feedback, please reach out to the OnchainKit team.
-
-Happy building!
-
-— The OnchainKit core team
-
diff --git a/docs/onchainkit/guides/themes.mdx b/docs/onchainkit/guides/themes.mdx
deleted file mode 100644
index 422124c3b..000000000
--- a/docs/onchainkit/guides/themes.mdx
+++ /dev/null
@@ -1,203 +0,0 @@
----
-title: OnchainKit Themes · OnchainKit
-sidebarTitle: OnchainKit Themes
-description: Customize the appearance of OnchainKit's components
----
-
-
-
-
-
-## Overview
-
-OnchainKit provides flexible appearance control through two main features: `mode` and `theme`.
-
-- **Mode**: Controls the light/dark appearance and includes an auto option that inherits the system preference.
-- **Theme**: Governs the overall styling across components.
-
-You can choose from built-in themes or dynamically switch modes based on user preference or system settings, allowing for a customized and responsive user interface.
-
-## Built-in Themes
-
-OnchainKit offers multiple themes to quickly style your components. Set the theme via the `OnchainKitProvider` using `config.appearance.theme`:
-
-- `default`: Includes both light and dark modes.
-- `base`: Single mode only.
-- `cyberpunk`: Single mode only.
-- `hacker`: Single mode only.
-- `custom`: Single mode only.
-
-If no theme is selected, the **`default`** theme is applied automatically.
-
-```tsx
-// @noErrors: 2304 17008 1005
-
-```
-
-## Mode
-
-Control the color scheme by setting the `config.appearance.mode` property of the `OnchainKitProvider`:
-
-- `auto`: Automatically switches between light and dark mode based on the user’s OS preference.
-- `light`: Forces all components to use the light version of the theme.
-- `dark`: Forces all components to use the dark version of the theme.
-
-If no mode is specified, `auto` mode will be applied by default.
-
-```tsx
-// @noErrors: 2304 17008 1005
-
-```
-
-## CSS Overrides
-
-Fine-tune specific aspects of an existing theme.
-This is useful when you want to make adjustments to the appearance of the components without creating an entirely new theme.
-
-```css
-@layer base {
- :root
- .default-light,
- .default-dark,
- .base,
- .cyberpunk,
- .hacker {
- /* Override specific variables as needed */
- --ock-font-family: 'your-custom-value';
- --ock-border-radius: 'your-custom-value';
- --ock-text-primary: 'your-custom-value';
- }
-}
-```
-
-## Custom Theme
-
-Define an entirely new look and feel for your application.
-This gives you complete control over all aspects of the design, including colors, fonts, and other visual properties.
-
-#### Usage Options:
-
-##### Automatic Light/Dark Mode Switching:
-
-- To automatically switch between light and dark versions of your custom theme:
-
-```tsx
-// @noErrors: 2304 17008 1005
-
-```
-
-##### Single Theme Version:
-
-- To use only one version of your custom theme at all times:
-
-```tsx
-// @noErrors: 2304 17008 1005
-
-```
-
-##### Defining a custom theme
-
-Use CSS variables to define your custom theme.
-The class name definitions must include the `-light` or `-dark` suffix.
-
-```css
-
-.custom-light {
- /* Font and Shape */
- --ock-font-family: 'your-custom-value';
- --ock-border-radius: 'your-custom-value';
- --ock-border-radius-inner: 'your-custom-value';
-
- /* Text Colors */
- --ock-text-inverse: 'your-custom-value';
- --ock-text-foreground: 'your-custom-value';
- --ock-text-foreground-muted: 'your-custom-value';
- --ock-text-error: 'your-custom-value';
- --ock-text-primary: 'your-custom-value';
- --ock-text-success: 'your-custom-value';
- --ock-text-warning: 'your-custom-value';
- --ock-text-disabled: 'your-custom-value';
-
- /* Background Colors */
- --ock-bg-default: 'your-custom-value';
- --ock-bg-default-hover: 'your-custom-value';
- --ock-bg-default-active: 'your-custom-value';
- --ock-bg-alternate: 'your-custom-value';
- --ock-bg-alternate-hover: 'your-custom-value';
- --ock-bg-alternate-active: 'your-custom-value';
- --ock-bg-inverse: 'your-custom-value';
- --ock-bg-inverse-hover: 'your-custom-value';
- --ock-bg-inverse-active: 'your-custom-value';
- --ock-bg-primary: 'your-custom-value';
- --ock-bg-primary-hover: 'your-custom-value';
- --ock-bg-primary-active: 'your-custom-value';
- --ock-bg-primary-washed: 'your-custom-value';
- --ock-bg-primary-disabled: 'your-custom-value';
- --ock-bg-secondary: 'your-custom-value';
- --ock-bg-secondary-hover: 'your-custom-value';
- --ock-bg-secondary-active: 'your-custom-value';
- --ock-bg-error: 'your-custom-value';
- --ock-bg-warning: 'your-custom-value';
- --ock-bg-success: 'your-custom-value';
- --ock-bg-default-reverse: 'your-custom-value';
-
- /* Icon Colors */
- --ock-icon-color-primary: 'your-custom-value';
- --ock-icon-color-foreground: 'your-custom-value';
- --ock-icon-color-foreground-muted: 'your-custom-value';
- --ock-icon-color-inverse: 'your-custom-value';
- --ock-icon-color-error: 'your-custom-value';
- --ock-icon-color-success: 'your-custom-value';
- --ock-icon-color-warning: 'your-custom-value';
-
- /* Border Colors */
- --ock-border-line-primary: 'your-custom-value';
- --ock-border-line-default: 'your-custom-value';
- --ock-border-line-heavy: 'your-custom-value';
- --ock-border-line-inverse: 'your-custom-value';
-}
-
-.custom-dark {
- /* Define dark mode custom classes here */
-}
-
-```
-
diff --git a/docs/onchainkit/guides/troubleshooting.mdx b/docs/onchainkit/guides/troubleshooting.mdx
deleted file mode 100644
index c3f303615..000000000
--- a/docs/onchainkit/guides/troubleshooting.mdx
+++ /dev/null
@@ -1,142 +0,0 @@
----
-title: "Troubleshooting"
----
-
-
-This guide covers common issues you may encounter while using OnchainKit. If you don't find your issue here, try searching our [GitHub Issues](https://github.com/coinbase/onchainkit/issues) or joining our [Discord Community](https://discord.gg/invite/buildonbase).
-
-## Common Issues
-
-### Environment Setup
-
-- **Missing API Key**
-
- - Error: "Project ID is required for this component"
- - Solution: Add your Client API Key to `.env`:
-
- ```dotenv
- NEXT_PUBLIC_CDP_API_KEY=YOUR_PUBLIC_API_KEY
- ```
-
-- **Invalid Environment Variables**
-
- - Error: "Cannot find environment variable"
- - Solution: Use the correct variable name for your framework:
- - Next.js: `NEXT_PUBLIC_CDP_API_KEY`
- - Vite: `VITE_PUBLIC_ONCHAINKIT_API_KEY`
- - Astro: `PUBLIC_ONCHAINKIT_API_KEY`
-
-- **Contracts Not Available**
- - Error: "Contracts are not available" or "Contracts not available for LifecycleStatus"
- - Solutions:
- - Verify `NEXT_PUBLIC_ONCHAINKIT_API_KEY` is set correctly
- - For Checkout component with `chargeHandler`, also set:
- ```dotenv
- NEXT_PUBLIC_COINBASE_COMMERCE_API_KEY=YOUR_COMMERCE_API_KEY
- ```
- - Ensure API keys are properly exposed in your environment
-
-### Dependencies
-
-- **Version Compatibility**
- - Issue: Unexpected behavior or type errors
- - Solution: Ensure compatible versions:
- ```json
- {
- "dependencies": {
- "@coinbase/onchainkit": "latest",
- "viem": "^2.0.0",
- "@wagmi/core": "^2.0.0"
- }
- }
- ```
-
-### Provider Configuration
-
-- **Missing OnchainKitProvider**
-
- - Error: "OnchainKit context not found"
- - Solution: Wrap your app with OnchainKitProvider and [configure](/onchainkit/getting-started) properly:
-
- ```tsx
- import { OnchainKitProvider } from '@coinbase/onchainkit';
- import { base } from 'viem/chains';
-
- export default function App({ children }) {
- return (
-
- {children}
-
- );
- }
- ```
-
-### Wallet Connection
-
-- **Connection Failed**
-
- - Error: "Unable to connect wallet"
- - Solutions:
- - Verify wallet extension is installed and unlocked
- - Check [supported chains configuration](/onchainkit/wallet/wallet)
- - Ensure proper network selection in wallet
- - Verify RPC endpoints are accessible
-
-- **Chain Switching Issues**
- - Error: "Failed to switch chain"
- - Solutions:
- - Verify chain ID is supported by OnchainKit
- - Check wallet has required permissions
- - Ensure RPC endpoints are configured correctly
- - Add chain to wallet if not already added
-
-### Transaction Issues
-
-- **Gas Estimation Failed**
- - Error: "Gas estimation failed"
- - Solutions:
- - Verify sufficient balance for gas
- - Check transaction parameters are valid
- - Ensure proper network [configuration](/onchainkit/transaction/transaction)
-
-### Identity Components
-
-### Theme Issues
-
-- **Dark Mode Not Working**
-
- - Error: "Dark mode styles not applying"
- - Solution: Configure Tailwind and OnchainKit properly:
-
- ```js
- // tailwind.config.js
- module.exports = {
- darkMode: ['class'],
- safelist: ['dark'],
- // ... rest of config
- }
- ```
-
-### React Native
-
-- ** React Native Support **
- - OnchainKit's components are not supported for use in React Native, however, you can use utility functions, like `getName`, as well as some hooks in your React Native app. When using these utility functions, you may need to import them directly rather than through the export file.
- - Example: `import { getName } from '@coinbase/onchainkit/esm/identity/utils/getName.js';` rather than `import { getName } from '@coinbase/onchainkit/identity;`
-
-### Module Resolution
-
-- **Module Resolution Errors**
- - Error: "Cannot find module ... or its corresponding type declarations. Consider updating to 'node16', 'nodenext', or 'bundler'"
- - Solution: Update your Node.js version or use a compatible bundler. We recommend using Node 18+ and `"moduleResolution": "NodeNext"` for the best developer experience. OnchainKit supports only ES Modules and does not support CommonJS modules.
-
-## Getting Help
-
-Need more help?
-
-- [Discord Community](https://discord.gg/invite/buildonbase)
-- [X/Twitter Support](https://x.com/onchainkit)
-- [GitHub Issues](https://github.com/coinbase/onchainkit/issues)
-
diff --git a/docs/onchainkit/guides/use-basename-in-onchain-app.mdx b/docs/onchainkit/guides/use-basename-in-onchain-app.mdx
deleted file mode 100644
index 04ed805d2..000000000
--- a/docs/onchainkit/guides/use-basename-in-onchain-app.mdx
+++ /dev/null
@@ -1,97 +0,0 @@
----
-title: Use Basename · OnchainKit
-sidebarTitle: Use Basename
-description: Integrate Basenames into your onchain app, in just a few steps.
----
-
-Basenames are an essential onchain building block that empowers builders to establish their identity on Base by registering human-readable names for their wallet addresses.
-
-They operate entirely onchain, utilizing the same technology as ENS names, and are deployed on Base.
-
-You can integrate [Basenames](https://www.base.org/names) into your app with these few steps.
-
-
-
- Follow the [Getting Started](/onchainkit/getting-started) guide to install the package.
-
-
- Update to the latest version and choose from the following steps: a React component approach, a React hook, or a pure TypeScript utility function.
-
-
-
-
-## React components with `` and ``
-
-Use the [``](/onchainkit/identity/avatar) and [``](/onchainkit/identity/name) components to display Basenames associated with Ethereum addresses.
-
-The `chain` prop is optional and setting to Base, it's what makes the components switch from ENS to Basenames.
-
-```tsx
-// @noErrors: 2657 - JSX expressions must have one parent element
-import { Avatar, Name } from '@coinbase/onchainkit/identity';
-import { base } from 'viem/chains';
-
-const address = '0x02feeb0AdE57b6adEEdE5A4EEea6Cf8c21BeB6B1';
-
-// omitted component code for brevity
-
-
-```
-
-
-{/*
-
-
- */}
-
-## React hooks with `useAvatar` and `useName`
-
-Use the [`useAvatar`](/onchainkit/identity/use-avatar) and [`useName`](/onchainkit/identity/use-name) hooks to get Basenames associated with Ethereum addresses.
-
-The hooks are incredibly useful for building custom components while leveraging OnchainKit for efficient data fetching.
-
-
-```tsx code
-import { useAvatar, useName } from '@coinbase/onchainkit/identity';
-import { base } from 'viem/chains';
-
-const address = '0x02feeb0AdE57b6adEEdE5A4EEea6Cf8c21BeB6B1';
-const basename = 'zizzamia.base.eth';
-const { data: avatar, isLoading: avatarIsLoading } = await useAvatar({ ensName: basename, chain: base });
-const { data: name, isLoading: nameIsLoading } = await useName({ address, chain: base });
-```
-
-```ts return value
-{ data: 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAwMCIgaGVpZ2h0PSIzMDAwIiB2aWV3Qm94PSIwIDAgMzAwMCAzMDAwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF81NTY5XzcyODM1KSI+PHJlY3Qgd2lkdGg9IjMwMDAiIGhlaWdodD0iMzAwMCIgZmlsbD0iIzE1NURGRCIvPjxjaXJjbGUgY3g9IjE1MDAiIGN5PSIxNTAwIiByPSIxNTAwIiBmaWxsPSIjMTU1REZEIi8+PHBhdGggZD0iTTI3MTMuMTMgMTUwMEMyNzMxLjIgMTY4MC45MiAyNjE1LjEzIDE4MTguMTUgMjUwNy43OCAxOTI0LjQyQzIzOTQuNyAyMDMyLjEzIDIyOTAuNDQgMjEwOC44OCAyMjAwLjg4IDIyMDAuNjFDMjEwOS4xNSAyMjkwLjE2IDIwMzIuMjIgMjM5NC42MSAxOTI0LjUxIDI1MDcuNjhDMTgxOC4xNSAyNjE1LjA0IDE2ODAuOTIgMjczMS4xMSAxNTAwIDI3MTMuMTNDMTMxOS4wOCAyNzMxLjIgMTE4MS44NSAyNjE1LjEzIDEwNzUuNTggMjUwNy43OEM5NjcuODY2IDIzOTQuNyA4OTEuMTIgMjI5MC40NCA3OTkuMzg5IDIyMDAuODhDNzA5LjgzNyAyMTA5LjE1IDYwNS4zOSAyMDMyLjIyIDQ5Mi4zMTUgMTkyNC41MUMzODQuOTYyIDE4MTguMTUgMjY4Ljg5IDE2ODAuOTIgMjg2Ljg3MyAxNTAwQzI2OC43OTkgMTMxOS4wOCAzODQuODcxIDExODEuODUgNDkyLjIyNCAxMDc1LjU4QzYwNS4yOTkgOTY3Ljg2NiA3MDkuNTY0IDg5MS4xMiA3OTkuMTE2IDc5OS4zODlDODkwLjg0OCA3MDkuODM3IDk2Ny43NzUgNjA1LjM5IDEwNzUuNDkgNDkyLjMxNUMxMTgxLjg1IDM4NC44NzEgMTMxOS4wOCAyNjguNzk5IDE1MDAgMjg2Ljg3M0MxNjgwLjkyIDI2OC43OTkgMTgxOC4xNSAzODQuODcxIDE5MjQuNDIgNDkyLjIyNEMyMDMyLjEzIDYwNS4yOTkgMjEwOC44OCA3MDkuNTY0IDIyMDAuNjEgNzk5LjExNkMyMjkwLjE2IDg5MC44NDggMjM5NC42MSA5NjcuNzc1IDI1MDcuNjggMTA3NS40OUMyNjE1LjA0IDExODEuODUgMjczMS4xMSAxMzE5LjA4IDI3MTMuMTMgMTUwMFoiIGZpbGw9IndoaXRlIi8+PHBhdGggZD0iTTEzOTEuMDYgMTUwMEMxMzkxLjA2IDE2NDcuODkgMTM1OC40IDE3ODEuNjIgMTMwNS43NCAxODc4LjI4QzEyNTMuMDMgMTk3NS4wNSAxMTgwLjY5IDIwMzQgMTEwMS41MyAyMDM0QzEwMjIuMzYgMjAzNCA5NTAuMDMxIDE5NzUuMDUgODk3LjMxNCAxODc4LjI4Qzg0NC42NiAxNzgxLjYyIDgxMiAxNjQ3Ljg5IDgxMiAxNTAwQzgxMiAxMzUyLjExIDg0NC42NiAxMjE4LjM4IDg5Ny4zMTQgMTEyMS43MkM5NTAuMDMxIDEwMjQuOTUgMTAyMi4zNiA5NjYgMTEwMS41MyA5NjZDMTE4MC42OSA5NjYgMTI1My4wMyAxMDI0Ljk1IDEzMDUuNzQgMTEyMS43MkMxMzU4LjQgMTIxOC4zOCAxMzkxLjA2IDEzNTIuMTEgMTM5MS4wNiAxNTAwWiIgZmlsbD0iIzE1NURGRCIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSI2Ii8+PGVsbGlwc2UgY3g9IjExMDIuNTciIGN5PSIxMTk0LjkzIiByeD0iMTI2LjQxNCIgcnk9IjIzMS45MzQiIGZpbGw9IndoaXRlIi8+PHBhdGggZD0iTTIxODcuMTYgMTUwMEMyMTg3LjE2IDE2NDcuODkgMjE1NC41IDE3ODEuNjIgMjEwMS44NCAxODc4LjI4QzIwNDkuMTIgMTk3NS4wNSAxOTc2Ljc5IDIwMzQgMTg5Ny42MyAyMDM0QzE4MTguNDYgMjAzNCAxNzQ2LjEzIDE5NzUuMDUgMTY5My40MSAxODc4LjI4QzE2NDAuNzYgMTc4MS42MiAxNjA4LjEgMTY0Ny44OSAxNjA4LjEgMTUwMEMxNjA4LjEgMTM1Mi4xMSAxNjQwLjc2IDEyMTguMzggMTY5My40MSAxMTIxLjcyQzE3NDYuMTMgMTAyNC45NSAxODE4LjQ2IDk2NiAxODk3LjYzIDk2NkMxOTc2Ljc5IDk2NiAyMDQ5LjEyIDEwMjQuOTUgMjEwMS44NCAxMTIxLjcyQzIxNTQuNSAxMjE4LjM4IDIxODcuMTYgMTM1Mi4xMSAyMTg3LjE2IDE1MDBaIiBmaWxsPSIjMTU1REZEIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjYiLz48ZWxsaXBzZSBjeD0iMTg5Ni41OCIgY3k9IjExOTQuOTMiIHJ4PSIxMjYuNDE0IiByeT0iMjMxLjkzNCIgZmlsbD0id2hpdGUiLz48L2c+PGRlZnM+PGNsaXBQYXRoIGlkPSJjbGlwMF81NTY5XzcyODM1Ij48cmVjdCB3aWR0aD0iMzAwMCIgaGVpZ2h0PSIzMDAwIiBmaWxsPSJ3aGl0ZSIvPjwvY2xpcFBhdGg+PC9kZWZzPjwvc3ZnPg==', isLoading: false }
-{ data: 'zizzamia.base.eth', isLoading: false }
-```
-
-
-## Typescript utility with `getAvatar` and `getName`
-
-Use the [`getAvatar`](/onchainkit/identity/get-avatar) and [`getName`](/onchainkit/identity/get-name) functions to get Basenames associated with Ethereum addresses.
-
-Being pure functions, it seamlessly integrates into any TypeScript project, including Vue, Angular, Svelte, or Node.js.
-
-
-```tsx code
-import { getAvatar, getName } from '@coinbase/onchainkit/identity';
-import { base } from 'viem/chains';
-
-const address = '0x02feeb0AdE57b6adEEdE5A4EEea6Cf8c21BeB6B1';
-const basename = 'zizzamia.base.eth';
-const avatar = await getAvatar({ ensName: basename, chain: base });
-const name = await getName({ address, chain: base });
-```
-
-```ts return value
-data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAwMCIgaGVpZ2h0PSIzMDAwIiB2aWV3Qm94PSIwIDAgMzAwMCAzMDAwIiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF81NTY5XzcyODM1KSI+PHJlY3Qgd2lkdGg9IjMwMDAiIGhlaWdodD0iMzAwMCIgZmlsbD0iIzE1NURGRCIvPjxjaXJjbGUgY3g9IjE1MDAiIGN5PSIxNTAwIiByPSIxNTAwIiBmaWxsPSIjMTU1REZEIi8+PHBhdGggZD0iTTI3MTMuMTMgMTUwMEMyNzMxLjIgMTY4MC45MiAyNjE1LjEzIDE4MTguMTUgMjUwNy43OCAxOTI0LjQyQzIzOTQuNyAyMDMyLjEzIDIyOTAuNDQgMjEwOC44OCAyMjAwLjg4IDIyMDAuNjFDMjEwOS4xNSAyMjkwLjE2IDIwMzIuMjIgMjM5NC42MSAxOTI0LjUxIDI1MDcuNjhDMTgxOC4xNSAyNjE1LjA0IDE2ODAuOTIgMjczMS4xMSAxNTAwIDI3MTMuMTNDMTMxOS4wOCAyNzMxLjIgMTE4MS44NSAyNjE1LjEzIDEwNzUuNTggMjUwNy43OEM5NjcuODY2IDIzOTQuNyA4OTEuMTIgMjI5MC40NCA3OTkuMzg5IDIyMDAuODhDNzA5LjgzNyAyMTA5LjE1IDYwNS4zOSAyMDMyLjIyIDQ5Mi4zMTUgMTkyNC41MUMzODQuOTYyIDE4MTguMTUgMjY4Ljg5IDE2ODAuOTIgMjg2Ljg3MyAxNTAwQzI2OC43OTkgMTMxOS4wOCAzODQuODcxIDExODEuODUgNDkyLjIyNCAxMDc1LjU4QzYwNS4yOTkgOTY3Ljg2NiA3MDkuNTY0IDg5MS4xMiA3OTkuMTE2IDc5OS4zODlDODkwLjg0OCA3MDkuODM3IDk2Ny43NzUgNjA1LjM5IDEwNzUuNDkgNDkyLjMxNUMxMTgxLjg1IDM4NC44NzEgMTMxOS4wOCAyNjguNzk5IDE1MDAgMjg2Ljg3M0MxNjgwLjkyIDI2OC43OTkgMTgxOC4xNSAzODQuODcxIDE5MjQuNDIgNDkyLjIyNEMyMDMyLjEzIDYwNS4yOTkgMjEwOC44OCA3MDkuNTY0IDIyMDAuNjEgNzk5LjExNkMyMjkwLjE2IDg5MC44NDggMjM5NC42MSA5NjcuNzc1IDI1MDcuNjggMTA3NS40OUMyNjE1LjA0IDExODEuODUgMjczMS4xMSAxMzE5LjA4IDI3MTMuMTMgMTUwMFoiIGZpbGw9IndoaXRlIi8+PHBhdGggZD0iTTEzOTEuMDYgMTUwMEMxMzkxLjA2IDE2NDcuODkgMTM1OC40IDE3ODEuNjIgMTMwNS43NCAxODc4LjI4QzEyNTMuMDMgMTk3NS4wNSAxMTgwLjY5IDIwMzQgMTEwMS41MyAyMDM0QzEwMjIuMzYgMjAzNCA5NTAuMDMxIDE5NzUuMDUgODk3LjMxNCAxODc4LjI4Qzg0NC42NiAxNzgxLjYyIDgxMiAxNjQ3Ljg5IDgxMiAxNTAwQzgxMiAxMzUyLjExIDg0NC42NiAxMjE4LjM4IDg5Ny4zMTQgMTEyMS43MkM5NTAuMDMxIDEwMjQuOTUgMTAyMi4zNiA5NjYgMTEwMS41MyA5NjZDMTE4MC42OSA5NjYgMTI1My4wMyAxMDI0Ljk1IDEzMDUuNzQgMTEyMS43MkMxMzU4LjQgMTIxOC4zOCAxMzkxLjA2IDEzNTIuMTEgMTM5MS4wNiAxNTAwWiIgZmlsbD0iIzE1NURGRCIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSI2Ii8+PGVsbGlwc2UgY3g9IjExMDIuNTciIGN5PSIxMTk0LjkzIiByeD0iMTI2LjQxNCIgcnk9IjIzMS45MzQiIGZpbGw9IndoaXRlIi8+PHBhdGggZD0iTTIxODcuMTYgMTUwMEMyMTg3LjE2IDE2NDcuODkgMjE1NC41IDE3ODEuNjIgMjEwMS44NCAxODc4LjI4QzIwNDkuMTIgMTk3NS4wNSAxOTc2Ljc5IDIwMzQgMTg5Ny42MyAyMDM0QzE4MTguNDYgMjAzNCAxNzQ2LjEzIDE5NzUuMDUgMTY5My40MSAxODc4LjI4QzE2NDAuNzYgMTc4MS42MiAxNjA4LjEgMTY0Ny44OSAxNjA4LjEgMTUwMEMxNjA4LjEgMTM1Mi4xMSAxNjQwLjc2IDEyMTguMzggMTY5My40MSAxMTIxLjcyQzE3NDYuMTMgMTAyNC45NSAxODE4LjQ2IDk2NiAxODk3LjYzIDk2NkMxOTc2Ljc5IDk2NiAyMDQ5LjEyIDEwMjQuOTUgMjEwMS44NCAxMTIxLjcyQzIxNTQuNSAxMjE4LjM4IDIxODcuMTYgMTM1Mi4xMSAyMTg3LjE2IDE1MDBaIiBmaWxsPSIjMTU1REZEIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjYiLz48ZWxsaXBzZSBjeD0iMTg5Ni41OCIgY3k9IjExOTQuOTMiIHJ4PSIxMjYuNDE0IiByeT0iMjMxLjkzNCIgZmlsbD0id2hpdGUiLz48L2c+PGRlZnM+PGNsaXBQYXRoIGlkPSJjbGlwMF81NTY5XzcyODM1Ij48cmVjdCB3aWR0aD0iMzAwMCIgaGVpZ2h0PSIzMDAwIiBmaWxsPSJ3aGl0ZSIvPjwvY2xpcFBhdGg+PC9kZWZzPjwvc3ZnPg==
-zizzamia.base.eth;
-```
-
-
-
diff --git a/docs/onchainkit/guides/using-ai-powered-ides.mdx b/docs/onchainkit/guides/using-ai-powered-ides.mdx
deleted file mode 100644
index 0d7779530..000000000
--- a/docs/onchainkit/guides/using-ai-powered-ides.mdx
+++ /dev/null
@@ -1,30 +0,0 @@
----
-title: Use AI-powered IDEs · OnchainKit
-sidebarTitle: Use AI-powered IDEs
-description: How to use AI-powered IDEs to generate code for OnchainKit.
----
-
-You can also directly download the [context](https://github.com/fakepixels/md-generator/blob/master/combined-ock-docs-0.35.8.mdx) and import it into AI-powered IDE such as Cursor or Replit.
-
-In addition, you can import a `.cursorrules` file in the root of your project via [Cursor Directory](https://cursor.directory/onchainkit). Cursor also has an array of resources [here](https://cursor.directory/learn) on how to use AI-powered IDEs.
-
-
-
-
-
-## AI Tooling
-
-### Replit
-
-[Replit](https://replit.com) is a cloud-based coding platform that streamlines the process of setting up, building, sharing, and deploying projects. It allows developers to code in a Google Docs-like environment, and pre-built templates provide a great starting point for building a website, app, or game. Its new AI Agent can assist with the code development process and work with several files at once, making the programming process feel like a one-on-one conversation.
-
-### Cursor
-
-[Cursor](https://cursor.com) is an AI-powered code editor that makes the programming experience feel like magic. Built as a fork of VS Code, it boasts powerful features like AI code completion, natural language editing, and codebase understanding. Cursor Pro is free for the first two weeks after signup, and offers more powerful models.
-
-### Using OnchainKit with CDP SDK
-
-You can use OnchainKit with [CDP SDK](https://docs.cdp.coinbase.com/get-started/docs/overview) to access additional capabilities such as [AgentKit](https://docs.cdp.coinbase.com/agentkit/docs/welcome).
-
diff --git a/docs/onchainkit/hooks/use-build-deposit-to-morpho-tx.mdx b/docs/onchainkit/hooks/use-build-deposit-to-morpho-tx.mdx
deleted file mode 100644
index 4fd7a3c2b..000000000
--- a/docs/onchainkit/hooks/use-build-deposit-to-morpho-tx.mdx
+++ /dev/null
@@ -1,32 +0,0 @@
----
-title: useBuildDepositToMorphoTx
----
-
-
-The `useBuildDepositToMorphoTx` hook is used to build a deposit transaction to Morpho from within a React component.
-
-The hook handles the following:
-
-- Fetching data required to build the transaction
-- Using [`buildDepositToMorphoTx`](/onchainkit/api/build-deposit-to-morpho-tx) to build the transaction
-- Returning the transaction calls to be used with the `` component
-
-## Usage
-
-```tsx code
-import { useBuildDepositToMorphoTx } from '@coinbase/onchainkit/earn';
-
-const { calls } = useBuildDepositToMorphoTx({
- vaultAddress: '0x...',
- recipientAddress: '0x...',
- amount: '1000000000000000000',
-});
-```
-
-## Returns
-
-[`{ calls: Call[] }`](/onchainkit/transaction/types#calls)
-
-## Parameters
-
-[`UseBuildDepositToMorphoTxParams`](/onchainkit/earn/types#usebuilddeposittomorphotxparams)
diff --git a/docs/onchainkit/hooks/use-build-withdraw-from-morpho-tx.mdx b/docs/onchainkit/hooks/use-build-withdraw-from-morpho-tx.mdx
deleted file mode 100644
index 59d126df2..000000000
--- a/docs/onchainkit/hooks/use-build-withdraw-from-morpho-tx.mdx
+++ /dev/null
@@ -1,33 +0,0 @@
----
-title: useBuildWithdrawFromMorphoTx
----
-
-
-The `useBuildWithdrawFromMorphoTx` hook is used to build a withdraw transaction from Morpho from within a React component.
-
-The hook handles the following:
-
-- Fetching data required to build the transaction
-- Using [`buildWithdrawFromMorphoTx`](/onchainkit/api/build-withdraw-from-morpho-tx) to build the transaction
-- Returning the transaction calls to be used with the `` component
-
-## Usage
-
-```tsx code
-import { useBuildWithdrawFromMorphoTx } from '@coinbase/onchainkit/earn';
-
-const { calls } = useBuildWithdrawFromMorphoTx({
- vaultAddress: '0x...',
- recipientAddress: '0x...',
- amount: '1000000000000000000',
- tokenDecimals: 18,
-});
-```
-
-## Returns
-
-[`{ calls: Call[] }`](/onchainkit/transaction/types#calls)
-
-## Parameters
-
-[`UseBuildWithdrawFromMorphoTxParams`](/onchainkit/earn/types#usebuildwithdrawfrommorphotxparams)
diff --git a/docs/onchainkit/hooks/use-earn-context.mdx b/docs/onchainkit/hooks/use-earn-context.mdx
deleted file mode 100644
index daaccdd84..000000000
--- a/docs/onchainkit/hooks/use-earn-context.mdx
+++ /dev/null
@@ -1,36 +0,0 @@
----
-title: useEarnContext
----
-
-
-The `useEarnContext` hook is used to access the context values of the `Earn` component.
-
-It can be used to build fully custom deposit and withdraw interfaces and contains all relevant data about a Morpho vault.
-
-
-## Usage
-
-Note: This hook should be used within a `` or `` (headless) component.
-
-```tsx code
-import { useEarnContext } from '@coinbase/onchainkit/earn';
-
-const { depositAmount,
- setDepositAmount,
- apy,
- nativeApy,
- rewards,
- vaultFee,
- vaultToken,
- liquidity,
- deposits
- // ...
- } = useEarnContext();
-
-// Use the values to build a custom deposit interface!
-```
-
-## Returns
-
-[`EarnContextType`](/onchainkit/earn/types#earncontexttype)
-
diff --git a/docs/onchainkit/hooks/use-mint-details.mdx b/docs/onchainkit/hooks/use-mint-details.mdx
deleted file mode 100644
index 50449e613..000000000
--- a/docs/onchainkit/hooks/use-mint-details.mdx
+++ /dev/null
@@ -1,86 +0,0 @@
----
-title: useMintDetails
----
-
-
-The `useMintDetails` hook implements the `getMintDetails` API, returning the data required to view an NFT to be minted.
-
-It is implemented with [useQuery](https://tanstack.com/query/latest/docs/framework/react/reference/useQuery) from `@tanstack/react-query`, and returns a `UseQueryResult` object, allowing you to pass through all `@tanstack/react-query` options.
-
-Before using them, make sure to obtain a [Client API Key](https://portal.cdp.coinbase.com/projects/api-keys/client-key) from Coinbase Developer Platform.
-
-## Usage
-
-
-```tsx code
-import { useMintDetails } from '@coinbase/onchainkit/nft';
-
-const Component = () => {
- const { data, isLoading, error } = useMintDetails({
- contractAddress: '0x...',
- takerAddress: '0x...',
- tokenId: '1',
- });
-
- if (isLoading) return Loading...
;
-
- return {JSON.stringify(data)}
;
-};
-```
-
-```tsx scaffolding
-import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
-import { OnchainKitProvider } from '@coinbase/onchainkit';
-import { useTokenDetails } from '@coinbase/onchainkit/nft';
-
-const queryClient = new QueryClient();
-
-
-
-
-
-
-```
-
-
-```json return value
-{
- "data": {
- "name": "NFT Name",
- "description": "NFT description",
- "imageUrl": "https://example.com/image.png",
- "animationUrl": "",
- "mimeType": "image/png",
- "contractType": "ERC721",
- "price": {
- "amount": "0.0001",
- "currency": "ETH",
- "amountUSD": "0.242271"
- },
- "mintFee": {
- "amount": "0",
- "currency": "ETH",
- "amountUSD": "0"
- },
- "maxMintsPerWallet": 100,
- "isEligibleToMint": true,
- "creatorAddress": "0x...",
- "network": "",
- "totalTokens": "300",
- "totalOwners": "200"
- }
-}
-```
-
-
-## Returns
-
-[`UseQueryResult`](/onchainkit/api/types#getmintdetailsresponse)
-
-## Parameters
-
-[`GetMintDetailsParams`](/onchainkit/api/types#getmintdetailsparams)
-
diff --git a/docs/onchainkit/hooks/use-morpho-vault.mdx b/docs/onchainkit/hooks/use-morpho-vault.mdx
deleted file mode 100644
index f685afb3a..000000000
--- a/docs/onchainkit/hooks/use-morpho-vault.mdx
+++ /dev/null
@@ -1,33 +0,0 @@
----
-title: useMorphoVault
----
-
-
-The `useMorphoVault` hook fetches and returns comprehensive data about a Morpho vault, including APYs, balances, and rewards.
-
-## Usage
-
-```tsx
-import { useMorphoVault } from '@coinbase/onchainkit/earn';
-
-const {
- balance,
- totalApy,
- rewards,
- deposits,
- liquidity,
- // ... other values
-} = useMorphoVault({
- vaultAddress: '0x...',
- recipientAddress: '0x...',
-});
-```
-
-## Returns
-
-[`UseMorphoVaultReturnType`](/onchainkit/earn/types#usemorphovaultreturntype)
-
-## Parameters
-
-[`UseMorphoVaultParams`](/onchainkit/earn/types#usemorphovaultparams)
-
diff --git a/docs/onchainkit/hooks/use-token-details.mdx b/docs/onchainkit/hooks/use-token-details.mdx
deleted file mode 100644
index 2e610766c..000000000
--- a/docs/onchainkit/hooks/use-token-details.mdx
+++ /dev/null
@@ -1,76 +0,0 @@
----
-title: useTokenDetails
----
-
-
-The `useTokenDetails` hook implements the `getTokenDetails` API, returning the data required to view an NFT.
-
-It is implemented with [useQuery](https://tanstack.com/query/latest/docs/framework/react/reference/useQuery) from `@tanstack/react-query`, and returns a `UseQueryResult` object, allowing you to pass through all `@tanstack/react-query` options.
-
-Before using them, make sure to obtain a [Client API Key](https://portal.cdp.coinbase.com/projects/api-keys/client-key) from Coinbase Developer Platform.
-
-## Usage
-
-
-```tsx code
-import { useTokenDetails } from '@coinbase/onchainkit/nft';
-
-const Component = () => {
- const { data, isLoading, error } = useTokenDetails({
- contractAddress: '0x...',
- tokenId: '1',
- });
-
- if (isLoading) return Loading...
;
-
- return {JSON.stringify(data)}
;
-};
-```
-
-```tsx scaffolding
-import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
-import { OnchainKitProvider } from '@coinbase/onchainkit';
-import { useTokenDetails } from '@coinbase/onchainkit/nft';
-
-const queryClient = new QueryClient();
-
-
-
-
-
-
-```
-
-```json return value
-{
- "data": {
- "collectionName": "NFT Collection Name",
- "collectionDescription": "NFT Collection Description",
- "name": "NFT Name",
- "description": "NFT Description",
- "imageUrl": "https://example.com/image.png",
- "animationUrl": "",
- "ownerAddress": "0x...",
- "lastSoldPrice": {
- "amount": "0.0001",
- "currency": "ETH",
- "amountUSD": "0.242271"
- },
- "mimeType": "image/png",
- "contractType": "ERC721"
- }
-}
-```
-
-
-## Returns
-
-[`UseQueryResult`](/onchainkit/api/types#gettokendetailsresponse)
-
-## Parameters
-
-[`GetTokenDetailsParams`](/onchainkit/api/types#gettokendetailsparams)
-
diff --git a/docs/onchainkit/identity/address.mdx b/docs/onchainkit/identity/address.mdx
deleted file mode 100644
index e24552539..000000000
--- a/docs/onchainkit/identity/address.mdx
+++ /dev/null
@@ -1,65 +0,0 @@
----
-title: "``"
----
-
-The `Address` component is used to render a shortened user account address.
-
-## Usage
-
-Sliced account address:
-
-```tsx
-import { Address } from '@coinbase/onchainkit/identity';
- // [!code focus]
-```
-
-{/*
-
- */}
-
-### Display full address
-
-Set `isSliced` to false, to display the full address:
-
-```tsx
-import { Address } from '@coinbase/onchainkit/identity';
- // [!code focus]
-```
-
-
-{/*
-
- */}
-
-### Override styles
-
-You can override component styles using `className`.
-
-```tsx
-import { Address } from '@coinbase/onchainkit/identity';
-
-```
-
-{/*
-
- */}
-
-## Props
-
-[`AddressReact`](/onchainkit/identity/types#addressreact)
-
diff --git a/docs/onchainkit/identity/avatar.mdx b/docs/onchainkit/identity/avatar.mdx
deleted file mode 100644
index 1e7fde08f..000000000
--- a/docs/onchainkit/identity/avatar.mdx
+++ /dev/null
@@ -1,160 +0,0 @@
----
-title: "``"
----
-
-The `Avatar` component is used to display ENS or [Basenames](https://www.base.org/names) avatar associated with Ethereum addresses.
-When an avatar is not available, it defaults to blue color avatar.
-
-## Usage
-
-Address with an ENS avatar:
-```tsx
-import { Avatar } from '@coinbase/onchainkit/identity';
- // [!code focus]
-```
-
-
-{/*
-
- */}
-
-Address without an ENS or Basenames avatar defaults to a plain avatar:
-
-```tsx
-import { Avatar } from '@coinbase/onchainkit/identity';
- // [!code focus]
-```
-
-
-{/*
-
- */}
-
-Address with a Basename avatar:
-
-```tsx
-import { Avatar } from '@coinbase/onchainkit/identity';
-import { base } from 'viem/chains'; // [!code focus]
-
- // [!code focus]
-```
-
-
-{/*
-
- */}
-
-Override styles via `className` prop:
-
-```tsx
-import { Avatar } from '@coinbase/onchainkit/identity';
- // [!code focus]
-```
-
-
-
-{/*
-
- */}
-
-Use `defaultComponent` prop to change the default avatar when ENS avatar is not found.
-Use `loadingComponent` prop to change the loading placeholder:
-```tsx
-import { Avatar } from '@coinbase/onchainkit/identity';
-
-
-
- )}
- defaultComponent={(
-