@txnlab/use-wallet
A framework-agnostic Algorand wallet integration library (v4.x) with reactive adapters for React, Vue, SolidJS, and Svelte. Requires algosdk v3.
Packages
| Package |
Purpose |
@txnlab/use-wallet |
Core library (framework-agnostic) |
@txnlab/use-wallet-react |
React adapter (hooks + WalletProvider) |
@txnlab/use-wallet-vue |
Vue adapter (composables + plugin) |
@txnlab/use-wallet-solid |
SolidJS adapter (primitives + WalletProvider) |
@txnlab/use-wallet-svelte |
Svelte adapter (primitives + context) |
@txnlab/use-wallet-ui-react |
React UI components (WalletButton, menus) |
Routing Guide
Read the reference file that matches the developer's task:
Setup & Configuration
- Getting started (any framework): references/getting-started.md — Installation, WalletManager config, supported wallets table, webpack fallbacks
Framework-Specific Integration
- Vanilla JS/TS (no framework): references/vanilla.md — WalletManager direct usage, BaseWallet subscribe, no provider wrapper
- React: references/react.md — WalletProvider, useWallet, useNetwork hooks
- Vue: references/vue.md — WalletManagerPlugin, useWallet/useNetwork composables
- SolidJS: references/solid.md — WalletProvider, useWallet/useNetwork primitives (signals)
- Svelte: references/svelte.md — useWalletContext, useWallet/useNetwork primitives (.current)
Features & Guides
- Signing transactions: references/signing-transactions.md — signTransactions, transactionSigner with ATC, AlgoKit Utils
- Signing data (ARC-60/SIWA): references/signing-data.md — Sign In With Algorand, Lute wallet, verification
- Network switching & custom networks: references/network-configuration.md — NetworkConfigBuilder, custom AVM networks (Voi), runtime node config, useNetwork
- Pre-built UI components: references/wallet-ui.md — @txnlab/use-wallet-ui-react: WalletButton, menus, theming, Tailwind setup
- Testing: references/testing.md — Mnemonic wallet provider for dev/testing/E2E
- Custom wallet provider: references/custom-provider.md — Implementing CustomProvider interface
Reference
- Full API reference: references/api-reference.md — WalletManager, useWallet, useNetwork, enums, types
- Migration from v3: references/migration-v3.md — algosdk v3, network config changes, useNetwork extraction
Quick Reference: Supported Wallets
| Wallet |
WalletId |
Required Package |
| Pera |
PERA |
@perawallet/connect |
| Defly |
DEFLY |
@blockshake/defly-connect |
| Defly Web (beta) |
DEFLY_WEB |
@agoralabs-sh/avm-web-provider |
| Exodus |
EXODUS |
— |
| Kibisis |
KIBISIS |
@agoralabs-sh/avm-web-provider |
| Lute |
LUTE |
lute-connect |
| WalletConnect |
WALLETCONNECT |
@walletconnect/sign-client, @walletconnect/modal |
| Magic |
MAGIC |
magic-sdk, @magic-ext/algorand |
| Web3Auth |
WEB3AUTH |
@web3auth/modal, @web3auth/base, @web3auth/base-provider |
| W3 Wallet |
W3_WALLET |
— |
| KMD |
KMD |
— (dev only) |
| Mnemonic |
MNEMONIC |
— (test only, never MainNet) |
| Custom |
CUSTOM |
— (implement CustomProvider) |
Wallets that require no extra package use built-in browser APIs or AVM web provider.
Key Patterns
Minimal Setup (React)
import {
WalletProvider,
WalletManager,
NetworkId,
WalletId,
} from '@txnlab/use-wallet-react'
const manager = new WalletManager({
wallets: [WalletId.PERA, WalletId.DEFLY, WalletId.LUTE],
defaultNetwork: NetworkId.TESTNET,
})
function App() {
return (
<WalletProvider manager={manager}>
<YourApp />
</WalletProvider>
)
}
Accessing Wallet State
const {
wallets,
activeAddress,
isReady,
signTransactions,
transactionSigner,
algodClient,
} = useWallet()
const {
activeNetwork,
setActiveNetwork,
updateAlgodConfig,
resetNetworkConfig,
} = useNetwork()
Important Notes
- v4.x requires algosdk v3 — see migration guide if upgrading from v3.x
- In v4.0.0, network features moved from
useWallet to a separate useNetwork hook/composable/primitive
- Default networks (MainNet, TestNet, BetaNet, LocalNet) use Nodely's free API
- Some wallet providers require signature requests from direct user interaction (button clicks)
- Only Lute supports ARC-60 data signing (
signData)
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: txnlab-skills-use-wallet3description: Txnlab Skills Use Wallet4---56# @txnlab/use-wallet78A framework-agnostic Algorand wallet integration library (v4.x) with reactive adapters for React, Vue, SolidJS, and Svelte. Requires **algosdk v3**.910## Packages1112| Package | Purpose |13| ----------------------------- | --------------------------------------------- |14| `@txnlab/use-wallet` | Core library (framework-agnostic) |15| `@txnlab/use-wallet-react` | React adapter (hooks + WalletProvider) |16| `@txnlab/use-wallet-vue` | Vue adapter (composables + plugin) |17| `@txnlab/use-wallet-solid` | SolidJS adapter (primitives + WalletProvider) |18| `@txnlab/use-wallet-svelte` | Svelte adapter (primitives + context) |19| `@txnlab/use-wallet-ui-react` | React UI components (WalletButton, menus) |2021## Routing Guide2223Read the reference file that matches the developer's task:2425### Setup & Configuration2627- **Getting started (any framework)**: [references/getting-started.md](references/getting-started.md) — Installation, WalletManager config, supported wallets table, webpack fallbacks2829### Framework-Specific Integration3031- **Vanilla JS/TS (no framework)**: [references/vanilla.md](references/vanilla.md) — WalletManager direct usage, BaseWallet subscribe, no provider wrapper32- **React**: [references/react.md](references/react.md) — WalletProvider, useWallet, useNetwork hooks33- **Vue**: [references/vue.md](references/vue.md) — WalletManagerPlugin, useWallet/useNetwork composables34- **SolidJS**: [references/solid.md](references/solid.md) — WalletProvider, useWallet/useNetwork primitives (signals)35- **Svelte**: [references/svelte.md](references/svelte.md) — useWalletContext, useWallet/useNetwork primitives (.current)3637### Features & Guides3839- **Signing transactions**: [references/signing-transactions.md](references/signing-transactions.md) — signTransactions, transactionSigner with ATC, AlgoKit Utils40- **Signing data (ARC-60/SIWA)**: [references/signing-data.md](references/signing-data.md) — Sign In With Algorand, Lute wallet, verification41- **Network switching & custom networks**: [references/network-configuration.md](references/network-configuration.md) — NetworkConfigBuilder, custom AVM networks (Voi), runtime node config, useNetwork42- **Pre-built UI components**: [references/wallet-ui.md](references/wallet-ui.md) — @txnlab/use-wallet-ui-react: WalletButton, menus, theming, Tailwind setup43- **Testing**: [references/testing.md](references/testing.md) — Mnemonic wallet provider for dev/testing/E2E44- **Custom wallet provider**: [references/custom-provider.md](references/custom-provider.md) — Implementing CustomProvider interface4546### Reference4748- **Full API reference**: [references/api-reference.md](references/api-reference.md) — WalletManager, useWallet, useNetwork, enums, types49- **Migration from v3**: [references/migration-v3.md](references/migration-v3.md) — algosdk v3, network config changes, useNetwork extraction5051## Quick Reference: Supported Wallets5253| Wallet | WalletId | Required Package |54| ---------------- | --------------- | -------------------------------------------------------------- |55| Pera | `PERA` | `@perawallet/connect` |56| Defly | `DEFLY` | `@blockshake/defly-connect` |57| Defly Web (beta) | `DEFLY_WEB` | `@agoralabs-sh/avm-web-provider` |58| Exodus | `EXODUS` | — |59| Kibisis | `KIBISIS` | `@agoralabs-sh/avm-web-provider` |60| Lute | `LUTE` | `lute-connect` |61| WalletConnect | `WALLETCONNECT` | `@walletconnect/sign-client`, `@walletconnect/modal` |62| Magic | `MAGIC` | `magic-sdk`, `@magic-ext/algorand` |63| Web3Auth | `WEB3AUTH` | `@web3auth/modal`, `@web3auth/base`, `@web3auth/base-provider` |64| W3 Wallet | `W3_WALLET` | — |65| KMD | `KMD` | — (dev only) |66| Mnemonic | `MNEMONIC` | — (test only, never MainNet) |67| Custom | `CUSTOM` | — (implement CustomProvider) |6869Wallets that require no extra package use built-in browser APIs or AVM web provider.7071## Key Patterns7273### Minimal Setup (React)7475```tsx76import {77 WalletProvider,78 WalletManager,79 NetworkId,80 WalletId,81} from '@txnlab/use-wallet-react'8283const manager = new WalletManager({84 wallets: [WalletId.PERA, WalletId.DEFLY, WalletId.LUTE],85 defaultNetwork: NetworkId.TESTNET,86})8788function App() {89 return (90 <WalletProvider manager={manager}>91 <YourApp />92 </WalletProvider>93 )94}95```9697### Accessing Wallet State9899```tsx100const {101 wallets,102 activeAddress,103 isReady,104 signTransactions,105 transactionSigner,106 algodClient,107} = useWallet()108const {109 activeNetwork,110 setActiveNetwork,111 updateAlgodConfig,112 resetNetworkConfig,113} = useNetwork()114```115116## Important Notes117118- v4.x requires **algosdk v3** — see migration guide if upgrading from v3.x119- In v4.0.0, network features moved from `useWallet` to a separate `useNetwork` hook/composable/primitive120- Default networks (MainNet, TestNet, BetaNet, LocalNet) use Nodely's free API121- Some wallet providers require signature requests from direct user interaction (button clicks)122- Only Lute supports ARC-60 data signing (`signData`)123124---125> Converted and distributed by [TomeVault](https://tomevault.io/claim/txnlab) — claim your Tome and manage your conversions.126<!-- tomevault:4.0:skill_md:2026-04-11 -->