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

@livo-build/kit

v0.2.3

Published

Livo frontend kit — reusable React + wagmi v3 building blocks (wallet connect modal, providers, hooks) for web3 apps built on Livo.

Downloads

962

Readme

@livo-build/kit

Livo's frontend kit — reusable React + wagmi v3 building blocks for web3 apps built on Livo. The frontend counterpart to @livo-build/runtime (the backend stdlib). Zero runtime dependencies of its own; React, wagmi, viem and @tanstack/react-query are peers.

Install

npm install @livo-build/kit
# peers (a Livo scaffold already has these):
npm install wagmi viem @tanstack/react-query

Quick start

import { LivoWeb3Provider, ConnectWallet } from "@livo-build/kit";
import { wagmiConfig } from "./wagmi"; // your chains + connectors (stays in your app)

export default function App() {
  return (
    <LivoWeb3Provider config={wagmiConfig}>
      <ConnectWallet />
    </LivoWeb3Provider>
  );
}

ConnectWallet is a button that opens a responsive wallet-picker modal (centered on desktop, a bottom sheet on mobile) and turns into an account pill (copy / disconnect) once connected.

Not opinionated — style it your way

The kit owns behaviour + structure + accessibility; the look is yours. Defaults are deliberately neutral (they inherit the app font and lean grayscale) so apps don't all look the same. Restyle via CSS variables, a per-part classNames prop, the class hooks / [data-state] attributes, or go fully headless on the hooks. See STYLING.md. Don't ship the neutral default as-is for a real product — spend a moment making it match your app.

Customize (three levels)

  1. Restyle — override the CSS variables (--wm-accent, --wm-radius, --wm-row, …) on :root or any parent. No logic touched.
  2. Custom trigger — keep the modal, supply your own button:
    <ConnectWallet>
      {({ open, isConnected, address }) => (
        <button onClick={open}>{isConnected ? address : "Sign in"}</button>
      )}
    </ConnectWallet>
  3. Fully custom UI — build your own on the controlled <WalletModal open onClose/> and the headless useWalletConnectors() hook (deduped connectors + connect / pending / error wiring).

Transactions

The whole write lifecycle (submit → pending → confirming → success/error) in one component, with toasts + an explorer link (wrap your app in ToastProvider):

import { ToastProvider, TxButton } from "@livo-build/kit";
import { addresses, abis } from "./livo/contracts"; // generated by Livo

<ToastProvider>
  <TxButton address={addresses.Counter} abi={abis.Counter} functionName="increment">
    Increment
  </TxButton>
</ToastProvider>

Headless version: const { send, status, hash, error } = useTx({ address, abi, functionName }). decodeRevert(error) turns a viem error into a short human message.

Contracts (bound to Livo's generated bindings)

import { createLivoContracts } from "@livo-build/kit";
import { addresses, abis } from "./livo/contracts"; // generated by sync_contract_bindings

export const contracts = createLivoContracts({ addresses, abis });

const n = contracts.useRead<bigint>("Counter", "number");                 // read (chain-aware)
<TxButton {...contracts.useContract("Counter")} functionName="increment">+1</TxButton>  // write

Data, web3 primitives, UI

const { data } = useApi<{ ok: boolean }>("/health");      // same-origin /api/*
const { data } = useSubgraph({ url, query: GET_ITEMS });  // your indexer's graphql_url_latest

<Address address={addr} explorer />        <Balance address={addr} />
<TokenAmountInput value={v} onChange={setV} decimals={18} max={bal} symbol="USDC" />
<NetworkGuard chainId={11155111} name="Sepolia">{/* on-chain UI */}</NetworkGuard>

<Dialog open={open} onClose={close} title="Confirm">…</Dialog>
<Card/>  <Skeleton width={120}/>  <Spinner/>  <EmptyState title="Nothing yet"/>  <CopyButton value={addr}/>

Theme it from one object

<KitThemeProvider theme={{ accent: "#6d28d9", radius: 16 }}>
  {/* every kit component beneath inherits the brand */}
</KitThemeProvider>

Accounts, tokens, approvals

<RequireConnection>{/* shown only when connected; else a connect prompt */}</RequireConnection>
<Connected><Identity address={addr} /></Connected>   <Avatar address={addr} />

const { symbol, decimals } = useToken(token);
const { enough } = useAllowance({ token, owner, spender });
<ApproveButton token={token} spender={spender} amount={amt} />   // approve → toast → done

Link a wallet to Telegram

For apps that have both a Telegram bot and a web instance — verify the same person on both.

<LinkTelegramButton />                    // Mini App: uses verified initData; web: bot deep-link
const { status, telegram, link } = useTelegramLink();   // headless
const mini = useTelegramMiniApp();        // { available, initData, user } when open inside Telegram

The hook talks to your api/ (same-origin), which verifies both proofs with @livo-build/runtime (verifyTelegramInitData + a signed-nonce check) and writes the binding to D1 (TelegramLinks). Endpoints it expects under endpoint (default /api/telegram): GET /nonce, GET /status, POST /link (Mini App), POST /start (web deep-link), POST /unlink. (Livo's telegram-app blueprint scaffolds these.)

Exports

  • walletConnectWallet, WalletModal, useWalletConnectors
  • telegramLinkTelegramButton, useTelegramLink, useTelegramMiniApp
  • providerLivoWeb3Provider
  • contractscreateLivoContracts, useContractValue, useContractEvent, resolveAddress
  • txTxButton, useTx, decodeRevert
  • toastToastProvider, useToast
  • datauseApi, apiClient, useSubgraph, Async
  • tokenuseToken, useAllowance, useApprove, ApproveButton
  • accountConnected, Disconnected, RequireConnection, useIsConnected, Avatar, Identity
  • web3Address, Balance, NetworkGuard, TokenAmountInput, ChainSwitcher, AddressInput
  • uiDialog, Card, Skeleton, Spinner, EmptyState, CopyButton, Button, Badge
  • themeKitThemeProvider
  • hooksuseCopyToClipboard, useLocalStorage, useDebounce, useInterval
  • formatshortAddress, shortHash, formatToken, parseToken, formatUsd, timeAgo, avatarGradient

Every component is neutral by default — style it (see STYLING.md).

Versioning

Published from packages/kit via publish-kit.yml on merge to main (idempotent). Livo scaffolds pin the version from convex/lib/frontendVersion.ts (KIT_VERSION).