{"id":50615491,"url":"https://github.com/piprail/piprail","last_synced_at":"2026-06-06T08:01:00.534Z","repository":{"id":362346917,"uuid":"1250957952","full_name":"piprail/piprail","owner":"piprail","description":"Backendless, no-fee x402 payments across 24 chains — EVM, Solana, TON, Tron, NEAR, Sui, Stellar \u0026 XRPL. Install, name a chain, get paid straight to your wallet.","archived":false,"fork":false,"pushed_at":"2026-06-03T19:21:10.000Z","size":1038,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-03T21:10:03.677Z","etag":null,"topics":["agent-payments","ai-agents","crypto-payments","evm","payments","sdk","solana","stablecoin","typescript","usdc","web3","x402"],"latest_commit_sha":null,"homepage":"https://piprail.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/piprail.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-27T05:46:51.000Z","updated_at":"2026-06-03T19:21:01.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/piprail/piprail","commit_stats":null,"previous_names":["piprail/piprail"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/piprail/piprail","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piprail%2Fpiprail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piprail%2Fpiprail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piprail%2Fpiprail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piprail%2Fpiprail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/piprail","download_url":"https://codeload.github.com/piprail/piprail/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piprail%2Fpiprail/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33973868,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-06T02:00:07.033Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-payments","ai-agents","crypto-payments","evm","payments","sdk","solana","stablecoin","typescript","usdc","web3","x402"],"created_at":"2026-06-06T08:00:58.089Z","updated_at":"2026-06-06T08:01:00.521Z","avatar_url":"https://github.com/piprail.png","language":"TypeScript","funding_links":[],"categories":["🛠️ SDKs \u0026 Client Libraries","Integrations \u0026 Bridges","Uncategorized"],"sub_categories":["JavaScript/TypeScript","Deployment","Uncategorized"],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"site/public/og.png\" alt=\"PipRail — the payment layer for the agent economy\" width=\"840\" /\u003e\n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n[![@piprail/sdk](https://img.shields.io/npm/v/@piprail/sdk.svg?logo=npm\u0026label=%40piprail%2Fsdk\u0026color=cb3837)](https://www.npmjs.com/package/@piprail/sdk)\n[![@piprail/mcp](https://img.shields.io/npm/v/@piprail/mcp.svg?logo=npm\u0026label=%40piprail%2Fmcp\u0026color=2ee6a6)](https://www.npmjs.com/package/@piprail/mcp)\n[![types](https://img.shields.io/npm/types/@piprail/sdk.svg?logo=typescript\u0026logoColor=white\u0026color=3178c6)](https://www.npmjs.com/package/@piprail/sdk)\n[![license](https://img.shields.io/github/license/piprail/piprail.svg?color=2ee6a6)](LICENSE)\n[![x402 v2](https://img.shields.io/badge/x402-v2-6e56cf.svg)](https://x402.org)\n[![chains](https://img.shields.io/badge/chains-28%20across%2010%20families-2ee6a6.svg)](#-supported-chains)\n\n**Let any HTTP endpoint charge for itself, and any agent pay for itself — across 28 chains, in a couple of lines.**\n\n[Website](https://piprail.com) · [npm](https://www.npmjs.com/package/@piprail/sdk) · [Full docs →](sdk/README.md)\n\n\u003c/div\u003e\n\n---\n\n`@piprail/sdk` implements the open [x402](https://x402.org) **\"402 Payment Required\"** standard with **no backend, no database, no account, and no fee**. Payments settle **straight into your wallet**, verified locally against your own RPC — across every major EVM chain plus **Solana, TON, Tron, NEAR, Sui, Aptos, Algorand, Stellar \u0026 the XRP Ledger**.\n\n```bash\nnpm install @piprail/sdk viem\n```\n\n### 💸 Charge for an endpoint\n\n```ts\nimport { requirePayment } from '@piprail/sdk'\n\napp.get('/report',\n  requirePayment({ chain: 'base', token: 'USDC', amount: '0.05', payTo: '0xYourWallet…' }),\n  (_req, res) =\u003e res.json({ report: 'TOP SECRET' }),\n)\n```\n\nThat route now costs **0.05 USDC on Base**, paid straight to your wallet. The first request gets a `402` with payment instructions; once the caller pays on-chain, it goes through. One parameter picks the chain.\n\n### 🤖 Let an agent pay for it\n\n```ts\nimport { PipRailClient } from '@piprail/sdk'\n\nconst client = new PipRailClient({ chain: 'base', wallet: { privateKey: process.env.AGENT_KEY } })\n\n// Hits a 402, pays it on-chain, waits for confirmation, retries with proof — automatically.\nconst res = await client.fetch('https://api.example.com/report')\n```\n\nThe same app can **take** payments and **make** them. Built for autonomous agents: install, add a wallet, monetize or pay — nothing else to wire up.\n\n## 🌐 Supported chains\n\n**28 chains across 10 families** — name one with a single `chain:` parameter. Non-EVM families lazy-load on first use, so a pure-EVM install never downloads their libraries.\n\n| Family | Built-in chains | Tokens |\n|---|---|---|\n| **EVM** (19) | Ethereum · Base · Arbitrum · Optimism · Polygon · BNB · Avalanche · Mantle · Sonic · Linea · Scroll · Celo · zkSync · Unichain · World Chain · Sei · Injective · HyperEVM · Monad | USDC + USDT* |\n| **Solana** | Solana | USDC · USDT |\n| **TON** | The Open Network | USD₮ |\n| **Tron** | Tron | USD₮ |\n| **NEAR** | NEAR | USDC · USDT |\n| **Sui** | Sui | USDC |\n| **Aptos** | Aptos | USDC · USDT |\n| **Algorand** | Algorand | USDC |\n| **Stellar** | Stellar | USDC · EURC |\n| **XRP Ledger** | XRPL | USDC · RLUSD |\n\n\u003csub\u003e\\*USDC on every EVM chain; USDT on all of them except Base, World Chain, Sei, HyperEVM, and Monad (their \"USDT\" is USDT0/LayerZero, not Tether-native — omitted). Any other EVM chain works via a viem `Chain` or `{ id, rpcUrl }` — no allowlist. Every token address was verified on-chain before shipping.\u003c/sub\u003e\n\n## ✨ Why PipRail\n\nAnything should be able to charge for itself — an API, a dataset, a model, an agent — and **anyone** should be able to get paid for it in seconds, without asking a platform for permission. The agent economy will run on millions of tiny, machine-to-machine payments, and that rail should be **open, free, and self-custodial** — not a toll booth owned by a middleman.\n\nSo we built it that way: no backend, no fees, no gatekeeper — an MIT library that turns any endpoint into a paid one and any agent into a paying customer, on every major chain. The goal is simple and audacious: **make open, self-custodial payments the default rail for the agent economy.**\n\n## ⚙️ How it works\n\n```\nAgent                                  Your server\n  │  GET /report                            │\n  │ ───────────────────────────────────────►│  requirePayment\n  │ ◄──────────── 402 + payment-required ────│  (issues a challenge)\n  │  pay on-chain (one transfer to payTo)    │\n  │ ───────────────────►  [the chain]        │\n  │  GET /report  + payment-signature        │\n  │ ───────────────────────────────────────►│  verifies the tx against\n  │ ◄──────────── 200 + your content ────────│  its own RPC, then next()\n```\n\nVerification is local and confirms the transaction **succeeded, is recent, and actually moved the required amount of the right token to `payTo`**. The x402 v2 spec (§7) explicitly endorses merchant-local verification — no facilitator required — so this is a spec-compliant shape, not a workaround. **Self-custody throughout:** the payer signs and broadcasts their own transfer straight to your wallet; PipRail never holds funds and never takes a cut.\n\n## 📦 What's in here\n\n```\npiprail/\n├── sdk/         # @piprail/sdk — the npm package (the product)\n├── site/        # piprail.com — the landing site (Astro 5 + Tailwind v4, deploys to Netlify)\n├── examples/    # runnable merchant + agent demos + a live Anvil end-to-end\n└── .github/     # CI: build/test checks · npm publish on a sdk-v* tag\n```\n\n**`@piprail/sdk`** is the product — and the only thing published to npm. `site/` is the source of [piprail.com](https://piprail.com); `examples/` holds runnable demos. Both live here in the repo but aren't npm packages.\n\n→ Full API \u0026 guides: **[sdk/README.md](sdk/README.md)**\n\nNo `contracts/`, no server, no database. PipRail is a tool you install, not a platform you sign up for.\n\n## 🛠️ Quick start\n\n```bash\nnpm install              # install workspace deps\n\nnpm run build:sdk        # build the SDK\nnpm run test:sdk         # run the SDK test suite\nnpm run typecheck        # typecheck the SDK\n\nnpm run dev              # run the landing site → http://localhost:4321\nnpm run e2e              # live end-to-end against a local Anvil chain\n```\n\n## 📄 License \u0026 trademark\n\n**Code:** [MIT](LICENSE) — use it, fork it, ship it, commercially or otherwise.\n\n**Name \u0026 brand:** **PipRail™**, the logo, and the `@piprail` npm scope are trademarks of the PipRail project — MIT covers the *code*, not the *name*. Build on it freely; just don't call a fork \"PipRail\" or imply it's official. See [TRADEMARK.md](TRADEMARK.md).\n\nContributions welcome — see [CONTRIBUTING.md](CONTRIBUTING.md) (a simple DCO sign-off, no CLA).\n\n\u003cdiv align=\"center\"\u003e\n\u003cbr/\u003e\n\u003cimg src=\"site/public/logo.png\" alt=\"PipRail\" width=\"64\" /\u003e\n\n\u003csub\u003eBuilt for the agent economy · \u003ca href=\"https://piprail.com\"\u003epiprail.com\u003c/a\u003e\u003c/sub\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiprail%2Fpiprail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiprail%2Fpiprail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiprail%2Fpiprail/lists"}