Installation
Which butr packages to install for your setup: batteries-included, single-platform, or with extra connectors.
butr targets React 19 and uses Zustand as a peer dependency. Pick the install that matches your app.
Batteries-included (recommended)
@usebutr/wallets provides autoDiscovery(), one wallet source that discovers
EVM, SVM, Sui, Bitcoin, and Polkadot wallets. Put it in the sources of the
config you pass to WalletManagerProvider from @usebutr/react.
@usebutr/wallets depends on @usebutr/core, every per-platform adapter
package, and @wallet-standard/app, so this line covers most apps:
npm install @usebutr/react @usebutr/wallets zustandSingle platform
Skip the other platforms entirely. Install @usebutr/react, @usebutr/core
(for the config type and chain registries), and one platform package. Its
discover*Adapters export goes straight into sources; see
EVM-only setup and SVM-only setup.
npm install @usebutr/react @usebutr/core @usebutr/evm zustandThe Wallet Standard packages (@usebutr/svm, @usebutr/sui, @usebutr/bitcoin,
@usebutr/polkadot) also need @wallet-standard/app for discovery.
Optional connectors
These build adapters that no wallet announces. Add them to sources with
fromAdapters from @usebutr/core, and they appear in useDiscoveredWallets()
next to the discovered ones. Each needs its own peer dependency.
WalletConnect v2 (EVM, Solana, Sui, and Bitcoin mobile wallets):
npm install @usebutr/walletconnect @walletconnect/universal-providerLedger hardware wallet (WebUSB, Chromium only). Install the device app package for each platform you use; this is the EVM one:
npm install @usebutr/ledger @ledgerhq/hw-transport-webusb @ledgerhq/hw-app-ethTesting 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.5 | The manager is a Zustand store. |
@usebutr/react | react >= 19, zustand >= 4.5 | |
@usebutr/svm | @wallet-standard/app ^1.1.0 | Optional; without it discovery does nothing. |
@usebutr/sui | @wallet-standard/app ^1.1.0 | Optional; without it discovery does nothing. |
@usebutr/bitcoin | @wallet-standard/app ^1.1.0 | Optional; the injected fallback works without it. |
@usebutr/polkadot | @wallet-standard/app ^1.1.0 | Optional; injectedWeb3 discovery works without it. |
@usebutr/walletconnect | @walletconnect/universal-provider ^2 | Dynamically imported. |
@usebutr/ledger | @ledgerhq/hw-transport-webusb, plus @ledgerhq/hw-app-{eth,solana,sui,btc} per platform | Each app is loaded on first connect. |
@usebutr/wallets has no peers of its own: it ships @wallet-standard/app as a
dependency.
No environment variables are required to use butr. WalletConnect needs a project ID, but that is passed in code; see the WalletConnect connector.