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

@atticplaygroup/pua

v0.1.1

Published

Paid User Agent Library to control spending and choose parties in PAID services automatically

Readme

PUA - Paid User Agent

This is a library acting as a Block Broker in Helia. You may use it with Helia's Verified Fetch to get blocks from Pkv with these benefits:

  • Automatic exchange selection based on their reputation
  • Automatic service provider selection based on their prices and reputation
  • Automatic payment to those services

[!CAUTION] The library is in active development. It does not guarantee a smart spending now. You may unexpectedly spend a lot if you use mainnet tokens. We will improve its spending on the way.

Usage

Initialize it with mnemonics, which should already have money in it. If not, please deposit from mainnet or get from faucet, with some tools beyond the scope of this library, for example a Sui wallet.

Storing mnemonics in browser can be dangerous but is acceptable for our usage. See a discussion on this topic here.

import { pkvBlockBroker, PaymentEnvironment } from '@atticplaygroup/pua';

const pkvBlockBrokerInstance = pkvBlockBroker({
  paymentEnvironment: PaymentEnvironment.DEVNET,
  mnemonics:
    'wild shiver source slam trouble talent fantasy depart sleep burger fit trumpet',
});

Then create use Helia's verified fetch to fetch an IPFS file.

import type { VerifiedFetch } from '@helia/verified-fetch';
import { createVerifiedFetch } from '@helia/verified-fetch';
import { createHeliaHTTP } from '@helia/http';
import { delegatedHTTPRouting } from '@helia/routers';

async function initVerifiedFetch(): Promise<VerifiedFetch> {
  // Delegated routing provider URL.
  // It can be a public one run by 3rd parties like https://delegated-ipfs.dev
  // It does not need to be the same as the storage provider.
  // Helia will find a storage provider itself.
  const PKV_URL = 'http://localhost:3000';
  const helia = await createHeliaHTTP({
    routers: [
      delegatedHTTPRouting(PKV_URL, {
        timeout: 1_000_000,
      }),
    ],
    blockBrokers: [pkvBlockBrokerInstance],
  });
  return await createVerifiedFetch(helia);
}

async function main() {
  const vFetch = await initVerifiedFetch();
  const response = await vFetch(
    'ipfs://bafkreiepisknsjkso33wxxta5i7voiyzulfrghh2uryxyd5ptin7v5rbva',
  );
  const blob = await response.blob();
  console.log(blob.bytes());
}

Tests

Currently tests require a setup written in bash script. Later we will write an e2e test purely in typescript.

First prepare binaries in the bin/ folder.

bin
├── buf
├── gateway
├── pkv
├── prex
├── sql-migrate
└── sui

Get gateway, pkv from cmd/gateway/gateway.go and cmd/pkv/pkv.go from the Pkv project, and prex from main.go of the Prex project.

Get buf by go install github.com/bufbuild/buf/cmd/buf@latest. And sql-migrate from https://github.com/rubenv/sql-migrate.

You don't need a local sui binary if you want to use devnet.

Then run the tests:

cd scripts
bash run-tests.sh