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/Features

Activity and transactions

Track transactions and log custom events in the activity timeline.

View .mdReport a problem

Every connected account gets an activity timeline in the account panel's Activity tab. Wyllet records connects, network switches and sign-ins on its own. You add transactions, which are tracked live, and any custom entries you want.

Tracking a transaction

Call addTransaction with the hash as soon as you have it:

import { useWriteContract } from 'wagmi'
import { useWylletActivity } from 'wyllet'
 
function MintButton() {
  const { writeContractAsync } = useWriteContract()
  const { addTransaction } = useWylletActivity()
 
  async function mint() {
    const hash = await writeContractAsync({ address, abi, functionName: 'mint', args: [1n] })
    addTransaction({ hash, description: 'Mint 1 NFT' })
  }
 
  return <button onClick={mint}>Mint</button>
}

Wyllet then:

  1. Adds a pending entry to the timeline, titled with your description.
  2. Shows a "Transaction pending" toast with the description and a View link to the block explorer (when the chain has one).
  3. Waits for the receipt and updates the entry and the toast to "Transaction confirmed" or "Transaction failed".

A reverted transaction, or an error while waiting, is marked failed.

addTransaction

FieldTypeDefaultDescription
hashHashTransaction hash
descriptionstringShortened hashEntry title and toast description
chainIdnumberConnected chainChain the transaction was sent on
accountAddressConnected accountAccount the entry belongs to
toastbooleantrueSet false to track without toasts

It returns true when the transaction is tracked, and false when no account or chain is known. Pass account and chainId explicitly if the wallet might disconnect before you call it.

Calling it again with the same hash replaces the earlier entry instead of adding a second one.

Reloads and timeouts

  • After a reload. When the provider mounts, Wyllet resumes watching transactions that are still pending and less than 24 hours old. These resumed watches update the timeline without toasts.
  • After 30 minutes. If no receipt arrives within 30 minutes, Wyllet stops watching and dismisses the pending toast. The entry stays pending, because the transaction may still be mined or may have been dropped. It is not marked failed.

Custom entries

log adds your own entry to the current account's timeline.

const { log } = useWylletActivity()
 
log({ title: 'Staked 10 ETH', status: 'success' })
log({ title: 'Joined the allowlist', description: 'Season 2' })
FieldTypeDefaultDescription
titlestringEntry title
descriptionstringOptional detail
status'pending' | 'success' | 'failed' | 'info''info'Sets the entry's icon
accountAddressConnected accountAccount the entry belongs to

The entry is tagged with the connected chain. log returns false when no account is known, and true otherwise. It does not show a toast. Use toasts for that.

Automatic entries

EventEntry
Connect"Connected" followed by the connector name. Restored sessions after a reload are not logged
Disconnect"Disconnected", on the account that was connected
Network switch"Switched to" followed by the chain name
Sign-in"Signed in", after a successful SIWE step in the panel

All titles come from the messages object, so you can rename or translate them.

useWylletActivity

const { activity, addTransaction, log, clearActivity } = useWylletActivity()
FieldTypeDescription
activityActivityItem[]Entries for the connected account, newest first. Empty when disconnected
addTransaction(tx) => booleanTrack a transaction
log(entry) => booleanAdd a custom entry
clearActivity() => voidRemove every entry for the connected account

ActivityItem

FieldTypeDescription
idstringUnique id. For transactions, the hash
kind'transaction' | 'connect' | 'disconnect' | 'network' | 'signIn' | 'custom'Entry type (ActivityKind)
titlestringEntry title
descriptionstringOptional detail
status'pending' | 'success' | 'failed' | 'info'Current status (ActivityStatus)
accountAddressAccount the entry belongs to, lower-cased
chainIdnumberOptional chain
hashHashTransaction hash, for transactions
timestampnumberCreation time in milliseconds

Storage

The timeline is stored in the browser's localStorage under wyllet.v1.activity. Each account keeps its newest 50 entries, and older ones are dropped. Entries never leave the browser. Stored data is validated when it is read, so malformed entries are ignored.

PreviousAccount panelNextToasts

On this page

  • Tracking a transaction
  • addTransaction
  • Reloads and timeouts
  • Custom entries
  • Automatic entries
  • useWylletActivity
  • ActivityItem
  • Storage