feeless402 / docs

Documentation

One package, both sides of the machine economy: spend (pay any x402 endpoint per call) and earn (sell your own API responses for exact micro-prices). Self-custodied throughout — your keys, your money, no accounts anywhere.

Spend

Install & fund

pip install feeless402
nano-pay init                     # wallet at ~/.nano-pay/wallet.json — back up the seed
nano-pay claim --auto             # free starter XNO (solves the faucet's PoW, ~1 min CPU)
nano-pay topup 5 --asset USDC-BASE --execute   # real working capital, ~$0.02 min
nano-pay receive                  # pocket incoming funds
nano-pay status

topup quotes and creates swaps directly with an instant-swap service (default NanSwap; estimates need no key, execution needs a free NANSWAP_API_KEY). Funds go straight to your own wallet — nothing here ever holds your money.

Pay per call

nano-pay quote URL                # see the price — pays nothing
nano-pay compare URL              # price the call on EVERY offered rail, live
nano-pay pay URL [--json BODY] [--max-xno 0.05]

pay runs the whole x402 handshake: reads the 402 quote (both major Nano dialects), refuses anything above your cap, signs a send block locally, retries with the payment header. The merchant settles it; confirmation lands in under a second. Try it against a live endpoint:

nano-pay pay https://nano-gpt.com/api/v1/chat/completions \
  --json '{"model":"gpt-5-nano","messages":[{"role":"user","content":"hello"}]}'

Agents: MCP server

Give any MCP-speaking agent (Claude Code, Cursor, and friends) native feeless payments:

pip install "feeless402[mcp]"
claude mcp add feeless402 -- nano-pay mcp

Tools exposed: wallet_status, x402_quote, x402_compare, x402_pay (with spend cap), faucet_claim, topup_quote. The seed is never readable through any tool.

Earn

Sell your API for micro-prices

pip install "feeless402[server]"
nano-pay serve --port 8402

Every unpaid request gets a standards-compliant 402 with your price in accepts and a railHint block that teaches visiting agents how to onboard — docs, bootstrap command, faucet list. Incoming payments are verified against the live ledger (payer frontier, exact amount, destination, signature, replay guard) and settled on-chain by your own server. No facilitator, no processor, no percentage.

Env varDefaultMeaning
F402_PRICE_XNO0.0001price per call
F402_SITE_URLhttps://feeless402.comyour public base URL (used in hints)
F402_FAUCET_XNO0.005starter grant size
F402_FAUCET_POW01 = require proof-of-work on claims (recommended public)
F402_FAUCETSthis sitecomma-sep federation list advertised in railHint

serve auto-creates two wallets under ~/.nano-pay/: server-wallet.json (your treasury) and faucet-wallet.json (fund it to give out starter grants — every grantee is a future customer).

Reference

All commands

CommandDoes
init [--seed HEX]create or import wallet
address / status / receiveinspect + pocket funds
send ADDR XNOdirect transfer
quote / compare / pay URLx402 client (see above)
claim [URL] [--auto]starter grant; --auto walks the faucet federation
topup AMT [--asset X] [--execute]swap into XNO, self-custodied
serve / mcpmerchant server / MCP stdio server
preworkpre-compute PoW so the next payment is instant

Security model

Beta software handling real money. Keep working capital only — a few dollars. Not audited. MIT license, no warranty.

Source & spec

Code: github.com/feeless402/feeless402 (MIT)
railHint extension spec: railhint.com
x402 standard: x402.org (Linux Foundation)
Engine: Nano (XNO)