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

@lumiapassport/uo-debug

v0.3.0

Published

ERC-4337 user operation debugger for Lumia Passport with CLI and library exports.

Readme

@lumiapassport/uo-debug

Lightweight debugger for Lumia Beam ERC-4337 user operations. Ship with a terminal CLI (with colorful tracing) and library exports so other tools or UIs can reuse the same logic.

Installation

npm install @lumiapassport/uo-debug

You can run the CLI bundled with the package:

npx @lumiapassport/uo-debug --tx 0x...

Or install it globally to expose uo-debug system-wide:

npm install -g @lumiapassport/uo-debug
uo-debug --uo <userOpHash>

CLI Usage

Environment variables mirror the legacy debugWallet.js script but now require the UO_DEBUG_ prefix (legacy names still work for backward compatibility):

| Variable | Purpose | Default | | --- | --- | --- | | UO_DEBUG_RPC_URL (legacy RPC_URL) | Lumia Beam RPC endpoint | https://beam-rpc.lumia.org | | UO_DEBUG_TRACE_TIMEOUT (legacy DEBUG_TRACE_TIMEOUT) | debug_traceTransaction timeout string | 20s | | UO_DEBUG_NATIVE_TOKEN_SYMBOL (legacy NATIVE_TOKEN_SYMBOL) | Display label for the native token | LUMIA | | UO_DEBUG_NATIVE_TOKEN_SUBUNIT (legacy NATIVE_TOKEN_SUBUNIT) | Subunit label for value summaries | attoLUMIA | | UO_DEBUG_EXPLORER_TX_BASE_URL (legacy EXPLORER_TX_BASE_URL) | Prefix for explorer hyperlinks in failure summaries | https://beam-explorer.lumia.org/tx/ | | UO_DEBUG_ALIAS_FILE (legacy ALIAS_FILE) | Path to aliases.json when not using the bundled file | aliases.json | | UO_DEBUG_SIGNATURES_FILE (legacy SIGNATURES_FILE) | Path to signatures.json when not using the bundled file | signatures.json | | UO_DEBUG_DISABLE_4BYTE_LOOKUP (legacy DISABLE_4BYTE_LOOKUP) | Disable online 4byte.xyz selector lookups | false |

uo-debug --tx <txHash>
uo-debug --uo <userOpHash> --rpc https://beam-rpc.lumia.org

Use --timeout to override the trace timeout and --rpc to specify another endpoint.

Library Usage

Import the entry point in your Node (or bundler) project to reuse the debugging logic programmatically:

import { runDebug, traceTransaction } from "@lumiapassport/uo-debug";

await runDebug({ txHash: "...", rpc: process.env.RPC_URL });

runDebug returns when tracing finishes and reuses the same alias/signature files shipped in the package root. If you need to resolve selectors without running the CLI, import traceTransaction or inspectUserOperation directly.

Sharing Configuration

aliases.json and signatures.json live next to the CLI and are included in the package. Drop in custom files by setting UO_DEBUG_ALIAS_FILE / UO_DEBUG_SIGNATURES_FILE (absolute paths or relative to your working directory); the legacy ALIASES_FILE / SIGNATURES_FILE environment names still work.

Set UO_DEBUG_DISABLE_4BYTE_LOOKUP=true (or DISABLE_4BYTE_LOOKUP=true) to skip live 4byte.xyz selector resolution when offline.

Browser or UI Integration

Because the same renderer is used for both CLI and library consumers, you can capture the terminal output (ANSI colors from picocolors) and pipe it into browser-friendly widgets that respect ANSI escape sequences. For richer integrations, re-use the exported helpers (inspectUserOperation, traceTransaction, selector resolvers, etc.) to build structured JSON and render your own markup.

React integration pattern

Run the debugger inside a trusted Node/Edge handler and expose an API to your React app:

// server/debug.js
import express from "express";
import { runDebug } from "@lumiapassport/uo-debug";

const app = express();

app.get("/api/uo-debug", async (req, res) => {
  try {
    await runDebug({ uoHash: req.query.uo, rpc: process.env.RPC_URL });
    res.send("Trace completed"); // or capture structured data instead of relying on console
  } catch (err) {
    res.status(500).send(err.message);
  }
});

The React client can then fetch the endpoint and render the returned ANSI-friendly text inside <pre> (use ansi-to-react, ansi-html, etc. to keep the colors). For richer views, alter runDebug / traceTransaction to return the annotated call tree and gas summaries, and render them directly as JSON-driven components.

Keep the RPC settings in .env (or pass custom values to runDebug) so the server controls provider access while the browser only renders prepared output.

Running Locally

Use npm run debug -- --tx <txHash> from the workspace root (after installing dependencies) to mimic the CLI shipped inside the package.