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

@cicero-zcash/react

v0.2.11

Published

Universal wallet connection toolkit for shielded Zcash (RainbowKit of Zcash)

Readme

🛡️ Cicero

The RainbowKit for Shielded Zcash

Universal wallet connection, bi-directional network synchronization, and multi-wallet state management for React and Next.js applications.

License: MIT NPM Version Zcash Design

Quickstart • React Hooks • Wallets Supported • Components


📖 What is Cicero?

Cicero is the "RainbowKit of Zcash". It provides a drop-in, zero-knowledge native wallet connection suite:

  • 🥒 Zucchini Chrome Extension: 1-click in-browser connection and shielded account detection.
  • 📱 Mobile & Desktop Wallets: Zashi (Electric Coin Co.) and Ywallet QR handoff.
  • 🔑 Viewing Key Mode: Audit and read-only treasury dashboard connection.
  • 🔄 Bi-Directional Network Sync: Automatically detects Mainnet vs Testnet from wallet address prefixes and listens to extension network change events.
  • 💰 Per-Network Balance Segregation: Independent balance caching for Mainnet and Testnet with live USD conversion.
import { CiceroProvider, CiceroConnectButton, useAccount, useBalance } from '@cicero-zcash/react';

export default function App() {
  return (
    <CiceroProvider initialNetwork="mainnet">
      <nav className="flex justify-between p-4 border-b">
        <span>My Zcash dApp</span>
        <CiceroConnectButton variant="primary" size="md" />
      </nav>
      <Dashboard />
    </CiceroProvider>
  );
}

function Dashboard() {
  const { address, isConnected, wallet } = useAccount();
  const { zec, usd } = useBalance();

  if (!isConnected) return <p>Please connect your Zcash wallet.</p>;

  return (
    <div>
      <p>Connected to {wallet?.name}</p>
      <p>Address: {address}</p>
      <p>
        Balance: {zec} ZEC (~${usd} USD)
      </p>
    </div>
  );
}

⚡ Features

  • 🛡️ Shielded-First Architecture: Built specifically for Zcash's Unified Address standard (ZIP-316), Sapling (zs1), and Transparent (t1) pools.
  • 🔄 Live Network & Chain Synchronization: Listens to wallet extension events (networkChanged, accountsChanged). Switching between Mainnet and Testnet inside Zucchini immediately updates Cicero and queries the new balance.
  • 💼 RainbowKit-Style Connected Pill: Displays active network indicator (green/amber dot), current ZEC balance, and truncated address. Clicking opens an account drawer with address copying, QR code receive view, and network switch assistance.
  • 🎨 Supabase Design Language: Styled with Supabase tokens (#3ecf8e emerald accents, #171717 ink typography, 6px button radii, clean border tokens).
  • 🪙 Live Fiat Conversions: useZcashPrice() hook provides cached, rate-limited ZEC/USD pricing with automatic fallback.

🚀 Quickstart

1. Install

pnpm add @cicero-zcash/react
# or
npm install @cicero-zcash/react
# or
yarn add @cicero-zcash/react

2. Wrap your app in <CiceroProvider>

import { CiceroProvider } from '@cicero-zcash/react';

export function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <CiceroProvider initialNetwork="mainnet" appName="My Zcash dApp">
      {children}
    </CiceroProvider>
  );
}

3. Add the <CiceroConnectButton />

import { CiceroConnectButton } from '@cicero-zcash/react';

export function Header() {
  return (
    <header className="flex justify-between items-center p-4">
      <h1>Zcash Portal</h1>
      <CiceroConnectButton variant="primary" size="md" />
    </header>
  );
}

🪝 React Hooks

Cicero exports familiar, ergonomic hooks modeled after RainbowKit and wagmi:

useAccount()

const {
  address, // string | null - Active shielded or transparent address
  isConnected, // boolean - Whether a wallet is connected
  isConnecting, // boolean - True during connection handshake
  wallet, // ZcashWallet | null - Active wallet adapter metadata
  disconnect, // () => Promise<void> - Disconnect handler
} = useAccount();

useBalance()

const {
  zec, // number - Shielded balance in ZEC
  usd, // string | null - Estimated USD equivalent
  isLoading, // boolean - True when querying balance
  refetch, // () => Promise<void> - Re-queries balance from wallet/RPC
} = useBalance();

useCicero()

Full context access including network state, modal controls, and raw wallet methods:

const {
  account,
  network, // 'mainnet' | 'testnet'
  switchNetwork, // (net: 'mainnet' | 'testnet') => Promise<SwitchResult>
  openConnectModal,
  closeConnectModal,
  openAccountModal,
  closeAccountModal,
} = useCicero();

useZucchiniWallet()

Direct low-level hook for interacting with the Zucchini browser extension:

const {
  isAvailable, // boolean - True if Zucchini Chrome extension is installed
  isConnected, // boolean
  connect, // () => Promise<WalletSession>
  address, // string | null
  network, // 'mainnet' | 'testnet'
  getBalance, // () => Promise<number | null>
} = useZucchiniWallet();

🔌 Supported Wallets

| Wallet | Type | Support | Features | | ----------------- | -------------------- | ----------------- | ---------------------------------------------------- | | Zucchini | Chrome Extension | Direct in-browser | 1-click connect, live network sync, shielded balance | | Zashi | Mobile (iOS/Android) | QR Handoff | Electric Coin Co. official wallet | | Ywallet | Desktop & Mobile | QR Handoff | Multi-platform shielded wallet | | Viewing Key | Read-Only | Manual Input | Auditor compliance, treasury dashboards | | Burner Wallet | Dev / Sandbox | Ephemeral | Instant testing in development |


🧩 Components

<CiceroConnectButton />

| Prop | Type | Default | Description | | ------------- | --------------------------------------------------------------------- | -------------------------------------------------- | ----------------------------------------------------------------------------------------------- | | variant | 'primary' \| 'outline' \| 'dark' \| 'ghost' \| 'gradient' \| 'gold' | 'primary' | Visual style token | | size | 'sm' \| 'md' \| 'lg' | 'md' | Button dimensions | | radius | 'none' \| 'sm' \| 'md' \| 'lg' \| 'full' | 'md' | Button corner radius | | label | string | 'Connect Zcash Wallet' | Text shown while disconnected | | showBalance | boolean | true | Show balance in the connected pill | | showNetwork | boolean | true | Show the network indicator in the connected pill | | showIcon | boolean | true | Show the wallet icon in the button and dialogs | | accentColor | string | Emerald (#3ecf8e) or gold (#f59e0b) by variant | CSS hex color for the button and dialogs. The package selects readable text on filled surfaces. | | className | string | '' | Custom CSS class names |

The connected pill keeps the selected variant, size, radius, icon, balance, network, and accent settings. Opening either wallet dialog from the button carries that appearance into the dialog. CiceroButtonAppearance is exported for integrations that need to open a styled dialog through useCicero().


📄 License

MIT © Kaycee276