Installation
Which butr packages to install for your setup — batteries-included, EVM-only, or custom.
butr targets React 18+ and uses Zustand as a peer dependency. Pick the install that matches your app.
Batteries-included (recommended)
@usebutr/wallets provides autoDiscovery(), a WalletSource that composes
EVM + SVM discovery in one call. Use it with WalletManagerProvider from
@usebutr/react. It depends on @usebutr/react, @usebutr/evm, @usebutr/svm, and
@usebutr/core, so this single line covers most apps.
npm install @usebutr/wallets zustandEVM-only
Skip the Solana bundle entirely. Use @usebutr/react for the provider/hooks and
@usebutr/evm for EIP-6963 discovery, wired with ~30 lines of your own discovery
code (see Provider setup and the
Next.js framework guide).
npm install @usebutr/react @usebutr/evm @usebutr/core zustandOptional connectors
These are independent adapters you register alongside discovered wallets. Each needs its own optional peer dependency.
WalletConnect v2 (EVM mobile wallets):
npm install @usebutr/walletconnect @walletconnect/universal-providerLedger hardware wallet (WebUSB, Chromium only):
npm install @usebutr/ledger @ledgerhq/hw-app-eth @ledgerhq/hw-transport-webusbTesting helpers
npm install --save-dev @usebutr/testing@usebutr/testing provides createFakeAdapter and createFakePersistence so unit
tests never touch a real wallet or localStorage. See the
Testing guide.
Peer dependencies
| Package | Peer dependency | Notes |
|---|---|---|
@usebutr/core | zustand >= 4 | The store is Zustand-backed. |
@usebutr/react | react >= 18, zustand >= 4 | |
@usebutr/wallets | react >= 18, zustand >= 4 | |
@usebutr/svm | @wallet-standard/app ^1.1.0 | Optional — lazily imported. |
@usebutr/walletconnect | @walletconnect/universal-provider ^2 | Optional — dynamically imported. |
@usebutr/ledger | @ledgerhq/hw-app-eth, @ledgerhq/hw-transport-webusb | Optional. |
No environment variables are required to use butr. WalletConnect needs a project ID, but that is passed in code — see the WalletConnect connector.