For the complete documentation index, see llms.txt. This page is also available as Markdown.

πŸ› οΈGet Started

A quick guide to set up use-wallet in your project

Prerequisites

  • Node.js v18+ (v20 recommended) or Bun

  • NPM, PNPM, Yarn or Bun

  • algosdk (v2.7.0+)

  • Environment with support for dynamic imports (e.g., modern build tools like Vite, Next.js, or Webpack 5+)

Install dependencies

Algorand JS SDK

The algosdk package must be installed in your project as a peer dependency. Use your preferred package manager to install it.

npm install algosdk

Next, install one of the framework adapters or the standalone core library:

React

Vue

Solid.js

Core Library

Wallet-specific dependencies

Some wallets require additional packages to be installed. The following table lists wallet providers and their corresponding packages.

Wallet Provider
Package(s)

Defly Wallet

@blockshake/defly-connect

Pera Wallet

@perawallet/connect

WalletConnect

@walletconnect/sign-client, @walletconnect/modal

Lute Wallet

lute-connect

Magic

magic-sdk, @magic-ext/algorand

Kibisis

@agoralabs-sh/avm-web-provider

Liquid Auth

@algorandfoundation/liquid-auth-use-wallet-client

Webpack config for Next.js

When using @txnlab/use-wallet-react in a Next.js application, you may encounter "module not found" errors for optional dependencies of wallets you choose not to support. To resolve this, you can use the webpackFallback export (added in v3.10.0)

This configuration allows your Next.js app to build and run without these packages installed, enabling you to include only the wallet packages you need. The webpackFallback object is maintained within the @txnlab/use-wallet library and will be automatically updated when new optional dependencies are added.

Last updated