🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@agentpay-dev/x402-facilitator

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@agentpay-dev/x402-facilitator

x402 Facilitator for AgentPay �?Bridge between x402 protocol and CKB Fiber Network

latest
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

@agentpay-dev/x402-facilitator

x402 Facilitator using CKB Fiber Network as settlement layer

Why CKB Fiber for x402?

Coinbase x402 (Base L2)AgentPay x402 (CKB Fiber)
Settlement Speed~2 secondsmilliseconds
Transaction Cost~$0.0001~$0
BTC Support�?�?(via Cch)
Hold Invoice�?�?(trustless)

Install

npm install @agentpay-dev/x402-facilitator @agentpay-dev/core

Usage �?Middleware (one-line paywall)

import { createX402Middleware } from '@agentpay-dev/x402-facilitator';
import { createServer } from 'node:http';

const paywall = createX402Middleware({ price: '100000000', asset: 'CKB' });

createServer(async (req, res) => {
  await paywall(req, res, () => {
    // Only reached if payment is verified
    res.writeHead(200);
    res.end(JSON.stringify({ data: 'premium content' }));
  });
}).listen(3000);

Usage �?Standalone Facilitator

FIBER_RPC_URL=http://127.0.0.1:8227 npx tsx src/index.ts

Endpoints:

  • POST /verify �?Verify payment against requirements
  • POST /settle �?Settle a verified payment

License

MIT

FAQs

Package last updated on 15 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts