You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/wallet-app/introduction/getting-started.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
1
---
2
2
title: Getting Started with Mini Apps
3
-
description: Overview and implementation guide for Mini Apps in Coinbase Wallet
3
+
description: Overview and implementation guide for Mini Apps in Base App
4
4
---
5
5
6
6
7
7
8
-
Mini Apps are lightweight web applications that run natively within clients like Coinbase Wallet. Users instantly access mini apps without downloads, benefit from seamless wallet interactions, and discover apps directly in the social feed. This benefits app developers by creating viral loops for user acquisition and engagement.
8
+
Mini Apps are lightweight web applications that run natively within clients like Base App. Users instantly access mini apps without downloads, benefit from seamless wallet interactions, and discover apps directly in the social feed. This benefits app developers by creating viral loops for user acquisition and engagement.
description: Guide for building and optimizing mini apps for Coinbase Wallet
2
+
title: Mini Apps in Base App
3
+
description: Guide for building and optimizing mini apps for Base App
4
4
---
5
5
6
6
7
-
We're so excited that mini apps are coming to Coinbase Wallet! The purpose of this guide is to go over how to build or update your mini app so it works as well as possible in Coinbase Wallet.
7
+
We're so excited that mini apps are supported in Base App! The purpose of this guide is to go over how to build or update your mini app so it works as well as possible in Base App.
8
8
9
9
## Using MiniKit
10
10
11
+
For reference, MiniKit is easiest way to build mini apps on Base, allowing developers to easily build mini apps without needing to know the details of the SDK implementation. It integrates seamlessly with OnchainKit components and provides Base App-specific hooks.
12
+
11
13
<Cardtitle="Quick Start with MiniKit"icon="rocket"href="/wallet-app/build-with-minikit/quickstart">
12
-
If you use MiniKit and/or follow the MiniKit quickstart guide, your mini app will work out of the box in Coinbase Wallet!
14
+
If you use MiniKit and/or follow the MiniKit quickstart guide, your mini app will work out of the box in Base App!
13
15
</Card>
14
16
15
-
For reference, MiniKit is easiest way to build mini apps on Base, allowing developers to easily build mini apps without needing to know the details of the SDK implementation. It integrates seamlessly with OnchainKit components and provides Coinbase Wallet-specific hooks.
If you're already using MiniKit and experiencing issues, you can refer to our debugging guide
19
19
</Card>
20
20
21
21
## Authentication
22
22
23
23
<Warning>
24
-
As a general rule of thumb for building any mini app, we recommend that you do not automatically request that the user logs in/signs a message and instead that authentication is only used when it's needed (e.g. signing up for an event, viewing authenticated resources, etc).
24
+
As a general rule of thumb, we recommend that you save authentication that requires an interaction for interactions that require it(eg. buying something, viewing personalized pages etc)
25
25
</Warning>
26
26
27
-
Below we will quickly cover the different methods of authentication offered for mini apps and how well each of them work in Coinbase Wallet:
27
+
Below we will quickly cover the different methods of authentication offered for mini apps and how well each of them work in Base App:
28
28
29
29
<Tabs>
30
-
<Tabtitle="Wallet Authentication (Recommended)">
31
-
Because users in Coinbase Wallet have an in-app smart wallet that doesn't require any app switching, we recommend wallet authentication as the primary method of authentication for developers looking to create a persisted session for the mini app user.
30
+
<Tabtitle="Sign In with Farcaster/Quick Auth">
31
+
Base App natively supports [Sign In with Farcaster](https://github.com/farcasterxyz/protocol/discussions/110)(SIWF) in-app, so you can sign users in and get their social identity all without leaving Base App.
32
+
33
+
We also support [Quick Auth](https://miniapps.farcaster.xyz/docs/sdk/quick-auth), which uses Sign In with Farcaster to issue developers a [JWT](https://jwt.io/introduction) that can be used to persist the user's session in the mini app.
34
+
35
+
This is the expected flow for end-users to Sign In with Farcaster in your mini app:
36
+
-**Create Account Users**: Users who created a net-new Farcaster account during Base App onboarding
37
+
- When signing into a mini app, the user will be prompted to see a "Login request" tray showing the SIWF message and can sign it right their with their passkey
38
+
-**Connect Account Users**: Users who connected an existing Farcaster account during Base App onboarding
39
+
- When signing into a mini app for the first time, the user will be prompted to deeplink to Farcaster(one-time only) and register their wallet as an auth address, which will then enable seamless in-app sign in -- just like the above create account flow
40
+
</Tab>
41
+
42
+
<Tabtitle="Wallet Auth">
43
+
Because users in Base App have an in-app smart wallet that doesn't require any app switching, we recommend wallet authentication as the primary method of authentication for developers looking to create a persisted session for the mini app user.
32
44
33
45
As described below, we don't think it's the best practice to prompt the user to log in before that authentication will allow them to do something else in your mini app, but for cases where do you want a secure, persisted session, using a wallet connection is a great option.
34
46
</Tab>
35
47
36
48
<Tabtitle="Context Data">
37
-
All mini app host apps (including Coinbase Wallet) return [context data](https://miniapps.farcaster.xyz/docs/sdk/context), which tells developers about the app/mini app host the user is accessing their mini app in, as well as **which user** is interacting with their mini app.
49
+
All mini app host apps (including Base App) return [context data](https://miniapps.farcaster.xyz/docs/sdk/context), which tells developers about the app/mini app host the user is accessing their mini app in, as well as **which user** is interacting with their mini app.
38
50
39
51
A common flow that other mini app developers follow is using the context data to either track analytics metrics or create an authentication session via a [JWT](https://jwt.io/introduction). This allows you to still track analytics/offer certain authenticated services to your users without the extra friction of signing a message or deeplinking to another app.
40
52
@@ -43,34 +55,23 @@ Something important to note is that because of how the current mini app spec is
43
55
</Warning>
44
56
</Tab>
45
57
46
-
<Tabtitle="Sign In with Farcaster">
47
-
Currently, using Sign In with Farcaster inside of Coinbase Wallet is **not recommended as the primary method of authentication**. This is because, for Farcaster accounts that were created in Farcaster (which many current accounts were), using Sign In with Farcaster will require deeplinking the user to Farcaster and then back to Coinbase Wallet. While this flow still works inside of Coinbase Wallet, we recommend either wallet auth or creating an auth strategy around the context data (eg. a custom JWT with context data) for a more optimal UX.
48
-
49
-
<Info>
50
-
Note: The Sign In with Farcaster flow will no longer require a deeplink to Farcaster when the [auth addresses FIP](https://github.com/farcasterxyz/protocol/discussions/225) lands, which will allow a set of delegated wallets to take actions on behalf of a Farcaster account's custody wallet.
51
-
</Info>
52
-
</Tab>
53
58
</Tabs>
54
59
55
60
## Deeplinks and SDK Actions
56
61
57
-
The official mini apps SDK offers a [set of actions](https://miniapps.farcaster.xyz/docs/specification#actions) (which MiniKit offers as well) so that users of your mini app can be led to do things back in clients like Coinbase Wallet (e.g. compose a cast, view a profile, etc).
62
+
The official mini apps SDK offers a [set of actions](https://miniapps.farcaster.xyz/docs/specification#actions) (which MiniKit offers as well) so that users of your mini app can be led to do things back in clients like Base App (e.g. compose a cast, view a profile, etc).
58
63
59
64
<Warning>
60
65
**Always use official SDK functions instead of Farcaster-specific deeplinks in your mini app.**
61
66
</Warning>
62
67
63
-
While some developers have used Farcaster-specific deeplinks in the `openUrl` function as a workaround, this approach can create problems. Farcaster-specific deeplinks might not match Coinbase Wallet-specific deeplinks, **potentially leaving users dead-ended and unable to take further action in your mini app**.
64
-
65
-
Using the official SDK functions ensures your users have the best viewing experience possible across all supported clients, including Coinbase Wallet.
68
+
While some developers have used Farcaster-specific deeplinks in the `openUrl` function as a workaround, this approach can create problems. Farcaster-specific deeplinks might not match Base App-specific deeplinks, **potentially leaving users dead-ended and unable to take further action in your mini app**.
66
69
67
-
<Info>
68
-
Note: For developers who include a "Share" button in their miniapp, we recommend that you move over to the new `composeCast` function in the miniapps SDK instead of using a Farcaster-specific deeplink.
69
-
</Info>
70
+
Using the official SDK functions ensures your users have the best viewing experience possible across all supported clients, including Base App.
70
71
71
72
## Wallet Interactions
72
73
73
-
Wallet interactions are a core part of the miniapp experience. We want to ensure both that building wallet interactions on top of the Coinbase Wallet is smooth for developers and that users can choose/have funds sent to their Coinbase Wallet when interacting with mini apps.
74
+
Wallet interactions are a core part of the miniapp experience. We want to ensure both that building wallet interactions on top of the Base App is smooth for developers and that users can choose/have funds sent to their Base App when interacting with mini apps.
74
75
75
76
As a mini app host, we expose an [EIP-1193 Ethereum Provider](https://eips.ethereum.org/EIPS/eip-1193) that can be accessed in two primary ways:
76
77
@@ -83,19 +84,96 @@ If you run `npm create onchain --mini`, your mini app will have a "Connect Walle
83
84
</Note>
84
85
</Tab>
85
86
86
-
<Tabtitle="Frame SDK">
87
-
By using either `sdk.wallet.getEthereumProvider()` from [@farcaster/frame-sdk](https://www.npmjs.com/package/@farcaster/frame-sdk) or by using [@farcaster/frame-wagmi-connector](https://www.npmjs.com/package/@farcaster/frame-wagmi-connector) with your Wagmi config
87
+
<Tabtitle="Wagmi">
88
+
[Wagmi](https://wagmi.sh) is a powerful JavaScript library for building Ethereum applications, and using it alongside any other onchain logic you have configured is very simple.
89
+
It only takes the two steps below to auto-connect to the user's wallet with Wagmi:
90
+
91
+
1) Set up your WagmiProvider to use the Farcaster mini app connector
Because of the open standards this is built on top of, you can both listen for and connect to our injected wallet provider without installing any new package, directly from the browser window's DOM! There are two ways to do this that are both highlighted below:
Farcaster has recently [extended the metadata spec for mini apps](https://github.com/farcasterxyz/miniapps/discussions/191), which allows developers to add screenshot links, categories, and more to their manifest (farcaster.json) file. Making use of these new metadata fields is highly recommended for increasing the chance that your mini app could be featured throughout Coinbase Wallet.
171
+
Farcaster has recently [extended the metadata spec for mini apps](https://github.com/farcasterxyz/miniapps/discussions/191), which allows developers to add screenshot links, categories, and more to their manifest (farcaster.json) file. Making use of these new metadata fields is highly recommended for increasing the chance that your mini app could be featured throughout Base App.
94
172
95
173
Below is a table of the new metadata fields introduced, what they mean/could potentially be used for, and an example of what a manifest file could look like with these new fields (all taken from the [official spec](https://github.com/farcasterxyz/miniapps/discussions/191))
96
174
97
175
<Info>
98
-
Note: Only ~30 of the hundreds of mini apps we've seen have set this data, we **highly recommend** that you set this metadata as it will give your mini app a better shot at being featured.
176
+
Note: We **highly recommend** that you set this metadata as it will give your mini app a better shot at being featured throughout Base App.
99
177
</Info>
100
178
101
179
<AccordionGroup>
@@ -165,7 +243,7 @@ Note: Only ~30 of the hundreds of mini apps we've seen have set this data, we **
165
243
"tags": [
166
244
"example",
167
245
"mini app",
168
-
"coinbase wallet"
246
+
"Base App"
169
247
],
170
248
"heroImageUrl": "https://example.com/og.png",
171
249
"tagline": "Example Mini App tagline",
@@ -178,7 +256,7 @@ Note: Only ~30 of the hundreds of mini apps we've seen have set this data, we **
178
256
179
257
## Notifications
180
258
181
-
You will soon be able to send notifications from your Mini App that will appear in Coinbase Wallet. These notifications help re-engage users when something important happens, like a new drop, an update, or a reminder to complete an action. There are two ways to integrate:
259
+
You will soon be able to send notifications from your Mini App that will appear in Base App. These notifications help re-engage users when something important happens, like a new drop, an update, or a reminder to complete an action. There are two ways to integrate:
182
260
183
261
<Tabs>
184
262
<Tabtitle="Use Neynar (Recommended)">
@@ -202,48 +280,54 @@ You can self-host your own backend as long as it follows the [Farcaster Mini App
202
280
</Tab>
203
281
</Tabs>
204
282
205
-
## Mini Apps Compatibility in Coinbase Wallet
283
+
## Mini Apps Compatibility in Base App
206
284
207
-
Coinbase Wallet is working towards full compatibility with the Farcaster Mini App SDK. While we continue to enhance support during the beta phase, there are currently some features that are not yet supported.
285
+
Base App is working towards full compatibility with the Farcaster Mini App SDK. While we continue to enhance support during the beta phase, there are currently some features that are not yet supported.
208
286
209
287
### AI-Powered Compatibility Checking
210
-
We provide a [validate.txt](https://raw.githubusercontent.com/base/demos/refs/heads/master/minikit/mini-app-help/validate.txt) file that can be used with AI tools to automatically check your codebase for Coinbase Wallet compatibility issues. Similar to llms.txt files, you can provide this validation file to language models to scan your Mini App code and receive a detailed compatibility report highlighting any unsupported features or patterns.
288
+
We provide a [validate.txt](https://raw.githubusercontent.com/base/demos/refs/heads/master/minikit/mini-app-help/validate.txt) file that can be used with AI tools to automatically check your codebase for Base App compatibility issues. Similar to llms.txt files, you can provide this validation file to language models to scan your Mini App code and receive a detailed compatibility report highlighting any unsupported features or patterns.
211
289
212
290
<Warning>
213
291
This AI validation is experimental and should only be used in a read-only capacity for analysis and reporting purposes.
214
292
</Warning>
215
293
216
294
### Currently Unsupported Features
217
295
218
-
The following Mini App SDK features are **not currently supported** in Coinbase Wallet:
296
+
The following Mini App SDK features are **not currently supported** in Base App:
* Note: We still expose an [EIP-1193 Ethereum Provider](https://eips.ethereum.org/EIPS/eip-1193) that you can auto-detect or use in a package such as MiniKit/Wagmi
0 commit comments