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

@agenttech/tpay-cli

v0.0.5

Published

T402 CLI for agent automation

Readme

@agenttech/tpay-cli

Send USDT payments on Solana via the T402 x402 v2 protocol. Designed for AI agents — all output is structured JSON on stdout, logs go to stderr.

Install

npm install -g @agenttech/tpay-cli

Verify:

tpay version

Setup

The CLI needs a BIP-39 seed phrase to sign transactions. Two setup paths:

Non-interactive (recommended for agents)

WALLET_SEED_PHRASE="your twelve or twenty four word seed phrase here" \
TPAY_PASSPHRASE="encryption-password" \
tpay setup

This encrypts and saves the seed phrase to ~/.config/tpay/.env.

From env file

tpay setup --from-env /path/to/.env

The file must contain WALLET_SEED_PHRASE=....

Skip setup (inline seed phrase)

You can skip tpay setup entirely by passing the seed phrase as an environment variable on every call:

WALLET_SEED_PHRASE="your seed phrase" tpay send --to <address> --amount 10

Setup output

{"status":"success","saved":true}

Commands

tpay send

Send a USDT payment.

tpay send --to <solana-address> --amount <number>

Or pipe JSON via stdin:

echo '{"to":"<solana-address>","amount":"10"}' | tpay send

Success output:

{"status":"success","intent_id":"intent_abc123","tx_hash":"5xY...","explorer_url":"https://..."}

Error output:

{"status":"error","error_type":"payment_error","message":"Payment failed","intent_id":"intent_abc123"}

tpay balance

Check SOL and USDT balances for any address. No wallet keys required.

tpay balance --address <solana-address>

Output:

{"status":"ok","address":"<solana-address>","sol":"1.5","usdt":"100.0"}

tpay intent status

Check the status of a payment intent.

tpay intent status <intent_id>

Or via stdin:

echo '{"intent_id":"intent_abc123"}' | tpay intent status

Output:

{"status":"ok","intent_id":"intent_abc123","payment_status":"BASE_SETTLED","sending_amount":"10","receiving_amount":"10","payer_chain":"solana","created_at":"...","expires_at":"...","tx_hash":"5xY...","explorer_url":"https://..."}

tpay version

tpay version

tpay help

tpay help

Global Flags

| Flag | Description | |---|---| | --verbose | Debug logs to stderr | | --format json\|text | Output format (default: json) |

Environment Variables

| Variable | Required | Description | |---|---|---| | WALLET_SEED_PHRASE | Yes (if no config file) | BIP-39 mnemonic (12–24 words) | | TPAY_PASSPHRASE | No | Decrypts saved config at ~/.config/tpay/.env | | SOLANA_FEE_PAYER | No | Override fee payer address |

If both WALLET_SEED_PHRASE env var and an encrypted config file exist, the env var takes precedence.

Exit Codes

| Code | Type | Meaning | |---|---|---| | 0 | — | Success | | 1 | validation_error | Invalid arguments or input | | 2 | runtime_error | Unexpected runtime failure | | 3 | configuration_error | Missing or invalid config | | 4 | network_error | API or RPC failure | | 5 | payment_error | Payment-specific failure |

All errors output JSON to stdout:

{"status":"error","error_type":"<type>","message":"<description>"}

Supported Chains

| Chain | Network ID | |---|---| | Solana Mainnet | solana | | Solana Devnet | solana-devnet |

Third-party Dependencies

  • @tetherto/wdk-wallet-solana — WDK by Tether, Solana wallet module
  • @solana/web3.js — Solana RPC and transaction construction
  • @solana/keys — Cryptographic signing
  • Commander.js — CLI framework
  • AgentPay T402 API — Payment intent and settlement service

License

Apache-2.0