Skip to content
wyllet
  • Docs
  • Features
  • Playground
  • Blog
  • Docs
  • Features
  • Playground
  • Blog
  • Compare
  • Changelog
GitHub @wylletdevnpm Support
esc
  • IntroductionWhat Wyllet is, what it includes, and how it fits into a wagmi + viem dApp.
  • InstallationInstall Wyllet and its peer dependencies, and enable WalletConnect.
  • Quick startAdd a working connect button to a React dApp in a few minutes.
  • Next.jsUse Wyllet with the Next.js App Router, server components and SSR.
  • Build with AI assistantsGive Cursor, Claude Code, Copilot or ChatGPT the Wyllet docs and the rules for a correct integration.
  • ConfigurationCreate a wagmi config with getDefaultConfig: app info, chains, transports and wallets.
  • WylletProviderEvery WylletProvider prop: theme, appearance, tokens, auth, messages and callbacks.
  • WylletButtonThe Island button, its display options, and building your own trigger with useWylletButton.
Overview

Getting started

  • Introduction
  • Installation
  • Quick start
  • Next.js
  • Build with AI assistants

Core concepts

  • Configuration
  • WylletProvider
  • WylletButton
  • Presentations

Customization

  • Theming
  • Class names
  • Translations

Wallets

  • Wallets
  • All wallets
  • WalletConnect

Chains and tokens

  • Chains
  • Tokens

Features

  • Account panel
  • Activity and transactions
  • Toasts
  • Sign-In With Ethereum
  • ConnectGate

Reference

  • Hooks
  • Components
  • Utilities and types

Guides

  • Security
  • Migrate from RainbowKit
  • FAQ
wyllet

The open-source wallet connector for React dApps. Built on wagmi and viem.

MIT licensed. v1.1.0 on npm with provenance.

Product

  • Features
  • Compare
  • Playground
  • Changelog
  • Blog

Docs

  • Quick start
  • Next.js
  • Build with AI
  • Theming
  • Migrate from RainbowKit

Community

  • GitHub
  • X @wylletdev
  • npm
  • Releases
  • Report an issue

Support

  • support@wyllet.dev
  • FAQ
  • Security
  • Report a vulnerability
  • MIT License

For AI agents

  • llms.txt
  • llms-full.txt
  • RSS feed
  • Sitemap

Wallet, network and token names and logos are trademarks of their respective owners and are used only to identify them.

Docs/Wallets

Wallets

Built-in wallets, EIP-6963 detection, custom wallets and connectors.

View .mdReport a problem

The wallet list is defined in code and passed to getDefaultConfig. Wyllet ships presets for common wallets, detects any installed browser wallet through EIP-6963, and lets you describe your own wallets with a plain object.

wagmi.ts
import { burnerWallet, defaultWallets, getDefaultConfig } from 'wyllet'
import { base, mainnet } from 'viem/chains'
 
export const config = getDefaultConfig({
  appName: 'My dApp',
  walletConnectProjectId: process.env.NEXT_PUBLIC_WC_PROJECT_ID,
  chains: [mainnet, base],
  wallets: [...defaultWallets(), burnerWallet()],
})

When you leave out wallets, getDefaultConfig uses defaultWallets(). The order of the array is the order of the list.

Built-in presets

Every preset is a function that returns a Wallet. Call it with no arguments, or pass options (see preset options).

PresetNameIconConnects through
metaMaskWallet()MetaMaskOfficialExtension, or WalletConnect with a MetaMask app link
phantomWallet()PhantomOfficialExtension
rabbyWallet()RabbyOfficialExtension
okxWallet()OKX WalletOfficialExtension, or WalletConnect with an OKX app link
walletConnectWallet()WalletConnectGeneric scan iconWalletConnect QR code
coinbaseWallet()Coinbase WalletNeutral monogramExtension, or WalletConnect with a Coinbase Wallet app link
rainbowWallet()RainbowNeutral monogramExtension, or WalletConnect with a Rainbow app link
trustWallet()Trust WalletNeutral monogramExtension, or WalletConnect with a Trust Wallet app link
browserWallet()Browser WalletGeneric browser iconThe generic injected (window.ethereum) connector
burnerWallet()Burner WalletBurner iconA local, in-browser key (development only)

defaultWallets() returns MetaMask, Phantom, Rabby, OKX Wallet and WalletConnect. These are the presets that bundle official artwork from each wallet's brand kit.

Coinbase Wallet, Rainbow and Trust Wallet do not bundle artwork. They show a neutral monogram unless the extension is installed (then the icon it announces is used) or you pass the official icon yourself:

import { coinbaseWallet, rainbowWallet, trustWallet } from 'wyllet'
 
const wallets = [
  coinbaseWallet({ overrides: { icon: '/brand/coinbase-wallet.svg' } }),
  rainbowWallet({ overrides: { icon: '/brand/rainbow.svg' } }),
  trustWallet({ overrides: { icon: '/brand/trust.svg' } }),
]

The WalletConnect option only appears when a WalletConnect connector exists, which means a walletConnectProjectId is set. With a project ID it becomes the entry point to All wallets. See WalletConnect for setup.

Browser wallet

browserWallet() is a fallback for in-app browsers and older extensions that expose window.ethereum without announcing themselves through EIP-6963. You rarely need to list it: when no EIP-6963 wallet is announced and window.ethereum exists, Wyllet adds it to the top of the list on its own.

Burner wallet

burnerWallet() is a throwaway wallet for local development and demos. It generates a private key on first use, keeps it in localStorage, and signs messages, typed data and transactions with it. Other RPC calls go to the chain's transport from your config.

