{"_id":"@402kit/server","_rev":"5-99e44466a353dbedc831f9546ff7d4e2","name":"@402kit/server","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"@402kit/server","version":"0.1.0","keywords":["http","402","payment","server","middleware"],"license":"Apache-2.0","_id":"@402kit/server@0.1.0","maintainers":[{"name":"402kit","email":"402kit@402kit.dev"}],"homepage":"https://github.com/402kit/402kit#readme","bugs":{"url":"https://github.com/402kit/402kit/issues"},"dist":{"shasum":"6fcb7827341a496cbcf2b6da165ae0544fbbbd29","tarball":"https://registry.npmjs.org/@402kit/server/-/server-0.1.0.tgz","fileCount":27,"integrity":"sha512-B7nzDEwfsE6Z0sndBEIzVZ3D2mj/PrYufNIH8O2lBriif6Tx6INH/f1EtmYsYVTcAbLDEf/WuEZ2YXCbOeOEJQ==","signatures":[{"sig":"MEQCIBOeO7NqLBpqSzuJsYlArynVGhBGC1yv51n8ew3W0emZAiAqheMZ9RViFuX2ykgwWuWo6wXSRxGO7j79i7/LxvhzqA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":206021},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./hono":{"types":"./dist/hono.d.ts","import":"./dist/hono.js","require":"./dist/hono.cjs"},"./next":{"types":"./dist/next.d.ts","import":"./dist/next.js","require":"./dist/next.cjs"},"./express":{"types":"./dist/express.d.ts","import":"./dist/express.js","require":"./dist/express.cjs"}},"gitHead":"99224724ac04ec0a4b2b6df5e4e89c0447ad3fb9","scripts":{"test":"vitest run","build":"tsup","prepack":"pnpm build","typecheck":"tsc --noEmit"},"_npmUser":{"name":"402kit","email":"402kit@402kit.dev"},"deprecated":"Broken: contains workspace:* dependencies. Use 0.1.1 instead.","repository":{"url":"git+https://github.com/402kit/402kit.git","type":"git"},"_npmVersion":"11.5.2","description":"Server middleware for 402Kit (Express, Next.js, Hono)","directories":{},"_nodeVersion":"20.17.0","dependencies":{"@402kit/core":"workspace:*","@402kit/entitlement":"workspace:*"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","vitest":"^1.3.1","typescript":"^5.3.3","@types/express":"^4.17.21"},"peerDependencies":{"hono":"^4.0.0","express":"^4.0.0"},"peerDependenciesMeta":{"hono":{"optional":true},"express":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/server_0.1.0_1760972207843_0.41903730388904803","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@402kit/server","version":"0.1.1","keywords":["http","402","payment","server","middleware"],"license":"Apache-2.0","_id":"@402kit/server@0.1.1","maintainers":[{"name":"402kit","email":"402kit@402kit.dev"}],"homepage":"https://github.com/402kit/402kit#readme","bugs":{"url":"https://github.com/402kit/402kit/issues"},"dist":{"shasum":"02af8a505317877ab6c641292d078870375282b2","tarball":"https://registry.npmjs.org/@402kit/server/-/server-0.1.1.tgz","fileCount":27,"integrity":"sha512-svQm7ND3+/3giRWnlFShjTBVq3YZ0+YPi7PoVL/2bdt3V13WjNiCCUbAmjXFLDSkLCU8DHfzmKiqYy1d94ZRrw==","signatures":[{"sig":"MEYCIQC3fAR1yIeNQTd/pdquy5pdTgIrFOvLL4v2YCbmgGn0ewIhAI6kQ7AN42fEXNZa2c7r6NsW0b73l8RWaCVETQDjW65o","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":206011},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./hono":{"types":"./dist/hono.d.ts","import":"./dist/hono.js","require":"./dist/hono.cjs"},"./next":{"types":"./dist/next.d.ts","import":"./dist/next.js","require":"./dist/next.cjs"},"./express":{"types":"./dist/express.d.ts","import":"./dist/express.js","require":"./dist/express.cjs"}},"gitHead":"99224724ac04ec0a4b2b6df5e4e89c0447ad3fb9","scripts":{"test":"vitest run","build":"tsup","prepack":"pnpm build","typecheck":"tsc --noEmit"},"_npmUser":{"name":"402kit","email":"402kit@402kit.dev"},"repository":{"url":"git+https://github.com/402kit/402kit.git","type":"git"},"_npmVersion":"11.5.2","description":"Server middleware for 402Kit (Express, Next.js, Hono)","directories":{},"_nodeVersion":"20.17.0","dependencies":{"@402kit/core":"^0.1.1","@402kit/entitlement":"^0.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","vitest":"^1.3.1","typescript":"^5.3.3","@types/express":"^4.17.21"},"peerDependencies":{"hono":"^4.0.0","express":"^4.0.0"},"peerDependenciesMeta":{"hono":{"optional":true},"express":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/server_0.1.1_1760973062095_0.07447699480319359","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@402kit/server","version":"0.1.2","keywords":["402kit","http 402","x402","middleware","express","nextjs","hono","edge"],"author":{"name":"402Kit Authors"},"license":"Apache-2.0","_id":"@402kit/server@0.1.2","maintainers":[{"name":"402kit","email":"402kit@402kit.dev"}],"homepage":"https://github.com/402kit/402kit#readme","bugs":{"url":"https://github.com/402kit/402kit/issues"},"dist":{"shasum":"185ef9dae04619e337e95a297fc64fe6d30f70d9","tarball":"https://registry.npmjs.org/@402kit/server/-/server-0.1.2.tgz","fileCount":27,"integrity":"sha512-XWbg5Ax3CdgeFJVS1wgPm3dEjoMoVip1L1rKPAzLVpxI6bFXOEEGrEWgy9EY+kDjVXv3f9sSD9h9Z6GAslI2+g==","signatures":[{"sig":"MEQCIDJCtMHjPkey9po4YPDgM7N2Lz18pc8Gm/xcy2ihl1gLAiBKLef/aEFOnrTuOIEzXjQFWtH++3IEXZEupIjG7dTzTA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":205627},"main":"./dist/index.cjs","type":"module","_from":"file:402kit-server-0.1.2.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./hono":{"types":"./dist/hono.d.ts","import":"./dist/hono.js","require":"./dist/hono.cjs"},"./next":{"types":"./dist/next.d.ts","import":"./dist/next.js","require":"./dist/next.cjs"},"./express":{"types":"./dist/express.d.ts","import":"./dist/express.js","require":"./dist/express.cjs"}},"scripts":{"test":"vitest run","build":"tsup","typecheck":"tsc --noEmit"},"_npmUser":{"name":"402kit","email":"402kit@402kit.dev"},"_resolved":"/private/var/folders/6c/6xv7gwvn6jzc7rz8pn1_3_vm0000gn/T/78e8406c330703e3543283e809e3c755/402kit-server-0.1.2.tgz","_integrity":"sha512-XWbg5Ax3CdgeFJVS1wgPm3dEjoMoVip1L1rKPAzLVpxI6bFXOEEGrEWgy9EY+kDjVXv3f9sSD9h9Z6GAslI2+g==","repository":{"url":"git+https://github.com/402kit/402kit.git","type":"git","directory":"packages/server"},"_npmVersion":"11.5.2","description":"Server middleware for HTTP 402/x402 (Express/Next.js/Hono/edge)","directories":{},"sideEffects":false,"_nodeVersion":"20.17.0","dependencies":{"@402kit/core":"^0.1.2","@402kit/entitlement":"^0.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","vitest":"^1.3.1","typescript":"^5.3.3","@types/express":"^4.17.21"},"peerDependencies":{"hono":"^4.0.0","express":"^4.0.0"},"peerDependenciesMeta":{"hono":{"optional":true},"express":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/server_0.1.2_1761341488568_0.8247880322762233","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@402kit/server","version":"0.1.3","description":"Server middleware for HTTP 402/x402 (Express/Next.js/Hono/edge)","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./express":{"types":"./dist/express.d.ts","import":"./dist/express.js","require":"./dist/express.cjs"},"./next":{"types":"./dist/next.d.ts","import":"./dist/next.js","require":"./dist/next.cjs"},"./hono":{"types":"./dist/hono.d.ts","import":"./dist/hono.js","require":"./dist/hono.cjs"}},"sideEffects":false,"author":{"name":"402Kit Authors"},"homepage":"https://github.com/402kit/402kit#readme","bugs":{"url":"https://github.com/402kit/402kit/issues"},"engines":{"node":">=18"},"repository":{"type":"git","url":"git+https://github.com/402kit/402kit.git","directory":"packages/server"},"publishConfig":{"access":"public"},"keywords":["402kit","http 402","x402","middleware","express","nextjs","hono","edge"],"license":"Apache-2.0","dependencies":{"@402kit/core":"^0.1.3","@402kit/entitlement":"^0.1.3"},"devDependencies":{"@types/express":"^4.17.21","tsup":"^8.5.0","typescript":"^5.3.3","vitest":"^1.3.1"},"peerDependencies":{"express":"^4.0.0","hono":"^4.0.0"},"peerDependenciesMeta":{"express":{"optional":true},"hono":{"optional":true}},"scripts":{"build":"tsup","typecheck":"tsc --noEmit","test":"vitest run"},"_id":"@402kit/server@0.1.3","_integrity":"sha512-qL+ePH28c+K2KHUiwphV5NaaCneA36Ybq/SH6EOh4MNk6Jt4R/LvwxUeB4oVyRjVfqEXApVFZcSKxiBoonSSOg==","_resolved":"/tmp/c1ead22a533cc4bd31a76d2512b1cae5/402kit-server-0.1.3.tgz","_from":"file:402kit-server-0.1.3.tgz","_nodeVersion":"20.19.5","_npmVersion":"10.8.2","dist":{"integrity":"sha512-qL+ePH28c+K2KHUiwphV5NaaCneA36Ybq/SH6EOh4MNk6Jt4R/LvwxUeB4oVyRjVfqEXApVFZcSKxiBoonSSOg==","shasum":"209c6cb679fa0d3aef4a7ad9465edba78c5dc4b8","tarball":"https://registry.npmjs.org/@402kit/server/-/server-0.1.3.tgz","fileCount":27,"unpackedSize":223367,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@402kit%2fserver@0.1.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGTeUwlNpVz24SYmb2pW8nvqzFE850RoWapGCggVNxeyAiBSh+IsvrxONR/nKJ+5Gj0DX8VIHrvxWKpS/Y3hBRwaOw=="}]},"_npmUser":{"name":"402kit","email":"402kit@402kit.dev"},"directories":{},"maintainers":[{"name":"402kit","email":"402kit@402kit.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/server_0.1.3_1761515232927_0.49091432492637344"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-20T14:56:47.788Z","modified":"2025-10-26T21:47:13.573Z","0.1.0":"2025-10-20T14:56:48.059Z","0.1.1":"2025-10-20T15:11:02.289Z","0.1.2":"2025-10-24T21:31:28.801Z","0.1.3":"2025-10-26T21:47:13.141Z"},"bugs":{"url":"https://github.com/402kit/402kit/issues"},"author":{"name":"402Kit Authors"},"license":"Apache-2.0","homepage":"https://github.com/402kit/402kit#readme","keywords":["402kit","http 402","x402","middleware","express","nextjs","hono","edge"],"repository":{"type":"git","url":"git+https://github.com/402kit/402kit.git","directory":"packages/server"},"description":"Server middleware for HTTP 402/x402 (Express/Next.js/Hono/edge)","maintainers":[{"name":"402kit","email":"402kit@402kit.dev"}],"readme":"# @402kit/server\n\nServer middleware for HTTP 402/x402 (Express/Next.js/Hono/edge). Protect API routes with micropayments using the 402kit ecosystem and x402 protocol.\n\n## Installation\n\n```bash\nnpm install @402kit/server\n```\n\n## Quick Start\n\n```typescript\nimport { handle402 } from '@402kit/server';\nimport { MockAdapter } from '@402kit/adapter-mock';\n\n// HTTP 402 payment protection middleware\nconst config = {\n  price: async () => ({\n    scheme: 'exact',\n    network: 'evm:base:sepolia',\n    asset: '0x036CbD53842c5426634e7929541eC2318f3dCF7e',\n    maxAmountRequired: '1000',\n  }),\n  adapters: { mock: new MockAdapter() },\n  defaultAdapter: 'mock',\n};\n```\n\n## Features\n\n- HTTP 402 Payment Required middleware\n- x402 facilitator integration\n- Express/Next.js/Hono/edge runtime support\n- 402kit adapter ecosystem\n- **Strict header validation** (4096-byte limit, CRLF injection protection)\n\n## License\n\nApache-2.0\n","readmeFilename":"README.md"}