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

digirails

v0.1.0

Published

DigiRails SDK — Payment infrastructure for autonomous AI agents on DigiByte L1

Readme

digirails

Node.js/TypeScript SDK for the DR-Pay protocol — permissionless AI agent payments on DigiByte.

What is this?

DigiRails enables autonomous AI agents to discover, negotiate with, and pay each other using DigiByte's Layer 1 blockchain. This SDK implements the DR-Pay protocol: the 4-message payment flow, agent identity, service manifests, and on-chain data encoding.

Every payment settles on-chain as a standard DigiByte transaction. No sidechains, no Layer 2, no API keys.

Install

npm install digirails

Quick Start

Buyer — purchase a service in one call

import { Agent, REGTEST } from 'digirails';

const buyer = Agent.generate({
  network: REGTEST,
  rpcUrl: 'http://127.0.0.1:18443',
  rpcUsername: 'digirails',
  rpcPassword: 'digirails',
});

const result = await buyer.requestService({
  sellerUrl: 'http://127.0.0.1:9001',
  serviceId: 'echo',
  serviceParams: { message: 'Hello from DigiRails!' },
  maxAmount: '0.01',
});
console.log(result.result);

await buyer.close();

Seller — offer a service

import { Agent, ServiceCategory, REGTEST } from 'digirails';

const seller = Agent.generate({
  network: REGTEST,
  rpcUrl: 'http://127.0.0.1:18443',
  rpcUsername: 'digirails',
  rpcPassword: 'digirails',
});

seller.registerService({
  serviceId: 'echo',
  handler: async (params) => ({ echo: params?.message ?? '' }),
  price: '0.001',
  category: ServiceCategory.GENERAL_COMPUTE,
});

await seller.serve('0.0.0.0', 9001);

What happens under the hood

Buyer                                Seller
  |                                    |
  |  GET /.well-known/digirails.json   |
  |----------------------------------->|  1. Discover manifest
  |<-----------------------------------|
  |                                    |
  |  POST /drpay/request               |
  |----------------------------------->|  2. SERVICE_REQUEST
  |<-----------------------------------|  3. PAYMENT_INVOICE
  |                                    |
  |  [build, sign, broadcast tx]       |
  |                                    |
  |  POST /drpay/broadcast             |
  |----------------------------------->|  4. PAYMENT_BROADCAST
  |                                    |  5. Verify payment
  |                                    |  6. Execute service
  |<-----------------------------------|  7. SERVICE_DELIVERY

Features

  • Light mode: No DigiByte node required. Connects to rpc.digirails.org or any RPC endpoint.
  • Async-native: Built on native fetch and async/await.
  • Type-safe: Zod-validated protocol messages with full TypeScript types.
  • 3 dependencies: @noble/curves, @noble/hashes, zod. Zero native modules.
  • SegWit transactions: BIP-143 signing for P2WPKH inputs.
  • Encrypted keystore: AES-256-GCM encrypted key files.
  • All 18 service categories from the DR-Pay spec.

Protocol Version

Implements DR-Pay specification v0.3.0.

License

MIT