use-wallet

Integrate Algorand/AVM wallet connections using @txnlab/use-wallet v4.x. Use when building dApps that need wallet connectivity (Pera, Defly, Lute, Kibisis, Exodus, WalletConnect, etc.), transaction signing, data signing (ARC-60/SIWA), network switching, or wallet state management in vanilla JS/TS, React, Vue, SolidJS, or Svelte applications. Also covers the companion UI component library @txnlab/use-wallet-ui-react for drop-in wallet buttons and menus.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "use-wallet" with this command: npx skills add txnlab/skills/txnlab-skills-use-wallet

@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

PackagePurpose
@txnlab/use-walletCore library (framework-agnostic)
@txnlab/use-wallet-reactReact adapter (hooks + WalletProvider)
@txnlab/use-wallet-vueVue adapter (composables + plugin)
@txnlab/use-wallet-solidSolidJS adapter (primitives + WalletProvider)
@txnlab/use-wallet-svelteSvelte adapter (primitives + context)
@txnlab/use-wallet-ui-reactReact 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

Features & Guides

Reference

Quick Reference: Supported Wallets

WalletWalletIdRequired Package
PeraPERA@perawallet/connect
DeflyDEFLY@blockshake/defly-connect
Defly Web (beta)DEFLY_WEB@agoralabs-sh/avm-web-provider
ExodusEXODUS
KibisisKIBISIS@agoralabs-sh/avm-web-provider
LuteLUTElute-connect
WalletConnectWALLETCONNECT@walletconnect/sign-client, @walletconnect/modal
MagicMAGICmagic-sdk, @magic-ext/algorand
Web3AuthWEB3AUTH@web3auth/modal, @web3auth/base, @web3auth/base-provider
W3 WalletW3_WALLET
KMDKMD— (dev only)
MnemonicMNEMONIC— (test only, never MainNet)
CustomCUSTOM— (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)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

nfd

No summary provided by upstream source.

Repository SourceNeeds Review
Web3

crypto-report

No summary provided by upstream source.

Repository SourceNeeds Review
760-aahl
Web3

agentwallet

No summary provided by upstream source.

Repository SourceNeeds Review
Web3

valtio-define

No summary provided by upstream source.

Repository SourceNeeds Review
434-hairyf