Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Build onchain applications with React components and TypeScript utilities from Coinbase's OnchainKit. Use when users want to create crypto wallets, swap tokens, mint NFTs, build payments, display blockchain identities, or develop any onchain app functionality. Supports wallet connection, transaction building, token operations, identity management, and complete onchain app development workflows.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 123% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -28% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 54% | 0% |
| case-15 | ✗→✓ | ▲ Improved | -1% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 102% | 0% |
Build production-ready onchain applications using Coinbase's comprehensive React component library and TypeScript utilities.
OnchainKit provides ready-to-use, full-stack components that abstract blockchain complexity, making it easy to build onchain applications without deep blockchain knowledge. It offers AI-friendly components that work automatically on Base, requires no backend infrastructure, and provides cost-effective transactions (< $0.01 fees).
bash# Create a new onchain app with all batteries included scripts/create-onchain-app.py <project-name> # Verify setup scripts/validate-setup.py
bashnpm install @coinbase/onchainkit # Setup configuration and providers scripts/setup-environment.py
Connect users to their crypto wallets with minimal code:
tsximport { Wallet, ConnectWallet } from '@coinbase/onchainkit/wallet'; function WalletConnection() { return ( <Wallet> <ConnectWallet /> </Wallet> ); }
Use cases:
Reference: references/wallet-integration.md
Show blockchain identities with ENS names, avatars, and verification badges:
tsximport { Identity, Avatar, Name, Badge } from '@coinbase/onchainkit/identity'; function UserProfile({ address }) { return ( <Identity address={address}> <Avatar /> <Name /> <Badge /> </Identity> ); }
Reference: references/identity-components.md
Handle token swaps, purchases, and transfers:
tsximport { Swap, SwapAmountInput, SwapButton } from '@coinbase/onchainkit/swap'; function TokenSwap() { return ( <Swap> <SwapAmountInput /> <SwapButton /> </Swap> ); }
Supported operations:
Reference: references/token-operations.md
Create and execute blockchain transactions:
tsximport { Transaction, TransactionButton } from '@coinbase/onchainkit/transaction'; function SendTransaction({ calls }) { return ( <Transaction calls={calls}> <TransactionButton /> </Transaction> ); }
Reference: references/transactions.md
Build checkout flows and payment processing:
tsximport { Checkout, CheckoutButton } from '@coinbase/onchainkit/checkout'; function PaymentFlow() { return ( <Checkout> <CheckoutButton /> </Checkout> ); }
Reference: references/payments.md
Display, mint, and manage NFTs:
tsximport { NFTCard } from '@coinbase/onchainkit/nft'; function NFTDisplay({ contract, tokenId }) { return <NFTCard contract={contract} tokenId={tokenId} />; }
Reference: references/nft-integration.md
create-onchain-app.pyassets/templates/swap-app/assets/templates/nft-mint/bash# Required for API access NEXT_PUBLIC_CDP_API_KEY="your-api-key" NEXT_PUBLIC_WC_PROJECT_ID="your-walletconnect-id" # Optional configurations NEXT_PUBLIC_CHAIN_ID="8453" # Base mainnet
Reference: references/configuration.md
OnchainKit requires proper React provider configuration:
tsximport { OnchainKitProvider } from '@coinbase/onchainkit'; import { WagmiProvider } from 'wagmi'; function App() { return ( <WagmiProvider config={wagmiConfig}> <OnchainKitProvider apiKey={process.env.NEXT_PUBLIC_CDP_API_KEY} chain={base} > {/* Your app components */} </OnchainKitProvider> </WagmiProvider> ); }
Start simple, add features as needed:
tsx// Basic wallet connection <ConnectWallet /> // Enhanced with custom styling <ConnectWallet className="custom-wallet-button" /> // Full wallet interface with status <Wallet> <ConnectWallet /> <WalletDropdown> <Identity /> <WalletDropdownDisconnect /> </WalletDropdown> </Wallet>
Mix and match components for custom workflows:
tsxfunction CustomApp() { return ( <div> {/* User identity */} <Identity address={address}> <Avatar /> <Name /> </Identity> {/* Token operations */} <Swap> <SwapAmountInput /> <SwapButton /> </Swap> {/* Payment processing */} <Checkout> <CheckoutButton /> </Checkout> </div> ); }
import { Wallet } from '@coinbase/onchainkit/wallet'Reference: references/best-practices.md
Reference: references/troubleshooting.md
assets/templates/basic-app/ - Minimal onchain appassets/templates/swap-app/ - Complete swap interface assets/templates/nft-mint/ - NFT marketplaceassets/templates/commerce/ - Onchain storeReference: references/examples.md
Support additional EVM chains beyond Base:
tsxconst customChain = { id: 123456, name: 'Custom Chain', // ... chain configuration }; <OnchainKitProvider chain={customChain}>
Build Farcaster Frame applications:
tsximport { useMiniKit } from '@coinbase/onchainkit/minikit'; function FrameApp() { const { isReady } = useMiniKit(); return isReady ? <YourFrameContent /> : <Loading />; }
Reference: references/advanced-features.md
OnchainKit provides both React components and utility functions:
Reference: references/api-reference.md
💡 Pro Tip: Start with npm create onchain to bootstrap a working app, then customize components as needed. The quickstart template includes all necessary configuration and examples.
🚀 Quick Win: Use the validation script after setup to ensure everything is working correctly before building custom features.
Other measured skills in the registry, with their headline benchmark lift.