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

@broccolo1d/wallet-browser

v0.2.9

Published

Core browser-wallet runtime, guardrails, CLI, and artifact helpers for dapp QA.

Readme

@broccolo1d/wallet-browser

Core browser-wallet runtime helpers for dapp QA.

This lower-level package owns Chromium/MetaMask launch configuration, prompt guardrails, network/account assertions, local smoke artifacts, proof verification, and the wallet-browser CLI. Most app test suites should consume @broccolo1d/playwright; use this package directly for custom runners, package integrations, and low-level wallet runtime work.

Install

pnpm add -D @broccolo1d/[email protected] playwright

ESM-only. Node.js >=22 <23.

CLI

After install, the package exposes a wallet-browser binary:

pnpm exec wallet-browser --help
pnpm exec wallet-browser doctor
pnpm exec wallet-browser prepare
pnpm exec wallet-browser verify-smoke-artifacts .wallet-artifacts/metamask-smoke/<run-id>

From this repository root, convenience scripts build the package first and resolve default .wallet-* paths consistently:

pnpm wallet:cli --help
pnpm wallet:doctor
pnpm wallet:metamask:fetch --dry-run
pnpm wallet:metamask:fetch
pnpm wallet:prepare
pnpm wallet:smoke:metamask
pnpm wallet:smoke:fixture-extension
pnpm wallet:smoke:verify

Commands:

wallet-browser prepare
wallet-browser doctor
wallet-browser smoke-metamask
wallet-browser smoke-fixture-extension
wallet-browser verify-smoke-artifacts [artifact-dir]
wallet-browser verify-fixture-proof <artifact-dir>
wallet-browser onboarding-plan
wallet-browser profile-bootstrap-import --dry-run
wallet-browser network-plan

doctor prints setup diagnostics for Node 22, Playwright/Chromium resolution, the configured MetaMask extension path/manifest, .env key presence, wallet profile usability, and .gitignore protection for local wallet directories. It exits non-zero for actionable setup errors and never prints .env values, private keys, wallet passwords, or RPC tokens.

prepare, onboarding-plan, network-plan, and dry-run commands print redacted plans. The raw local output can still contain machine-specific paths; redact before sharing. smoke-metamask launches Chromium and captures local-only screenshots, but it does not import, unlock, connect, sign, or transact.

API sketch

import {
  assertExpectedChainAndAccount,
  launchWalletBrowser,
  type MetaMaskNetworkDriver,
  resolveSepoliaNetworkConfig,
  resolveWalletBrowserConfig,
  verifySmokeArtifactManifest
} from '@broccolo1d/wallet-browser';

const expectedAccount = process.env.SEPOLIA_WALLET_ADDRESS;
if (!expectedAccount) throw new Error('SEPOLIA_WALLET_ADDRESS is required for wallet QA');

const config = resolveWalletBrowserConfig();
const { context } = await launchWalletBrowser({ config });

const network: MetaMaskNetworkDriver = {
  async getChainId() { return 11155111; },
  async getAccounts() { return [expectedAccount]; },
  async switchChain() {},
  async addEthereumChain() {}
};

try {
  const sepolia = resolveSepoliaNetworkConfig({ expectedAccount });
  await assertExpectedChainAndAccount(sepolia, network);
} finally {
  await context.close();
}

verifySmokeArtifactManifest('.wallet-artifacts/metamask-smoke/<run-id>');

Configuration

Prefer explicit options in code. Environment-backed local runs should use ignored .env files. Before launching a browser, run:

npx wallet-browser doctor
# or inside this repo:
pnpm wallet:doctor

The doctor report lists configured key names and setup status only; it does not print secret values. Fix any error checks before running prepare or smoke commands.

Relevant keys include:

  • METAMASK_EXTENSION_PATH or METAMASK_EXTENSION_DIR
  • METAMASK_EXTENSION_VERSION
  • WALLET_PROFILE_DIR
  • WALLET_PROFILE_NAME
  • PRESERVE_WALLET_PROFILE
  • SEPOLIA_WALLET_ADDRESS
  • SEPOLIA_RPC_URL
  • SEPOLIA_CHAIN_ID
  • METAMASK_PASSWORD

Never commit .env, wallet profiles, extension bundles, traces, screenshots, videos, reports, or local proof artifacts.

Smoke and artifact verification

# Real browser smoke: local burner/testnet config only.
xvfb-run -a pnpm exec wallet-browser smoke-metamask

# Verify the newest smoke artifact directory.
pnpm exec wallet-browser verify-smoke-artifacts

# Verify one explicit run.
pnpm exec wallet-browser verify-smoke-artifacts .wallet-artifacts/metamask-smoke/<run-id>

verify-smoke-artifacts checks manifest shape and attachment hash/size metadata. If no directory is supplied, it verifies the newest run under .wallet-artifacts/metamask-smoke/ or .wallet-artifacts/fixture-extension-smoke/.

Safety notes

  • Burner/testnet wallets only.
  • Real wallet launch requires explicit configuration.
  • Prompt approval requires explicit prompt-driver support and guardrail policy.
  • Unknown prompts, signatures, and transactions fail closed unless intentionally supported by the caller.
  • Transaction value caps default to zero wei.
  • Plans and public manifests must not expose private keys, seed phrases, wallet passwords, RPC credentials, local paths, or full wallet addresses.
  • Raw screenshots, traces, videos, profiles, and extension bundles remain local unless reviewed and verified.