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

ergo-agent-server

v0.3.2

Published

Local HTTP signing-and-submission daemon for ergo-agent-pay. Closes the TS↔Python (and any-language) gap by exposing the SDK over a small REST surface.

Readme

ergo-agent-server

Local HTTP bridge for ergo-agent-pay. Closes the TS↔Python (and any-language) gap by exposing the SDK over a small REST surface. The Python SDK ships a BridgeClient that talks to it.

The server is intentionally minimal — Node http only, no Express. It listens on 127.0.0.1 by default; exposing it to a network without --api-key is dangerous.

Install

npm install -g ergo-agent-server

Run

ergo-agent-server \
  --address  YOUR_ERGO_ADDRESS \
  --network  testnet \
  --port     3737 \
  --api-key  $(openssl rand -hex 16)

Environment variables (CLI flags take precedence):

| Var | Flag | |---|---| | ERGO_ADDRESS | --address | | ERGO_NETWORK | --network | | ERGO_NODE_URL | --node-url | | ERGO_API_KEY | --api-key | | ERGO_BRIDGE_PORT | --port (default 3737) | | ERGO_BRIDGE_HOST | --host (default 127.0.0.1) | | ERGO_ALLOW_INSECURE_DEV_MODE=1 | --allow-insecure-dev-mode |

Endpoints

All requests / responses are JSON. Errors carry a stable code field mirroring ErgoAgentPayError.code for client-side switching.

| Method | Path | Notes | |---|---|---| | GET | /health | Public; never requires API key. | | GET | /balance | nanoERG returned as string. | | GET | /height | | | GET | /notes/<boxId> | Returns decoded NoteInfo. | | POST | /notes/<boxId>/redeem | { task_output?, receiver_address? } | | POST | /pay | { to, amount, memo? } | | POST | /notes | { recipient, value, reserve_box_id, deadline, task_hash?, ... } | | POST | /reserves | { collateral, script_ergo_tree?, memo? } | | POST | /trackers | { script_ergo_tree } | | POST | /settle | { note_box_ids[], task_outputs?, receiver_address? } | | POST | /task-hash | { text } or { hex }{ task_hash, algorithm, input_bytes } |

When --api-key is set, every endpoint except /health requires the X-API-Key header to match.

Error shape

{
  "error": "human-readable message",
  "code": "BOX_NOT_FOUND",
  "status": 404
}

Status mapping:

| Code | HTTP | |---|---| | INVALID_ADDRESS, INVALID_AMOUNT, INVALID_HASH, INVALID_JSON | 400 | | UNAUTHORISED | 401 | | INSECURE_MAINNET_MODE, POLICY_REJECTED, APPROVAL_DENIED | 403 | | BOX_NOT_FOUND, NOTE_EXPIRED, NOTE_INVALID, NOT_FOUND | 404 | | NO_SIGNER, INSUFFICIENT_FUNDS | 409 | | PAYLOAD_TOO_LARGE | 413 | | NETWORK_ERROR, SUBMISSION_FAILED | 502 |

Signing

v0 of the daemon does not embed a signer — every write endpoint returns an unsigned EIP-12 transaction in unsigned_tx. Callers sign with Nautilus, AppKit, or another signing process and submit themselves.

A future revision will support a configurable signer (HSM, file-based key with passphrase). The Python BridgeClient already exposes the unsigned transaction directly so a Python signing daemon can plug in without API changes.

Use from Python

from ergo_agent_pay import BridgeClient

bridge = BridgeClient("http://127.0.0.1:3737", api_key="secret")
print(bridge.balance())
print(bridge.task_hash(text="the answer is 42"))
note = bridge.issue_note(
    recipient="9X...",
    value="0.005 ERG",
    reserve_box_id="abc...",
    deadline="+100 blocks",
    task_output="the answer is 42",
)

Compatibility with the safety guardrail

Endpoints that build on-chain state (/reserves, /notes, /trackers) inherit the SDK's mainnet guardrail. On mainnet without a compiled script_ergo_tree, the request returns 403 INSECURE_MAINNET_MODE unless the daemon was started with --allow-insecure-dev-mode.