# Use Wallet

> >-

- **Type:** Skill
- **Install:** `agentstack add skill-txnlab-skills-use-wallet`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [TxnLab](https://agentstack.voostack.com/s/txnlab)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [TxnLab](https://github.com/TxnLab)
- **Source:** https://github.com/TxnLab/skills/tree/main/skills/use-wallet

## Install

```sh
agentstack add skill-txnlab-skills-use-wallet
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# @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](references/getting-started.md) — Installation, WalletManager config, supported wallets table, webpack fallbacks

### Framework-Specific Integration

- **Vanilla JS/TS (no framework)**: [references/vanilla.md](references/vanilla.md) — WalletManager direct usage, BaseWallet subscribe, no provider wrapper
- **React**: [references/react.md](references/react.md) — WalletProvider, useWallet, useNetwork hooks
- **Vue**: [references/vue.md](references/vue.md) — WalletManagerPlugin, useWallet/useNetwork composables
- **SolidJS**: [references/solid.md](references/solid.md) — WalletProvider, useWallet/useNetwork primitives (signals)
- **Svelte**: [references/svelte.md](references/svelte.md) — useWalletContext, useWallet/useNetwork primitives (.current)

### Features & Guides

- **Signing transactions**: [references/signing-transactions.md](references/signing-transactions.md) — signTransactions, transactionSigner with ATC, AlgoKit Utils
- **Signing data (ARC-60/SIWA)**: [references/signing-data.md](references/signing-data.md) — Sign In With Algorand, Lute wallet, verification
- **Network switching & custom networks**: [references/network-configuration.md](references/network-configuration.md) — NetworkConfigBuilder, custom AVM networks (Voi), runtime node config, useNetwork
- **Pre-built UI components**: [references/wallet-ui.md](references/wallet-ui.md) — @txnlab/use-wallet-ui-react: WalletButton, menus, theming, Tailwind setup
- **Testing**: [references/testing.md](references/testing.md) — Mnemonic wallet provider for dev/testing/E2E
- **Custom wallet provider**: [references/custom-provider.md](references/custom-provider.md) — Implementing CustomProvider interface

### Reference

- **Full API reference**: [references/api-reference.md](references/api-reference.md) — WalletManager, useWallet, useNetwork, enums, types
- **Migration from v3**: [references/migration-v3.md](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)

```tsx
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 (
    
      
    
  )
}
```

### Accessing Wallet State

```tsx
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 & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [TxnLab](https://github.com/TxnLab)
- **Source:** [TxnLab/skills](https://github.com/TxnLab/skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-txnlab-skills-use-wallet
- Seller: https://agentstack.voostack.com/s/txnlab
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
