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

v0.4.12

Published

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

Readme

t-0 Network Provider Starter

CLI tool to quickly bootstrap a Node.js TypeScript integration service for the t-0 Network.

Overview

This CLI tool scaffolds a complete TypeScript project configured to integrate with the t-0 Network as a provider. It automatically generates secp256k1 cryptographic key pairs, sets up your development environment, and includes all necessary dependencies to get started immediately.

Prerequisites

Before using this tool, ensure you have:

  • Node.js >= 14.0.0
  • npm >= 6.0.0
  • OpenSSL (for cryptographic key generation)

Quick Start

Using npx (Recommended)

Run the following command to create a new t-0 Network integration:

npx @t-0/provider-starter-ts

Alternative: Global Installation

npm install -g @t-0/provider-starter-ts
provider-starter-ts

What It Does

When you run the CLI tool, it performs the following steps automatically:

  1. Interactive Prompt - Asks for your project name
  2. Project Directory - Creates a new directory with your project name
  3. Template Setup - Copies pre-configured TypeScript project structure
  4. Key Generation - Generates a secp256k1 cryptographic key pair using OpenSSL
  5. Environment Configuration - Creates .env file with:
    • Generated private key (PROVIDER_PRIVATE_KEY)
    • Generated public key (as comment for reference)
    • t-0 Network public key (NETWORK_PUBLIC_KEY)
    • Server configuration (PORT, NODE_ENV)
    • Optional quote publishing interval
  6. Git Initialization - Initializes git repository with .gitignore
  7. Dependency Installation - Runs npm install to install all dependencies

Generated Project Structure

After running the CLI, your new project will have the following structure:

your-project-name/
├── src/
│   ├── index.ts              # Main 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
├── .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

Environment Variables

The generated .env file includes:

| Variable | Description | |----------|-------------| | NETWORK_PUBLIC_KEY | t-0 Network's public key (pre-configured) | | PROVIDER_PRIVATE_KEY | Your generated private key (keep secret!) | | PORT | Server port (default: 3000) | | NODE_ENV | Environment mode (default: development) | | TZERO_ENDPOINT | t-0 Network API endpoint (default: sandbox) | | QUOTE_PUBLISHING_INTERVAL | Quote publishing frequency in ms (optional) |

Available Scripts

In your generated project, you can run:

npm run dev

Runs the service in development mode using ts-node.

npm run build

Compiles TypeScript to JavaScript in the dist/ directory.

npm start

Runs the compiled production build from dist/.

npm run lint

Lints TypeScript files in the src/ directory using ESLint.

Getting Started with Your Integration

After creating your project:

  1. Navigate to project directory:

    cd your-project-name
  2. Review the generated keys:

    • Open .env file
    • Your private key is stored in PROVIDER_PRIVATE_KEY
    • Your public key is shown as a comment (you'll need to share this)
  3. Share your public key with t-0 team:

    • Find your public key in the .env file (marked as "Step 1.2")
    • Contact the t-0 team to register your provider
  4. Implement quote publishing:

    • Edit src/publish_quotes.ts to implement your quote publishing logic
    • This determines how you provide exchange rate quotes to the network
  5. Start development server:

    npm run dev
  6. Test your integration:

    • Follow the TODO comments in src/index.ts for step-by-step guidance
    • Test quote retrieval
    • Test payment submission
    • Verify payout endpoint

Key Features

  • Type Safety - Full TypeScript support with strict mode enabled
  • Automatic Key Generation - Secure secp256k1 key pairs generated via OpenSSL
  • Pre-configured SDK - t-0 Provider SDK integrated and ready to use
  • Development Ready - Hot reload support with ts-node
  • Production Ready - Optimized build configuration
  • Security First - .env automatically excluded from git
  • Code Quality - ESLint configured with TypeScript rules

Security Considerations

  • Never commit .env file - It's automatically added to .gitignore
  • Keep private key secure - The PROVIDER_PRIVATE_KEY must remain confidential
  • Share only public key - Only the public key should be shared with t-0 team
  • Use environment-specific configs - Different keys for dev/staging/production

Deployment

When ready to deploy:

  1. Build your project:

    npm run build
  2. Set environment variables on your hosting platform

  3. Provide your base URL to t-0 team for network registration

  4. Start the service:

    npm start

Troubleshooting

"Directory already exists" Error

The project directory name is already taken. Choose a different project name.

"OpenSSL not found" Error

Install OpenSSL:

  • macOS: brew install openssl
  • Ubuntu/Debian: sudo apt-get install openssl
  • Windows: Download from openssl.org

Key Generation Fails

Ensure OpenSSL is installed and accessible in your PATH. Try running:

openssl version

npm install Fails

Check your Node.js and npm versions:

node --version  # Should be >= 14
npm --version   # Should be >= 6

Support

For issues or questions:

  • Review the generated code comments and TODO markers
  • Check the t-0 Network documentation
  • Contact the t-0 team for integration support