From a2b5345d735ef7cd45ff5d011d35185d1c95eeff Mon Sep 17 00:00:00 2001 From: Nate Reiners Date: Tue, 21 May 2024 13:33:34 -0700 Subject: [PATCH] add beta explanation back to install section --- docs/pages/guides/create-app/using-boat.mdx | 6 +-- docs/pages/guides/create-app/using-wagmi.mdx | 10 ++-- docs/pages/guides/update-existing-app.mdx | 11 ++++- docs/pages/sdk/install.mdx | 52 +++++++++++++++----- 4 files changed, 59 insertions(+), 20 deletions(-) diff --git a/docs/pages/guides/create-app/using-boat.mdx b/docs/pages/guides/create-app/using-boat.mdx index 0a6afb8..51441a3 100644 --- a/docs/pages/guides/create-app/using-boat.mdx +++ b/docs/pages/guides/create-app/using-boat.mdx @@ -1,20 +1,20 @@ # Getting started with Build Onchain Apps Template This guide uses [Build Onchain Apps Template](https://buildonchainapps.xyz/). -### 1. Create project +## 1. Create project Run the command below and proceed through the following steps, choosing "yes" when asked "Do you want to use Smart Wallet?". ```bash npx @coinbase/build-onchain-apps@latest create ``` -### 2. Setup project +## 2. Setup project Open your newly created project, and create a new `.env` file in the `web` folder. Add the following to this file. ```bash NEXT_PUBLIC_RPC_URL=https://sepolia.base.org ENVIRONMENT=localhost ``` -### 3. Install dependencies and run dev +## 3. Install dependencies and run dev ```bash yarn install && yarn dev ``` diff --git a/docs/pages/guides/create-app/using-wagmi.mdx b/docs/pages/guides/create-app/using-wagmi.mdx index 930ea97..1589b93 100644 --- a/docs/pages/guides/create-app/using-wagmi.mdx +++ b/docs/pages/guides/create-app/using-wagmi.mdx @@ -2,7 +2,7 @@ This guide covers creating a new Wagmi template project that uses Smart Wallet. -### 1. Run the following command and proceed through the prompts. +## 1. Run the following command and proceed through the prompts. :::code-group @@ -16,7 +16,7 @@ bun create wagmi ::: -### 3. Install packages and run dev. +## 3. Install packages and run dev. :::code-group @@ -30,7 +30,7 @@ bun install && bun run dev ::: -### 4. Update the Wagmi config and coinbaseWallet connector to use baseSepolia +## 4. Update the Wagmi config and coinbaseWallet connector to use baseSepolia `src/wagmi.ts` should look something like this: @@ -56,12 +56,12 @@ declare module 'wagmi' { } ``` -### 5. Visit your site locally, click the "Coinbase Wallet" button, and choose "Create a Smart Wallet." +## 5. Visit your site locally, click the "Coinbase Wallet" button, and choose "Create a Smart Wallet." Note, if you are using a browser with Coinbase Wallet Extension enabled, that will be the default connection method and you will not see a screen to choose Smart Wallet. Temporarily disable the Extension to connect with Smart Wallet. -### 6. Keep building +## 6. Keep building You can find everything you need here: https://wagmi.sh/react/api/hooks diff --git a/docs/pages/guides/update-existing-app.mdx b/docs/pages/guides/update-existing-app.mdx index b07e53a..e120d8b 100644 --- a/docs/pages/guides/update-existing-app.mdx +++ b/docs/pages/guides/update-existing-app.mdx @@ -1,7 +1,16 @@ # Update an existing project +## Direct dependency +Follow the [installation instructions](/sdk/install). + ## Wagmi -If your project is using wagmi, simply upgrade wagmi to version `2.9.0` or higher. Smart Wallet is available out of the box. + +1. Upgrade wagmi to version `2.9.0` or higher. +1. Prior to mainnet launch: + - Smart Wallet will be available for use with Base Sepolia only. + - Smart Wallet will only be available on the `keys.coinbase.com` popup if `preference: 'smartWalletOnly'` is used. [Example](/guides/create-app/using-wagmi#4-update-the-wagmi-config-and-coinbasewallet-connector-to-use-basesepolia) + + ## Transitive dependency If your project or its dependencies are already using diff --git a/docs/pages/sdk/install.mdx b/docs/pages/sdk/install.mdx index 907fd8a..1a6db84 100644 --- a/docs/pages/sdk/install.mdx +++ b/docs/pages/sdk/install.mdx @@ -1,13 +1,21 @@ -# Install +# Installation -Smart Wallet is accessible to developers through the [Coinbase Wallet SDK](https://github.com/coinbase/coinbase-wallet-sdk), versions `4.0` and later. +:::warning +**IMPORTANT** + +Smart Wallet is not yet publicly launched on mainnet networks. Read about the current SDK versions below +and reach out on [Discord](https://discord.com/invite/cdp/) in the `#smart-wallet` channel if you have questions. + +Public mainnet launch is expected to occur by early June. +::: +## Latest :::code-group - + ```bash [npm] npm i @coinbase/wallet-sdk@4.0.0 ``` - + ```bash [pnpm] pnpm i @coinbase/wallet-sdk@4.0.0 ``` @@ -15,18 +23,40 @@ pnpm i @coinbase/wallet-sdk@4.0.0 ```bash [yarn] yarn add @coinbase/wallet-sdk@4.0.0 ``` - + ```bash [bun] bun i @coinbase/wallet-sdk@4.0.0 ``` ::: +- Intended for production environments. +- Allows developers to see Smart Wallet option on `keys.coinbase.com` popup when `'smartWalletOnly'` is used. + - [Wagmi example](/guides/create-app/using-wagmi#4-update-the-wagmi-config-and-coinbasewallet-connector-to-use-basesepolia) + - [Direct dependency example](/sdk/makeWeb3Provider#usage) +- Before public mainnet launch + - Will *not* show Smart Wallet option on `keys.coinbase.com` popup when `'smartWalletOnly'` is not used. + - Will allow Smart Wallet usage on Base Sepolia only. -:::warning -**IMPORTANT** +## Beta +:::code-group -Smart Wallet is not yet publicly launched on mainnet networks. Read about the current SDK versions below -and reach out on [Discord](https://discord.com/invite/cdp/) in the `#smart-wallet` channel if you have questions. +```bash [npm] +npm i @coinbase/wallet-sdk@4.0.0-beta.14 +``` -Public mainnet launch is expected to occur by early June. -::: \ No newline at end of file +```bash [pnpm] +pnpm i @coinbase/wallet-sdk@4.0.0-beta.14 +``` + +```bash [yarn] +yarn add @coinbase/wallet-sdk@4.0.0-beta.14 +``` + +```bash [bun] +bun i @coinbase/wallet-sdk@4.0.0-beta.14 +``` +::: + +- Intended for local testing or demo testnet apps. +- Based on [config](/sdk/setup), can show Smart Wallet option on `keys.coinbase.com` popup. +- Only allows using Smart Wallet on testnets (currently just Base Sepolia). \ No newline at end of file