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

x500

v0.1.5

Published

x500 CLI — insured API calls and x402 Exact HBAR payments on Hedera testnet

Downloads

770

Readme

x500

npm version license

Command-line tool for x500 — insured API calls and x402 Exact HBAR payments on Hedera testnet.

Wraps x500-sdk for quick testing, scripting, and CI. All amounts are HBAR tinybars (asset: 0.0.0). USDC / HTS is not supported in V1.

V1 scope: --network testnet only.


Install

npm install -g x500

Or run without installing:

npx x500 --network testnet balance

Requires Node.js 18+.


Setup

Export your Hedera testnet agent credentials:

export X500_AGENT_ACCOUNT_ID=0.0.1234567
export HEDERA_AGENT_PRIVATE_KEY=0xabc123...

Optional — override default Cloud Run service URLs for local dev:

export MARKET_PROXY_URL=http://127.0.0.1:8788
export INDEXER_URL=http://127.0.0.1:8787
export FACILITATOR_URL=http://127.0.0.1:8790

Check wallet balance:

x500 --network testnet balance

Fund insurance escrow (one-time depositEscrow on X500Pool):

x500 --network testnet approve

Deposits 0.1 HBAR (10,000,000 tinybars) by default. HBAR needs no HTS token association.


Commands

Insured fetch (default)

Pass a URL as the first argument. Output is JSON.

# Merchant origin URL — slug resolved via indexer
x500 --network testnet https://your-merchant.example/paid/weather?city=Tokyo

# Explicit proxy path
x500 --network testnet /v1/my-slug/paid/weather?city=Tokyo

Example response:

{
  "status": 200,
  "callId": "…",
  "premiumTinybars": "1000000",
  "refundTinybars": "0",
  "outcome": "ok",
  "asset": "0.0.0",
  "body": { … }
}

balance

Wallet HBAR balance for X500_AGENT_ACCOUNT_ID.

x500 --network testnet balance
{
  "accountId": "0.0.1234567",
  "network": "hedera:testnet",
  "asset": "0.0.0",
  "tinybars": "500000000",
  "hbar": "5.00000000"
}

approve

Deposit escrow for insurance premiums (X500Pool.depositEscrow).

x500 --network testnet approve
{
  "ok": true,
  "note": "HBAR needs no token association; deposited escrow via depositEscrow",
  "transactionId": "0.0.1234567@…"
}

pay

x402-only payment — no insurance wrap. Useful for testing merchant x402 routes directly.

x500 --network testnet pay https://merchant.example/paid/quote

calls show <callId>

Fetch call detail from the indexer (settlement tx, outcome, premiums).

x500 --network testnet calls show 01234567-89ab-cdef-0123-456789abcdef

agents show [accountId]

Agent stats and escrow info. Defaults to your X500_AGENT_ACCOUNT_ID.

x500 --network testnet agents show
x500 --network testnet agents show 0.0.1234567

Environment variables

| Variable | Required | Description | |----------|----------|-------------| | X500_AGENT_ACCOUNT_ID | Yes | Hedera account 0.0.x | | HEDERA_AGENT_PRIVATE_KEY | Yes | ECDSA hex private key | | MARKET_PROXY_URL | No | Insured gateway base URL | | PROXY_URL | No | Alias for MARKET_PROXY_URL | | INDEXER_URL | No | Indexer REST API base URL | | FACILITATOR_URL | No | x402 facilitator URL | | X500_DEPLOYMENTS_PATH | No | Path to deployments.testnet.json | | X500_POOL_CONTRACT_ID | No | Pool contract for escrow (default 0.0.9585433) |

When unset, URLs default to the live x500 testnet Cloud Run stack.


Typical workflow

# 1. Credentials
export X500_AGENT_ACCOUNT_ID=0.0.x
export HEDERA_AGENT_PRIVATE_KEY=0x...

# 2. Check funds
x500 --network testnet balance

# 3. Deposit insurance escrow
x500 --network testnet approve

# 4. Call a registered merchant API
x500 --network testnet https://your-ngrok-url.ngrok-free.app/paid/weather?city=London

# 5. Inspect settlement
x500 --network testnet calls show <callId-from-response>

Merchants must register their public origin URL in the x500 dashboard before insured calls succeed.


Programmatic use

For agents, LangChain tools, and production integrations, use x500-sdk instead:

npm install x500-sdk

Links


License

MIT