npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@perawallet/use-wallet-pera

v1.0.0

Published

Pera Wallet adapter for @txnlab/use-wallet, maintained by Pera Wallet

Readme

@perawallet/use-wallet-pera

npm version License

The Pera Wallet adapter for use-wallet, maintained by Pera.

It wraps @perawallet/connect, so one adapter covers the Pera mobile app (WalletConnect), Pera Web and the Pera browser extension.

Installation

pnpm add @txnlab/use-wallet @perawallet/use-wallet-pera algosdk

If you use a framework adapter (@txnlab/use-wallet-react, -vue, -solid or -svelte), install it instead of @txnlab/use-wallet.

Requires @txnlab/use-wallet 5.x and algosdk 3.5.2 or later.

Usage

import { WalletManager } from "@txnlab/use-wallet";
import { pera } from "@perawallet/use-wallet-pera";

const manager = new WalletManager({
  wallets: [pera()],
});

pera() accepts every PeraWalletConnect option and passes them through unchanged, plus use-wallet's shared metadata option to change the name or icon shown for the wallet:

pera({
  shouldShowSignTxnToast: false,
  compactMode: true,
  metadata: { name: "Pera Wallet" },
});

The adapter supports MainNet and TestNet, transaction signing (signTransactions and transactionSigner) and ARC-60 data signing (signData).

Migrating from @txnlab/use-wallet-pera

Swap the package and the import. Nothing else changes:

- import { pera } from "@txnlab/use-wallet-pera";
+ import { pera } from "@perawallet/use-wallet-pera";

The wallet id is still "pera", so sessions that use-wallet has already persisted are picked up as they are and users stay connected across the upgrade.

What's different from the TxnLab package:

  • Pera browser extension sessions. Revoking a site from the extension's Connections screen now disconnects the wallet in your app. The old adapter only listened on the WalletConnect connector, which extension sessions don't have.
  • All connect options. Options such as singleAccount, shouldPreferExtension and algod are passed through, not just bridge, shouldShowSignTxnToast, chainId and compactMode.
  • Typed signing errors. A rejected or failed signing request throws use-wallet's SignTxnsError or SignDataError. The code is 4001 when the user cancelled and 4300 otherwise, and the original Pera error type is in error.data.type.
  • A strict response count. If the wallet returns a different number of signed transactions than it was asked for, signTransactions throws instead of returning a misaligned array.
  • Sharing an app with other WalletConnect wallets. From connect 1.7, Pera keeps its WalletConnect session under its own storage key, so it no longer competes with other WalletConnect v1 wallets for the shared one. Pera's session also resumes on page load while another wallet is active.

Error handling

import { SignTxnsError } from "@txnlab/use-wallet";

try {
  await wallet.signTransactions(txns);
} catch (error) {
  if (error instanceof SignTxnsError && error.code === 4001) {
    // the user rejected the request in Pera
  }
}

Contributing

See CONTRIBUTING.md. Report security issues through GitHub private vulnerability reporting on this repository, not in a public issue.

License

MIT. This package began as a fork of TxnLab's @txnlab/use-wallet-pera.