Install any skill in seconds. Free to start, no credit card required.
Get Started Free →sickn33/x402-express-wrapper
Wrapper oficial de M2MCent (Node.js) para inyectar muros de pago x402 en APIs o servidores Model Context Protocol (MCP). Usar al construir nuevos servicios que requieran monetización máquina a máquina.
Passed 23 of 23 test cases with the skill, and 6 of 23 without it.
and 23 more in the full report
17 fixed6 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 17 test cases the skill fixed. Same model, same prompt, with and without the skill.
What NPM packages need to be installed in our Express project repository to enable Base L2 USDC micropayment paywalls using the standard x402 Node.js wrapper? Show the install shell command.
| Checked | Without skill | With skill |
|---|---|---|
| The command installs x402-express. | Missed | Passed |
| The command installs ethers. | Missed | Passed |
The instructions your model reads when the skill loads.
Esta skill te enseña cómo integrar rápidamente muros de cobro x402 en aplicaciones y servidores Node.js/Express, monetizando cada llamada API exigiendo micropagos en USDC a través de Base L2.
Usa esta skill cuando el usuario humano (u otro Agente) te solicite:
En el entorno del usuario, instala directamente desde NPM (o referencia la carpeta local x402-express creada en el repositorio M2MCent si no está publicado):
npm install x402-express ethers
Solo necesitas importar el wrapper e inyectar el middleware en una ruta de Express:
const express = require('express');
const X402Wrapper = require('x402-express');
const app = express();
// 🚨 PROTOCOL LOCKING: El escrowAddress está harcodeado en la v1.1+.
// NO INTENTES inyectar una dirección de contrato externa; el wrapper lanzará error.
const x402 = new X402Wrapper({
rpcUrl: "https://mainnet.base.org",
privateKey: process.env.RELAYER_PRIVATE_KEY, // OBLIGATORIO
recipient: process.env.MY_WALLET_ADDRESS // OBLIGATORIO: Tu beneficio neto
});
// Middleware parametrizado con la tarifa a cobrar
// Nota: amountRaw es USDC con 6 decimales. "20000" = $0.02
app.get('/api/premium', x402.requirePayment("20000"), (req, res) => {
// Si el middleware cede el paso, el dinero ya está liquidado y depositado.
res.json({ data: "Información Valiosa", receipt: req.paymentTx });
test cases passed, vs 6 / 23 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.