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

@t-0/provider-starter-ts

v1.1.8

Published

CLI tool to scaffold a Node.js t-0 Network integration service

Readme

T-0 Provider Starter -- TypeScript

CLI tool to scaffold a Node.js TypeScript provider project for the T-0 Network.

Quick Start

npx @t-0/provider-starter-ts

The CLI will prompt for a project name, then create a ready-to-run project with a secp256k1 keypair (via OpenSSL), environment config, provider service stubs, and a Dockerfile.

Generated Project Structure

your-project-name/
├── src/
│   ├── index.ts              # Entry point
│   ├── service.ts            # Provider service implementation
│   ├── publish_quotes.ts     # Quote publishing logic
│   ├── get_quote.ts          # Quote retrieval logic
│   ├── submit_payment.ts     # Payment submission logic
│   └── lib.ts                # Utility functions
├── Dockerfile                # Docker configuration
├── .env                      # Environment variables (with generated keys)
├── .env.example              # Example environment file
├── .eslintrc.json            # ESLint configuration
├── .gitignore                # Git ignore rules
├── package.json              # Project dependencies
└── tsconfig.json             # TypeScript configuration

Key Files to Modify

| File | Purpose | |------|---------| | src/service.ts | Implement your payment processing logic. Look for TODO comments. | | src/publish_quotes.ts | Replace sample quotes with your FX rate source. |

Environment Variables

| Variable | Required | Default | Description | |----------|----------|---------|-------------| | PROVIDER_PRIVATE_KEY | Yes | Auto-generated | Your secp256k1 private key (hex) | | NETWORK_PUBLIC_KEY | Yes | Sandbox key | T-0 Network public key for signature verification | | TZERO_ENDPOINT | No | https://api-sandbox.t-0.network | T-0 Network API endpoint | | PORT | No | 3000 | Server port | | QUOTE_PUBLISHING_INTERVAL | No | -- | Quote publishing frequency in milliseconds |

Getting Started

Phase 1: Quoting

  1. Open .env and find your generated public key (marked as "Step 1.2"). Share it with the T-0 team to register your provider.
  2. Implement your quote publishing logic in src/publish_quotes.ts.
  3. Start the dev server (npm run dev) and verify quotes are published.
  4. Confirm quote retrieval works by checking the output of getQuote in src/index.ts.

Phase 2: Payments

  1. Implement updatePayment handler in src/service.ts.
  2. Deploy your service and share the base URL with the T-0 team.
  3. Implement payOut handler in src/service.ts.
  4. Test payment submission by uncommenting the submitPayment call in src/index.ts.
  5. Coordinate with the T-0 team to test end-to-end payment flows.

Available Commands

npm run dev        # Run in development mode with ts-node
npm run build      # Compile TypeScript to dist/
npm start          # Run compiled production build
npm run lint       # Lint TypeScript source with ESLint

Deployment

docker build -t my-provider .
docker run -p 3000:3000 --env-file .env my-provider

SDK Reference

For direct SDK usage (without the starter), see the TypeScript SDK documentation.

Troubleshooting

"Directory already exists" -- Choose a different project name.

"OpenSSL not found" -- Install OpenSSL (brew install openssl on macOS, sudo apt-get install openssl on Debian/Ubuntu).

Key generation fails -- Ensure OpenSSL is in your PATH: openssl version.

npm install fails -- Check Node.js >= 18 and npm >= 8: node --version && npm --version.