diff --git a/docs.json b/docs.json index 96aa31c..923e9c3 100644 --- a/docs.json +++ b/docs.json @@ -14,45 +14,18 @@ "tab": "Wallets", "groups": [ { - "group": "User Wallets", - "pages": [ - "/wallets/user-wallets/quickstart", - "/wallets/user-wallets/ui-components", - { - "group": "Authentication", - "pages": [ - "/wallets/user-wallets/auth-methods", - "/wallets/user-wallets/link-profiles", - "/wallets/user-wallets/sign-in-with-ethereum", - "/wallets/user-wallets/custom-auth" - ] - }, - { - "group": "Customization", - "pages": [ - "/wallets/user-wallets/customization/custom-otp-email" - ] - }, - "/wallets/user-wallets/pregenerate-wallets", - { - "group": "Adapters", - "pages": [ - "/wallets/user-wallets/adapters" - ] - } - ] - }, - { - "group": "Ecosystem Wallets", + "group": "Get Started", "pages": [ - "/wallets/ecosystem-wallets/get-started", - "/wallets/ecosystem-wallets/reown" + "/wallets/user/quickstart", + "/wallets/ecosystem", + "/wallets/external", + "/wallets/server/quickstart" ] }, { "group": "Sponsor Gas", "pages": [ - "/sponsor-gas/quickstart" + "/wallets/gas-sponsorship" ] }, { diff --git a/wallets/ecosystem.mdx b/wallets/ecosystem.mdx new file mode 100644 index 0000000..0fd3254 --- /dev/null +++ b/wallets/ecosystem.mdx @@ -0,0 +1,64 @@ +--- +title: "Ecosystem Wallets" +description: "Cross-app wallets with centralized management" +--- + +Ecosystem wallets are user wallets with additional functionality unlocked. Same tech, more features. + +## What makes them different? + +Ecosystem wallets are built on the same technology as regular user wallets, but they let you: + +- **Share wallets across apps** - Users keep the same wallet across your entire ecosystem of apps and games +- **Partner integrations** - Let approved partners integrate your wallet into their apps +- **Centralized management** - Control permissions, gas sponsorship, and branding from one dashboard + +Think of it as upgrading from a single-app wallet to a multi-app wallet system. + +## When to use ecosystem wallets + +Use ecosystem wallets if you: + +- Have multiple apps or games where users should share the same wallet +- Want to let partners integrate your branded wallet +- Need centralized control over your entire wallet ecosystem + +If you just need wallets for a single app, stick with regular [user wallets](/wallets/user). + +## How to set up + +### 1. Create your ecosystem + +Visit the [Ecosystem Wallets dashboard](https://thirdweb.com/team/~/~/ecosystem/create) and name your ecosystem. This name is permanent and appears wherever your wallet shows up. + +You'll get an **Ecosystem ID** - save this, you'll need it for integration. + +### 2. Set permissions + +Choose who can use your ecosystem wallet: + +**Anyone** - Open to all apps (you can blocklist bad actors) +**Allowlist** - Restrict to approved partners only + +For allowlist mode, add each app with: + +- App name +- Allowed domains +- Bundle ID (for mobile apps) + +Each approved app gets a **Partner ID**. + +### 3. Integrate and use + +Reference your Ecosystem ID in your integration. For allowlist mode, also include your Partner ID. + +All the same auth methods from user wallets work here—the wallet just has additional cross-app capabilities enabled. + +## What you can do + +- **Cross-app authentication** - User logs in once, works everywhere +- **Shared wallet balance** - Same wallet address across all your apps +- **Partner management** - Add/remove apps from your dashboard +- **Gas sponsorship** - Sponsor transactions for your entire ecosystem + +Check the API Reference tab for implementation details. diff --git a/wallets/external.mdx b/wallets/external.mdx new file mode 100644 index 0000000..ae59ce9 --- /dev/null +++ b/wallets/external.mdx @@ -0,0 +1,49 @@ +--- +title: "External Wallets" +description: "Connect MetaMask, Rainbow, and 500+ wallets" +--- + +External wallets let users connect with wallets they already own—MetaMask, Rainbow, Coinbase Wallet, and 500+ others. + +## What are they? + +Instead of creating a new wallet for users, you let them connect their existing browser extension or mobile wallet. thirdweb supports all EIP-6963 compatible wallets plus native integrations for popular wallets. + +## When to use external wallets + +Use external wallets when: + +- Your users are crypto-native and already have wallets +- You want to give users the choice to bring their own wallet +- You need to support hardware wallets or specific wallet apps + +For mainstream users who don't have wallets yet, use [user wallets](/wallets/user) instead. + +## Supported wallets + +thirdweb supports 500+ wallets including: + +- **MetaMask** +- **Coinbase Wallet** +- **Rainbow** +- **Trust Wallet** +- **WalletConnect** - connects to 400+ mobile wallets +- **All EIP-6963 compatible wallets** - automatic detection + +## How it works + +When you add external wallet support: + +1. thirdweb detects which wallets are installed in the user's browser +2. User selects their wallet from the available options +3. They approve the connection in their wallet app +4. Your app can now send transactions that the user signs in their wallet + +## Mix and match + +You can offer both embedded user wallets and external wallets at the same time. This gives users flexibility: + +- Crypto beginners can use embedded wallets (no setup required) +- Crypto-native users can connect their existing wallets + +Check the API Reference tab for implementation details. diff --git a/wallets/gas-sponsorship.mdx b/wallets/gas-sponsorship.mdx new file mode 100644 index 0000000..8d8eeac --- /dev/null +++ b/wallets/gas-sponsorship.mdx @@ -0,0 +1,67 @@ +--- +title: "Overview" +description: "Pay gas fees for your users" +--- + +Gas sponsorship lets you pay transaction fees for your users. They sign transactions with zero friction—no need to hold native tokens for gas. + +## What is it? + +Normally, users need ETH (or the native token) to pay gas fees. With gas sponsorship, you cover those costs. Users can interact with your contracts without worrying about gas. + +Perfect for onboarding new users who don't own crypto yet. + +## How it works + +Gas sponsorship uses smart account technology: + +- **EIP-7702** (recommended) - Simpler, works with regular wallets +- **ERC-4337** - Account abstraction standard + +Both methods let you sponsor gas fees. Enable it when creating user wallets, and transactions from those wallets get sponsored automatically. + +The user still signs each transaction—you just pay the gas fee. + +## What gets sponsored? + +You can sponsor: + +- **Contract interactions** - Minting NFTs, claiming tokens, game actions +- **Token transfers** - Sending ERC-20 tokens +- **Any on-chain transaction** - As long as it originates from a sponsored wallet + +## Control your spending + +Configure sponsorship rules from your thirdweb dashboard: + +### Scope rules + +- **Specific contracts** - Only sponsor your own contracts +- **Specific functions** - Only sponsor certain operations (like `mint` but not `transfer`) +- **Specific chains** - Sponsor on Polygon but not Ethereum + +### Budget limits + +- **Per user** - Cap gas spending per wallet +- **Per day/month** - Set overall spending limits +- **Alert thresholds** - Get notified when approaching limits + +## Common use cases + +- **Onboarding** - New users don't need to buy crypto to get started +- **Gaming** - Players focus on gameplay, not managing gas +- **Social apps** - Users post, like, share without friction +- **NFT minting** - Let users mint without needing ETH first +- **Loyalty programs** - Reward users without them paying gas to claim + +## Cost considerations + +Gas sponsorship costs you real money—you're paying network fees. Start with: + +1. Restrictive rules (specific contracts and functions only) +2. Low per-user limits +3. Test on cheaper networks first (Base, Polygon) + +Monitor spending in your dashboard and adjust rules as needed. + +Check the API Reference tab for implementation details. diff --git a/wallets/server/quickstart.mdx b/wallets/server/quickstart.mdx new file mode 100644 index 0000000..ece8e5d --- /dev/null +++ b/wallets/server/quickstart.mdx @@ -0,0 +1,53 @@ +--- +title: "Server Wallets" +description: "Backend wallets for sending transactions" +--- + +Server wallets are wallets managed by your backend. Use them for admin actions, treasury management, or any transaction that originates from your server instead of your users. + +## What are they? + +Server wallets are non-custodial wallets that live on your backend. You control them completely—use them for: + +- **Treasury wallets** - Hold and manage your project's funds +- **Admin wallets** - Execute privileged contract operations +- **Automation** - Send transactions programmatically + +## How it works + +### 1. Create a server wallet + +Create server wallets via the API by passing an identifier (any string, but use a descriptive name like "treasury-wallet" or "admin-wallet"). + +You'll get back a wallet address. Save it—you'll use it to send transactions. + +### 2. Send transactions + +All transactions go through the API. Specify your server wallet address as the `from` field, and thirdweb handles signing and sending. + +You can: + +- **Send native tokens** (ETH, MATIC, etc.) +- **Interact with smart contracts** (mint NFTs, transfer tokens, call any function) +- **Batch transactions** together +- **Monitor transaction status** via API or webhooks + +### 3. Manage wallets + +List all your server wallets to see their addresses and identifiers. Create new ones as needed for different purposes (treasury, admin, automation, etc.). + +## Common use cases + +- **NFT minting** - Mint NFTs to users from your backend +- **Airdrops** - Distribute tokens programmatically +- **Contract administration** - Update contract settings, pause/unpause +- **Automated trading** - Execute trades based on bot logic +- **Reward distribution** - Send rewards based on user actions + +## Security + +Server wallets are managed by thirdweb's secure infrastructure. Your secret key controls access—keep it safe and never expose it client-side. + +Each wallet is fully non-custodial. thirdweb handles the infrastructure but you maintain full control via your API keys. + +Check the API Reference tab for endpoint details and request/response formats. diff --git a/wallets/user/quickstart.mdx b/wallets/user/quickstart.mdx new file mode 100644 index 0000000..f688a28 --- /dev/null +++ b/wallets/user/quickstart.mdx @@ -0,0 +1,41 @@ +--- +title: "User Wallets" +description: "Embedded in-app wallets for your users" +--- + +User wallets are embedded in-app wallets that live inside your application. Each user gets their own non-custodial wallet automatically—no seed phrases, no browser extensions. + +## What are they? + +When a user logs into your app, thirdweb creates a wallet for them behind the scenes. The user doesn't need to download anything or manage private keys. It just works. + +## How it works + +1. **User authenticates** - They log in using one of the supported auth methods +2. **Wallet gets created** - thirdweb generates a wallet tied to their identity +3. **User transacts** - The wallet can now send transactions, sign messages, interact with contracts + +## Auth methods + +- **Social logins** - Google, Apple, Facebook, Discord, etc. +- **Email or SMS** - Passwordless verification +- **Passkeys** - Biometric authentication +- **Bring your own auth** - Connect wallets to your existing user system + +## What can users do? + +Once they have a wallet, users can: + +- Send and receive tokens +- Interact with smart contracts +- Sign messages +- Use the wallet across any chain you support + +All transactions still require the user's signature—thirdweb never has custody of their assets. + +## Next steps + +- **[Ecosystem Wallets](/wallets/ecosystem)** - Unlock advanced features like cross-app wallets and partner integrations +- **[External Wallets](/wallets/external)** - Let users connect their existing wallets (MetaMask, Rainbow, etc.) + +Check the API Reference tab for implementation details.