burnerWallet({ storageKey: 'my-app.burner' })
OptionTypeDefaultDescription
storageKeystring'wyllet.v1.burner.key'localStorage key that holds the private key
connector() => CreateConnectorFnburner(options)Replace the connector
overridesPartial<Wallet>Override name, icon or other fields

The connector is also exported as burner() for hand-written wagmi configs.

Warning

The burner's private key is stored unencrypted in localStorage. Never send real funds to it. When it connects on a host other than localhost, 127.0.0.1, [::1], 0.0.0.0 or a .local, .localhost or .test domain, Wyllet logs a console warning. Remove it from production builds.

The Wallet type

A preset is just a function that returns this object. You can write one by hand for any wallet.

FieldTypeDescription
idstringStable id. Also used as the key for the "last used" wallet
namestringDisplay name
iconstringImage URL or data URI. Installed wallets use the icon they announce instead
iconBackgroundstringColor shown behind transparent icons, including the logo in the QR code
rdnsstring | readonly string[]EIP-6963 reverse-DNS identifier(s) used to detect the extension
connectorIdstringId of a wagmi connector in your config to use for this wallet
createConnector() => CreateConnectorFnA dedicated wagmi connector (SDK wallets, embedded wallets, burner)
walletConnect{ mobileUri?: (uri: string) => string }Marks WalletConnect support. mobileUri builds the link that opens the app on phones
downloadUrlsWalletDownloadUrlsbrowserExtension, ios, android and website links for the "Get wallet" screen
descriptionstringShort text shown on the "Get wallet" and onboarding screens
featuredbooleanDefault true. Wallets with featured: false are listed after the others and are left out of onboarding suggestions

A wallet with no way to connect in the current browser and no downloadUrls is hidden from the list.

How a wallet connects

When a user picks a wallet, Wyllet resolves how to connect at that moment:

  1. Installed extension. If an EIP-6963 provider whose rdns matches is announced, Wyllet connects to it directly.
  2. Dedicated connector. If the wallet has createConnector or a connectorId that matches a connector in your config, Wyllet connects with it.
  3. WalletConnect. If the wallet has walletConnect and a WalletConnect connector exists, Wyllet shows a QR code on desktop. On phones it opens the link returned by mobileUri.
  4. Get wallet. Otherwise Wyllet shows a "Get" screen with the wallet's download links.

Detected wallets

Installed wallets you did not list still appear. Every wallet announced through EIP-6963 is added with the name and icon it announces. Installed and recently used wallets are grouped at the top under Detected, and the rest follow under All wallets.

Preset options

Every preset accepts WalletPresetOptions:

OptionTypeDescription
overridesPartial<Omit<Wallet, 'createConnector'>>Replace any field: name, icon, links, description
connector() => CreateConnectorFnReplace how the wallet connects

For example, to connect Coinbase Wallet through its SDK (install @coinbase/wallet-sdk first):

import { coinbaseWallet as coinbaseSdk } from 'wagmi/connectors'
import { coinbaseWallet } from 'wyllet'
 
const coinbase = coinbaseWallet({
  connector: () => coinbaseSdk({ appName: 'My dApp' }),
  overrides: { icon: '/brand/coinbase-wallet.svg' },
})

Custom wallets

Describe any wallet with a Wallet object and add it to the list.

wallets.ts
import type { Wallet } from 'wyllet'
import { defaultWallets } from 'wyllet'
 
const acme: Wallet = {
  id: 'acme',
  name: 'Acme Wallet',
  icon: 'https://acme.xyz/icon.png',
  rdns: 'xyz.acme',
  walletConnect: { mobileUri: (uri) => `acme://wc?uri=${encodeURIComponent(uri)}` },
  downloadUrls: {
    browserExtension: 'https://acme.xyz/download',
    ios: 'https://apps.apple.com/app/acme/id000000000',
  },
  description: 'The Acme self-custody wallet.',
}
 
export const wallets = [acme, ...defaultWallets()]

With this definition, Acme connects directly when its extension is installed, shows a QR code on desktop, opens the Acme app on phones, and falls back to the download links.

Hand-written wagmi configs

If you build the config with wagmi's createConfig, pass the list to the provider instead. Wallets match connectors by connectorId or rdns, so add any dedicated connectors to your config yourself.

import { burner, burnerWallet, defaultWallets, WylletProvider } from 'wyllet'
import { createConfig, http, injected } from 'wagmi'
import { mainnet } from 'viem/chains'
 
const config = createConfig({
  chains: [mainnet],
  transports: { [mainnet.id]: http() },
  connectors: [injected(), burner()],
})
 
// Inside WagmiProvider and QueryClientProvider:
<WylletProvider wallets={[...defaultWallets(), burnerWallet()]} appInfo={{ name: 'My dApp' }}>
  {children}
</WylletProvider>

For QR codes and mobile wallets with a hand-written config, see WalletConnect.

Keyboard

The connect list is built for the keyboard:

KeyAction
↑ / ↓Move through the list (wraps around)
EnterConnect the highlighted wallet
1–9Connect the wallet at that position

Number keys work while the search field is empty and no modifier key is held. If any wallet's name starts with that digit, the keystroke goes to search instead.

The last wallet the user connected with appears at the top as Continue with followed by its name, and it is always position 1. It is hidden while searching. Wyllet remembers the three most recent wallets in localStorage.

A search field appears when appearance.walletSearch is true, or when it is 'auto' (the default) and the list has six or more wallets. To open the panel from anywhere with a shortcut such as mod+k, set the shortcut prop on WylletProvider.

PreviousTranslationsNextAll wallets

On this page

  • Built-in presets
  • Browser wallet
  • Burner wallet
  • The Wallet type
  • How a wallet connects
  • Detected wallets
  • Preset options
  • Custom wallets
  • Hand-written wagmi configs
  • Keyboard