{"_id":"@aeon-ai-pay/x402","_rev":"3-727046ab5f3b5672554f6d4b4e2b036c","name":"@aeon-ai-pay/x402","dist-tags":{"latest":"0.0.22"},"versions":{"0.0.20":{"name":"@aeon-ai-pay/x402","version":"0.0.20","keywords":["X402","payments","blockchain","evm","solana"],"author":{"name":"AeonGPT"},"license":"Apache-2.0","_id":"@aeon-ai-pay/x402@0.0.20","maintainers":[{"name":"aeon_project","email":"code@alchemypay.org"}],"homepage":"https://github.com/AEON-Project/A402#readme","bugs":{"url":"https://github.com/AEON-Project/A402/issues"},"dist":{"shasum":"5b25ef8d362cd75917e12b6d0b6f7eb3a045f524","tarball":"https://registry.npmjs.org/@aeon-ai-pay/x402/-/x402-0.0.20.tgz","fileCount":246,"integrity":"sha512-Y27Y50w/UOPPNWpMBPdu1RahJMIm+c8zg1BHZ6AntomDNOyylRycPo3wXv0QubtzwslhbkcjFjcAH1uo6ML31A==","signatures":[{"sig":"MEUCIHWYsIGbWiT93JbiP425qIvsiJdQrm0sAWr4icF9V2amAiEAiiYWBTHijG5tqWdGIUISS7/GJ1CeVe4hvx8bvar9NgY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5622719},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./types":{"types":"./dist/types/index.d.ts","import":"./dist/types/index.js","default":"./dist/types/index.js"},"./client":{"import":{"types":"./dist/client/index.d.ts","import":"./dist/client/index.js","default":"./dist/client/index.js"}},"./scheme":{"import":{"types":"./dist/scheme/index.d.ts","import":"./dist/scheme/index.js","default":"./dist/scheme/index.js"}},"./shared":{"import":{"types":"./dist/shared/index.d.ts","import":"./dist/shared/index.js","default":"./dist/shared/index.js"}},"./verify":{"import":{"types":"./dist/verify/index.d.ts","import":"./dist/verify/index.js","default":"./dist/verify/index.js"}},"./middleware":{"types":"./dist/middleware/index.d.ts","import":"./dist/middleware/index.js","default":"./dist/middleware/index.js"},"./facilitator":{"types":"./dist/facilitator/index.d.ts","import":"./dist/facilitator/index.js","default":"./dist/facilitator/index.js"},"./schemes/exact/evm":{"types":"./dist/schemes/exact/evm/index.d.ts","import":"./dist/schemes/exact/evm/index.js","default":"./dist/schemes/exact/evm/index.js"},"./schemes/exact/solana":{"types":"./dist/schemes/exact/solana/index.d.ts","import":"./dist/schemes/exact/solana/index.js","default":"./dist/schemes/exact/solana/index.js"}},"gitHead":"d30165f01943e8286a661b3f49c601224acadf8e","scripts":{"build":"tsc && pnpm run build:paywall && tsc","clean":"rm -rf dist","build:paywall":"pnpm --filter 'paywall-app' i && pnpm --filter 'paywall-app' build && node ../../../scripts/build-paywall.js"},"_npmUser":{"name":"aeon_project","email":"code@alchemypay.org"},"repository":{"url":"git+https://github.com/AEON-Project/A402.git","type":"git"},"_npmVersion":"10.8.2","description":"Aeon's X402 open protocol for blockchain-native payments","directories":{},"_nodeVersion":"20.18.1","dependencies":{"bs58":"^6.0.0","next":"15.3.1","viem":"^2.28.1","express":"^4.21.2","typescript":"^5.8.3","@solana/kit":"^2.1.0","@types/express":"^5.0.1","@solana/signers":"^2.1.0","@solana-program/memo":"^0.7.0","@solana/transactions":"^2.1.0","@solana-program/token":"^0.5.1","@solana-program/system":"^0.7.0","@solana-program/token-2022":"^0.4.1","@solana/wallet-standard-features":"^1.3.0"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^3.25.49","@types/node":"^22.15.3"},"_npmOperationalInternal":{"tmp":"tmp/x402_0.0.20_1760687253540_0.2380393523927855","host":"s3://npm-registry-packages-npm-production"}},"0.0.21":{"name":"@aeon-ai-pay/x402","version":"0.0.21","keywords":["x402","payments","blockchain","evm","solana"],"author":{"name":"AeonGPT"},"license":"Apache-2.0","_id":"@aeon-ai-pay/x402@0.0.21","maintainers":[{"name":"aeon_project","email":"code@alchemypay.org"}],"homepage":"https://github.com/AEON-Project/x402#readme","bugs":{"url":"https://github.com/AEON-Project/x402/issues"},"dist":{"shasum":"d44fb71df8d32b079c577ed4740f6778bb11cc96","tarball":"https://registry.npmjs.org/@aeon-ai-pay/x402/-/x402-0.0.21.tgz","fileCount":242,"integrity":"sha512-aElFPHD0KQEgOuYm8jeJVFnA67omNJT+uJHwKPVm1IrJhdASAE2p1EZ4z4C1TQ7h757dCKb7DwuFCZ+9wcmqEg==","signatures":[{"sig":"MEQCIDlZCe4mH0qFkIHItqc/M4trfzf+iO4Y0rJJc+TDYWeIAiA7J/fW3KXCyK4+B0aQQxWpOfh133ODaXW8iz2TH7++sA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6074572},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./types":{"types":"./dist/types/index.d.ts","import":"./dist/types/index.js","default":"./dist/types/index.js"},"./client":{"import":{"types":"./dist/client/index.d.ts","import":"./dist/client/index.js","default":"./dist/client/index.js"}},"./scheme":{"import":{"types":"./dist/scheme/index.d.ts","import":"./dist/scheme/index.js","default":"./dist/scheme/index.js"}},"./shared":{"import":{"types":"./dist/shared/index.d.ts","import":"./dist/shared/index.js","default":"./dist/shared/index.js"}},"./verify":{"import":{"types":"./dist/verify/index.d.ts","import":"./dist/verify/index.js","default":"./dist/verify/index.js"}},"./middleware":{"types":"./dist/middleware/index.d.ts","import":"./dist/middleware/index.js","default":"./dist/middleware/index.js"},"./facilitator":{"types":"./dist/facilitator/index.d.ts","import":"./dist/facilitator/index.js","default":"./dist/facilitator/index.js"},"./schemes/exact/evm":{"types":"./dist/schemes/exact/evm/index.d.ts","import":"./dist/schemes/exact/evm/index.js","default":"./dist/schemes/exact/evm/index.js"},"./schemes/exact/solana":{"types":"./dist/schemes/exact/solana/index.d.ts","import":"./dist/schemes/exact/solana/index.js","default":"./dist/schemes/exact/solana/index.js"}},"gitHead":"bd3a75ca77cf058c8aafe04be356b56b0d76f425","scripts":{"build":"tsc && pnpm run build:paywall && tsc","clean":"rm -rf dist","build:paywall":"pnpm --filter 'paywall-app' i && pnpm --filter 'paywall-app' build && node ../../../scripts/build-paywall.js"},"_npmUser":{"name":"aeon_project","email":"code@alchemypay.org"},"repository":{"url":"git+https://github.com/AEON-Project/x402.git","type":"git"},"_npmVersion":"10.8.2","description":"Aeon's x402 open protocol for blockchain-native payments","directories":{},"_nodeVersion":"20.18.1","dependencies":{"bs58":"^6.0.0","next":"15.3.1","viem":"^2.28.1","express":"^4.21.2","typescript":"^5.8.3","@solana/kit":"^2.1.0","@types/express":"^5.0.1","@solana/signers":"^2.1.0","@aeon-ai-pay/x402":"^0.0.20","@solana-program/memo":"^0.7.0","@solana/transactions":"^2.1.0","@solana-program/token":"^0.5.1","@solana-program/system":"^0.7.0","@solana-program/token-2022":"^0.4.1","@solana/wallet-standard-features":"^1.3.0"},"_hasShrinkwrap":false,"devDependencies":{"zod":"^3.25.49","@types/node":"^22.15.3"},"_npmOperationalInternal":{"tmp":"tmp/x402_0.0.21_1760701638497_0.23051069143210423","host":"s3://npm-registry-packages-npm-production"}},"0.0.22":{"name":"@aeon-ai-pay/x402","version":"0.0.22","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","description":"Aeon's x402 open protocol for blockchain-native payments","scripts":{"build":"tsc && pnpm run build:paywall && tsc","build:paywall":"pnpm --filter 'paywall-app' i && pnpm --filter 'paywall-app' build && node ../../../scripts/build-paywall.js","clean":"rm -rf dist"},"repository":{"type":"git","url":"git+https://github.com/AEON-Project/x402.git"},"keywords":["x402","payments","blockchain","evm","solana"],"author":{"name":"AeonGPT"},"license":"Apache-2.0","bugs":{"url":"https://github.com/AEON-Project/x402/issues"},"homepage":"https://github.com/AEON-Project/x402#readme","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./types":{"types":"./dist/types/index.d.ts","import":"./dist/types/index.js","default":"./dist/types/index.js"},"./facilitator":{"types":"./dist/facilitator/index.d.ts","import":"./dist/facilitator/index.js","default":"./dist/facilitator/index.js"},"./scheme":{"import":{"types":"./dist/scheme/index.d.ts","import":"./dist/scheme/index.js","default":"./dist/scheme/index.js"}},"./schemes/exact/solana":{"types":"./dist/schemes/exact/solana/index.d.ts","import":"./dist/schemes/exact/solana/index.js","default":"./dist/schemes/exact/solana/index.js"},"./schemes/exact/evm":{"types":"./dist/schemes/exact/evm/index.d.ts","import":"./dist/schemes/exact/evm/index.js","default":"./dist/schemes/exact/evm/index.js"},"./middleware":{"types":"./dist/middleware/index.d.ts","import":"./dist/middleware/index.js","default":"./dist/middleware/index.js"},"./client":{"import":{"types":"./dist/client/index.d.ts","import":"./dist/client/index.js","default":"./dist/client/index.js"}},"./verify":{"import":{"types":"./dist/verify/index.d.ts","import":"./dist/verify/index.js","default":"./dist/verify/index.js"}},"./shared":{"import":{"types":"./dist/shared/index.d.ts","import":"./dist/shared/index.js","default":"./dist/shared/index.js"}}},"devDependencies":{"@types/node":"^22.15.3","zod":"^3.25.49"},"dependencies":{"@aeon-ai-pay/x402":"^0.0.20","@solana-program/memo":"^0.7.0","@solana-program/system":"^0.7.0","@solana-program/token":"^0.5.1","@solana-program/token-2022":"^0.4.1","@solana/kit":"^2.1.0","@solana/signers":"^2.1.0","@solana/transactions":"^2.1.0","@solana/wallet-standard-features":"^1.3.0","@types/express":"^5.0.1","bs58":"^6.0.0","express":"^4.21.2","next":"15.3.1","typescript":"^5.8.3","viem":"^2.28.1"},"_id":"@aeon-ai-pay/x402@0.0.22","gitHead":"4ac5f428d1234c1b6acd6e074d6f9828618d199f","_nodeVersion":"20.18.1","_npmVersion":"10.8.2","dist":{"integrity":"sha512-QIM7g8XNrAKm6f5ODaGr0A2GeccA4umNvPY1GJtuLJ4/bGJ9jTQADv4nGUgWad1SKHaU1nuO0uXCmmUwQaIc+Q==","shasum":"6e26e37f430d119a93877d826988cb17944a5bbc","tarball":"https://registry.npmjs.org/@aeon-ai-pay/x402/-/x402-0.0.22.tgz","fileCount":242,"unpackedSize":6074993,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDkDZ7RSwUbHZHM7rQ+q4EeuMUb2Na9jafyOdVZp6fmlAIhAP/PN2b3mRpUfXqCTawGKY+ze0YRZHcbKC1eEodtWLVX"}]},"_npmUser":{"name":"aeon_project","email":"code@alchemypay.org"},"directories":{},"maintainers":[{"name":"aeon_project","email":"code@alchemypay.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/x402_0.0.22_1760936143879_0.7232176850005625"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-17T07:47:33.466Z","modified":"2025-10-20T04:55:44.346Z","0.0.20":"2025-10-17T07:47:33.808Z","0.0.21":"2025-10-17T11:47:18.781Z","0.0.22":"2025-10-20T04:55:44.130Z"},"bugs":{"url":"https://github.com/AEON-Project/x402/issues"},"author":{"name":"AeonGPT"},"license":"Apache-2.0","homepage":"https://github.com/AEON-Project/x402#readme","keywords":["x402","payments","blockchain","evm","solana"],"repository":{"type":"git","url":"git+https://github.com/AEON-Project/x402.git"},"description":"Aeon's x402 open protocol for blockchain-native payments","maintainers":[{"name":"aeon_project","email":"code@alchemypay.org"}],"readme":"# @aeon-ai-pay/x402\n\nAeon's x402 open protocol for blockchain-native payments.\n\n## Features\n\n- Support for multiple payment schemes (exact, subscription)\n- Support for multiple blockchains (EVM, Solana)\n- Middleware for Express and Next.js\n- Static HTML paywall bundle for serving directly from middleware\n\n## Installation\n\n```bash\nnpm install @aeon-ai-pay/x402\n```\n\n## Usage\n\n### Next.js Middleware\n\n```javascript\nimport { x402NextMiddleware } from '@aeon-ai-pay/x402/middleware';\n\n// Configure the middleware\nconst middleware = x402NextMiddleware({\n  facilitatorUrl: 'https://facilitator.aeon.xyz',\n  routes: {\n    '/api/protected': {\n      paymentRequirements: [\n        {\n          scheme: 'exact',\n          namespace: 'evm',\n          networkId: 'base',\n          payTo: '0x...',\n          maxAmountRequired: 100000000, // 100 USDC (6 decimals)\n          maxTimeoutSeconds: 3600,\n          resource: '/api/protected',\n          description: 'Access to protected API',\n        }\n      ]\n    }\n  }\n});\n\n// Export the middleware\nexport { middleware };\n```\n\n### Static HTML Paywall Bundle\n\nThe package now includes a static HTML paywall bundle that can be served directly from the middleware when a 402 status is encountered, instead of redirecting to a paywall route.\n\nTo build the static HTML paywall bundle:\n\n```bash\nnpm run build:paywall\n```\n\nThis will build the paywall-app with static export and copy the output to the [`src/shared/paywall/paywallHtml.ts`](./src/shared/paywall/paywallHtml.ts) directory.\n\nThe middleware will automatically serve the static HTML bundle when a 402 status is encountered.\n\n## Documentation\n\nFor more detailed documentation, see the [scripts/README.md](./scripts/README.md) file.\n\n## License\n\nApache-2.0\n","readmeFilename":"README.md"}