
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
x402-xrplTypeScript SDK for x402 v2 payments over XRPL using the exact presigned Payment tx blob scheme from this repository.
This package is intended to mirror the ergonomics of the Python SDK (x402_xrpl/) so developers can easily build:
402 Payment Requirednpm install x402-xrpl
If you are building a resource server:
npm install express
import express from "express";
import { requirePayment } from "x402-xrpl/express";
const app = express();
app.use(
requirePayment({
path: "/ai-news",
price: "1000", // XRP drops; for IOUs use the XRPL value string (e.g. "1.25")
payToAddress: "rhaDe3NBxgUSLL12N5Sxpii2xy8vSyXNG6",
network: "xrpl:1",
asset: "XRP",
facilitatorUrl: "http://127.0.0.1:8011",
resource: "demo:ai-news",
description: "AI news feed (paid)",
}),
);
app.get("/ai-news", (_req, res) => res.json({ ok: true }));
app.listen(8080, () => console.log("listening on http://127.0.0.1:8080"));
By default, this SDK issues extra.sourceTag = 804681468 in the 402 accepts[] requirements, and buyer clients will sign XRPL Payment transactions with SourceTag = 804681468 (so XRPL can query/aggregate these payments on-ledger).
To override the tag for your app, set extra.sourceTag:
app.use(
requirePayment({
// ...
extra: { sourceTag: 123 },
}),
);
asset to a canonical XRPL currency code: 3 chars or 40-hex.
RLUSD must be provided as its 40-hex currency code, unless you explicitly opt into UTF-8 encoding using the currency helpers.issuer or extra.issuer.price to the IOU value string (e.g. "1", "1.25").x402Fetch implements the standard x402 flow:
402 with accepts[], select a PaymentRequirementsPAYMENT-SIGNATUREimport { x402Fetch } from "x402-xrpl";
import { Wallet } from "xrpl";
const wallet = Wallet.fromSeed(process.env.XRPL_SEED!);
const fetchPaid = x402Fetch({
wallet,
network: "xrpl:1",
// Optional: override the default public WS endpoint
// wsUrl: "wss://s.altnet.rippletest.net:51233",
});
const resp = await fetchPaid("http://127.0.0.1:8080/ai-news");
console.log(resp.status, await resp.text());
From this package directory:
npm install
npm run build
npm test
FAQs
XRPL x402 v2 SDK (exact presigned Payment tx scheme)
The npm package x402-xrpl receives a total of 28 weekly downloads. As such, x402-xrpl popularity was classified as not popular.
We found that x402-xrpl demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.