diff --git a/docs/_docs.json b/docs/_docs.json index 8ab1fe7a..faf96174 100644 --- a/docs/_docs.json +++ b/docs/_docs.json @@ -48,12 +48,12 @@ }, { "anchor": "Faucet", - "href": "https://test-184b3b57.mintlify.app/base-chain/tools/network-faucets", + "href": "/base-chain/tools/network-faucets", "icon": "gas-pump" }, { "anchor": "Bridge", - "href": "https://test-184b3b57.mintlify.app/base-chain/quickstart/bridge-token", + "href": "/base-chain/network-information/bridges-mainnet", "icon": "coin" } ] diff --git a/docs/base-chain/network-information/bridges-mainnet.mdx b/docs/base-chain/network-information/bridges-mainnet.mdx index 988b90d6..2e04cf67 100644 --- a/docs/base-chain/network-information/bridges-mainnet.mdx +++ b/docs/base-chain/network-information/bridges-mainnet.mdx @@ -4,8 +4,6 @@ description: Documentation for bridging assets to Base. This page covers how to --- -# Bridges - While the bridge on bridge.base.org has been deprecated, there are many bridges that support moving assets between Base and other chains. diff --git a/docs/docs.json b/docs/docs.json index dd5357d4..f826c459 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -71,12 +71,12 @@ }, { "anchor": "Faucet", - "href": "https://test-184b3b57.mintlify.app/base-chain/tools/network-faucets", + "href": "https://docs.base.org/base-chain/tools/network-faucets", "icon": "gas-pump" }, { "anchor": "Bridge", - "href": "https://test-184b3b57.mintlify.app/base-chain/quickstart/bridge-token", + "href": "https://docs.base.org/base-chain/network-information/bridges-mainnet", "icon": "coin" } ] @@ -1108,6 +1108,10 @@ } }, "redirects": [ + { + "source": "/", + "destination": "/get-started/base" + }, { "source": "/base-services-hub", "destination": "/get-started/base-services-hub" @@ -1141,8 +1145,8 @@ "destination": "/wallet-app/guides/thinking-social" }, { - "source": "/builderkits/onchainkit/:path*", - "destination": "/onchainkit/:path" + "source": "/builderkits/onchainkit/:slug*", + "destination": "/onchainkit/:slug*" }, { "source": "/builderkits/onchainkit/appchain/bridge", @@ -1521,15 +1525,15 @@ "destination": "/cookbook/defi-your-app" }, { - "source": "/cookbook/smart-contract-development/foundry/:path*", - "destination": "/learn/foundry/:path" + "source": "/cookbook/smart-contract-development/foundry/:slug*", + "destination": "/learn/foundry/:slug*" }, { - "source": "/cookbook/smart-contract-development/hardhat/:path*", - "destination": "/learn/hardhat/hardhat-tools-and-testing/:path" + "source": "/cookbook/smart-contract-development/hardhat/:slug*", + "destination": "/learn/hardhat/hardhat-tools-and-testing/:slug*" }, { - "source": "/cookbook/smart-contract-development/remix/:path*", + "source": "/cookbook/smart-contract-development/remix/:slug*", "destination": "/learn/introduction-to-solidity/deployment-in-remix" }, { @@ -1637,20 +1641,16 @@ "destination": "/base-chain/node-operators/run-a-base-node" }, { - "source": "/identity/basenames/:path*", + "source": "/identity/basenames/:slug*", "destination": "/onchainkit/guides/use-basename-in-onchain-app" }, { "source": "/identity/smart-wallet", - "destination": "/identity/smart-wallet/quickstart" - }, - { - "source": "/identity/smart-wallet/:path*", - "destination": "/smart-wallet/:path" + "destination": "/smart-wallet/quickstart" }, { "source": "/identity/smart-wallet/checklist", - "destination": "/identity/smart-wallet/quickstart" + "destination": "/smart-wallet/quickstart" }, { "source": "/identity/smart-wallet/concepts/features/optional/spend-limits", @@ -1662,7 +1662,7 @@ }, { "source": "/identity/smart-wallet/concepts/usage-details/self-calls", - "destination": "/identity/smart-wallet/concepts/usage-details/unsupported-calls" + "destination": "/smart-wallet/concepts/usage-details/unsupported-calls" }, { "source": "/identity/smart-wallet/concepts/usage-details/simulations", @@ -1670,43 +1670,43 @@ }, { "source": "/identity/smart-wallet/FAQ", - "destination": "/identity/smart-wallet/quickstart" + "destination": "/smart-wallet/quickstart" }, { - "source": "/identity/smart-wallet/faq/:path*", - "destination": "/identity/smart-wallet/quickstart" + "source": "/identity/smart-wallet/faq/:slug*", + "destination": "/smart-wallet/quickstart" }, { "source": "/identity/smart-wallet/features/batch-operations", - "destination": "/identity/smart-wallet/concepts/features/optional/batch-operations" + "destination": "/smart-wallet/concepts/features/optional/batch-operations" }, { "source": "/identity/smart-wallet/features/custom-gas-tokens", - "destination": "/identity/smart-wallet/concepts/features/optional/custom-gas-tokens" + "destination": "/smart-wallet/concepts/features/optional/custom-gas-tokens" }, { "source": "/identity/smart-wallet/features/gas-free-transactions", - "destination": "/identity/smart-wallet/concepts/features/optional/gas-free-transactions" + "destination": "/smart-wallet/concepts/features/optional/gas-free-transactions" }, { "source": "/identity/smart-wallet/features/MagicSpend", - "destination": "/identity/smart-wallet/concepts/features/built-in/MagicSpend" + "destination": "/smart-wallet/concepts/features/built-in/MagicSpend" }, { "source": "/identity/smart-wallet/features/networks", - "destination": "/identity/smart-wallet/concepts/features/built-in/networks" + "destination": "/smart-wallet/concepts/features/built-in/networks" }, { "source": "/identity/smart-wallet/features/passkeys", - "destination": "/identity/smart-wallet/concepts/features/built-in/passkeys" + "destination": "/smart-wallet/concepts/features/built-in/passkeys" }, { "source": "/identity/smart-wallet/features/recovery-keys", - "destination": "/identity/smart-wallet/concepts/features/built-in/recovery-keys" + "destination": "/smart-wallet/concepts/features/built-in/recovery-keys" }, { "source": "/identity/smart-wallet/features/single-sign-on", - "destination": "/identity/smart-wallet/concepts/features/built-in/single-sign-on" + "destination": "/smart-wallet/concepts/features/built-in/single-sign-on" }, { "source": "/identity/smart-wallet/features/spend-permissions", @@ -1714,15 +1714,15 @@ }, { "source": "/identity/smart-wallet/features/sub-accounts", - "destination": "/identity/smart-wallet/concepts/features/optional/sub-accounts" + "destination": "/smart-wallet/concepts/features/optional/sub-accounts" }, { - "source": "/identity/smart-wallet/guides/create-app/:path*", - "destination": "/identity/smart-wallet/quickstart" + "source": "/identity/smart-wallet/guides/create-app/:slug*", + "destination": "/smart-wallet/quickstart" }, { "source": "/identity/smart-wallet/guides/react-native-integration", - "destination": "/identity/smart-wallet/quickstart/react-native-project" + "destination": "/smart-wallet/quickstart/react-native-project" }, { "source": "/identity/smart-wallet/guides/spend-limits", @@ -1733,12 +1733,12 @@ "destination": "/smart-wallet/guides/spend-permissions" }, { - "source": "/identity/smart-wallet/guides/spend-permissions/:path*", - "destination": "/identity/smart-wallet/guides/spend-limits/" + "source": "/identity/smart-wallet/guides/spend-permissions/:slug*", + "destination": "/smart-wallet/guides/spend-limits/" }, { - "source": "/identity/smart-wallet/guides/sub-accounts/:path*", - "destination": "/identity/smart-wallet/guides/sub-accounts/" + "source": "/identity/smart-wallet/guides/sub-accounts/:slug*", + "destination": "/smart-wallet/guides/sub-accounts/" }, { "source": "/identity/smart-wallet/guides/sub-accounts/add-sub-accounts-to-onchainkit-minikit", @@ -1746,59 +1746,63 @@ }, { "source": "/identity/smart-wallet/guides/sub-accounts/creating-sub-accounts", - "destination": "/identity/smart-wallet/guides/sub-accounts/" + "destination": "/smart-wallet/guides/sub-accounts/" }, { "source": "/identity/smart-wallet/guides/sub-accounts/incorporate-spend-permissions", - "destination": "/identity/smart-wallet/guides/sub-accounts/" + "destination": "/smart-wallet/guides/sub-accounts/" }, { "source": "/identity/smart-wallet/guides/sub-accounts/sub-accounts-with-privy", "destination": "/smart-wallet/guides/sub-accounts/sub-accounts-with-privy" }, { - "source": "/identity/smart-wallet/guides/tips/:path*", - "destination": "/identity/smart-wallet/quickstart" + "source": "/identity/smart-wallet/guides/tips/:slug*", + "destination": "/smart-wallet/quickstart" }, { "source": "/identity/smart-wallet/guides/update-existing-app", - "destination": "/identity/smart-wallet/quickstart" + "destination": "/smart-wallet/quickstart" }, { "source": "/identity/smart-wallet/index", - "destination": "/identity/smart-wallet/quickstart" + "destination": "/smart-wallet/quickstart" }, { - "source": "/identity/smart-wallet/introduction/:path*", - "destination": "/identity/smart-wallet/quickstart" + "source": "/identity/smart-wallet/introduction/:slug*", + "destination": "/smart-wallet/quickstart" }, { "source": "/identity/smart-wallet/introduction/base-gasless-campaign", - "destination": "/identity/smart-wallet/concepts/base-gasless-campaign" + "destination": "/smart-wallet/concepts/base-gasless-campaign" }, { "source": "/identity/smart-wallet/quick-start", - "destination": "/identity/smart-wallet/quickstart" + "destination": "/smart-wallet/quickstart" }, { - "source": "/identity/smart-wallet/sdk/:path*", - "destination": "/identity/smart-wallet/technical-reference/sdk/" + "source": "/identity/smart-wallet/sdk/:slug*", + "destination": "/smart-wallet/technical-reference/sdk/" }, { "source": "/identity/smart-wallet/technical-reference/sdk/sub-account-reference", - "destination": "/identity/smart-wallet/technical-reference/sub-account-reference" + "destination": "/smart-wallet/technical-reference/sub-account-reference" }, { - "source": "/identity/smart-wallet/usage-details/:path*", - "destination": "/identity/smart-wallet/concepts/usage-details/:path" + "source": "/identity/smart-wallet/usage-details/:slug*", + "destination": "/smart-wallet/concepts/usage-details/:slug*" }, { "source": "/identity/smart-wallet/wallet-library-support", - "destination": "/identity/smart-wallet/concepts/usage-details/wallet-library-support" + "destination": "/smart-wallet/concepts/usage-details/wallet-library-support" }, { "source": "/identity/smart-wallet/why", - "destination": "/identity/smart-wallet/concepts/what-is-smart-wallet" + "destination": "/smart-wallet/concepts/what-is-smart-wallet" + }, + { + "source": "/identity/smart-wallet/:slug*", + "destination": "/smart-wallet/:slug*" }, { "source": "/learn/account-abstraction", @@ -1821,12 +1825,12 @@ "destination": "/learn/welcome" }, { - "source": "/learn/erc-20-token/:path*", - "destination": "/learn/token-development/erc-20-token/:path" + "source": "/learn/erc-20-token/:slug*", + "destination": "/learn/token-development/erc-20-token/:slug*" }, { - "source": "/learn/erc-721-token/:path*", - "destination": "/learn/token-development/erc-721-token/:path" + "source": "/learn/erc-721-token/:slug*", + "destination": "/learn/token-development/erc-721-token/:slug*" }, { "source": "/learn/ethereum-applications", @@ -1837,16 +1841,16 @@ "destination": "/learn/introduction-to-ethereum/ethereum-dev-overview-vid" }, { - "source": "/learn/etherscan/:path*", - "destination": "/learn/hardhat/etherscan/:path" + "source": "/learn/etherscan/:slug*", + "destination": "/learn/hardhat/etherscan/:slug*" }, { "source": "/learn/evm-diagram", "destination": "/learn/introduction-to-ethereum/evm-diagram" }, { - "source": "/learn/frontend-setup/:path*", - "destination": "/learn/onchain-app-development/frontend-setup/:path" + "source": "/learn/frontend-setup/:slug*", + "destination": "/learn/onchain-app-development/frontend-setup/:slug*" }, { "source": "/learn/gas-use-in-eth-transactions", @@ -1857,40 +1861,36 @@ "destination": "/learn/introduction-to-ethereum/guide-to-base" }, { - "source": "/learn/hardhat-deploy/:path*", - "destination": "/learn/hardhat/hardhat-deploy/:path" + "source": "/learn/hardhat-deploy/:slug*", + "destination": "/learn/hardhat/hardhat-deploy/:slug*" }, { - "source": "/learn/hardhat-forking/:path*", - "destination": "/learn/hardhat/hardhat-forking/:path" + "source": "/learn/hardhat-forking/:slug*", + "destination": "/learn/hardhat/hardhat-forking/:slug*" }, { - "source": "/learn/hardhat-setup-overview/:path*", - "destination": "/learn/hardhat/hardhat-setup-overview/:path" + "source": "/learn/hardhat-setup-overview/:slug*", + "destination": "/learn/hardhat/hardhat-setup-overview/:slug*" }, { - "source": "/learn/hardhat-testing/:path*", - "destination": "/learn/hardhat/hardhat-testing/:path" + "source": "/learn/hardhat-testing/:slug*", + "destination": "/learn/hardhat/hardhat-testing/:slug*" }, { "source": "/learn/hardhat-tools-and-testing/overview", "destination": "/learn/hardhat/hardhat-tools-and-testing/overview" }, { - "source": "/learn/hardhat-verify/:path*", - "destination": "/learn/hardhat/hardhat-verify/:path" - }, - { - "source": "/learn/hardhat/:path*", - "destination": "/learn/hardhat/hardhat-tools-and-testing/:path" + "source": "/learn/hardhat-verify/:slug*", + "destination": "/learn/hardhat/hardhat-verify/:slug*" }, { "source": "/learn/help-on-discord", "destination": "/learn/welcome" }, { - "source": "/learn/intro-to-tokens/:path*", - "destination": "/learn/token-development/intro-to-tokens/:path" + "source": "/learn/intro-to-tokens/:slug*", + "destination": "/learn/token-development/intro-to-tokens/:slug*" }, { "source": "/learn/introduction-to-ethereum", @@ -1901,16 +1901,16 @@ "destination": "/learn/welcome" }, { - "source": "/learn/minimal-tokens/:path*", - "destination": "/learn/token-development/minimal-tokens/:path" + "source": "/learn/minimal-tokens/:slug*", + "destination": "/learn/token-development/minimal-tokens/:slug*" }, { - "source": "/learn/reading-and-displaying-data/:path*", - "destination": "/learn/onchain-app-development/reading-and-displaying-data/:path" + "source": "/learn/reading-and-displaying-data/:slug*", + "destination": "/learn/onchain-app-development/reading-and-displaying-data/:slug*" }, { - "source": "/learn/writing-to-contracts/:path*", - "destination": "/learn/onchain-app-development/writing-to-contracts/:path" + "source": "/learn/writing-to-contracts/:slug*", + "destination": "/learn/onchain-app-development/writing-to-contracts/:slug*" }, { "source": "/base-learn/progress", diff --git a/docs/learn/client-side-development.mdx b/docs/learn/client-side-development.mdx deleted file mode 100644 index e006f903..00000000 --- a/docs/learn/client-side-development.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: Client Side Development ---- \ No newline at end of file diff --git a/docs/learn/cross-chain-development.mdx b/docs/learn/cross-chain-development.mdx deleted file mode 100644 index 86a6691a..00000000 --- a/docs/learn/cross-chain-development.mdx +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: Cross Chain Development ---- \ No newline at end of file diff --git a/docs/wallet-app/guides/chat-agents.mdx b/docs/wallet-app/guides/chat-agents.mdx new file mode 100644 index 00000000..58b971e3 --- /dev/null +++ b/docs/wallet-app/guides/chat-agents.mdx @@ -0,0 +1,211 @@ +# Chat Agents in Coinbase Wallet + +This guide will cover how you can get started building messaging agents for Coinbase Wallet, using XMTP, a decentralized messaging protocol. Discover a fast, easy way to build and get distribution in Coinbase Wallet. + +- Why agents? +- Getting started with XMTP +- Getting featured in Coinbase Wallet + +## Why agents? + +Messaging is the largest use-case in the world, but it’s more than just conversations—it’s a secure, programmable channel for financial and social innovation. When combined with the onchain capabilities of Coinbase Wallet, builders have a new surface area to build 10X better messaging experiences not currently possible on legacy platforms like WhatsApp or Messenger. + +Real Examples: + +• Smart Payment Assistant: Text "split dinner $200 4 ways" and everyone gets paid instantly with sub-cent fees, no app switching or Venmo delays. + +• AI Trading Companion: Message "buy $100 ETH when it hits $3,000" and your agent executes trades 24/7 while you sleep. + +• Travel Planning Bot: "Book flight LAX to NYC under $300" and get instant booking with crypto payments, all in your group chat + +• Coinbase Wallet & XMTP are combining AI, crypto, and mini apps with secure messaging – to unlock use-cases never before possible. Secure group chats & DMs are the new surface area for developers. + +## Getting started + +This guide will walk you through creating, testing, and deploying your first XMTP messaging agent. By the end, you'll have a fully functional agent that can send and receive messages on the XMTP messaging network. + +**Prerequisites** +• Node.js (v16 or higher) +• Git +• A code editor +• Basic knowledge of JavaScript/TypeScript + +**Resources** + +- [Getting Started with XMTP (Video)](https://www.youtube.com/watch?v=djRLnWUvwIA) +- [Building Agents on XMTP](https://github.com/ephemeraHQ/xmtp-agent-examples) +- [XMTP Documentation](https://docs.xmtp.org/) +- [Coinbase AgentKit](https://github.com/coinbase/agentkit) +- [Coinbase Developer Platform](https://docs.cdp.coinbase.com/) +- [Faucets](https://portal.cdp.coinbase.com/products/faucet) +- [OnchainKit](https://onchainkit.xyz/) + +**STEP 1: SET UP YOUR DEVELOPMENT ENVIRONMENT** + +Clone the XMTP Bot Starter Template: + +```javascript +git clone https://github.com/xmtp/bot-starter +cd bot-starter +``` + +Alternative: create from scratch: + +```javascript +mkdir my-xmtp-bot +cd my-xmtp-bot +npm init -y +``` + +**STEP 2: INSTALL DEPENDENCIES** + +Install the required XMTP SDK and other dependencies: + +```javascript +npm install @xmtp/xmtp-js ethers dotenv +``` + +For TypeScript support (recommended): + +```javascript +npm install -D typescript @types/node ts-node +``` + +**STEP 3: GENERATE KEYS FOR YOUR BOT** + +Run the key generation script to create your bot's wallet: + +```javascript +npm run gen:keys +``` + +This creates a .env file with: + +```javascript +XMTP_ENV=dev +PRIVATE_KEY=0x... (Your bot's private key) +PUBLIC_ADDRESS=0x... (Your bot's public address) +``` + +IMPORTANT: +• Keep your PRIVATE_KEY secure and never commit it to version control +• Start with XMTP_ENV=dev for testing +• Switch to XMTP_ENV=production when ready to go live + +**STEP 4: WRITE YOUR BOT LOGIC** + +Create a basic bot that responds to messages: + +```javascript +// bot.js +import { Client } from '@xmtp/xmtp-js' +import { Wallet } from 'ethers' + +const wallet = new Wallet(process.env.PRIVATE_KEY) +const xmtp = await Client.create(wallet, { env: process.env.XMTP_ENV }) + +// Listen for new conversations +for await (const conversation of await xmtp.conversations.stream()) { + console.log(`New conversation started with ${conversation.peerAddress}`) + + // Listen for messages in this conversation + for await (const message of await conversation.streamMessages()) { + if (message.senderAddress === xmtp.address) continue // Skip own messages + + console.log(`Received: ${message.content}`) + + // Simple echo bot response + await conversation.send(`You said: ${message.content}`) + } +} + +``` + +**STEP 5: TEST YOUR BOT** + +**Development Testing** + +1\. Start your bot: + +```javascript +npm start +``` + +2\. Test on [xmtp.chat:](https://xmtp.chat/conversations) +• Go to https://xmtp.chat +• Connect your personal wallet +• Switch to Dev environment in settings +• Start a new conversation with your bot's public address (from .env) +• Send a test message and verify the bot responds + +**Production Testing** + +1\. Update environment: + +```javascript +XMTP_ENV=production +``` + +2\. Test on Coinbase Wallet: +• Open Coinbase Wallet mobile app +• Go to messaging +• Start conversation with your bot's address +• Verify functionality + +**STEP 6: GET A BASENAME FOR YOUR BOT** + +Give your bot a human-readable name: + +**1\. Import bot wallet to Coinbase Wallet extension:** +• Install Coinbase Wallet browser extension +• Import using your bot's private key + +**2\. Purchase a basename:** +• Visit https://base.org/names +• Connect your bot's wallet +• Search and purchase your desired basename (e.g., mybot.base.eth) +• Set as primary name + +**3\. Verify setup:** +• Your bot can now be reached via the basename instead of the long address +• Users can message mybot.base.eth instead of 0x123... + +**STEP 7: DEPLOY YOUR BOT** + +**Option 1: Railway (Recommended)** + +• Visit https://railway.app +• Connect your GitHub repository +• Add environment variables in Railway dashboard: + \- XMTP_ENV=production + \- PRIVATE_KEY=your_bot_private_key +• Deploy and monitor logs + +**Option 2: Other Platforms** +Heroku, Vercel, or any Node.js hosting platform: +• Ensure your package.json has the correct start script +• Set environment variables in your hosting platform +• Deploy your repository + +**STEP 8: MONITOR AND MAINTAIN** + +**Best Practices** +1\. Logging: Add comprehensive logging to track bot activity +2\. Error Handling: Implement try-catch blocks for network issues +3\. Rate Limiting: Respect XMTP rate limits in your bot logic +4\. Security: Never expose private keys; use environment variables + +**Monitoring** +Add to your bot for basic monitoring: + +```javascript +- console.log(\`Bot started. Address: ${xmtp.address}\`) +- console.log(\`Environment: ${process.env.XMTP_ENV}\`) +- console.log(\`Listening for messages...\`) +``` + +## Getting featured + +Fill out the form [here](https://app.deform.cc/form/52b71db4-bfa2-4ef5-a954-76c66250bdd2/?page_number=0) to submit your agent for review. If approved, your bot will be featured in Coinbase Wallet. You will hear back from us within 5 business days. + +Need help or have feature requests? Visit [https://community.xmtp.org/](https://community.xmtp.org/)