npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lykhoyda/gelato-wallet-ui

v2.3.1

Published

Production-ready React Smart components for Web3 wallet interfaces with Gelato SDK integration

Downloads

15

Readme

@lykhoyda/gelato-wallet-ui

Production-ready React component library for Web3 wallet interfaces with Gelato SDK integration. Build gasless Web3 experiences with beautiful, customizable components.

npm version License: MIT

📚 Storybook

This library includes a comprehensive Storybook for interactive component development and testing. Storybook provides a visual catalog of all components with their various states and configurations.

Running Storybook

# Start Storybook development server
yarn storybook

# Storybook will open automatically at http://localhost:6006

Building Storybook

# Build static Storybook for deployment
yarn build-storybook

# Output will be in storybook-static/ directory

Available Stories

  • WalletCard - Multiple states including empty, loading, and rich wallet displays
  • ActivityLog - Transaction history with pending, success, and error states
  • GasEstimationModal - Gas estimation flows for USDC and WETH payments

Each component story includes:

  • Interactive controls to modify props
  • Multiple pre-configured states
  • Responsive preview at different viewport sizes
  • Documentation and usage examples

Visit Storybook to explore all components and their variations interactively!

Features

  • 🎨 Beautiful Components - Pre-built wallet UI components with dark theme
  • Gasless Transactions - Built-in support for sponsored transactions
  • 🔐 Smart Wallet Support - Seamless integration with Gelato Smart Wallets
  • 🎯 TypeScript First - Full type safety and IntelliSense support
  • 📦 Tree Shakeable - Import only what you need
  • 🚀 Production Ready - Battle-tested error handling and edge cases
  • 🌙 Dark Mode - Built-in dark mode support
  • TypeScript - Full type safety
  • ⚛️ React 19 - Built for the latest React features
  • 📚 Interactive Storybook - Explore all components with live examples

Installation

Note: This library requires React 19 or higher.

yarn add @lykhoyda/gelato-wallet-ui
# or
npm install @lykhoyda/gelato-wallet-ui
# or
pnpm add @lykhoyda/gelato-wallet-ui

⚠️ Required Configuration

This library does NOT include any API keys or environment variables.

Your application MUST provide:

The library will throw errors if these are not provided. The default network is Ink Sepolia; you can opt into additional chains via the chains prop.

Quick Start

Step 1: Setup Provider with Required Configuration

import { GelatoProvider, GelatoSmartWalletConnectButton } from '@lykhoyda/gelato-wallet-ui';
import '@lykhoyda/gelato-wallet-ui/style.css';

// Your app must provide these values (e.g., from your .env file)
const GELATO_CONFIG = {
  sponsorApiKey: process.env.NEXT_PUBLIC_GELATO_API_KEY!, // Required
  dynamicEnvironmentId: process.env.NEXT_PUBLIC_DYNAMIC_ID!, // Required
  rpcUrl: process.env.NEXT_PUBLIC_RPC_URL, // Optional (applies to all chains)
};

function App() {
  return (
    <GelatoProvider config={GELATO_CONFIG}>
      {/* REQUIRED: Use SDK's button for authentication */}
      <GelatoSmartWalletConnectButton>
        <button className="px-4 py-2 bg-purple-600 rounded">Connect Wallet</button>
      </GelatoSmartWalletConnectButton>
    </GelatoProvider>
  );
}

Step 2: Add Components

import { WalletCard, ActivityLog } from '@lykhoyda/gelato-wallet-ui';

function Dashboard() {
  return (
    <>
      <WalletCard />
      <ActivityLog />
    </>
  );
}

Components

WalletCard

Main wallet interface component showing connection status, balance, and actions.

<WalletCard showBalances={true} showNetwork={true} />

GasEstimationModal

Modal for displaying and selecting gas payment options.

<GasEstimationModal isOpen={isOpen} onClose={() => setIsOpen(false)} estimatedGas={gasAmount} />

ActivityLog

Transaction history and activity display with automatic fetching from useMintToken hook.

<ActivityLog maxEntries={5} />

Multi-Chain Setup

By default, GelatoProvider configures the SDK for Ink Sepolia. To support additional networks, pass the chains prop with any viem chains (for example, Base Sepolia and Sepolia):

import { GelatoProvider, GelatoSmartWalletConnectButton } from '@lykhoyda/gelato-wallet-ui';
import { inkSepolia, baseSepolia, sepolia } from 'viem/chains';

const GELATO_CONFIG = {
  sponsorApiKey: process.env.NEXT_PUBLIC_GELATO_API_KEY!,
  dynamicEnvironmentId: process.env.NEXT_PUBLIC_DYNAMIC_ID!,
};

export function App() {
  return (
    <GelatoProvider config={GELATO_CONFIG} chains={[inkSepolia, baseSepolia, sepolia]}>
      <GelatoSmartWalletConnectButton>
        <button className="px-4 py-2 bg-purple-600 rounded">Connect Wallet</button>
      </GelatoSmartWalletConnectButton>
    </GelatoProvider>
  );
}

Notes:

  • The library still defaults to Ink Sepolia when chains is omitted.
  • Switching between networks happens via the SDK’s switchNetwork from the provider context or via your own UI.

Hooks

useGelatoClient

Primary hook for accessing the Gelato client and session state.

Note: The SDK does not expose a programmatic connect API. Use <GelatoSmartWalletConnectButton> to open the authentication modal.

import { useGelatoClient, ConnectButton } from '@lykhoyda/gelato-wallet-ui';

function Actions() {
  const { client, account, isConnected, logout, switchNetwork } = useGelatoClient();

  if (!client || !account || !isConnected) {
    return <ConnectButton />;
  }

  // Example: switch network or logout
  return (
    <div>
      <button onClick={() => switchNetwork?.(763373)}>Switch to Ink Sepolia</button>
      <button onClick={() => logout()}>Logout</button>
    </div>
  );
}

useMintToken

Hook for minting tokens with gasless transactions.

const { mintSponsored, mintWithERC20, isMinting, error } = useMintToken();

// Gasless minting (sponsored)
await mintSponsored();

// Or pay with ERC-20 tokens
await mintWithERC20('USDC');

Development

# Install dependencies
yarn install

# Start development server
yarn dev

# Build library
yarn build

# Type check
yarn type-check

# Run linter
yarn lint

📚 Storybook

This library includes a comprehensive Storybook for interactive component development and testing. Storybook provides a visual catalog of all components with their various states and configurations.

Running Storybook

# Start Storybook development server
yarn storybook

# Storybook will open automatically at http://localhost:6006

Building Storybook

# Build static Storybook for deployment
yarn build-storybook

# Output will be in storybook-static/ directory

Available Stories

  • WalletCard - Multiple states including empty, loading, and rich wallet displays
  • ActivityLog - Transaction history with pending, success, and error states
  • GasEstimationModal - Gas estimation flows for USDC and WETH payments

Each component story includes:

  • Interactive controls to modify props
  • Multiple pre-configured states
  • Responsive preview at different viewport sizes
  • Documentation and usage examples

Visit Storybook to explore all components and their variations interactively!

Architecture

This library is built with:

  • Vite - Fast build tool and dev server
  • React 19 - Latest React with support for Server Components and Actions
  • TypeScript - Full type safety
  • Tailwind CSS v4 - Latest version with Oxide engine, using gwui prefix for style isolation
  • Viem - Ethereum interface

Browser Support

  • Chrome/Edge 90+
  • Firefox 88+
  • Safari 14+

Contributing

Contributions are welcome! Please read our contributing guidelines before submitting PRs.

License

MIT © Gelato Network

Links