diff --git a/docs/docs.json b/docs/docs.json index ffd04ca37..5d0c3ac2d 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -507,247 +507,265 @@ }, { "tab": "OnchainKit", - "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", - "onchainkit/guides/testing-with-onchaintestkit" - ] - }, - { - "group": "Templates", - "pages": [ - "onchainkit/templates/onchain-nft-app", - "onchainkit/templates/onchain-commerce-app", - "onchainkit/templates/onchain-social-profile" - ] - }, + "versions": [ { - "group": "Components", - "pages": [ - { - "group": "Appchain", - "pages": ["onchainkit/appchain/bridge"] - }, - { - "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" - ] - }, + "version": "latest", + "groups": [ { - "group": "Identity", + "group": "Introduction", "pages": [ - "onchainkit/identity/identity", - "onchainkit/identity/address", - "onchainkit/identity/avatar", - "onchainkit/identity/badge", - "onchainkit/identity/identity-card", - "onchainkit/identity/name", - "onchainkit/identity/socials" + "onchainkit/getting-started", + "onchainkit/guides/telemetry", + "onchainkit/guides/troubleshooting" ] }, { - "group": "Mint", + "group": "Installation", "pages": [ - "onchainkit/mint/nft-card", - "onchainkit/mint/nft-mint-card" + "onchainkit/installation/nextjs", + "onchainkit/installation/vite", + "onchainkit/installation/remix", + "onchainkit/installation/astro" ] }, - "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", + "group": "Config", "pages": [ - "onchainkit/api/get-token-details", - "onchainkit/api/get-mint-details", - "onchainkit/api/build-mint-transaction" + "onchainkit/config/onchainkit-provider", + "onchainkit/config/supplemental-providers" ] }, { - "group": "Swap", + "group": "Guides", "pages": [ - "onchainkit/api/build-swap-transaction", - "onchainkit/api/get-swap-quote" + "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", + "onchainkit/guides/testing-with-onchaintestkit" ] }, { - "group": "Token", - "pages": ["onchainkit/api/get-tokens"] - }, - { - "group": "Wallet", - "pages": ["onchainkit/api/get-portfolios"] - } - ] - }, - { - "group": "Utilities", - "pages": [ - { - "group": "Config", + "group": "Templates", "pages": [ - "onchainkit/config/is-base", - "onchainkit/config/is-ethereum" + "onchainkit/templates/onchain-nft-app", + "onchainkit/templates/onchain-commerce-app", + "onchainkit/templates/onchain-social-profile" ] }, { - "group": "Earn", + "group": "Components", "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": "Appchain", + "pages": ["onchainkit/appchain/bridge"] + }, + { + "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": "Fund", + "group": "API", "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": "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": "Identity", + "group": "Utilities", "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": "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": "Mint", + "group": "Types", "pages": [ - "onchainkit/hooks/use-token-details", - "onchainkit/hooks/use-mint-details" + "onchainkit/api/types", + "onchainkit/appchain/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": "Token", - "pages": ["onchainkit/token/format-amount"] - }, - { - "group": "Wallet", + "group": "Contribution", "pages": [ - "onchainkit/wallet/is-valid-aa-entrypoint", - "onchainkit/wallet/is-wallet-a-coinbase-smart-wallet" + "onchainkit/guides/contribution", + "onchainkit/guides/reporting-bug" ] } ] }, { - "group": "Types", - "pages": [ - "onchainkit/api/types", - "onchainkit/appchain/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" + "version": "alpha", + "groups": [ + { + "group": "Introduction", + "pages": [ + "onchainkit/alpha/overview", + "onchainkit/alpha/quickstart-guide", + "onchainkit/alpha/manual-installation" + ] + } ] } ], diff --git a/docs/onchainkit/alpha/images/quickstart.png b/docs/onchainkit/alpha/images/quickstart.png new file mode 100644 index 000000000..48cc9e774 Binary files /dev/null and b/docs/onchainkit/alpha/images/quickstart.png differ diff --git a/docs/onchainkit/alpha/manual-installation.mdx b/docs/onchainkit/alpha/manual-installation.mdx new file mode 100644 index 000000000..dbac565af --- /dev/null +++ b/docs/onchainkit/alpha/manual-installation.mdx @@ -0,0 +1,10 @@ +--- +title: "Manual Installation" +--- + +import StartBuilding from "/snippets/start-building.mdx"; +import InstallationOptions from '/snippets/installation-options.mdx'; + +Already have a project set up? You can manually add OnchainKit to your existing project by following the instructions below. + + diff --git a/docs/onchainkit/alpha/overview.mdx b/docs/onchainkit/alpha/overview.mdx new file mode 100644 index 000000000..c16d22877 --- /dev/null +++ b/docs/onchainkit/alpha/overview.mdx @@ -0,0 +1,27 @@ +--- +title: "Overview" +--- + +OnchainKit is a full-featured SDK for building onchain applications. If you're building a mini app, a browser-based onchain app, or a hybrid app, OnchainKit's suite of components and utilities will help you build quickly and easily. + +Whether it's connecting wallets, sending transactions, configuring a mini app, and much more, OnchainKit has you covered. + +## An all-in-one web app and mini app solution + +OnchainKit helps you build traditional onchain web apps, mini apps, and hybrid apps (apps that work in Farcaster clients such as the Base app, as well as the browser). + +If you're new to mini apps, they are supercharged web apps that get additional functionality such as automatic wallet connection, push notifications, and more. Check out the [Mini Apps documentation](/mini-apps/overview) for more information. + +## Philosophy + +OnchainKit aims to provide a comprehensive toolkit that combines powerful onchain features with developer-friendly design. It's built with the following principles in mind: + +- **Ergonomic design:** Full-stack tools that make complex onchain interactions intuitive +- **Battle-tested patterns:** Industry best practices packaged into ready-to-use solutions +- **Purpose-built components:** Pre-built modules for common onchain workflows +- **Framework agnostic:** Compatible with any React framework +- **Supercharged by Base:** Deep integration with Base's protocol features and ecosystem + + + These docs are LLM-friendly. Reference the [OnchainKit AI Prompting Guide](/onchainkit/guides/ai-prompting-guide) in your code editor to streamline builds and prompt smarter. + diff --git a/docs/onchainkit/alpha/quickstart-guide.mdx b/docs/onchainkit/alpha/quickstart-guide.mdx new file mode 100644 index 000000000..499bead4c --- /dev/null +++ b/docs/onchainkit/alpha/quickstart-guide.mdx @@ -0,0 +1,50 @@ +--- +title: "Quickstart Guide" +--- + +import StartBuilding from "/snippets/start-building.mdx"; +import InstallationOptions from '/snippets/installation-options.mdx'; + +Building a new app? The easiest way to get started is to use `npx create onchain`, which sets up everything automatically for you. + +After running `npx create onchain` and following the prompts, you'll have a [Next.js](https://nextjs.org/) project with OnchainKit installed and ready to go. + +## Bootstrapping a new project + +### Mini app support + +If you're building a mini app or hybrid app, you can use the `--mini` flag to bootstrap a project with mini app support. + +```bash Terminal +npx create-onchain@alpha --mini +``` + +### Traditional onchain web app + +If you don't want to use mini app features, simply omit the `--mini` flag. If you decide to add mini app features later, you can convert your project to a mini by making some small changes to your codebase. + +```bash Terminal +npx create-onchain@alpha +``` + +## CLI settings + +The CLI will ask you a few simple questions to help you get started. + +These are: + +- Your project's name +- Your [Coinbase Developer Platform Client API key](https://portal.cdp.coinbase.com/products/onchainkit) (optional) +- Whether you'd like to enable telemetry (optional) + +After this, simply `cd` into your project folder and run `npm install` (or use your package manager of choice) to install the dependencies. + +Finally, run `npm run dev` to start the project and get to building! + + +OnchainKit Template +