
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
@x402/paywall
Advanced tools
Modular paywall UI for the x402 payment protocol with support for EVM and Solana networks.
pnpm add @x402/paywall
Choose the import that matches your needs:
| Import | Size | Networks | Use Case |
|---|---|---|---|
@x402/paywall | 3.5MB | EVM + Solana | Multi-network apps |
@x402/paywall/evm | 3.4MB | EVM only | Base, Ethereum, Polygon, etc. |
@x402/paywall/svm | 1.0MB | Solana only | Solana apps |
import { createPaywall } from '@x402/paywall';
import { evmPaywall } from '@x402/paywall/evm';
const paywall = createPaywall()
.withNetwork(evmPaywall)
.withConfig({
appName: 'My App',
testnet: true
})
.build();
// Use with Express
app.use(paymentMiddleware(routes, facilitators, schemes, undefined, paywall));
import { createPaywall } from '@x402/paywall';
import { svmPaywall } from '@x402/paywall/svm';
const paywall = createPaywall()
.withNetwork(svmPaywall)
.withConfig({
appName: 'My Solana App',
testnet: true
})
.build();
import { createPaywall } from '@x402/paywall';
import { evmPaywall } from '@x402/paywall/evm';
import { svmPaywall } from '@x402/paywall/svm';
const paywall = createPaywall()
.withNetwork(evmPaywall) // First-match priority
.withNetwork(svmPaywall) // Fallback option
.withConfig({
appName: 'Multi-chain App',
testnet: true
})
.build();
interface PaywallConfig {
appName?: string; // App name shown in wallet connection
appLogo?: string; // App logo URL
currentUrl?: string; // URL of protected resource
testnet?: boolean; // Use testnet (default: true)
}
When multiple networks are registered, the paywall uses first-match selection:
paymentRequired.accepts arrayExample:
// Server returns multiple options
{
"accepts": [
{ "network": "solana:5eykt...", ... }, // First
{ "network": "eip155:8453", ... } // Second
]
}
// If both handlers registered, Solana is selected (it's first in accepts)
const paywall = createPaywall()
.withNetwork(evmPaywall)
.withNetwork(svmPaywall)
.build();
EVM Networks (via evmPaywall):
eip155:* (e.g., eip155:8453 for Base, eip155:84532 for Base Sepolia)Solana Networks (via svmPaywall):
solana:* (e.g., solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp for mainnet)import express from 'express';
import { paymentMiddleware } from '@x402/express';
import { createPaywall } from '@x402/paywall';
import { evmPaywall } from '@x402/paywall/evm';
const app = express();
const paywall = createPaywall()
.withNetwork(evmPaywall)
.withConfig({ appName: 'My API' })
.build();
app.use(paymentMiddleware(
{ "/api/premium": { price: "$0.10", network: "eip155:84532", payTo: "0x..." } },
facilitators,
schemes,
undefined,
paywall
));
If you provide paywallConfig without a custom paywall, @x402/core automatically:
@x402/paywall if installed// Simple usage - auto-detects @x402/paywall
app.use(paymentMiddleware(routes, facilitators, schemes, {
appName: 'My App',
testnet: true
}));
You can create custom handlers for new networks:
import { createPaywall, type PaywallNetworkHandler } from '@x402/paywall';
const suiPaywall: PaywallNetworkHandler = {
supports: (req) => req.network.startsWith('sui:'),
generateHtml: (req, paymentRequired, config) => {
return `<!DOCTYPE html>...`; // Your custom Sui paywall
}
};
const paywall = createPaywall()
.withNetwork(evmPaywall)
.withNetwork(svmPaywall)
.withNetwork(suiPaywall) // Custom handler
.build();
pnpm build:paywall # Generate HTML templates
pnpm build # Build TypeScript
pnpm test # Run unit tests
FAQs
x402 Payment Protocol Paywall UI
We found that @x402/paywall demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.