Skip to content

Commit a9b8b9f

Browse files
authored
Sub Accounts Quick Update (#32)
* add profiles to sidebar * updates to sub accounts
1 parent 165006e commit a9b8b9f

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

docs/docs.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,7 @@
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",
250-
"smart-wallet/guides/sub-accounts/add-sub-accounts-to-onchainkit-minikit"
249+
"smart-wallet/guides/sub-accounts/sub-accounts-with-privy"
251250
]
252251
},
253252
"smart-wallet/guides/profiles",

docs/smart-wallet/guides/sub-accounts.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,9 @@ If you want to skip ahead and just get the final code, you can find it here:
4747
- Sending transactions with Spend Permissions using `useSendTransaction`
4848
- Building a complete interface for wallet connection and transactions
4949
- Understanding transaction limitations based on spend permissions
50+
51+
3. [Sub Accounts with Privy](/smart-wallet/guides/sub-accounts/sub-accounts-with-privy) - Learn how to use Sub Accounts with Privy. This guide demonstrates:
52+
53+
- Using Privy to create an Auto Sub Account on creation flow
54+
- Using Privy to create a Spend Permission that goes with the Auto Sub Account
55+
- Using Privy actions to send transactions with the Sub Account

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

File renamed without changes.

docs/smart-wallet/guides/sub-accounts/sub-accounts-with-privy.mdx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ By the end of this guide, you will:
3333
- [Smart Wallet Sub Accounts](/smart-wallet/concepts/features/optional/sub-accounts) are **only available on the canary version** of the Coinbase Wallet SDK and on **Base Sepolia**
3434
- For now, you must also use a specific beta version of `@privy-io/react-auth` (see below)
3535

36+
<Info>
37+
**Make sure you have a Privy project**
38+
39+
This guide covers adding Sub Accounts to your Privy project.
40+
It does not cover the setup and creation of a Privy project.
41+
If you don't have a Privy project yet, check out the [Privy Quickstart](https://docs.privy.io/guide/quickstart) guide.
42+
</Info>
43+
3644
## 1. Override Required Package Versions
3745

3846
Sub Accounts require the latest canary version of `@coinbase/wallet-sdk` and a specific beta version of Privy React Auth. **You must override these versions _before_ installing packages.**
@@ -69,8 +77,9 @@ import { toHex, parseEther } from "viem";
6977
appId={process.env.NEXT_PUBLIC_PRIVY_APP_ID || ""}
7078
config={{
7179
embeddedWallets: {
72-
createOnLogin: "all-users",
80+
createOnLogin: "users-without-wallets",
7381
},
82+
defaultChain: baseSepolia,
7483
externalWallets: {
7584
coinbaseWallet: {
7685
config: {
@@ -138,6 +147,7 @@ npm run dev
138147

139148
- [Sub Accounts Privy Demo](https://github.com/base/demos/tree/master/smart-wallet/sub-accounts-privy)
140149
- [Sub Accounts Setup Guide](/smart-wallet/guides/sub-accounts/setup)
150+
- [Sub Accounts Full Reference](/smart-wallet/guides/sub-accounts/sub-accounts-full-reference)
141151
- [Smart Wallet Sub Accounts Feature](/smart-wallet/concepts/features/optional/sub-accounts)
142152
- [Privy Quickstart](https://docs.privy.io/guide/quickstart)
143153
- [Discord #smart-wallet](https://discord.com/invite/cdp) for questions or feedback

0 commit comments

Comments
 (0)