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-algorand

v0.1.4

Published

x500 Algorand CLI — insured API calls and x402 USDC payments on Algorand testnet

Readme

x500-algorand

npm version license

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

Wraps x500-agent-sdk for quick testing, scripting, and CI. Merchant and insurance amounts are microUSDC (testnet ASA 10458941). Agents also need ALGO for transaction fees.

V1 scope: --network testnet only.

| Live | URL | |------|-----| | Dashboard | dashboard-production-915f.up.railway.app/endpoints | | Chat demo | chat-production-acf6.up.railway.app |


Install

npm install -g x500-algorand

Or run without installing:

npx x500-algorand --network testnet balance

Requires Node.js 18+.


Setup

Export your Algorand testnet agent credentials (any funded testnet account with USDC ASA 10458941 opted in):

export X500_AGENT_ADDRESS=YOUR_ALGORAND_ADDRESS
export ALGORAND_AGENT_MNEMONIC="25 word recovery phrase ..."

Optional — override default Railway 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=https://facilitator.goplausible.xyz
export X500_POOL_APP_ID=769443375
export X500_DEPLOYMENTS_PATH=./config/deployments.algorand.testnet.json

Check wallet USDC balance:

x500-algorand --network testnet balance

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

x500-algorand --network testnet approve

Deposits 3 USDC (3,000,000 microUSDC) by default. Requires a grouped ASA transfer + app call; wallet must be opted into USDC ASA 10458941.


Commands

Insured fetch (default)

Pass a URL as the first argument. Prints HTTP status and response body preview.

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

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

Inspect x-x500-* response headers via the SDK or indexer calls show after the call.

balance

Wallet USDC balance for X500_AGENT_ADDRESS (microUSDC).

x500-algorand --network testnet balance
{
  "address": "LGRB…",
  "network": "algorand:testnet",
  "asset": "algo",
  "balanceMicroAlgos": "10165000"
}

balanceMicroAlgos is the USDC balance in microUSDC from the indexer ASA read (legacy field name in CLI output).

approve / setup

Deposit USDC escrow for insurance premiums (X500Pool.deposit_escrow).

x500-algorand --network testnet approve
{
  "transactionId": "ABC123…",
  "loraUrl": "https://lora.algokit.io/testnet/transaction/ABC123…"
}

pay

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

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

calls show <callId>

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

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

agents show [address]

Agent stats and escrow info. Defaults to your X500_AGENT_ADDRESS.

x500-algorand --network testnet agents show
x500-algorand --network testnet agents show YOUR_ALGORAND_ADDRESS

Environment variables

| Variable | Required | Description | |----------|----------|-------------| | X500_AGENT_ADDRESS | Yes | Algorand address (base32) | | ALGORAND_AGENT_MNEMONIC | Yes | 25-word recovery phrase | | 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 (GoPlausible) | | X500_DEPLOYMENTS_PATH | No | Path to deployments.algorand.testnet.json | | X500_POOL_APP_ID | No | Pool app id for escrow (default 769443375) | | ALGORAND_ALGOD_URL | No | Algod for on-chain writes (default public testnet) |

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


Typical workflow

# 1. Credentials
export X500_AGENT_ADDRESS=…
export ALGORAND_AGENT_MNEMONIC="…"

# 2. Check USDC balance
x500-algorand --network testnet balance

# 3. Deposit insurance escrow (USDC)
x500-algorand --network testnet approve

# 4. Call a registered merchant API
x500-algorand --network testnet https://your-origin.example/paid/weather?city=London

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

Merchants must register their public origin URL in the x500 dashboard (Pera / Defly) or indexer DB before insured calls succeed.

SLA breach test (local)

pnpm example:server:slow   # 20s delay after x402 settle, SLA 15s in DB
x500-algorand --network testnet http://127.0.0.1:8801/paid/weather?city=London

Expect latency_breach and refund 15_000 microUSDC (0.015 USDC). Example refund tx: PG7Y5X….


Programmatic use

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

npm install x500-agent-sdk

Links


License

MIT