butr
Get started

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.

@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 zustand

Single 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 zustand

The 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-provider

Ledger 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-eth

Testing 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

PackagePeer dependencyNotes
@usebutr/corezustand >= 4.5The manager is a Zustand store.
@usebutr/reactreact >= 19, zustand >= 4.5
@usebutr/svm@wallet-standard/app ^1.1.0Optional; without it discovery does nothing.
@usebutr/sui@wallet-standard/app ^1.1.0Optional; without it discovery does nothing.
@usebutr/bitcoin@wallet-standard/app ^1.1.0Optional; the injected fallback works without it.
@usebutr/polkadot@wallet-standard/app ^1.1.0Optional; injectedWeb3 discovery works without it.
@usebutr/walletconnect@walletconnect/universal-provider ^2Dynamically imported.
@usebutr/ledger@ledgerhq/hw-transport-webusb, plus @ledgerhq/hw-app-{eth,solana,sui,btc} per platformEach 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.