Skip to content

Commit 8eecde2

Browse files
authored
Post launch qa (#24)
* Remove index page to route to get started * add chat agents to sidebar * Remove Get Featured from showcase * Update title of chat agents doc * add redirect for chat agents old url * Update base service hub * Migrate recent changes to wallet app docs * Add missing subaccounts guide
1 parent d3d8318 commit 8eecde2

File tree

8 files changed

+130
-168
lines changed

8 files changed

+130
-168
lines changed

docs/docs.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@
246246
"smart-wallet/guides/sub-accounts",
247247
"smart-wallet/guides/sub-accounts/setup",
248248
"smart-wallet/guides/sub-accounts/using-sub-accounts",
249-
"smart-wallet/guides/sub-accounts/sub-accounts-with-privy"
249+
"smart-wallet/guides/sub-accounts/sub-accounts-with-privy",
250+
"smart-wallet/guides/sub-accounts/add-sub-accounts-to-onchainkit-minikit"
250251
]
251252
},
252253
"smart-wallet/guides/spend-permissions"
@@ -639,7 +640,8 @@
639640
{
640641
"group": "Guides",
641642
"pages": [
642-
"wallet-app/guides/thinking-social"
643+
"wallet-app/guides/thinking-social",
644+
"wallet-app/guides/chat-agents"
643645
]
644646
}
645647
]
@@ -2011,6 +2013,10 @@
20112013
{
20122014
"source": "/wallet-app/mini-apps",
20132015
"destination": "/wallet-app/introduction/mini-apps"
2016+
},
2017+
{
2018+
"source": "/wallet-app/chat-agents",
2019+
"destination": "/wallet-app/guides/chat-agents"
20142020
}
20152021
],
20162022
"integrations": {

docs/get-started/base-services-hub.mdx

Lines changed: 16 additions & 12 deletions
Large diffs are not rendered by default.

docs/index.mdx

Lines changed: 0 additions & 117 deletions
This file was deleted.

docs/showcase.mdx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,6 @@ mode: "custom"
5050
AI crypto co-pilot with its cutting edge data and execution mechanism.
5151
</Card>
5252
</CardGroup>
53-
54-
<div className="flex flex-col items-center justify-center text-center mt-12 mb-8">
55-
<div className="flex gap-4">
56-
<a
57-
href="https://airtable.com/appuZG4HBdFMDrKPi/shrFLqZKVVUVqUzYy"
58-
className="inline-flex items-center justify-center px-6 py-3 border border-transparent text-base font-medium rounded-lg text-white bg-primary hover:bg-primary/90 transition-colors"
59-
>
60-
Get featured
61-
</a>
62-
</div>
63-
</div>
6453
</div>
6554

6655

docs/smart-wallet/guides/sub-accounts/add-sub-accounts-to-onchainkit.mdx renamed to docs/smart-wallet/guides/sub-accounts/add-sub-accounts-to-onchainkit-minikit.mdx

Lines changed: 84 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
---
2-
title: "Add Sub Accounts to OnchainKit"
2+
title: "Add Sub Accounts to Onchainkit/Minikit"
33
---
44

5-
import {GithubRepoCard} from "/snippets/GithubRepoCard.mdx";
5+
import { GithubRepoCard } from "/snippets/GithubRepoCard.mdx"
6+
7+
68

79
This guide will show you how to add Sub Accounts to your existing [OnchainKit](/builderkits/onchainkit/getting-started) or [MiniKit](/builderkits/minikit/quickstart) project.
810

@@ -11,18 +13,34 @@ you can read more about it in the [Sub Accounts Intro Page](/identity/smart-wall
1113

1214
Before you start, make sure you have checked the following guides:
1315

14-
- [OnchainKit Quickstart](/onchainkit/getting-started)
15-
- [OnchainKit Custom Providers](/onchainkit/config/supplemental-providers)
16-
- [Sub Accounts Intro Page](/smart-wallet/guides/sub-accounts)
16+
- [OnchainKit Quickstart](/builderkits/onchainkit/getting-started)
17+
- [MiniKit Quickstart](/builderkits/minikit/quickstart)
18+
- [OnchainKit Custom Providers](/builderkits/onchainkit/config/supplemental-providers)
19+
- [Sub Accounts Intro Page](/identity/smart-wallet/guides/sub-accounts)
20+
21+
<Warning>
22+
**Smart Wallet compatibility with Mini Apps**
23+
24+
The Coinbase Wallet team is working on adding Smart Wallet support to Mini Apps.
25+
26+
For now, you can only use Sub Accounts with OnchainKit/MiniKit outside of the social feed.
27+
</Warning>
1728

1829
## Skip ahead
1930

2031
If you want to skip ahead and just get the final code, you can find it here:
2132

22-
<GithubRepoCard title="Sub Account OnchainKit Template Demo" githubUrl="https://github.com/base/demos/tree/master/smart-wallet/sub-accounts-onchainkit" />
33+
<GithubRepoCard title="Sub Account MiniKit Template Demo" githubUrl="https://github.com/base/demos/tree/master/smart-wallet/sub-accounts-minikit" />
34+
35+
<Warning>
36+
**About this codebase**
2337

38+
The codebase uses MiniKit, but the same code can be used for OnchainKit with minimal changes.
39+
40+
The difference is detailed in the [Providers](#setting-up-the-onchainkitminikit-providers-config) section.
41+
</Warning>
2442

25-
## Add Sub Accounts to your OnchainKit project
43+
## Add Sub Accounts to your OnchainKit/MiniKit project
2644

2745
### Override the default Coinbase Wallet SDK version
2846

@@ -31,7 +49,7 @@ Currently, Sub Accounts are only available in the Smart Wallet development envir
3149
To override the default Coinbase Wallet SDK version, you can run the following command:
3250

3351
```bash
34-
npm pkg set overrides.@coinbase/wallet-sdk=canary
52+
npm @coinbase/wallet-sdk@canary install
3553
```
3654

3755
<Warning>
@@ -43,7 +61,6 @@ Make sure to delete the `node_modules` folder and `package-lock.json` file befor
4361
rm -rf node_modules package-lock.json
4462
npm install
4563
```
46-
4764
</Warning>
4865

4966
<Check>
@@ -52,7 +69,6 @@ npm install
5269
This is a temporary solution to get Sub Accounts working.
5370

5471
Once the new version of the Coinbase Wallet SDK is released, you can remove this step.
55-
5672
</Check>
5773

5874
### Setting up the Wagmi config
@@ -112,7 +128,7 @@ Let's break down the key preference parameters:
112128
- `keysUrl`: Points to the development environment for Smart Wallet testing
113129
- `options: 'smartWalletOnly'`: Ensures only Smart Wallet mode is used
114130
- `enableAutoSubAccounts: true`: When set to true, automatically creates a Sub Account at connection
115-
- `defaultSpendLimits`: Configures Spend Permissions for Sub Account for a network (eg. Base Sepolia `84532`), including:
131+
- `defaultSpendLimits`: Configures Spend Limits for Sub Account for a network (eg. Base Sepolia `84532`), including:
116132

117133
- Token address (In this case, `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` represents the native ETH)
118134
- Allowance WEI amount (in Hex)
@@ -123,23 +139,62 @@ Let's break down the key preference parameters:
123139

124140
Sub Accounts are currently only available in the Smart Wallet development environment.
125141
To use this environment, you need to set the `keysUrl` to `https://keys-dev.coinbase.com/connect` in your configuration.
126-
127142
</Warning>
128143

129144
### Setting up the OnchainKit/MiniKit providers config
130145

131146
Once the `wagmi.ts` file is updated, you can update your `providers.tsx` file to include the following:
132147

148+
<CodeGroup>
149+
```ts providers.tsx (MiniKit)
150+
"use client";
151+
152+
import { type ReactNode, useState } from "react";
153+
import { baseSepolia } from "wagmi/chains";
154+
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
155+
import { MiniKitProvider } from "@coinbase/onchainkit/minikit";
156+
import { type State, WagmiProvider } from "wagmi";
157+
import { getConfig } from "@/wagmi";
158+
159+
export function Providers(props: {
160+
children: ReactNode;
161+
initialState?: State;
162+
}) {
163+
const [config] = useState(() => getConfig());
164+
const [queryClient] = useState(() => new QueryClient());
165+
166+
return (
167+
<WagmiProvider config={config} initialState={props.initialState}>
168+
<QueryClientProvider client={queryClient}>
169+
<MiniKitProvider
170+
apiKey={process.env.NEXT_PUBLIC_ONCHAINKIT_API_KEY}
171+
chain={baseSepolia}
172+
config={{
173+
appearance: {
174+
mode: "auto",
175+
theme: "mini-app-theme",
176+
name: process.env.NEXT_PUBLIC_ONCHAINKIT_PROJECT_NAME,
177+
logo: process.env.NEXT_PUBLIC_ICON_URL,
178+
},
179+
}}
180+
>
181+
{props.children}
182+
</MiniKitProvider>
183+
</QueryClientProvider>
184+
</WagmiProvider>
185+
);
186+
}
187+
```
133188

134189
```ts providers.tsx (OnchainKit)
135190
"use client";
136191

137-
import { type ReactNode, useState } from "react"
138-
import { baseSepolia } from "wagmi/chains"
139-
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"
140-
import { MiniKitProvider } from "@coinbase/onchainkit/minikit"
141-
import { type State, WagmiProvider } from "wagmi"
142-
import { getConfig } from "@/wagmi"
192+
import { type ReactNode, useState } from "react";
193+
import { baseSepolia } from "wagmi/chains";
194+
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
195+
import { MiniKitProvider } from "@coinbase/onchainkit/minikit";
196+
import { type State, WagmiProvider } from "wagmi";
197+
import { getConfig } from "@/wagmi";
143198

144199
export function Providers(props: {
145200
children: ReactNode;
@@ -162,19 +217,28 @@ export function Providers(props: {
162217
);
163218
}
164219
```
220+
</CodeGroup>
221+
222+
<Check>
223+
**For OnchainKit**
224+
225+
For OnchainKit, use `OnchainKitProvider` instead of `MiniKitProvider` as it's detailed in the
226+
[OnchainKit Custom Providers page](/builderkits/onchainkit/config/supplemental-providers).
227+
</Check>
165228

166229
## Run your app
167230

168231
After installing the dependencies as described [above](#override-the-default-coinbase-wallet-sdk-version),
169232
make sure your environment variables are up to date as per
170-
the [OnchainKit Quickstart](/builderkits/onchainkit/getting-started)
233+
the [OnchainKit Quickstart](/builderkits/onchainkit/getting-started)or
234+
[MiniKit Quickstart](/builderkits/minikit/quickstart).
171235

172236
Then, you can run the app with the following command:
173237

174238
```bash
175239
npm run dev
176240
```
177241

178-
Congratulations! You've successfully added Sub Accounts to your OnchainKit project.
242+
Congratulations! You've successfully added Sub Accounts to your OnchainKit/MiniKit project.
179243

180244
If you have any questions, join the _#smart-wallet_ channel on [Discord](https://discord.gg/cdp).

docs/wallet-app/guides/chat-agents.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# Chat Agents in Coinbase Wallet
1+
---
2+
title: "Chat Agents in Coinbase Wallet"
3+
sidebarTitle: "Chat Agents"
4+
---
25

36
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.
47

docs/wallet-app/introduction/beta-faq.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Coinbase Wallet Beta FAQ
2+
title: Coinbase Wallet Beta
33
description: Frequently asked questions about the Coinbase Wallet limited beta
44
---
55

0 commit comments

Comments
 (0)