BigBlocks

Wallet Overview

Wallet dashboard card displaying BSV balance with privacy toggle, payment and ordinal addresses, identity key, and send/receive actions

Installation

bunx shadcn@latest add https://registry.bigblocks.dev/r/wallet-overview.json

Usage

WalletOverview must be rendered inside a WalletProvider from @1sat/react. It fetches balance data from the wallet context automatically.

import { WalletProvider } from "@1sat/react"
import { WalletOverview } from "@/components/blocks/wallet-overview"
 
export function Dashboard() {
  return (
    <WalletProvider>
      <WalletOverview
        onSend={() => console.log("Open send dialog")}
        onReceive={() => console.log("Open receive dialog")}
      />
    </WalletProvider>
  )
}

Props

WalletOverview

PropTypeDefaultDescription
onSend() => void--Callback fired when the Send button is clicked
onReceive() => void--Callback fired when the Receive button is clicked
classNamestring--Additional CSS classes

WalletOverviewUI

For standalone use without the hook, you can render WalletOverviewUI directly:

PropTypeDefaultDescription
balanceWalletBalance | null--Balance data
paymentAddressstring | null--Payment (BSV) address
ordinalAddressstring | null--Ordinal address
identityKeystring | null--Identity public key
isLoadingboolean--Loading state
errorstring | null--Error message
onSend() => void--Send button callback
onReceive() => void--Receive button callback
onRefresh() => void--Refresh button callback

WalletBalance

interface WalletBalance {
  confirmed: number
  unconfirmed: number
  total: number
}