agentsclimarketplace

Use wallet

Skill TxnLab/skills/skills/use-wallet

Curated agent skills for TxnLab's Algorand ecosystem — NFDomains, use-wallet, Haystack Router

Install
npx -y skills add TxnLab/skills --skill use-wallet

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 6 stars6 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

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.

SKILL.md

6.2 KB, as published. Nobody here has run it

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

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.