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

@actioncodes/wallet-adapter

v1.0.4

Published

Action Codes wallet adapter for Solana Wallet Adapter

Readme

Action Codes Wallet Adapter

A Solana Wallet Adapter plugin that lets users connect and sign using Action Codes — short, one-time codes generated by a mobile wallet for remote signing.

Install

npm install @actioncodes/wallet-adapter @solana/wallet-adapter-base @solana/web3.js

Quick Start

import { ActionCodesWalletAdapter } from '@actioncodes/wallet-adapter';
import { clusterApiUrl } from '@solana/web3.js';

const wallets = [
  new ActionCodesWalletAdapter({
    authToken: 'YOUR_AUTH_TOKEN',
    connection: clusterApiUrl('devnet'),
    environment: 'devnet',
  }),
];

Pass the wallets array to <WalletProvider> from @solana/wallet-adapter-react — "Action Codes" will appear alongside other wallets in the selection UI.

Configuration

| Option | Type | Default | Description | |---|---|---|---| | authToken | string | required | Bearer token for the Action Codes relay API | | connection | Connection \| string | required | Solana RPC connection or endpoint URL | | environment | 'mainnet' \| 'devnet' \| 'local' | 'mainnet' | Which Action Codes relay to use | | relayerUrl | string | — | Custom relay URL (overrides environment) | | theme | 'auto' \| 'light' \| 'dark' | 'auto' | Modal theme (auto follows system preference) | | debug | boolean | false | Log adapter events to the console |

How It Works

  1. User selects Action Codes in the wallet picker
  2. A modal opens — user enters the code displayed on their wallet
  3. The adapter resolves the code to the user's public key (connect)
  4. When the dApp calls signMessage, signTransaction, or sendTransaction:
    • The payload is attached to the code via the relay
    • The modal shows "Approve in wallet…"
    • The wallet holder approves on their device
    • The signed result is returned to the dApp
  5. Action codes are one-time-use — the adapter auto-disconnects after each signing operation

Supported Operations

  • signMessage(msg) — sign an arbitrary message (message must be valid UTF-8)
  • signTransaction(tx) — sign and return a transaction (legacy or versioned)
  • sendTransaction(tx, connection) — sign, execute on-chain, and return the tx hash

Note: Action codes are one-time-use. signAllTransactions is not supported — calling it with multiple transactions will succeed on the first and throw WalletNotConnectedError on subsequent ones, because the code is consumed after the first signature.

Environment Mapping

| environment | Relay URL | Use with | |---|---|---| | 'mainnet' | https://relay.actioncodes.org | Mainnet-beta | | 'devnet' | https://dev.relay.actioncodes.org | Devnet / Testnet | | 'local' | http://localhost:4000 | Local development |

Examples

Development

npm install
npm run build       # ESM + CJS + .d.ts via tsup
npm run typecheck   # tsc --noEmit
npm run dev         # watch mode

Testing

Tests use Vitest with happy-dom for DOM emulation.

npm test            # run once
npm run test:watch  # watch mode

The modal component has 45 tests covering:

  • Creation, destruction, and DOM lifecycle
  • Code input validation (length, character set)
  • Event dispatching (submit, cancel, keyboard shortcuts)
  • Help tooltip toggle
  • State transitions (input, resolving, approve, success, error)
  • Reset behavior
  • Error display and clearing
  • Theme attribute reflection

License

Apache-2.0