A framework-agnostic Algorand wallet integration library with reactive adapters for React, Vue, SolidJS, and Svelte.
- Modular wallet adapters — install only the wallets you need; each wallet SDK is bundled in its own package
- Factory function configuration with full TypeScript support
- Switch between accounts, wallets, and networks reactively
- Sign and send transactions, ARC-60 data signing, session restore
availableWalletslist filtered by each wallet's declared network capabilities- Typed event emitter for observing wallet lifecycle events
- ESM-only, tree-shakeable packages
Install the framework adapter (or the core package for vanilla JS/TS) plus the wallet adapters you want to support:
npm install @txnlab/use-wallet-react @txnlab/use-wallet-pera @txnlab/use-wallet-defly algosdkimport { WalletManager, WalletProvider, useWallet } from '@txnlab/use-wallet-react'
import { pera } from '@txnlab/use-wallet-pera'
import { defly } from '@txnlab/use-wallet-defly'
const manager = new WalletManager({
wallets: [pera(), defly()],
defaultNetwork: 'testnet'
})
function App() {
return (
<WalletProvider manager={manager}>
<YourApp />
</WalletProvider>
)
}| Package | Description |
|---|---|
@txnlab/use-wallet |
Core library (framework-agnostic) |
@txnlab/use-wallet-react |
React adapter |
@txnlab/use-wallet-vue |
Vue adapter |
@txnlab/use-wallet-solid |
SolidJS adapter |
@txnlab/use-wallet-svelte |
Svelte adapter |
Wallet adapters: Pera · Defly · Exodus · Kibisis · KMD · Lute · Mnemonic · W3 Wallet · WalletConnect · Web3Auth
A custom provider (built into core) supports integrating any other wallet, and third-party adapter packages work without changes to this repository — see the supported wallets docs.
See the v4 to v5 migration guide. v4 documentation remains available at txnlab.gitbook.io/use-wallet/v4.