wankmi
Solana-native · TypeScript · React Hooks

Reactive primitives for building Solana dApps. Wallets, programs, tokens, transactions — all the hooks you need, none of the boilerplate.

↗ Get Started ⟨/⟩ View on GitHub
import { useWallet, useConnection, useSolBalance }
  from '@wankmi/wankmi'

function MyDApp() {
  const { publicKey, signTransaction } = useWallet()
  const { balance } = useSolBalance({ address: publicKey })

  // balance is automatically reactive ✨
  return `SOL Balance: ${"{"}balance?.formatted{"}"}`
}
useWallet useSolBalance useConnection useTokenAccounts useSendTransaction useProgram useAnchorProgram useNFTs useJupiterSwap useMint useWallet useSolBalance useConnection useTokenAccounts useSendTransaction useProgram useAnchorProgram useNFTs useJupiterSwap useMint
40+Solana Hooks
12Wallet Adapters
4.2kGitHub Stars
99%TypeScript Coverage

Built different.
For Solana.

Every hook is designed around Solana's account model, transaction lifecycle, and program architecture. Not an Ethereum port — built from scratch.

Reactive by default

Hooks automatically re-render when on-chain state changes via WebSocket subscriptions. No polling, no manual refreshes.

🔗
Multi-wallet support

Phantom, Backpack, Solflare, Ledger, WalletConnect and more. Unified API across every adapter with zero config.

Anchor-native

First-class useAnchorProgram hook. Pass your IDL and get type-safe program interactions out of the box.

🔒
Type-safe

Built in TypeScript with full inference. Your IDL types, token mints, and account data all fully typed end-to-end.

🧩
Modular & tree-shakable

Import only what you need. Zero unnecessary bloat. Designed for lean bundle sizes and fast load times.

🔄
Smart caching

Built on TanStack Query. Deduped requests, background refetching, and stale-while-revalidate — all automatic.

Everything you need

A comprehensive hook library covering every Solana primitive.

  • useWallet
    Connect, sign, and manage wallet state
  • useSolBalance
    Reactive SOL balance with auto-updates
  • useTokenAccounts
    All SPL token holdings for an address
  • useSendTransaction
    Build, sign and send transactions
  • useAnchorProgram
    Type-safe Anchor program interactions
import { useWallet } from '@wankmi/wankmi'

const {
  publicKey, connected,
  connect, disconnect
} = useWallet()
Installation

Up and running
in minutes

$ npm install @wankmi/wankmi
// Wrap your app with WankmiProvider

import { WankmiProvider } from '@wankmi/wankmi'
import { PhantomAdapter } from '@wankmi/wankmi/adapters'

const wallets = [new PhantomAdapter()]

function App() {
  return (
    <WankmiProvider network="mainnet-beta" wallets={wallets}>
      <YourApp />
    </WankmiProvider>
  )
}

Works with the entire Solana ecosystem

Build on Solana.
Ship faster.

Join thousands of developers building the next generation of dApps.

↗ Read the Docs ⟨/⟩ View Examples