Industrial-grade Monero payment gating for modern APIs. IETF-compliant, 0-conf enabled, and built for the sovereign internet.
ripley-guard-ts is an early-stage TypeScript project in the AI payments / x402 ecosystem, focused on ai-agents, crypto-gateway, express, expressjs. It currently has 2 GitHub stars and 0 forks, and sits alongside related tools like xmr402-org, dna-x402, docs.
XMR402 v2.0: The first transport-agnostic Monero payment primitive.
Industrial-grade Monero payment gating for modern agents, relays, and APIs. Stateless, anonymous, and built for the sovereign machine economy.
ripley-guard-ts is a hyper-lightweight middleware implementation of the XMR402 Protocol. Refactored in v2.0 into a decoupled architecture, it now supports payment gating across HTTP, WebSockets, and Nostr.
npm install @kyc-rip/ripley-guard-ts
The classic 402 flow for REST APIs. Supports Cloudflare Workers, Node.js, Bun, and Deno.
import { ripleyGuardHono } from '@kyc-rip/ripley-guard-ts/hono'
// Mount as middleware
app.use('/intel', ripleyGuardHono({
nodeRpcUrl: "https://rpc.kyc.rip",
walletAddress: "888tNkba...",
amountPiconero: 1000000, // 0.001 XMR
serverSecret: "tactical_secret"
}))
Direct agent-to-agent payment gating using JSON frames.
import { ripleyGuardWS } from '@kyc-rip/ripley-guard-ts/ws/adapter'
const gate = ripleyGuardWS(options)
ws.on('message', async (msg) => {
await gate.handle(ws, msg.toString(), 'client-7', 5000, (intent) => {
ws.send(`Access granted for ${intent}. Unlocking sovereign stream...`)
})
})
Default implementation for gated Nostr relays or pay-per-event access.
import { NostrXMR402Gate } from '@kyc-rip/ripley-guard-ts/nostr'
const gate = new NostrXMR402Gate({ ...options })
// Issues standardized ["NOTICE", "PAYMENT_REQUIRED: XMR402 ..."]
const [tag, msg] = await gate.createNostrChallenge(pubkey, "EVENT_PUBLISH", 1000)
relay.send(tag, msg)
ripley-guard-ts strictly adheres to the XMR402 v2.0 specification:
address, amount, message (nonce), and timestamp.Authorization header or PROOF frame.For the full specification, visit XMR402.org.
For full integration details, see our Examples Directory.
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.
DNA — Payment rails for AI agents. x402 micropayment protocol on Solana. Netting, transfer, stream settlement. Receipt anchoring on-chain.
Official documentation for {xpay✦}. Learn how to monetize, manage, and observe your AI agents using the x402 protocol.