A HTTP 402 reverse proxy authentication server that utilizes Monero Transaction Proof Authentication Token
xmr402 is an early-stage C++ project in the AI payments / x402 ecosystem, focused on authentication, http-402, monero, proxy. It currently has 1 GitHub stars and 1 forks, and sits alongside related tools like xmr402-org, ripley-guard-ts, xmr-x402-facilitator, awesome-x402, routeweiler-python-sdk, awesome-mpp.
A HTTP 402 reverse proxy authentication server that utilizes Monero Transaction Proof Authentication Token for paid APIs. It uses monero native wallet. No RPC wallet needed.
curl -v http://localhost:8080
* Trying 127.0.0.1:8080...
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET / HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.88.1
> Accept: */*
>
< HTTP/1.1 402 Payment Required
< WWW-Authenticate: Bearer realm="xmr402 proxy",currency="XMR",address="59gqHxPdgjC3vWKxubBCDNZuCiMB3UjXNYHbT7ojjjd6KiLyCjiqtcp8T3js5d4h58Xf815FUZoaRDrqpBiejKz3JcZczbV",min_amount="0.01",min_confirmations="3",max_confirmations="150"
* no chunk, no close, no size. Assume close to signal end
<
* Closing connection 0
Authorization: Bearer <hex encoded txid>:<tx_proof>
curl -v -H "Authorization: Bearer 59632c9de3453907ada348fe47233d6c6648a2d21b08d716fad54c40ee0c1cac:OutProofV2jHQwEHcvw8uYSJcCCFzdMZh3odi1uqJXaYUv7aTPg2i8M1XnwSWcuDw5Jz1CzWjBM5QhvnxwkFZT8dhoGZoG3GG6Gx2ki9u2isuTAkncMLGFukMNgYgrzKEZUd9Wyf5e9MCh" http://localhost:8080
* Trying 127.0.0.1:8080...
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET / HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.88.1
> Accept: */*
> Authorization: Bearer 59632c9de3453907ada348fe47233d6c6648a2d21b08d716fad54c40ee0c1cac:OutProofV2jHQwEHcvw8uYSJcCCFzdMZh3odi1uqJXaYUv7aTPg2i8M1XnwSWcuDw5Jz1CzWjBM5QhvnxwkFZT8dhoGZoG3GG6Gx2ki9u2isuTAkncMLGFukMNgYgrzKEZUd9Wyf5e9MCh
>
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
< Server: SimpleHTTP/0.6 Python/3.11.2
< Date: Thu, 28 Nov 2024 15:59:29 GMT
< Content-type: text/html; charset=utf-8
< Content-Length: 789
<
<!DOCTYPE HTML>
<html lang="en">
<head>
...
curl -v -H "Authorization: Bearer 59632c9de3453907ada348fe47233d6c6648a2d21b08d716fad54c40ee0c1cac:OutProofV2jHQwEHcvw8uYSJcCCFzdMZh3odi1uqJXaYUv7aTPg2i8M1XnwSWcuDw5Jz1CzWjBM5QhvnxwkFZT8dhoGZoG3GG6Gx2ki9u2isuTAkncMLGFukMNgYgrzKEZUd9Wyf5e9MCh" http://localhost:8080
* Trying 127.0.0.1:8080...
* Connected to localhost (127.0.0.1) port 8080 (#0)
> GET / HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.88.1
> Accept: */*
> Authorization: Bearer 59632c9de3453907ada348fe47233d6c6648a2d21b08d716fad54c40ee0c1cac:OutProofV2jHQwEHcvw8uYSJcCCFzdMZh3odi1uqJXaYUv7aTPg2i8M1XnwSWcuDw5Jz1CzWjBM5QhvnxwkFZT8dhoGZoG3GG6Gx2ki9u2isuTAkncMLGFukMNgYgrzKEZUd9Wyf5e9MCh
>
< HTTP/1.1 402 Payment Required
< WWW-Authenticate: Bearer realm="xmr402 proxy",currency="XMR",address="59gqHxPdgjC3vWKxubBCDNZuCiMB3UjXNYHbT7ojjjd6KiLyCjiqtcp8T3js5d4h58Xf815FUZoaRDrqpBiejKz3JcZczbV",min_amount="0.01",min_confirmations="3",max_confirmations="150",error="invalid_token",error_description="token is valid only for 150 confirmations"
* no chunk, no close, no size. Assume close to signal end
<
* Closing connection 0
This project uses miniforge as dependency manager. Follow instructions to install it.
cd xmr402
git submodule update --init --force --recursive
mamba env update -n $(basename $PWD) -f conda.yml
. env.sh
bld_xmr && cnf && bld
mkdir ~/.local/share/xmr-stagenet-wallets
wallet --stagenet --daemon-address 45.63.8.26:38081 --generate-new-wallet ~/.local/share/xmr-stagenet-wallets/client
wallet --stagenet --daemon-address 45.63.8.26:38081 --generate-new-wallet ~/.local/share/xmr-stagenet-wallets/server
Password: 1234
python3 -m http.server
Just enter run to show usage.
run 0.0.0.0 8080 127.0.0.1 8000 Bearer ~/.local/share/xmr-stagenet-wallets/server 1234 0.01 3 150 STAGENET http://45.63.8.26:38081
curl -v http://127.0.0.1:8080
Use https://community.rino.io/faucet/stagenet or https://stagenet-faucet.xmr-tw.org
wallet --stagenet --daemon-address 45.63.8.26:38081 --wallet ~/.local/share/xmr-stagenet-wallets/client
transfer 59gqHxPdgjC3vWKxubBCDNZuCiMB3UjXNYHbT7ojjjd6KiLyCjiqtcp8T3js5d4h58Xf815FUZoaRDrqpBiejKz3JcZczbV 0.01
get_tx_proof 59632c9de3453907ada348fe47233d6c6648a2d21b08d716fad54c40ee0c1cac 59gqHxPdgjC3vWKxubBCDNZuCiMB3UjXNYHbT7ojjjd6KiLyCjiqtcp8T3js5d4h58Xf815FUZoaRDrqpBiejKz3JcZczbV
cat monero_tx_proof ; echo
Authorization: Bearer <hex encoded txid>:<tx_proof>
curl -v -H "Authorization: Bearer 59632c9de3453907ada348fe47233d6c6648a2d21b08d716fad54c40ee0c1cac:OutProofV2jHQwEHcvw8uYSJcCCFzdMZh3odi1uqJXaYUv7aTPg2i8M1XnwSWcuDw5Jz1CzWjBM5QhvnxwkFZT8dhoGZoG3GG6Gx2ki9u2isuTAkncMLGFukMNgYgrzKEZUd9Wyf5e9MCh" http://127.0.0.1:8080
cnf -DCMAKE_INSTALL_PREFIX=~/.local && bld install
Please consider donating to support the development of this project.
Monero (XMR): 8AADjm5nz4GXXn7Tf6FNfwCaAjAdkvdUs5KgRwBGUj2NHwWqkxbfLzYPom3mL6a1cN1aypyfvyzaxHAM8aARbafFKkABT6Z
XMR402 is an open, neutral standard for internet-native payments. It absolves the Internet's original sin by natively making payments possible between clients and servers, creating win-win economies that empower agentic payments at scale. XMR402 exists to build a more free and fair internet.
Industrial-grade Monero payment gating for modern APIs. IETF-compliant, 0-conf enabled, and built for the sovereign internet.
Proof of Concept facilitator for accepting XMR/Monero via x402 protocol
🚀 Curated list of x402 resources: HTTP 402 Payment Required protocol for blockchain payments, crypto micropayments, AI agents, API monetization. Includes SDKs (TypeScript, Python, Rust), examples, facilitators (Coinbase, Cloudflare), MCP integration, tutorials. Accept USDC payments with one line of code. Perfect for AI agent economy.
The financial operating system for AI agents. A single HTTP client that intercepts '402 Payment Required', routes across x402, L402, and MPP, persists credentials as recoverable assets, enforces per-envelope budgets, and emits a structured trace.
The MPP registry — 100+ Machine Payments Protocol tools, SDKs, services, and payment methods across 15+ chains. The definitive directory for Stripe + Tempo agent payments.
Your AI trading terminal assistant for US stocks, commodities, forex, and crypto.
The agent-native LLM router for autonomous agents. 55+ models (8 free), <1ms local routing, USDC payments on Base & Solana via x402.
A payments protocol for the internet. Built on HTTP.
A local-first AI agent with persistent memory, emotional intelligence, and a peer-to-peer skills economy.
The trust layer for agent-to-agent commerce — natural-language mandates, ERC-7710 delegated permissions, x402 payments, escrow, and dispute resolution as one open, catch-all Agent Skill / Claude Code plugin.
The AI agent with a wallet — spends USDC autonomously to get real work done. Apache-2.0, TypeScript.