
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.
Express middleware for HTTP 402-based Solana payments.
npm install z402
import express from "express";
import { createPaymentContext } from "z402/express";
import { Connection, clusterApiUrl } from "@solana/web3.js";
const app = express();
(async () => {
const z402 = await createPaymentContext({
connection: new Connection(clusterApiUrl("devnet")),
});
app.get("/premium", z402.route("DEST_WALLET", "1000000"), (req, res) =>
res.send({"message": "Paid content unlocked!", payment: res.locals.payment})
);
app.listen(3000);
})();
import { Hono } from "hono";
import { createPaymentContext } from "z402/hono";
import { Connection } from "@solana/web3.js";
const app = new Hono();
(async () => {
const z402 = await createPaymentContext({connection: new Connection("https://api.devnet.solana.com")});
app.get("/paid", z402.route("DestinationWalletPubkeyHere", "1000000"), (c) =>
c.json({"message": "Paid content unlocked!", payment: c.get("payment")})
);
})();
To enable crash-proof idempotence:
import { initSqliteDb } from "z402-storage-sqlite";
const z402 = await createPaymentContext({
connection,
db: initSqliteDb("./payments.db"),
});
200: finalized payment,
res.locals.payment contains tx details.c.get("payment") contains tx details.signature: tx signaturesigner: payer public keydestination: destination public keyamount: amount in lamports or raw token unitsmint: null for SOL, mint address for SPL202: pending (timeout reached). Retry the same request.400: invalid tx / already pending.500: final error on-chain (rebuild a new tx)FAQs
Zero Trust x402 protocol
The npm package z402 receives a total of 0 weekly downloads. As such, z402 popularity was classified as not popular.
We found that z402 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.