Skip to content

chore: update sub accounts docs#370

Merged
youssefea merged 2 commits intomasterfrom
stephancilliers/ba-2637-docs-sub-account-doc-restructure
Sep 25, 2025
Merged

chore: update sub accounts docs#370
youssefea merged 2 commits intomasterfrom
stephancilliers/ba-2637-docs-sub-account-doc-restructure

Conversation

@stephancill
Copy link
Contributor

What changed? Why?

Updated sub accounts page to address user feedback

Notes to reviewers

How has it been tested?

@linear
Copy link

linear bot commented Sep 22, 2025

@cb-heimdall
Copy link
Collaborator

cb-heimdall commented Sep 22, 2025

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

To support Base Account with user experiences that need more developer control over wallet interactions, we've built Sub Accounts in conjunction with [ERC-7895](https://eip.tools/eip/7895), a new wallet RPC for creating hierarchical relationships between wallet accounts.

Sub Accounts allow you to provision wallet accounts that are directly embedded in your application for your users. You can control when a Sub Account is created and interact with them just as you would with another wallet via the wallet provider or popular web3 libraries like OnchainKit, wagmi, and viem.
Sub Accounts allow you to provision app-specific wallet accounts for your users that are embedded directly in your application. Once created, you can interact with them just as you would with any other wallet via the wallet provider or popular onchain libraries like OnchainKit, wagmi, and viem.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got feedback from the community that explanations of how our features work and how they can useful to them are appreciated so if you're able to put more details in this section, specifically:

  • how do sub accounts work under the hood?
  • perhaps even pointing to links to the smart contracts implementation repos

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this conflicts a bit with the feedback i received about the intro being too long and abstract, which is why i extracted the technical details which aren't necessarily relevant to the implementer into a Technical Details section

```

This will automatically create a Sub Account for the user when they connect their Base Account and transactions will automatically be sent from the Sub Account unless you specify the `from` parameter in your transaction request to be the universal account address. Spend Permissions will also be automatically requested for the Sub Account as your app needs them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would great if you're able to show the user flow here: How does it look from a user perspective? A screenshot of the pop up window would do it


## Advanced Usage

### Import an existing account
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you clarify what is the difference between "importing" a sub account and "getting" an existing sub account?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have updated the line below it to be more explicit


<Note>

Before the Sub Account is imported, you will need to add the Base Account address as an owner of the Sub Account. This currently needs to be done manually
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where can we find addresses of these contracts on each chain? also, it would be nice to point to the ABI if you have it somewhere (but not necessary)

### Add Owner Account

Add an owner to a Sub Account:
Sub Accounts automatically detect when an ownership update is needed when a signature is required and will prompt the user to approve the update before signing. However, you can also add an owner to a Sub Account manually using the SDK convenience method:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work on the backend side (node)? If not, can you please add a callout to specify that it does not?

@youssefea youssefea merged commit 3165654 into master Sep 25, 2025
8 checks passed
@youssefea youssefea deleted the stephancilliers/ba-2637-docs-sub-account-doc-restructure branch September 25, 2025 21:55
madisoncarter1234 pushed a commit to madisoncarter1234/docs that referenced this pull request Oct 27, 2025
<!-- start pr-codex -->

## PR-Codex overview
This PR updates the documentation for the frame SDK, specifically
detailing the `sdk.context` variable and its sub-properties, including
`location`, `user`, and `client`. It introduces new types and examples
to clarify how frames communicate and the contexts from which they are
launched.

### Detailed summary
- Added information about `sdk.context` and its structure.
- Introduced `FrameContext` type with `user`, `location`, and `client`
properties.
- Defined `FrameLocationContext` types for different launch contexts:
`CastEmbed`, `Notification`, and `Launcher`.
- Provided examples of `sdk.context.location` for each context type.
- Added `context.client` details, including `clientFid`, `added`, and
`notificationDetails`.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`

<!-- end pr-codex -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants