diff --git a/AGENTS.md b/AGENTS.md index 8c1ba9a22..d6cdb3d3b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,10 +1,10 @@ # Base Docs Index IMPORTANT: Prefer retrieval-led reasoning. Read relevant docs before generating code. -Base is an Ethereum L2 by Coinbase. Docs for: Base Chain, Smart Wallet, OnchainKit, MiniKit. +Base is an Ethereum L2 by Coinbase. Docs for: Base Chain, Smart Wallet, MiniKit. [Docs]|root:./docs |ai-agents:index,trading |ai-agents/core-concepts:agent-apps,agent-frameworks,identity-verification-auth,payments-and-transactions,wallets -|base-account/basenames:basename-transfer,basenames-faq,basenames-onchainkit-tutorial,basenames-wagmi-tutorial +|base-account/basenames:basename-transfer,basenames-faq,basenames-wagmi-tutorial |base-account/contribute:contribute-to-base-account-docs,security-and-bug-bounty |base-account/framework-integrations:cdp,rainbowkit,reown,thirdweb |base-account/framework-integrations/privy:authentication,setup,spend-permissions,sub-accounts,wallet-actions @@ -43,49 +43,4 @@ Base is an Ethereum L2 by Coinbase. Docs for: Base Chain, Smart Wallet, OnchainK |mini-apps/resources:design-resources,templates |mini-apps/technical-guides:accept-payments,building-chat-agents,dynamic-embeds,neynar-notifications,sharing-and-social-graph,sign-manifest |mini-apps/troubleshooting:base-app-compatibility,common-issues,error-handling,how-search-works,testing -|onchainkit:create-a-basename-profile-component,getting-started,installation,restricted,use-coinbase-smart-wallet-and-eoas -|onchainkit/api:build-deposit-to-morpho-tx,build-mint-transaction,build-swap-transaction,build-withdraw-from-morpho-tx,get-mint-details,get-portfolios,get-swap-quote,get-token-details,get-tokens,types -|onchainkit/buy:buy,types -|onchainkit/checkout:checkout,types -|onchainkit/config:is-base,is-ethereum,onchainkit-provider,supplemental-providers,types -|onchainkit/earn:earn,types -|onchainkit/fund:fetch-onramp-config,fetch-onramp-options,fetch-onramp-quote,fetch-onramp-transaction-status,fund-button,fund-card,get-onramp-buy-url,setup-onramp-event-listeners,types -|onchainkit/guides:ai-prompting-guide,build-onchain-apps,contribution,lifecycle-status,reporting-bug,tailwind,telemetry,themes,troubleshooting,use-basename-in-onchain-app,using-ai-powered-ides -|onchainkit/hooks:use-build-deposit-to-morpho-tx,use-build-withdraw-from-morpho-tx,use-earn-context,use-mint-details,use-morpho-vault,use-token-details -|onchainkit/identity:address,avatar,badge,get-address,get-attestations,get-avatar,get-avatars,get-name,get-names,identity-card,identity,name,socials,types,use-address,use-avatar,use-avatars,use-name,use-names -|onchainkit/installation:astro,nextjs,remix,vite -|onchainkit/latest/components/appchain:bridge -|onchainkit/latest/components/buy:buy -|onchainkit/latest/components/checkout:checkout -|onchainkit/latest/components/connected:connected -|onchainkit/latest/components/earn:earn -|onchainkit/latest/components/fund:fund-button,fund-card -|onchainkit/latest/components/identity:address,avatar,badge,identity-card,identity,name,socials -|onchainkit/latest/components/minikit:overview,provider-and-initialization -|onchainkit/latest/components/minikit/hooks:useAddFrame,useAuthenticate,useClose,useComposeCast,useMiniKit,useNotification,useOpenUrl,usePrimaryButton,useViewCast,useViewProfile -|onchainkit/latest/components/mint:nft-card,nft-mint-card -|onchainkit/latest/components/signature:signature -|onchainkit/latest/components/swap:swap-settings,swap -|onchainkit/latest/components/token:token-chip,token-image,token-row,token-search,token-select-dropdown -|onchainkit/latest/components/transaction:transaction -|onchainkit/latest/components/wallet:wallet-dropdown-basename,wallet-dropdown-disconnect,wallet-dropdown-fund-link,wallet-dropdown-link,wallet-island,wallet-modal,wallet -|onchainkit/latest/configuration:onchainkit-provider,themes,wagmi-viem-integration -|onchainkit/latest/getting-started:manual-installation,overview,quickstart-guide,troubleshooting -|onchainkit/latest/guides:ai-prompting-guide,contributing -|onchainkit/latest/hooks/earn:use-build-deposit-to-morpho-tx,use-build-withdraw-from-morpho-tx,use-earn-context,use-morpho-vault -|onchainkit/latest/hooks/identity:use-address,use-avatar,use-avatars,use-name,use-names -|onchainkit/latest/hooks/mint:use-mint-details,use-token-details -|onchainkit/latest/utilities/earn:build-deposit-to-morpho-tx,build-withdraw-from-morpho-tx -|onchainkit/latest/utilities/fund:fetch-onramp-config,fetch-onramp-options,fetch-onramp-quote,fetch-onramp-transaction-status,get-onramp-buy-url,setup-onramp-event-listeners -|onchainkit/latest/utilities/identity:get-address,get-attestations,get-avatar,get-avatars,get-name,get-names -|onchainkit/latest/utilities/token:format-amount -|onchainkit/latest/utilities/wallet:is-valid-aa-entrypoint,is-wallet-a-coinbase-smart-wallet -|onchainkit/mint:nft-card,nft-mint-card,types -|onchainkit/paymaster:erc20-paymaster,errors,gasless-transactions-with-paymaster,how-to-contribute,quickstart-guide,quickstart-headless,security,troubleshooting,welcome -|onchainkit/signature:signature,types -|onchainkit/swap:swap-settings,swap,types -|onchainkit/templates:onchain-commerce-app,onchain-nft-app,onchain-social-profile -|onchainkit/token:format-amount,token-chip,token-image,token-row,token-search,token-select-dropdown,types -|onchainkit/transaction:transaction,types -|onchainkit/wallet:is-valid-aa-entrypoint,is-wallet-a-coinbase-smart-wallet,types,wallet-dropdown-basename,wallet-dropdown-disconnect,wallet-dropdown-fund-link,wallet-dropdown-link,wallet-island,wallet-modal,wallet |root:AGENTS,cookie-policy,privacy-policy,terms-of-service,tone_of_voice diff --git a/docs/AGENTS.md b/docs/AGENTS.md index 4aabd3728..2437aeba6 100644 --- a/docs/AGENTS.md +++ b/docs/AGENTS.md @@ -1,8 +1,8 @@ # Base Docs Index IMPORTANT: Prefer retrieval-led reasoning. Read relevant docs before generating code. -Base is an Ethereum L2 by Coinbase. Docs for: Base Chain, Smart Wallet, OnchainKit, MiniKit. +Base is an Ethereum L2 by Coinbase. Docs for: Base Chain, Smart Wallet, MiniKit. [Docs]|root:./docs -|base-account/basenames:basename-transfer,basenames-faq,basenames-onchainkit-tutorial,basenames-wagmi-tutorial +|base-account/basenames:basename-transfer,basenames-faq,basenames-wagmi-tutorial |base-account/contribute:contribute-to-base-account-docs,security-and-bug-bounty |base-account/framework-integrations:cdp,rainbowkit,reown,thirdweb |base-account/framework-integrations/privy:authentication,setup,spend-permissions,sub-accounts,wallet-actions @@ -73,51 +73,6 @@ Base is an Ethereum L2 by Coinbase. Docs for: Base Chain, Smart Wallet, OnchainK |mini-apps/quality-and-publishing:overview,quality-bar,submission-guidelines |mini-apps/quickstart:build-checklist,building-for-the-base-app,create-new-miniapp,migrate-existing-apps,template |mini-apps/resources:design-resources,templates -|mini-apps/technical-guides:accept-payments,dynamic-embeds,neynar-notifications,sharing-and-social-graph,sign-manifest +|mini-apps/technical-guides:accept-payments,neynar-notifications,sharing-and-social-graph,sign-manifest |mini-apps/troubleshooting:base-app-compatibility,common-issues,error-handling,how-search-works,testing -|onchainkit:create-a-basename-profile-component,getting-started,installation,restricted,use-coinbase-smart-wallet-and-eoas -|onchainkit/api:build-deposit-to-morpho-tx,build-mint-transaction,build-swap-transaction,build-withdraw-from-morpho-tx,get-mint-details,get-portfolios,get-swap-quote,get-token-details,get-tokens,types -|onchainkit/buy:buy,types -|onchainkit/checkout:checkout,types -|onchainkit/config:is-base,is-ethereum,onchainkit-provider,supplemental-providers,types -|onchainkit/earn:earn,types -|onchainkit/fund:fetch-onramp-config,fetch-onramp-options,fetch-onramp-quote,fetch-onramp-transaction-status,fund-button,fund-card,get-onramp-buy-url,setup-onramp-event-listeners,types -|onchainkit/guides:ai-prompting-guide,build-onchain-apps,contribution,lifecycle-status,reporting-bug,tailwind,telemetry,themes,troubleshooting,use-basename-in-onchain-app,using-ai-powered-ides -|onchainkit/hooks:use-build-deposit-to-morpho-tx,use-build-withdraw-from-morpho-tx,use-earn-context,use-mint-details,use-morpho-vault,use-token-details -|onchainkit/identity:address,avatar,badge,get-address,get-attestations,get-avatar,get-avatars,get-name,get-names,identity-card,identity,name,socials,types,use-address,use-avatar,use-avatars,use-name,use-names -|onchainkit/installation:astro,nextjs,remix,vite -|onchainkit/latest/components/appchain:bridge -|onchainkit/latest/components/buy:buy -|onchainkit/latest/components/checkout:checkout -|onchainkit/latest/components/connected:connected -|onchainkit/latest/components/earn:earn -|onchainkit/latest/components/fund:fund-button,fund-card -|onchainkit/latest/components/identity:address,avatar,badge,identity-card,identity,name,socials -|onchainkit/latest/components/minikit:overview,provider-and-initialization -|onchainkit/latest/components/minikit/hooks:useAddFrame,useAuthenticate,useClose,useComposeCast,useMiniKit,useNotification,useOpenUrl,usePrimaryButton,useViewCast,useViewProfile -|onchainkit/latest/components/mint:nft-card,nft-mint-card -|onchainkit/latest/components/signature:signature -|onchainkit/latest/components/swap:swap-settings,swap -|onchainkit/latest/components/token:token-chip,token-image,token-row,token-search,token-select-dropdown -|onchainkit/latest/components/transaction:transaction -|onchainkit/latest/components/wallet:wallet-dropdown-basename,wallet-dropdown-disconnect,wallet-dropdown-fund-link,wallet-dropdown-link,wallet-island,wallet-modal,wallet -|onchainkit/latest/configuration:onchainkit-provider,themes,wagmi-viem-integration -|onchainkit/latest/getting-started:manual-installation,overview,quickstart-guide,troubleshooting -|onchainkit/latest/guides:ai-prompting-guide,contributing -|onchainkit/latest/hooks/earn:use-build-deposit-to-morpho-tx,use-build-withdraw-from-morpho-tx,use-earn-context,use-morpho-vault -|onchainkit/latest/hooks/identity:use-address,use-avatar,use-avatars,use-name,use-names -|onchainkit/latest/hooks/mint:use-mint-details,use-token-details -|onchainkit/latest/utilities/earn:build-deposit-to-morpho-tx,build-withdraw-from-morpho-tx -|onchainkit/latest/utilities/fund:fetch-onramp-config,fetch-onramp-options,fetch-onramp-quote,fetch-onramp-transaction-status,get-onramp-buy-url,setup-onramp-event-listeners -|onchainkit/latest/utilities/identity:get-address,get-attestations,get-avatar,get-avatars,get-name,get-names -|onchainkit/latest/utilities/token:format-amount -|onchainkit/latest/utilities/wallet:is-valid-aa-entrypoint,is-wallet-a-coinbase-smart-wallet -|onchainkit/mint:nft-card,nft-mint-card,types -|onchainkit/paymaster:erc20-paymaster,errors,gasless-transactions-with-paymaster,how-to-contribute,quickstart-guide,quickstart-headless,security,troubleshooting,welcome -|onchainkit/signature:signature,types -|onchainkit/swap:swap-settings,swap,types -|onchainkit/templates:onchain-commerce-app,onchain-nft-app,onchain-social-profile -|onchainkit/token:format-amount,token-chip,token-image,token-row,token-search,token-select-dropdown,types -|onchainkit/transaction:transaction,types -|onchainkit/wallet:is-valid-aa-entrypoint,is-wallet-a-coinbase-smart-wallet,types,wallet-dropdown-basename,wallet-dropdown-disconnect,wallet-dropdown-fund-link,wallet-dropdown-link,wallet-island,wallet-modal,wallet |root:cookie-policy,privacy-policy,showcase,terms-of-service,tone_of_voice diff --git a/docs/docs.json b/docs/docs.json index 2c4c70279..4a3ce7bfc 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -42,7 +42,8 @@ "get-started/build-app", "get-started/launch-token", "get-started/deploy-smart-contracts", - "get-started/learning-resources" + "get-started/learning-resources", + "get-started/migrate-from-onchainkit" ] }, { @@ -472,7 +473,6 @@ "group": "Technical Guides", "pages": [ "mini-apps/technical-guides/sign-manifest", - "mini-apps/technical-guides/dynamic-embeds", "mini-apps/technical-guides/neynar-notifications", "mini-apps/technical-guides/accept-payments", "mini-apps/technical-guides/building-chat-agents" @@ -540,508 +540,6 @@ ] } ] - }, - { - "tab": "OnchainKit", - "versions": [ - { - "version": "latest", - "groups": [ - { - "group": "Getting started", - "pages": [ - "onchainkit/latest/getting-started/overview", - "onchainkit/latest/getting-started/quickstart-guide", - "onchainkit/latest/getting-started/manual-installation", - "onchainkit/latest/getting-started/troubleshooting" - ] - }, - { - "group": "Configuration", - "pages": [ - "onchainkit/latest/configuration/onchainkit-provider", - "onchainkit/latest/configuration/wagmi-viem-integration", - "onchainkit/latest/configuration/themes" - ] - }, - { - "group": "Components", - "pages": [ - { - "group": "Buy", - "pages": [ - "onchainkit/latest/components/buy/buy" - ] - }, - { - "group": "Checkout", - "pages": [ - "onchainkit/latest/components/checkout/checkout" - ] - }, - { - "group": "Earn", - "pages": [ - "onchainkit/latest/components/earn/earn" - ] - }, - { - "group": "Fund", - "pages": [ - "onchainkit/latest/components/fund/fund-button", - "onchainkit/latest/components/fund/fund-card" - ] - }, - { - "group": "Identity", - "pages": [ - "onchainkit/latest/components/identity/identity", - "onchainkit/latest/components/identity/address", - "onchainkit/latest/components/identity/avatar", - "onchainkit/latest/components/identity/badge", - "onchainkit/latest/components/identity/identity-card", - "onchainkit/latest/components/identity/name", - "onchainkit/latest/components/identity/socials" - ] - }, - { - "group": "Mint", - "pages": [ - "onchainkit/latest/components/mint/nft-card", - "onchainkit/latest/components/mint/nft-mint-card" - ] - }, - { - "group": "MiniKit", - "pages": [ - "onchainkit/latest/components/minikit/overview", - "onchainkit/latest/components/minikit/provider-and-initialization", - { - "group": "Hooks", - "pages": [ - "onchainkit/latest/components/minikit/hooks/useMiniKit", - "onchainkit/latest/components/minikit/hooks/useOpenUrl", - "onchainkit/latest/components/minikit/hooks/useClose", - "onchainkit/latest/components/minikit/hooks/usePrimaryButton", - "onchainkit/latest/components/minikit/hooks/useViewProfile", - "onchainkit/latest/components/minikit/hooks/useComposeCast", - "onchainkit/latest/components/minikit/hooks/useViewCast", - "onchainkit/latest/components/minikit/hooks/useAuthenticate", - "onchainkit/latest/components/minikit/hooks/useAddFrame", - "onchainkit/latest/components/minikit/hooks/useNotification" - ] - } - ] - }, - { - "group": "Signature", - "pages": [ - "onchainkit/latest/components/signature/signature" - ] - }, - { - "group": "Swap", - "pages": [ - "onchainkit/latest/components/swap/swap", - "onchainkit/latest/components/swap/swap-settings" - ] - }, - { - "group": "Token", - "pages": [ - "onchainkit/latest/components/token/token-chip", - "onchainkit/latest/components/token/token-image", - "onchainkit/latest/components/token/token-row", - "onchainkit/latest/components/token/token-search", - "onchainkit/latest/components/token/token-select-dropdown" - ] - }, - { - "group": "Transaction", - "pages": [ - "onchainkit/latest/components/transaction/transaction" - ] - }, - { - "group": "Wallet", - "pages": [ - "onchainkit/latest/components/wallet/wallet", - "onchainkit/latest/components/wallet/wallet-dropdown-basename", - "onchainkit/latest/components/wallet/wallet-dropdown-disconnect", - "onchainkit/latest/components/wallet/wallet-dropdown-fund-link", - "onchainkit/latest/components/wallet/wallet-dropdown-link", - "onchainkit/latest/components/wallet/wallet-island", - "onchainkit/latest/components/wallet/wallet-modal" - ] - }, - { - "group": "Connected", - "pages": [ - "onchainkit/latest/components/connected/connected" - ] - } - ] - }, - { - "group": "Utilities", - "pages": [ - { - "group": "Earn", - "pages": [ - "onchainkit/latest/utilities/earn/build-deposit-to-morpho-tx", - "onchainkit/latest/utilities/earn/build-withdraw-from-morpho-tx" - ] - }, - { - "group": "Fund", - "pages": [ - "onchainkit/latest/utilities/fund/get-onramp-buy-url", - "onchainkit/latest/utilities/fund/fetch-onramp-config", - "onchainkit/latest/utilities/fund/fetch-onramp-quote", - "onchainkit/latest/utilities/fund/fetch-onramp-options", - "onchainkit/latest/utilities/fund/fetch-onramp-transaction-status", - "onchainkit/latest/utilities/fund/setup-onramp-event-listeners" - ] - }, - { - "group": "Identity", - "pages": [ - "onchainkit/latest/utilities/identity/get-address", - "onchainkit/latest/utilities/identity/get-attestations", - "onchainkit/latest/utilities/identity/get-avatar", - "onchainkit/latest/utilities/identity/get-avatars", - "onchainkit/latest/utilities/identity/get-name", - "onchainkit/latest/utilities/identity/get-names" - ] - }, - { - "group": "Token", - "pages": [ - "onchainkit/latest/utilities/token/format-amount" - ] - }, - { - "group": "Wallet", - "pages": [ - "onchainkit/latest/utilities/wallet/is-valid-aa-entrypoint", - "onchainkit/latest/utilities/wallet/is-wallet-a-coinbase-smart-wallet" - ] - } - ] - }, - { - "group": "Hooks", - "pages": [ - { - "group": "Earn", - "pages": [ - "onchainkit/latest/hooks/earn/use-earn-context", - "onchainkit/latest/hooks/earn/use-build-deposit-to-morpho-tx", - "onchainkit/latest/hooks/earn/use-build-withdraw-from-morpho-tx", - "onchainkit/latest/hooks/earn/use-morpho-vault" - ] - }, - { - "group": "Identity", - "pages": [ - "onchainkit/latest/hooks/identity/use-address", - "onchainkit/latest/hooks/identity/use-avatar", - "onchainkit/latest/hooks/identity/use-avatars", - "onchainkit/latest/hooks/identity/use-name", - "onchainkit/latest/hooks/identity/use-names" - ] - }, - { - "group": "Mint", - "pages": [ - "onchainkit/latest/hooks/mint/use-token-details", - "onchainkit/latest/hooks/mint/use-mint-details" - ] - } - ] - }, - { - "group": "Guides", - "pages": [ - "onchainkit/latest/guides/ai-prompting-guide", - "onchainkit/latest/guides/contributing" - ] - } - ] - }, - { - "version": "v0.38.x", - "groups": [ - { - "group": "Introduction", - "pages": [ - "onchainkit/getting-started", - "onchainkit/guides/telemetry", - "onchainkit/guides/troubleshooting" - ] - }, - { - "group": "Installation", - "pages": [ - "onchainkit/installation/nextjs", - "onchainkit/installation/vite", - "onchainkit/installation/remix", - "onchainkit/installation/astro" - ] - }, - { - "group": "Config", - "pages": [ - "onchainkit/config/onchainkit-provider", - "onchainkit/config/supplemental-providers" - ] - }, - { - "group": "Guides", - "pages": [ - "onchainkit/guides/lifecycle-status", - "onchainkit/guides/tailwind", - "onchainkit/guides/themes", - "onchainkit/guides/use-basename-in-onchain-app", - "onchainkit/guides/using-ai-powered-ides", - "onchainkit/guides/ai-prompting-guide" - ] - }, - { - "group": "Templates", - "pages": [ - "onchainkit/templates/onchain-nft-app", - "onchainkit/templates/onchain-commerce-app", - "onchainkit/templates/onchain-social-profile" - ] - }, - { - "group": "Components", - "pages": [ - { - "group": "Buy", - "pages": [ - "onchainkit/buy/buy" - ] - }, - { - "group": "Checkout", - "pages": [ - "onchainkit/checkout/checkout" - ] - }, - { - "group": "Earn", - "pages": [ - "onchainkit/earn/earn" - ] - }, - { - "group": "Fund", - "pages": [ - "onchainkit/fund/fund-button", - "onchainkit/fund/fund-card" - ] - }, - { - "group": "Identity", - "pages": [ - "onchainkit/identity/identity", - "onchainkit/identity/address", - "onchainkit/identity/avatar", - "onchainkit/identity/badge", - "onchainkit/identity/identity-card", - "onchainkit/identity/name", - "onchainkit/identity/socials" - ] - }, - { - "group": "Mint", - "pages": [ - "onchainkit/mint/nft-card", - "onchainkit/mint/nft-mint-card" - ] - }, - "onchainkit/signature/signature", - { - "group": "Swap", - "pages": [ - "onchainkit/swap/swap", - "onchainkit/swap/swap-settings" - ] - }, - { - "group": "Token", - "pages": [ - "onchainkit/token/token-chip", - "onchainkit/token/token-image", - "onchainkit/token/token-row", - "onchainkit/token/token-search", - "onchainkit/token/token-select-dropdown" - ] - }, - "onchainkit/transaction/transaction", - { - "group": "Wallet", - "pages": [ - "onchainkit/wallet/wallet", - "onchainkit/wallet/wallet-dropdown-basename", - "onchainkit/wallet/wallet-dropdown-disconnect", - "onchainkit/wallet/wallet-dropdown-fund-link", - "onchainkit/wallet/wallet-dropdown-link", - "onchainkit/wallet/wallet-island", - "onchainkit/wallet/wallet-modal" - ] - } - ] - }, - { - "group": "API", - "pages": [ - { - "group": "Mint", - "pages": [ - "onchainkit/api/get-token-details", - "onchainkit/api/get-mint-details", - "onchainkit/api/build-mint-transaction" - ] - }, - { - "group": "Swap", - "pages": [ - "onchainkit/api/build-swap-transaction", - "onchainkit/api/get-swap-quote" - ] - }, - { - "group": "Token", - "pages": [ - "onchainkit/api/get-tokens" - ] - }, - { - "group": "Wallet", - "pages": [ - "onchainkit/api/get-portfolios" - ] - } - ] - }, - { - "group": "Utilities", - "pages": [ - { - "group": "Config", - "pages": [ - "onchainkit/config/is-base", - "onchainkit/config/is-ethereum" - ] - }, - { - "group": "Earn", - "pages": [ - "onchainkit/api/build-deposit-to-morpho-tx", - "onchainkit/api/build-withdraw-from-morpho-tx", - "onchainkit/hooks/use-build-deposit-to-morpho-tx", - "onchainkit/hooks/use-build-withdraw-from-morpho-tx", - "onchainkit/hooks/use-earn-context" - ] - }, - { - "group": "Fund", - "pages": [ - "onchainkit/fund/get-onramp-buy-url", - "onchainkit/fund/fetch-onramp-config", - "onchainkit/fund/fetch-onramp-quote", - "onchainkit/fund/fetch-onramp-options", - "onchainkit/fund/fetch-onramp-transaction-status", - "onchainkit/fund/setup-onramp-event-listeners" - ] - }, - { - "group": "Identity", - "pages": [ - "onchainkit/identity/get-address", - "onchainkit/identity/get-attestations", - "onchainkit/identity/get-avatar", - "onchainkit/identity/get-avatars", - "onchainkit/identity/get-name", - "onchainkit/identity/get-names", - "onchainkit/identity/use-address", - "onchainkit/identity/use-avatar", - "onchainkit/identity/use-avatars", - "onchainkit/identity/use-name", - "onchainkit/identity/use-names" - ] - }, - { - "group": "Mint", - "pages": [ - "onchainkit/hooks/use-token-details", - "onchainkit/hooks/use-mint-details" - ] - }, - { - "group": "Token", - "pages": [ - "onchainkit/token/format-amount" - ] - }, - { - "group": "Wallet", - "pages": [ - "onchainkit/wallet/is-valid-aa-entrypoint", - "onchainkit/wallet/is-wallet-a-coinbase-smart-wallet" - ] - } - ] - }, - { - "group": "Types", - "pages": [ - "onchainkit/api/types", - "onchainkit/checkout/types", - "onchainkit/config/types", - "onchainkit/earn/types", - "onchainkit/fund/types", - "onchainkit/identity/types", - "onchainkit/mint/types", - "onchainkit/signature/types", - "onchainkit/swap/types", - "onchainkit/token/types", - "onchainkit/transaction/types", - "onchainkit/wallet/types" - ] - }, - { - "group": "Contribution", - "pages": [ - "onchainkit/guides/contribution", - "onchainkit/guides/reporting-bug" - ] - } - ] - } - ], - "global": { - "anchors": [ - { - "anchor": "GitHub", - "href": "https://github.com/coinbase/onchainkit", - "icon": "github" - }, - { - "anchor": "Playground", - "href": "https://onchainkit.xyz/playground", - "icon": "gamepad" - }, - { - "anchor": "Support", - "href": "https://discord.com/invite/buildonbase", - "icon": "discord" - } - ] - } } ] }, @@ -1104,6 +602,758 @@ ] }, "redirects": [ + { + "source": "/mini-apps/technical-guides/dynamic-embeds", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/getting-started", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/latest/getting-started/overview", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/latest/getting-started/quickstart-guide", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/latest/getting-started/manual-installation", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/latest/getting-started/troubleshooting", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/installation/nextjs", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/installation/vite", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/installation/remix", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/installation/astro", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/config/onchainkit-provider", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/config/supplemental-providers", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/config/is-base", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/config/is-ethereum", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/config/types", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/latest/configuration/onchainkit-provider", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/latest/configuration/wagmi-viem-integration", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/latest/configuration/themes", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/guides/telemetry", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/guides/troubleshooting", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/guides/lifecycle-status", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/guides/tailwind", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/guides/themes", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/guides/use-basename-in-onchain-app", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/guides/using-ai-powered-ides", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/guides/ai-prompting-guide", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/guides/contribution", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/guides/reporting-bug", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/latest/guides/ai-prompting-guide", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/latest/guides/contributing", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/templates/onchain-nft-app", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/templates/onchain-commerce-app", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/templates/onchain-social-profile", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/paymaster/welcome", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/paymaster/quickstart-guide", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/paymaster/quickstart-headless", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/paymaster/erc20-paymaster", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/paymaster/gasless-transactions-with-paymaster", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/paymaster/security", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/paymaster/troubleshooting", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/paymaster/errors", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/paymaster/how-to-contribute", + "destination": "/get-started/build-app" + }, + { + "source": "/onchainkit/latest/components/minikit/overview", + "destination": "/mini-apps/introduction/overview" + }, + { + "source": "/onchainkit/latest/components/minikit/provider-and-initialization", + "destination": "/mini-apps/introduction/overview" + }, + { + "source": "/onchainkit/latest/components/minikit/hooks/useMiniKit", + "destination": "/mini-apps/introduction/overview" + }, + { + "source": "/onchainkit/latest/components/minikit/hooks/useOpenUrl", + "destination": "/mini-apps/introduction/overview" + }, + { + "source": "/onchainkit/latest/components/minikit/hooks/useClose", + "destination": "/mini-apps/introduction/overview" + }, + { + "source": "/onchainkit/latest/components/minikit/hooks/usePrimaryButton", + "destination": "/mini-apps/introduction/overview" + }, + { + "source": "/onchainkit/latest/components/minikit/hooks/useViewProfile", + "destination": "/mini-apps/introduction/overview" + }, + { + "source": "/onchainkit/latest/components/minikit/hooks/useComposeCast", + "destination": "/mini-apps/introduction/overview" + }, + { + "source": "/onchainkit/latest/components/minikit/hooks/useViewCast", + "destination": "/mini-apps/introduction/overview" + }, + { + "source": "/onchainkit/latest/components/minikit/hooks/useAuthenticate", + "destination": "/mini-apps/introduction/overview" + }, + { + "source": "/onchainkit/latest/components/minikit/hooks/useAddFrame", + "destination": "/mini-apps/introduction/overview" + }, + { + "source": "/onchainkit/latest/components/minikit/hooks/useNotification", + "destination": "/mini-apps/introduction/overview" + }, + { + "source": "/onchainkit/identity/identity", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/identity/address", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/identity/avatar", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/identity/badge", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/identity/identity-card", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/identity/name", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/identity/socials", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/identity/get-address", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/identity/get-attestations", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/identity/get-avatar", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/identity/get-avatars", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/identity/get-name", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/identity/get-names", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/identity/use-address", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/identity/use-avatar", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/identity/use-avatars", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/identity/use-name", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/identity/use-names", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/identity/types", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/latest/components/identity/identity", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/latest/components/identity/address", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/latest/components/identity/avatar", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/latest/components/identity/badge", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/latest/components/identity/identity-card", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/latest/components/identity/name", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/latest/components/identity/socials", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/latest/utilities/identity/get-address", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/latest/utilities/identity/get-attestations", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/latest/utilities/identity/get-avatar", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/latest/utilities/identity/get-avatars", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/latest/utilities/identity/get-name", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/latest/utilities/identity/get-names", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/latest/hooks/identity/use-address", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/latest/hooks/identity/use-avatar", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/latest/hooks/identity/use-avatars", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/latest/hooks/identity/use-name", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/latest/hooks/identity/use-names", + "destination": "/base-account/basenames/basenames-wagmi-tutorial" + }, + { + "source": "/onchainkit/checkout/checkout", + "destination": "/mini-apps/technical-guides/accept-payments" + }, + { + "source": "/onchainkit/checkout/types", + "destination": "/mini-apps/technical-guides/accept-payments" + }, + { + "source": "/onchainkit/latest/components/checkout/checkout", + "destination": "/mini-apps/technical-guides/accept-payments" + }, + { + "source": "/onchainkit/wallet/wallet", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/wallet/wallet-dropdown-basename", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/wallet/wallet-dropdown-disconnect", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/wallet/wallet-dropdown-fund-link", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/wallet/wallet-dropdown-link", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/wallet/wallet-island", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/wallet/wallet-modal", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/wallet/is-valid-aa-entrypoint", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/wallet/is-wallet-a-coinbase-smart-wallet", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/wallet/types", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/components/wallet/wallet", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/components/wallet/wallet-dropdown-basename", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/components/wallet/wallet-dropdown-disconnect", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/components/wallet/wallet-dropdown-fund-link", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/components/wallet/wallet-dropdown-link", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/components/wallet/wallet-island", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/components/wallet/wallet-modal", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/utilities/wallet/is-valid-aa-entrypoint", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/utilities/wallet/is-wallet-a-coinbase-smart-wallet", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/components/connected/connected", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/transaction/transaction", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/transaction/types", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/components/transaction/transaction", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/swap/swap", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/swap/swap-settings", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/swap/types", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/components/swap/swap", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/components/swap/swap-settings", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/buy/buy", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/components/buy/buy", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/fund/fund-button", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/fund/fund-card", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/fund/get-onramp-buy-url", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/fund/fetch-onramp-config", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/fund/fetch-onramp-quote", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/fund/fetch-onramp-options", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/fund/fetch-onramp-transaction-status", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/fund/setup-onramp-event-listeners", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/fund/types", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/components/fund/fund-button", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/components/fund/fund-card", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/utilities/fund/get-onramp-buy-url", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/utilities/fund/fetch-onramp-config", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/utilities/fund/fetch-onramp-quote", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/utilities/fund/fetch-onramp-options", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/utilities/fund/fetch-onramp-transaction-status", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/utilities/fund/setup-onramp-event-listeners", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/earn/earn", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/earn/types", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/components/earn/earn", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/utilities/earn/build-deposit-to-morpho-tx", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/utilities/earn/build-withdraw-from-morpho-tx", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/hooks/earn/use-earn-context", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/hooks/earn/use-build-deposit-to-morpho-tx", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/hooks/earn/use-build-withdraw-from-morpho-tx", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/hooks/earn/use-morpho-vault", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/api/build-deposit-to-morpho-tx", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/api/build-withdraw-from-morpho-tx", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/hooks/use-build-deposit-to-morpho-tx", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/hooks/use-build-withdraw-from-morpho-tx", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/hooks/use-earn-context", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/mint/nft-card", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/mint/nft-mint-card", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/mint/types", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/components/mint/nft-card", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/components/mint/nft-mint-card", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/hooks/mint/use-token-details", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/hooks/mint/use-mint-details", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/api/get-mint-details", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/api/build-mint-transaction", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/hooks/use-mint-details", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/hooks/use-token-details", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/token/token-chip", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/token/token-image", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/token/token-row", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/token/token-search", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/token/token-select-dropdown", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/token/format-amount", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/token/types", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/components/token/token-chip", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/components/token/token-image", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/components/token/token-row", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/components/token/token-search", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/components/token/token-select-dropdown", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/utilities/token/format-amount", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/signature/signature", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/signature/types", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/latest/components/signature/signature", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/api/get-token-details", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/api/build-swap-transaction", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/api/get-swap-quote", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/api/get-tokens", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/api/get-portfolios", + "destination": "/get-started/migrate-from-onchainkit" + }, + { + "source": "/onchainkit/api/types", + "destination": "/get-started/migrate-from-onchainkit" + }, { "source": "/basenames/basenames-onchainkit-tutorial", "destination": "/base-account/basenames/basenames-wagmi-tutorial" diff --git a/docs/get-started/deploy-smart-contracts.mdx b/docs/get-started/deploy-smart-contracts.mdx index 7554b28ad..e56cb1919 100644 --- a/docs/get-started/deploy-smart-contracts.mdx +++ b/docs/get-started/deploy-smart-contracts.mdx @@ -139,5 +139,5 @@ This will return the initial value of the Counter contract's `number` storage va ## Next Steps -- Use [Onchainkit](https://onchainkit.com) to connect your frontend to your contracts! Onchainkit is a library of ready-to-use React components and Typescript utilities. +- Use [wagmi](https://wagmi.sh) or [viem](https://viem.sh) to connect your frontend to your contracts. - Learn more about interacting with your contracts in the command line using Foundry from our [Foundry tutorial](/learn/foundry/deploy-with-foundry). diff --git a/docs/get-started/migrate-from-onchainkit.mdx b/docs/get-started/migrate-from-onchainkit.mdx new file mode 100644 index 000000000..6c9754c3a --- /dev/null +++ b/docs/get-started/migrate-from-onchainkit.mdx @@ -0,0 +1,63 @@ +--- +title: "Migrate your OnchainKit App" +description: "How to migrate your OnchainKit app to wagmi and viem using the Base migration skill." +--- + +OnchainKit is no longer maintained. This guide helps you migrate your existing OnchainKit app to a standalone [wagmi](https://wagmi.sh) project using the Base migration skill. + +## Overview + +The skill handles three components: `OnchainKitProvider`, `Wallet`, and `Transaction`. For each it: + +- Deletes existing OnchainKit component code from your project +- Creates new wagmi/viem-based replacement files +- Logs any errors in a `mistakes.md` file at your project root + +## Prerequisites + +- A Next.js or React project using OnchainKit +- An AI coding assistant that supports skills (Claude Code or Cursor) + +## Install the Skill + +```bash +npx skills add base/base-skills +``` + +## Migration Prompts + + +If migrating individually, start with the Provider prompt below. The wallet and transaction components depend on `WagmiProvider` being implemented first. + + +### One-Shot (all three components) + +```text +Migrate my OnchainKit app to use standalone wagmi and viem. Replace the provider, wallet component, and transaction component. Remove the OnchainKit dependency entirely. +``` + +### Provider + +```text +Replace my OnchainKitProvider with WagmiProvider and QueryClientProvider. +``` + +### Wallet + +```text +Migrate my OnchainKit wallet component to a standalone wagmi-based connect button. +``` + +### Transaction + +```text +Migrate my OnchainKit transaction component to use wagmi hooks directly. +``` + +## Verify + +After migration, run this prompt to confirm the three migrated components are fully replaced: + +```text +Run npm run build and confirm there are no remaining imports of OnchainKitProvider, Wallet, or Transaction from @coinbase/onchainkit in the project. +``` diff --git a/docs/llms-full.txt b/docs/llms-full.txt index ead46c926..fe26b6219 100644 --- a/docs/llms-full.txt +++ b/docs/llms-full.txt @@ -6,7 +6,7 @@ ## How the docs are organized - Products have two files each: `//llms.txt` (index) and `//llms-full.txt` (expanded) -- Main sections: Get Started, Base Chain, Base Account, AI Agents, Mini Apps, OnchainKit +- Main sections: Get Started, Base Chain, Base Account, AI Agents, Mini Apps ## Cross-site concepts @@ -22,45 +22,23 @@ Sources: Sources: - `https://docs.base.org/base-account/guides/authenticate-users.md` - `https://docs.base.org/mini-apps/features/Authentication.md` -- `https://docs.base.org/onchainkit/config/onchainkit-provider.md` -> Auth patterns vary by product. Use SIWE (ERC‑6492 compatible) for user sign-in where smart wallets may not yet exist. In Mini Apps, defer auth until needed; prefer scoped, revocable permissions and transaction trays for intent. For SDK/server APIs (e.g., OnchainKit), supply API keys via environment variables, rotate regularly, and verify server-side signatures or webhooks. Never store user passkeys or raw private keys server-side. +> Auth patterns vary by product. Use SIWE (ERC‑6492 compatible) for user sign-in where smart wallets may not yet exist. In Mini Apps, defer auth until needed; prefer scoped, revocable permissions and transaction trays for intent. Supply API keys via environment variables, rotate regularly, and verify server-side signatures or webhooks. Never store user passkeys or raw private keys server-side. ### Errors and retries Sources: -- `https://docs.base.org/onchainkit/api/get-swap-quote.md` - `https://docs.base.org/base-chain/node-operators/troubleshooting.md` > Expect standard JSON error envelopes with `code`, `message`, and optional `details`. Treat 429 as rate-limited: respect `Retry-After` and apply exponential backoff with jitter. For idempotent operations (payments, tx-build), include an idempotency key if supported. Distinguish user-declined actions from transport or server errors and surface clear recovery guidance to users. ### Rate limits Sources: -- `https://docs.base.org/onchainkit/api/get-tokens.md` - `https://docs.base.org/base-chain/tools/node-providers.md` > Rate limits vary by provider and endpoint. Batch reads when possible, cache static metadata, and use conditional requests. On 429, back off and retry after the indicated window. Avoid concurrent duplicate builds/quotes; fan out only when necessary. ### SDK install and hello world (JS/TS) -OnchainKit (UI + server APIs) - -```bash -npm install @coinbase/onchainkit wagmi viem -``` - -```tsx -import { OnchainKitProvider } from '@coinbase/onchainkit' -import { base } from 'wagmi/chains' - -export function Providers(props: { children: React.ReactNode }) { - return ( - - {props.children} - - ) -} -``` - Base Account (smart wallet + pay helper) ```bash @@ -95,7 +73,6 @@ const client = createPublicClient({ chain: base, transport: http() }) - AI Agents — `./ai-agents/llms-full.txt` - Base Chain — `./base-chain/llms-full.txt` - Mini Apps — `./mini-apps/llms-full.txt` -- OnchainKit — `./onchainkit/llms-full.txt` ## Related indexes - Root index: `./llms.txt` diff --git a/docs/llms.txt b/docs/llms.txt index ffeace6e3..605b9bf79 100644 --- a/docs/llms.txt +++ b/docs/llms.txt @@ -9,6 +9,5 @@ - [Base Account](./base-account/llms.txt) — Passkey smart wallet, payments, sponsored gas, sub‑accounts - [AI Agents](./ai-agents/llms.txt) — Build onchain AI agents: wallets, payments, identity, frameworks - [Mini Apps](./mini-apps/llms.txt) — MiniKit, manifests, features, growth, troubleshooting -- [OnchainKit](./onchainkit/llms.txt) — React SDK: provider, components, APIs, utilities, templates diff --git a/docs/mini-apps/core-concepts/authentication.mdx b/docs/mini-apps/core-concepts/authentication.mdx index 521559ad7..a4a810900 100644 --- a/docs/mini-apps/core-concepts/authentication.mdx +++ b/docs/mini-apps/core-concepts/authentication.mdx @@ -149,9 +149,6 @@ Your mini app's domain - - use Minikit's useAuthenticate hook to authenticate users. - Understand how context is used in mini apps. diff --git a/docs/mini-apps/core-concepts/navigation.mdx b/docs/mini-apps/core-concepts/navigation.mdx index 434f41cb0..6060e7e0c 100644 --- a/docs/mini-apps/core-concepts/navigation.mdx +++ b/docs/mini-apps/core-concepts/navigation.mdx @@ -36,42 +36,25 @@ Review this file and refactor any incorrect navigation patterns to use the corre 2. **Create Posts:** Use `sdk.actions.composeCast({ text, embeds })` 3. **View Casts:** Use `sdk.actions.viewCast(castUrl)` -### For MiniKit (`@coinbase/onchainkit/minikit`) -1. **External Links:** Use `useOpenUrl()` hook -2. **Create Posts:** Use `useComposeCast()` hook -3. **View Casts:** Use `useViewCast()` hook - ## Migration Examples // BEFORE (Incorrect) Visit Site -// AFTER (Correct - Farcaster SDK) +// AFTER (Correct) import { sdk } from '@farcaster/miniapp-sdk'; -// AFTER (Correct - MiniKit) -import { useOpenUrl } from '@coinbase/onchainkit/minikit'; -const openUrl = useOpenUrl(); - - // BEFORE (Incorrect) window.open('https://farcaster.com/~/compose?text=Check this out!') -// AFTER (Correct - Farcaster SDK) +// AFTER (Correct) sdk.actions.composeCast({ text: 'Check this out!', embeds: [window.location.href] }) -// AFTER (Correct - MiniKit) -const { composeCast } = useComposeCast(); -composeCast({ - text: 'Check this out!', - embeds: [window.location.href] -}) - ``` @@ -82,138 +65,52 @@ composeCast({ ## External Navigation ### Opening External URLs - - - Use `sdk.actions.openUrl()` to safely open external websites in the client's in-app browser: +Use `sdk.actions.openUrl()` to safely open external websites in the client's in-app browser: - ```typescript App.tsx highlight={5} - import { sdk } from '@farcaster/miniapp-sdk'; - - // Correct: Use SDK action - const openExternalSite = () => { - sdk.actions.openUrl('https://example.com'); - }; +```typescript App.tsx highlight={5} +import { sdk } from '@farcaster/miniapp-sdk'; - // Incorrect: Direct HTML link - // Visit Site - ``` - - - - Use [`useOpenUrl()`](/onchainkit/latest/components/minikit/hooks/useOpenUrl) to safely open external websites in the client's in-app browser: - - ```tsx components/ExternalLinks.tsx highlight={8 -10} - import { useOpenUrl } from '@coinbase/onchainkit/minikit'; - - export default function ExternalLinks() { - const openUrl = useOpenUrl(); - - return ( -
- - - -
- ); - } +// Correct: Use SDK action +const openExternalSite = () => { + sdk.actions.openUrl('https://example.com'); +}; - // Incorrect: Direct HTML link - // Visit Site - ``` -
-
+// Incorrect: Direct HTML link +// Visit Site +``` ### Composing Casts - - - - Use `sdk.actions.composeCast()` instead of composer intent URLs: - - ```typescript App.tsx highlight={5-8} - import { sdk } from '@farcaster/miniapp-sdk'; - - // Correct: Use SDK action - const shareContent = () => { - sdk.actions.composeCast({ - text: 'Check out this Mini App!', - embeds: ['https://yourminiapp.com'] - }); - }; +Use `sdk.actions.composeCast()` instead of composer intent URLs: - // Incorrect: Composer intent URLs - // window.open('https://farcaster.com/~/compose?text=...') - ``` - - - Use [`useComposeCast()`](/onchainkit/latest/components/minikit/hooks/useComposeCast) to open the native composer with prefilled content: - ```tsx components/ShareCast.tsx highlight={8-13} - import { useComposeCast } from '@coinbase/onchainkit/minikit'; - - export default function ShareCast() { - const { composeCast } = useComposeCast(); - - return ( - - ); - } +```typescript App.tsx highlight={5-8} +import { sdk } from '@farcaster/miniapp-sdk'; - // Incorrect: Composer intent URLs - // window.open('https://farcaster.com/~/compose?text=...') - ``` - - +// Correct: Use SDK action +const shareContent = () => { + sdk.actions.composeCast({ + text: 'Check out this Mini App!', + embeds: ['https://yourminiapp.com'] + }); +}; -### Viewing Casts +// Incorrect: Composer intent URLs +// window.open('https://farcaster.com/~/compose?text=...') +``` - - +### Viewing Casts - Use `sdk.actions.viewCast()` instead of cast intent URLs: +Use `sdk.actions.viewCast()` instead of cast intent URLs: - ```typescript App.tsx - import { sdk } from '@farcaster/miniapp-sdk'; +```typescript App.tsx +import { sdk } from '@farcaster/miniapp-sdk'; - // Correct: Use SDK action - const viewCast = () => { - sdk.actions.viewCast('https://base.app/post/0xffdec7c879aad726b5400d22ec8a89aaff6e0737'); - }; - ``` - - - - Use [`useViewCast()`](/onchainkit/latest/components/minikit/hooks/useViewCast) to open a specific cast by its hash: - ```tsx components/ViewCastButton.tsx highlight={4,7-9} - import { useViewCast } from '@coinbase/onchainkit/minikit'; - - export default function ViewCastButton() { - const viewCast = useViewCast('0x1234567890abcdef1234567890abcdef12345678'); - - return ( - - ); - } - ``` - - +// Correct: Use SDK action +const viewCast = () => { + sdk.actions.viewCast('https://base.app/post/0xffdec7c879aad726b5400d22ec8a89aaff6e0737'); +}; +``` ### Conditional Navigation @@ -224,7 +121,7 @@ import { sdk } from 'farcaster/miniapp-sdk'; const ConditionalNavigation = () => { const context = sdk.context; - + const handleNavigation = () => { // Adapt behavior based on client capabilities if (context.client.clientFid) { @@ -271,10 +168,10 @@ Getting the `conversationID`: agent.on('text', async (ctx) => { // Get conversation ID const conversationId = ctx.conversation.id; - + // Create deeplink to THIS conversation (not just the agent) const groupDeeplink = `cbwallet://messaging/${conversationId}`; - + if (ctx.isGroup()) { await ctx.sendText(`Share this group: ${groupDeeplink}`); } @@ -284,8 +181,8 @@ agent.on('text', async (ctx) => { Use the `conversationID` as a button: ```typescript DeeplinkButton.tsx - @@ -296,8 +193,8 @@ Use the `conversationID` as a button: Start a private conversation with a specific user or agent. ```typescript DeeplinkDM.tsx - @@ -316,6 +213,3 @@ Start a private conversation with a specific user or agent. The 0x address of the user or agent you want to chat with (in hex format, e.g., `0xabc...1234`). - - - diff --git a/docs/mini-apps/featured-guidelines/technical-guidelines.mdx b/docs/mini-apps/featured-guidelines/technical-guidelines.mdx index 7a4803043..1614262b0 100644 --- a/docs/mini-apps/featured-guidelines/technical-guidelines.mdx +++ b/docs/mini-apps/featured-guidelines/technical-guidelines.mdx @@ -48,13 +48,13 @@ There must be no client‑specific behaviors or wording that degrade the experie ## Sponsor Transactions -Sponsor transaction fees to remove friction and reduce drop‑off for new users. For mini apps on Base, we recommend using the [Base Paymaster](/onchainkit/paymaster/quickstart-guide). +Sponsor transaction fees to remove friction and reduce drop‑off for new users. For mini apps on Base, we recommend using the [Base Paymaster](/base-account/improve-ux/sponsor-gas/paymasters). **Acceptance criteria** - Transactions are sponsored via a paymaster **How to Implement** -- Recommended: [Base Paymaster](/onchainkit/paymaster/quickstart-guide) +- Recommended: [Base Paymaster](/base-account/improve-ux/sponsor-gas/paymasters) Claim free gas credits on base.dev. diff --git a/docs/mini-apps/growth/optimize-onboarding.mdx b/docs/mini-apps/growth/optimize-onboarding.mdx index 40cc77b47..60542eeef 100644 --- a/docs/mini-apps/growth/optimize-onboarding.mdx +++ b/docs/mini-apps/growth/optimize-onboarding.mdx @@ -20,7 +20,7 @@ Deliver value instantly and avoid blocking actions. - Show immediate value (demo content, sample state, or read-only mode) -- Personalize instantly with [`context`](/onchainkit/latest/components/minikit/provider-and-initialization) of the user's profile to instantly personalize +- Personalize instantly with [`context`](/mini-apps/core-concepts/context) of the user's profile to instantly personalize - Display one clear CTA that leads to a meaningful action (e.g. "Post a message", "Buy a token", "Follow a user") @@ -63,7 +63,6 @@ Read more in [Authentication](/mini-apps/features/Authentication). - Base App provides an in-app Base Account. This should be the default wallet used by your app to streamline interactions. - Do not show a connect button on first load - If you support other wallets, show connect/switch as optional and non-blocking -- Use the OnchainKit Wallet component or Wagmi hooks as needed ### Do not use raw deeplinks @@ -108,8 +107,8 @@ Learn how to implement them with [SDK actions](/mini-apps/features/links). - - + + diff --git a/docs/mini-apps/llms-full.txt b/docs/mini-apps/llms-full.txt index 96dcdccf2..95700a2aa 100644 --- a/docs/mini-apps/llms-full.txt +++ b/docs/mini-apps/llms-full.txt @@ -2,26 +2,30 @@ ## Mini Apps — Deep Guide for LLMs -> Mini Apps are social‑native, instant‑launch web apps that run inside Base App. This guide orients an LLM to MiniKit fundamentals, product capabilities, UX best practices, growth mechanics, and troubleshooting. +> Mini Apps are social‑native, instant‑launch web apps that run inside Base App. This guide orients an LLM to Mini App fundamentals, product capabilities, UX best practices, growth mechanics, and troubleshooting. ### What you can do here -- Scaffold new Mini Apps with MiniKit and integrate existing Next.js apps +- Scaffold new Mini Apps and integrate existing Next.js apps - Configure manifests for discovery and client capabilities -- Build social‑native UX using OnchainKit components +- Build social‑native UX using wagmi - Plan growth loops (sharing, search, notifications) and optimize onboarding - Diagnose issues specific to Base App vs. other Farcaster clients -## Minimal Critical Code (MiniKit + OnchainKit wiring) +## Minimal Critical Code ```tsx -// MiniKit and OnchainKit often co‑exist in Mini Apps. Keep providers minimal. -import { OnchainKitProvider } from '@coinbase/onchainkit' -import { base } from 'wagmi/chains' +import { WagmiProvider } from 'wagmi' +import { QueryClient, QueryClientProvider } from '@tanstack/react-query' +import { wagmiConfig } from './wagmi-config' +import { useState } from 'react' export function Providers(props: { children: React.ReactNode }) { + const [queryClient] = useState(() => new QueryClient()) return ( - - {props.children} - + + + {props.children} + + ) } ``` @@ -66,7 +70,6 @@ export function Providers(props: { children: React.ReactNode }) { ### Technical Guides - [Accept Payments](https://docs.base.org/mini-apps/technical-guides/accept-payments.md) — Payments -- [Dynamic Embeds](https://docs.base.org/mini-apps/technical-guides/dynamic-embeds.md) — Dynamic embeds - [Sharing & Social Graph](https://docs.base.org/mini-apps/technical-guides/sharing-and-social-graph.md) — Sharing - [Neynar Notifications](https://docs.base.org/mini-apps/technical-guides/neynar-notifications.md) — Notifications via Neynar - [Sign Manifest](https://docs.base.org/mini-apps/technical-guides/sign-manifest.md) — Manifest signing @@ -84,16 +87,14 @@ export function Providers(props: { children: React.ReactNode }) { - [Testing](https://docs.base.org/mini-apps/troubleshooting/testing.md) — Testing guide ### Technical Reference -- [MiniKit Overview](https://docs.base.org/onchainkit/latest/components/minikit/overview.md) — Overview -- [Provider & Initialization](https://docs.base.org/onchainkit/latest/components/minikit/provider-and-initialization.md) — Provider -- [Hooks](https://docs.base.org/onchainkit/latest/components/minikit/hooks/useMiniKit.md) — Hooks +- [Mini Apps Overview](https://docs.base.org/mini-apps/introduction/overview.md) — Overview ## Quickstart (excerpts) Source: `https://docs.base.org/mini-apps/quickstart/create-new-miniapp.md` -Create a new Mini App with MiniKit: +Create a new Mini App: ```bash npm create minikit@latest my-mini-app @@ -102,10 +103,10 @@ cd my-mini-app && npm i && npm run dev Source: `https://docs.base.org/mini-apps/quickstart/migrate-existing-apps.md` -Add MiniKit to an existing Next.js app: +Add Mini App support to an existing Next.js app: ```bash -npm install @coinbase/minikit @coinbase/onchainkit +npm install @farcaster/miniapp-sdk wagmi viem @tanstack/react-query ``` @@ -136,37 +137,15 @@ Sources: - Resilience & UX: Provide guest mode where possible; handle declined auth gracefully with alternate paths or read‑only modes. - Server verification: Verify any signed payloads or tokens server‑side. Enforce replay protection, expiration, and domain binding. -Hook reference: - -- useAuthenticate — Returns verified user from SIWF or wallet auth. Use alongside `useMiniKit` context. - - Source: `https://docs.base.org/onchainkit/latest/components/minikit/hooks/useAuthenticate.md` - -Example (hook usage): - -```tsx -import { useMiniKit } from '@coinbase/minikit' -import { useAuthenticate } from '@coinbase/onchainkit/minikit' - -export function AuthGate(props: { children: React.ReactNode }) { - const { context } = useMiniKit() - const { user } = useAuthenticate() - - // Use context for UI hints only - const displayName = context?.user?.displayName ?? 'Friend' - - // Use verified user for secure ops - if (!user) return - return
Welcome, {displayName}!{props.children}
-} -``` +Authentication uses Quick Auth via the Farcaster SDK. See: `https://docs.base.org/mini-apps/core-concepts/authentication.md` ## API and Schemas (pruned) -- MiniKit Provider and initialization props - - Source: `https://docs.base.org/onchainkit/latest/components/minikit/provider-and-initialization.md` -- `useMiniKit` hook: access frame context, user, and client capabilities - - Source: `https://docs.base.org/onchainkit/latest/components/minikit/hooks/useMiniKit.md` +- Mini App provider setup and initialization + - Source: `https://docs.base.org/mini-apps/introduction/overview.md` +- Farcaster SDK context: access frame and user context data + - Source: `https://docs.base.org/mini-apps/core-concepts/context.md` Example manifest fields (conceptual): @@ -196,33 +175,15 @@ Example manifest fields (conceptual): ## Examples (common flows) -Example: Wire providers for OnchainKit + MiniKit - -Sources: -- `https://docs.base.org/onchainkit/latest/components/minikit/provider-and-initialization.md` - -```tsx -import { OnchainKitProvider } from '@coinbase/onchainkit' -import { base } from 'wagmi/chains' - -export function Providers(props: { children: React.ReactNode }) { - return ( - - {props.children} - - ) -} -``` - -Example: Use `useMiniKit` to access client context +Example: Use the Farcaster SDK to access client context -Source: `https://docs.base.org/onchainkit/latest/components/minikit/hooks/useMiniKit.md` +Source: `https://docs.base.org/mini-apps/core-concepts/context.md` ```tsx -import { useMiniKit } from '@coinbase/minikit' +import { sdk } from '@farcaster/miniapp-sdk' export function Screen() { - const { user, client } = useMiniKit() - return
{JSON.stringify({ user, client }, null, 2)}
+ const context = sdk.context + return
{JSON.stringify(context, null, 2)}
} ``` diff --git a/docs/mini-apps/llms.txt b/docs/mini-apps/llms.txt index bdea38c01..771947417 100644 --- a/docs/mini-apps/llms.txt +++ b/docs/mini-apps/llms.txt @@ -2,7 +2,7 @@ ## Mini Apps Documentation -> Mini Apps are social-native, instant-launch web apps that run inside Base App. This section provides instruction on how to get started with MiniKit and OnchainKit as well as best practices developers should follow. +> Mini Apps are social-native, instant-launch web apps that run inside Base App. This section provides instruction on how to get started with MiniKit as well as best practices developers should follow. ## Introduction - [Overview](https://docs.base.org/mini-apps/introduction/overview.md) — What Mini Apps are and why they matter @@ -37,12 +37,10 @@ - [Base App Compatibility](https://docs.base.org/mini-apps/troubleshooting/base-app-compatibility.md) — Base App client-specific behaviors ## Technical Reference -- [MiniKit Overview](https://docs.base.org/onchainkit/latest/components/minikit/overview.md) — Architecture, provider, CLI, and hooks -- [Hooks: useMiniKit](https://docs.base.org/onchainkit/latest/components/minikit/hooks/useMiniKit.md) — Access frame context and client features +- [MiniKit Overview](https://docs.base.org/mini-apps/introduction/overview.md) — Architecture, provider, CLI, and hooks ## Optional - [Accept Payments](https://docs.base.org/mini-apps/technical-guides/accept-payments.md) — Integrate payments in Mini Apps - [Sharing & Social Graph](https://docs.base.org/mini-apps/technical-guides/sharing-and-social-graph.md) — Viral distribution patterns -- [Dynamic Embeds](https://docs.base.org/mini-apps/technical-guides/dynamic-embeds.md) — Dynamic embed metadata - [How Search Works](https://docs.base.org/mini-apps/troubleshooting/how-search-works.md) — Indexing and ranking signals in Base App diff --git a/docs/mini-apps/quickstart/build-checklist.mdx b/docs/mini-apps/quickstart/build-checklist.mdx index fd2275860..3e47cc7b3 100644 --- a/docs/mini-apps/quickstart/build-checklist.mdx +++ b/docs/mini-apps/quickstart/build-checklist.mdx @@ -51,10 +51,7 @@ Re‑engage saved users with relevant, rate‑limited notifications at the right Build for compact, touch‑first contexts: respect safe areas, keep interfaces concise, and emphasize clear primary actions. - - - - + ## Build for Growth diff --git a/docs/mini-apps/technical-guides/dynamic-embeds.mdx b/docs/mini-apps/technical-guides/dynamic-embeds.mdx deleted file mode 100644 index e3a54314c..000000000 --- a/docs/mini-apps/technical-guides/dynamic-embeds.mdx +++ /dev/null @@ -1,200 +0,0 @@ ---- -title: Generate Dynamic Embed Images -description: Create viral loops by turning every user interaction into dynamic, shareable content directly in the feed. ---- - -Embeds are the first thing users see when they encounter your mini app in their feed. Each share can display unique, contextual content tailored to drive engagement. - - - - Diagram showing the flow from mini app URL to metadata reading to image generation and final embed rendering in the Base app - -When users share your mini app `URL`, the Base app requests your page, reads the fc:miniapp metadata, and fetches the `imageUrl`. You can serve either a static file (same image for everyone) or a dynamic endpoint that generates unique images on-demand based on URL parameters. - - - -This guide uses Minikit but the principles apply to any framework with server-side rendering. - - -## Implementation - -This guide shows how to create shareable links with dynamic embed images. Users click a share button, which opens a compose window with their personalized link. When shared, the embed displays a unique image with their username. - - - -Install `@vercel/og` by running the following command inside your project directory. This isn't required for Next.js App Router projects, as the package is already included: - -```bash -npm install @vercel/og -``` - - -Build an API route that generates images based on the username parameter. - -```tsx lines expandable wrap app/api/og/[username]/route.tsx -import { ImageResponse } from "next/og"; - -export const dynamic = "force-dynamic"; - -export async function GET( - request: Request, - { params }: { params: Promise<{ username: string }> } -) { - const { username } = await params; - - return new ImageResponse( - ( -
- Hello {username} -
- ), - { - width: 1200, - height: 630, - } - ); -} -``` - -This endpoint generates a unique image for each username: `/api/og/alice`, `/api/og/bob`, etc. - - - `
` 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"; - - -Buy - - -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] - -``` - -