{"_id":"@atomic-rail/usage-gate","_rev":"13-e2afd936ec8b71237ce997dc6ad688dd","name":"@atomic-rail/usage-gate","dist-tags":{"latest":"0.2.3"},"versions":{"0.1.0":{"name":"@atomic-rail/usage-gate","version":"0.1.0","keywords":["x402","usage-gate","api","monetization","nextjs","payment","crypto"],"author":{"name":"atomic-rail"},"license":"MIT","_id":"@atomic-rail/usage-gate@0.1.0","maintainers":[{"name":"atomic-rail","email":"samin_r@outlook.com"}],"homepage":"https://atomicrail.com","dist":{"shasum":"4fc9acb607f7fe2722bdbf3537766d71105f5dc2","tarball":"https://registry.npmjs.org/@atomic-rail/usage-gate/-/usage-gate-0.1.0.tgz","fileCount":5,"integrity":"sha512-ThAw6vMy+PHfkhbXFsJpOLAllzPzRwt8wRqvn9TVeV/1O0DStS3PXDfVIw75GxSfppyNhpiDm+l/VXIZVK3ccw==","signatures":[{"sig":"MEUCICr+EZOEhhYNKoGxwmGU9yBTw3kL4GshmQYfPs2JAMMDAiEAn6bGX6ylIvRPN/ZGI+IIZ1hAvznc2e6+QQsz7MFcw7c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":37614},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"a97fdc70e835ff97aa5920b7bbc968fc9736209c","scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","test":"bun test","build":"tsup src/index.ts --format cjs,esm --dts","typecheck":"tsc --noEmit","prepublishOnly":"bun run build"},"_npmUser":{"name":"atomic-rail","email":"samin_r@outlook.com"},"_npmVersion":"10.5.0","description":"Usage-gated API routes with x402 payment and metering","directories":{},"_nodeVersion":"20.12.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","x402-next":"^1.0.0","typescript":"^5","@types/node":"^20"},"peerDependencies":{"next":">=14.0.0","x402-next":">=1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/usage-gate_0.1.0_1766277791698_0.8655962851891741","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@atomic-rail/usage-gate","version":"0.1.1","keywords":["x402","usage-gate","api","monetization","nextjs","payment","crypto"],"author":{"name":"atomic-rail"},"license":"MIT","_id":"@atomic-rail/usage-gate@0.1.1","maintainers":[{"name":"atomic-rail","email":"samin_r@outlook.com"}],"homepage":"https://atomicrail.com","dist":{"shasum":"3979a0e64c595690ed681794d65872a447ded17e","tarball":"https://registry.npmjs.org/@atomic-rail/usage-gate/-/usage-gate-0.1.1.tgz","fileCount":6,"integrity":"sha512-NmCKy/P/+LFypGFIm77eMnOOjXYGb40OL9urJIBdcid3vfMWR3Ft8rcsK7EwI6JcbMuUY4sbcNBLRIiuTurpQQ==","signatures":[{"sig":"MEUCIQDfBiy3mI44QlXlQBvHZqWlcsmc+u1X2COu3Ns2bVNfbAIgYVuhbSQAwx333eut+htKYPjzs/YVXQAz8e8b6IZCcG4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":50281},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"a97fdc70e835ff97aa5920b7bbc968fc9736209c","scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","test":"bun test","build":"tsup src/index.ts --format cjs,esm --dts","typecheck":"tsc --noEmit","prepublishOnly":"bun run build"},"_npmUser":{"name":"atomic-rail","email":"samin_r@outlook.com"},"_npmVersion":"10.5.0","description":"Usage-gated API routes with x402 payment and metering","directories":{},"_nodeVersion":"20.12.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","x402-next":"^1.0.0","typescript":"^5","@types/node":"^20"},"peerDependencies":{"next":">=14.0.0","x402-next":">=1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/usage-gate_0.1.1_1766278036469_0.002151073154852412","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@atomic-rail/usage-gate","version":"0.1.2","keywords":["x402","usage-gate","api","monetization","nextjs","payment","crypto"],"author":{"name":"atomic-rail"},"license":"MIT","_id":"@atomic-rail/usage-gate@0.1.2","maintainers":[{"name":"atomic-rail","email":"samin_r@outlook.com"}],"homepage":"https://atomicrail.com","dist":{"shasum":"c119ba275d21e53686b838d32ce4e61f3d344c5a","tarball":"https://registry.npmjs.org/@atomic-rail/usage-gate/-/usage-gate-0.1.2.tgz","fileCount":6,"integrity":"sha512-Vth2IZ1E6fBncluN6edV63ZpCNWJBZHiWHmYWH0LMOyPn+y7YoK+H43MgPdnTfkB52/ONQimhXc02HHgeBbrGg==","signatures":[{"sig":"MEUCICVA007pQgzfCuz2iVoh1a2aW2juWEzV8GzbLF5BQyJlAiEAqkZW8PvUoFIvc5up74w69G7jsf2UnukiUyk6euLksJQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":50281},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"a84d2373e2bec326217c787b010cac456fd1e507","scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","test":"bun test","build":"tsup src/index.ts --format cjs,esm --dts","typecheck":"tsc --noEmit","prepublishOnly":"bun run build"},"_npmUser":{"name":"atomic-rail","email":"samin_r@outlook.com"},"_npmVersion":"10.5.0","description":"Usage-gated API routes with x402 payment and metering","directories":{},"_nodeVersion":"20.12.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","x402-next":"^1.0.0","typescript":"^5","@types/node":"^20"},"peerDependencies":{"next":">=14.0.0","x402-next":">=1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/usage-gate_0.1.2_1766367777404_0.8315122021517831","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@atomic-rail/usage-gate","version":"0.1.3","keywords":["x402","usage-gate","api","monetization","nextjs","payment","crypto"],"author":{"name":"atomic-rail"},"license":"MIT","_id":"@atomic-rail/usage-gate@0.1.3","maintainers":[{"name":"atomic-rail","email":"samin_r@outlook.com"}],"homepage":"https://atomicrail.com","dist":{"shasum":"85d22658c4656eb93189786a3e4421f8ed906370","tarball":"https://registry.npmjs.org/@atomic-rail/usage-gate/-/usage-gate-0.1.3.tgz","fileCount":6,"integrity":"sha512-i939s7QslEe4ASvQxBG229z17rJrA67Mp37aihc5ot/84znVq/aBJWitROECf7qZo0eO0UxuYLpc0UH5K6WRCA==","signatures":[{"sig":"MEUCIQCAl7Ziqht18UQw1N57Vg+PGWcSmO2GK7sKe0o3kTJkcgIgJY37S9JmIEZO0T08OqLlbeCyVM70XzgBwNRTaWcLKWQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49745},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"a84d2373e2bec326217c787b010cac456fd1e507","scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","test":"bun test","build":"tsup src/index.ts --format cjs,esm --dts","typecheck":"tsc --noEmit","prepublishOnly":"bun run build"},"_npmUser":{"name":"atomic-rail","email":"samin_r@outlook.com"},"_npmVersion":"10.5.0","description":"Usage-gated API routes with x402 payment and metering","directories":{},"_nodeVersion":"20.12.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","x402-next":"^1.0.0","typescript":"^5","@types/node":"^20"},"peerDependencies":{"next":">=14.0.0","x402-next":">=1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/usage-gate_0.1.3_1766367832310_0.9478971997305476","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@atomic-rail/usage-gate","version":"0.1.5","keywords":["x402","usage-gate","api","monetization","payment","crypto","nextjs","hono","bun","deno","cloudflare-workers"],"author":{"name":"atomic-rail"},"license":"MIT","_id":"@atomic-rail/usage-gate@0.1.5","maintainers":[{"name":"atomic-rail","email":"samin_r@outlook.com"}],"homepage":"https://atomicrail.com","dist":{"shasum":"6fd653c8ea3d0010c9ca99d271d9ec69b43c3039","tarball":"https://registry.npmjs.org/@atomic-rail/usage-gate/-/usage-gate-0.1.5.tgz","fileCount":6,"integrity":"sha512-m8+qRF70UtKxk/mEHheAgqsA93zcHYLCtMOD7vvRjnZr2ml7G7KQXB0VINSDRA6Wp+w01+6c0xP8QE349Gjw4g==","signatures":[{"sig":"MEUCIEayd/66JC+o0C2gdqnYwuDSvrVf5/aQJbG2qPrZ/JUwAiEA/ZkHDaNjMkPQL3Sll/4OiGBq59k8betvxXPBwviW6QY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":51286},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"8b7a6fa102c93fb9e87ce3a123451dfaeeb1cca2","scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","test":"bun test","build":"tsup src/index.ts --format cjs,esm --dts","typecheck":"tsc --noEmit","prepublishOnly":"bun run build"},"_npmUser":{"name":"atomic-rail","email":"samin_r@outlook.com"},"_npmVersion":"10.5.0","description":"Usage-gated API routes with x402 payment and metering","directories":{},"_nodeVersion":"20.12.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","x402-next":"^1.0.0","typescript":"^5","@types/node":"^20"},"peerDependencies":{"next":">=14.0.0","@x402/next":"^2.0.0"},"peerDependenciesMeta":{"next":{"optional":true},"x402-next":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/usage-gate_0.1.5_1766433811379_0.34415907457653083","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@atomic-rail/usage-gate","version":"0.1.6","keywords":["x402","usage-gate","api","monetization","payment","crypto","nextjs","hono","bun","deno","cloudflare-workers"],"author":{"name":"atomic-rail"},"license":"MIT","_id":"@atomic-rail/usage-gate@0.1.6","maintainers":[{"name":"atomic-rail","email":"samin_r@outlook.com"}],"homepage":"https://atomicrail.com","dist":{"shasum":"a4285ada1a1a76890219cdd4da26520a567b808a","tarball":"https://registry.npmjs.org/@atomic-rail/usage-gate/-/usage-gate-0.1.6.tgz","fileCount":6,"integrity":"sha512-jsQzjnOQucdujrT/0VOd8krkq3i71rFMkpbD28xhgAcrwEDHQ2A5ohL+UtVI0TCmHEawtJypCCracUtR40vw8Q==","signatures":[{"sig":"MEQCIA0kklyvTrsPuwmEiMkzGlcfS5doq/ZiyfJMk1bwOQQ8AiAA8WokcXAPwvVCi00eBEgPPJvmNZ5k8cfamDKDjDuq4w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":42365},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"068dc6b5ce6cfac5d35045706b1b3e02b9bc6ffb","scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","test":"bun test","build":"tsup src/index.ts --format cjs,esm --dts","typecheck":"tsc --noEmit","prepublishOnly":"bun run build"},"_npmUser":{"name":"atomic-rail","email":"samin_r@outlook.com"},"_npmVersion":"10.5.0","description":"Usage-gated API routes with x402 payment and metering","directories":{},"_nodeVersion":"20.12.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","x402-next":"^1.0.0","typescript":"^5","@types/node":"^20"},"peerDependencies":{"next":">=14.0.0","@x402/next":"^2.0.0"},"peerDependenciesMeta":{"next":{"optional":true},"x402-next":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/usage-gate_0.1.6_1766519413688_0.7925076036754961","host":"s3://npm-registry-packages-npm-production"}},"0.1.7":{"name":"@atomic-rail/usage-gate","version":"0.1.7","keywords":["x402","usage-gate","api","monetization","payment","crypto","nextjs","hono","bun","deno","cloudflare-workers"],"author":{"name":"atomic-rail"},"license":"MIT","_id":"@atomic-rail/usage-gate@0.1.7","maintainers":[{"name":"atomic-rail","email":"samin_r@outlook.com"}],"homepage":"https://atomicrail.com","dist":{"shasum":"8286bdde8827183d2ad729884cf4ac3d79469f03","tarball":"https://registry.npmjs.org/@atomic-rail/usage-gate/-/usage-gate-0.1.7.tgz","fileCount":6,"integrity":"sha512-MvRxz1MIj+SHYUt4h2eMkw/cPqpO5HHfMBU5lZo9We0bIFMZS0s3E7PJiHjELTT1FlmfZRrxfyHX6vjTjCLdHg==","signatures":[{"sig":"MEUCIQCdD0YyBn6BwALpP8iEqs0XNZm1xosS0TGvIBl0y9+F7QIgYluMRK/pwtFLjC/zuaqrQqDXOT0F2xAjpd+SD6s/kOE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":151808},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"92e0a96a66563d52944253d872198811d45d30b6","scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","test":"bun test","build":"tsup src/index.ts --format cjs,esm --dts","typecheck":"tsc --noEmit","prepublishOnly":"bun run build"},"_npmUser":{"name":"atomic-rail","email":"samin_r@outlook.com"},"_npmVersion":"10.5.0","description":"Usage-gated API routes with x402 payment and metering","directories":{},"_nodeVersion":"20.12.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5","@types/node":"^20"},"_npmOperationalInternal":{"tmp":"tmp/usage-gate_0.1.7_1766727434345_0.64132718274863","host":"s3://npm-registry-packages-npm-production"}},"0.1.8":{"name":"@atomic-rail/usage-gate","version":"0.1.8","keywords":["x402","usage-gate","api","monetization","payment","crypto","nextjs","hono","bun","deno","cloudflare-workers"],"author":{"name":"atomic-rail"},"license":"MIT","_id":"@atomic-rail/usage-gate@0.1.8","maintainers":[{"name":"atomic-rail","email":"samin_r@outlook.com"}],"homepage":"https://atomicrail.com","dist":{"shasum":"c2ca2c6a62504e911748223b3c1f2ee8a2374af8","tarball":"https://registry.npmjs.org/@atomic-rail/usage-gate/-/usage-gate-0.1.8.tgz","fileCount":6,"integrity":"sha512-LCxGlrxlCm7+k+aeqfmZwl677QF9OMdfnXsgAkC1WWAm+dqiRBpQtR7+kxFbwLL4newO29ZugonhflAMj+54vw==","signatures":[{"sig":"MEYCIQCck4up6r4AQ8t5wnqeNVawNfY7yK2IRmsY7AdWnZlX0QIhAP+d7iSlhfQyciVi9BVNqMi2vYhYESmPsBsStYjM12rK","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":145564},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"54a449228b28a0cbd6c95faee7563d7cf69f4bd4","scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","test":"bun test","build":"tsup src/index.ts --format cjs,esm --dts","typecheck":"tsc --noEmit","prepublishOnly":"bun run build"},"_npmUser":{"name":"atomic-rail","email":"samin_r@outlook.com"},"_npmVersion":"10.5.0","description":"Usage-gated API routes with x402 payment and metering","directories":{},"_nodeVersion":"20.12.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5","@types/node":"^20"},"_npmOperationalInternal":{"tmp":"tmp/usage-gate_0.1.8_1766728759666_0.3053135401212672","host":"s3://npm-registry-packages-npm-production"}},"0.1.9":{"name":"@atomic-rail/usage-gate","version":"0.1.9","keywords":["x402","usage-gate","api","monetization","payment","crypto","nextjs","hono","bun","deno","cloudflare-workers"],"author":{"name":"atomic-rail"},"license":"MIT","_id":"@atomic-rail/usage-gate@0.1.9","maintainers":[{"name":"atomic-rail","email":"samin_r@outlook.com"}],"homepage":"https://atomicrail.com","dist":{"shasum":"3cb6a073b9d6679bbc2879305c9244bde77493fe","tarball":"https://registry.npmjs.org/@atomic-rail/usage-gate/-/usage-gate-0.1.9.tgz","fileCount":6,"integrity":"sha512-ONx42R1o2sPsYPY3y/6oBwGpZwfPH3n+s287JSeFtbr8f+DYVnRhLiIwOhLSWwJCkZAGakYuZl4RBwqrmBKVLA==","signatures":[{"sig":"MEUCIQC6eatK+imHVUgmlUmCKjlxyt+sx6/m4WRH1FAyESW7CQIgZg0qM1CrNDuwBd1vAIe78uRF6seG6vX2pv3drwMjL1E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":145552},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"54a449228b28a0cbd6c95faee7563d7cf69f4bd4","scripts":{"dev":"tsup src/index.ts --format cjs,esm --dts --watch","test":"bun test","build":"tsup src/index.ts --format cjs,esm --dts","typecheck":"tsc --noEmit","prepublishOnly":"bun run build"},"_npmUser":{"name":"atomic-rail","email":"samin_r@outlook.com"},"_npmVersion":"10.5.0","description":"Usage-gated API routes with x402 payment and metering","directories":{},"_nodeVersion":"20.12.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5","@types/node":"^20"},"_npmOperationalInternal":{"tmp":"tmp/usage-gate_0.1.9_1766728979001_0.23448190435492933","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@atomic-rail/usage-gate","version":"0.2.0","keywords":["x402","usage-gate","api","monetization","payment","crypto","nextjs","hono","bun","deno","cloudflare-workers"],"author":{"name":"atomic-rail"},"license":"MIT","_id":"@atomic-rail/usage-gate@0.2.0","maintainers":[{"name":"atomic-rail","email":"samin_r@outlook.com"}],"homepage":"https://atomicrail.com","dist":{"shasum":"744e96cfa5a4941e2a69ef8567e01af045a5fa8d","tarball":"https://registry.npmjs.org/@atomic-rail/usage-gate/-/usage-gate-0.2.0.tgz","fileCount":11,"integrity":"sha512-tizavFvCvf10ophpdJClu8V5N5dzJ/CPCPz0NiDRCYb0V/kdHCH5sgSPqOk0mmuWPDf0Te4aYoO9xUYh5ZTDSA==","signatures":[{"sig":"MEYCIQDNWo7jyEUbw4JtuPpLAM3fw66KP9hLgkqmrg+gWQM0VgIhAIc07pDMAJiVFLZ85DhPnq1H61NTX3FGtIfOrKJWmxw/","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":156477},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./client":{"types":"./dist/client/index.d.ts","import":"./dist/client/index.mjs","require":"./dist/client/index.js"}},"gitHead":"804473942f9c46ebae8d15535255f3b0a8b7ac00","scripts":{"dev":"tsup src/index.ts src/client/index.ts --format cjs,esm --dts --watch","test":"bun test","build":"tsup src/index.ts src/client/index.ts --format cjs,esm --dts","typecheck":"tsc --noEmit","prepublishOnly":"bun run build"},"_npmUser":{"name":"atomic-rail","email":"samin_r@outlook.com"},"_npmVersion":"10.5.0","description":"Usage-gated API routes with x402 payment and metering","directories":{},"_nodeVersion":"20.12.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5","@types/node":"^20","@types/react":"^19"},"peerDependencies":{"viem":"^2.0.0","react":">=18","@x402/evm":"^2.0.0","@x402/fetch":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/usage-gate_0.2.0_1766874128825_0.4711206466462061","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@atomic-rail/usage-gate","version":"0.2.1","keywords":["x402","usage-gate","api","monetization","payment","crypto","nextjs","hono","bun","deno","cloudflare-workers"],"author":{"name":"atomic-rail"},"license":"MIT","_id":"@atomic-rail/usage-gate@0.2.1","maintainers":[{"name":"atomic-rail","email":"samin_r@outlook.com"}],"homepage":"https://atomicrail.com","dist":{"shasum":"23614ca945819b2dee8df9086632dda95a3b2b7b","tarball":"https://registry.npmjs.org/@atomic-rail/usage-gate/-/usage-gate-0.2.1.tgz","fileCount":11,"integrity":"sha512-ASlJIPSqs9sh/NUVQ+Kxn4rIV+WB3ruJuHtxNY9dkK1z8+FgV6L9yxJTYBDsSuml8wDhUE9hGkSg0CWqFYFycg==","signatures":[{"sig":"MEYCIQDLxDRbvV2P2n32SHKo+PvEjNAZ4GzMuBofkUfpwog1RgIhAOzLL7AHQX8lCQ64c1p2MFrUh/DPKhoQlACq0rgT/cq4","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":156481},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./client":{"types":"./dist/client/index.d.ts","import":"./dist/client/index.mjs","require":"./dist/client/index.js"}},"gitHead":"79e1c0e2162ee87b4f3d581e1349d275705a36c2","scripts":{"dev":"tsup src/index.ts src/client/index.ts --format cjs,esm --dts --watch","test":"bun test","build":"tsup src/index.ts src/client/index.ts --format cjs,esm --dts","typecheck":"tsc --noEmit","prepublishOnly":"bun run build"},"_npmUser":{"name":"atomic-rail","email":"samin_r@outlook.com"},"_npmVersion":"10.5.0","description":"Usage-gated API routes with x402 payment and metering","directories":{},"_nodeVersion":"20.12.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5","@types/node":"^20","@types/react":"^19"},"peerDependencies":{"viem":"^2.0.0","react":">=18","@x402/evm":"^2.0.0","@x402/fetch":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/usage-gate_0.2.1_1766874531022_0.6842695479502516","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@atomic-rail/usage-gate","version":"0.2.2","keywords":["x402","usage-gate","api","monetization","payment","crypto","nextjs","hono","bun","deno","cloudflare-workers"],"author":{"name":"atomic-rail"},"license":"MIT","_id":"@atomic-rail/usage-gate@0.2.2","maintainers":[{"name":"atomic-rail","email":"samin_r@outlook.com"}],"homepage":"https://atomicrail.com","dist":{"shasum":"7246853c97e946c1c74a0584c064413a365661f1","tarball":"https://registry.npmjs.org/@atomic-rail/usage-gate/-/usage-gate-0.2.2.tgz","fileCount":11,"integrity":"sha512-8q78mW5x1SK32tOwEjiboju21I3Ujeerv7WDZv/Xawcx2QQayPImDkEDFTcBYe6bhcPk+Ylx9EcoTxRcCnu+Tg==","signatures":[{"sig":"MEUCIQDaVOv2JqHIyRy/SQNcz9mTRK7RR1hlu+6rY8Sm4bmlPQIgblLne8bSa6vtEqi2+44eITTh6MnS4Ni+NuHQuxopMU4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":157025},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./client":{"types":"./dist/client/index.d.ts","import":"./dist/client/index.mjs","require":"./dist/client/index.js"}},"gitHead":"e94ef69382c81d0a10340426c6a9f78e23985e7c","scripts":{"dev":"tsup src/index.ts src/client/index.ts --format cjs,esm --dts --watch","test":"bun test","build":"tsup src/index.ts src/client/index.ts --format cjs,esm --dts","typecheck":"tsc --noEmit","prepublishOnly":"bun run build"},"_npmUser":{"name":"atomic-rail","email":"samin_r@outlook.com"},"_npmVersion":"10.5.0","description":"Usage-gated API routes with x402 payment and metering","directories":{},"_nodeVersion":"20.12.1","_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5","@types/node":"^20","@types/react":"^19"},"peerDependencies":{"viem":"^2.0.0","react":">=18","@x402/evm":"^2.0.0","@x402/fetch":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/usage-gate_0.2.2_1766942416544_0.0653779081956245","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@atomic-rail/usage-gate","version":"0.2.3","description":"Usage-gated API routes with x402 payment and metering","author":{"name":"atomic-rail"},"homepage":"https://atomicrail.com","main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./client":{"types":"./dist/client/index.d.ts","import":"./dist/client/index.mjs","require":"./dist/client/index.js"}},"scripts":{"build":"tsup src/index.ts src/client/index.ts --format cjs,esm --dts","prepublishOnly":"bun run build","dev":"tsup src/index.ts src/client/index.ts --format cjs,esm --dts --watch","test":"bun test","typecheck":"tsc --noEmit"},"devDependencies":{"@types/node":"^20","@types/react":"^19","tsup":"^8.0.0","typescript":"^5"},"peerDependencies":{"react":">=18","viem":"^2.0.0","@x402/fetch":"^2.0.0","@x402/evm":"^2.0.0"},"keywords":["x402","usage-gate","api","monetization","payment","crypto","nextjs","hono","bun","deno","cloudflare-workers"],"license":"MIT","_id":"@atomic-rail/usage-gate@0.2.3","gitHead":"8b3963adf9336bf8e491db221ca350b199a99495","_nodeVersion":"20.12.1","_npmVersion":"10.5.0","dist":{"integrity":"sha512-OKufz4NB2zDiEKsHGGj5yJqhkqUFmZOxYQWUdSrOg7wdp4GSPkhGsYRdtheSBIupUlLOICfZMiYCUFO74st0vw==","shasum":"f0c58ee538dd1de6d746af163b174b3678207e0e","tarball":"https://registry.npmjs.org/@atomic-rail/usage-gate/-/usage-gate-0.2.3.tgz","fileCount":11,"unpackedSize":159419,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDiJMDfTXiBbdpE4C3oJUdBLCqakxufFejq+T3lKXmLBQIgemD0H6t0oP7dAp2xOIqPhuzVpByqNjRFHy+35x+uIFI="}]},"_npmUser":{"name":"atomic-rail","email":"samin_r@outlook.com"},"directories":{},"maintainers":[{"name":"atomic-rail","email":"samin_r@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/usage-gate_0.2.3_1766975696042_0.27440237909834764"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-21T00:43:11.622Z","modified":"2025-12-29T02:34:56.403Z","0.1.0":"2025-12-21T00:43:11.837Z","0.1.1":"2025-12-21T00:47:16.635Z","0.1.2":"2025-12-22T01:42:57.555Z","0.1.3":"2025-12-22T01:43:52.446Z","0.1.5":"2025-12-22T20:03:31.535Z","0.1.6":"2025-12-23T19:50:13.827Z","0.1.7":"2025-12-26T05:37:14.507Z","0.1.8":"2025-12-26T05:59:19.828Z","0.1.9":"2025-12-26T06:02:59.158Z","0.2.0":"2025-12-27T22:22:08.977Z","0.2.1":"2025-12-27T22:28:51.167Z","0.2.2":"2025-12-28T17:20:16.700Z","0.2.3":"2025-12-29T02:34:56.196Z"},"author":{"name":"atomic-rail"},"license":"MIT","homepage":"https://atomicrail.com","keywords":["x402","usage-gate","api","monetization","payment","crypto","nextjs","hono","bun","deno","cloudflare-workers"],"description":"Usage-gated API routes with x402 payment and metering","maintainers":[{"name":"atomic-rail","email":"samin_r@outlook.com"}],"readme":"# @atomic-rail/usage-gate\r\n\r\n<div align=\"center\">\r\n\r\n**Registry-first API monetization with automated metering**\r\n\r\nTurn any API route into a paid endpoint in minutes.  \r\nEverything—pricing, gating, and status—is managed from your dashboard.\r\n\r\n[![npm version](https://img.shields.io/npm/v/@atomic-rail/usage-gate.svg)](https://www.npmjs.com/package/@atomic-rail/usage-gate)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\r\n\r\n</div>\r\n\r\n---\r\n\r\n## ✨ Features\r\n\r\n- **💰 Registry-First** — Change prices or disable endpoints from your dashboard without redeploying code.\r\n- **📊 Automatic Metering** — Every request tracked with verified payer info.\r\n- **🔐 HMAC-Signed Verification** — Secure communication between your API and the Action Registry.\r\n- **⚡ Framework Agnostic** — Works with Next.js, Express, Hono, Bun, and more.\r\n- **🌐 Direct Payments** — Funds go straight from the payer to your wallet via x402.\r\n\r\n---\r\n\r\n## 📦 Installation\r\n\r\n```bash\r\nnpm install @atomic-rail/usage-gate\r\n```\r\n\r\n---\r\n\r\n## 🚀 Quick Start\r\n\r\n### 1. Install\r\n\r\n```bash\r\nnpm install @atomic-rail/usage-gate\r\n```\r\n\r\n### 2. Initialize the Gate\r\n\r\nCreate a central gate instance. This class is framework-agnostic and handles all the complex x402 payment logic and Registry synchronization for you.\r\n\r\n```typescript:lib/atomic.ts\r\nimport { AtomicGate } from \"@atomic-rail/usage-gate\";\r\n\r\nexport const gate = new AtomicGate({\r\n  projectId: process.env.METER_PROJECT_ID!,\r\n  hmacSecret: process.env.METER_HMAC_SECRET!,\r\n  sellerWallet: \"0xYourWalletAddress\",\r\n});\r\n```\r\n\r\n### 3. Protect Your Routes\r\n\r\nUse the gate in your middleware or request handler. It automatically fetches your latest pricing and status from the **Action Registry**.\r\n\r\n```typescript:middleware.ts\r\nimport { gate } from \"./lib/atomic\";\r\n\r\nexport default async function middleware(request: Request) {\r\n  if (request.url.includes(\"/api/\")) {\r\n    const result = await gate.process(request);\r\n    if (result.shouldBlock) return result.response;\r\n  }\r\n}\r\n```\r\n\r\n### 4. Meter Your Handler\r\n\r\nWrap your route handler with `withUsageGate` to emit usage events to your dashboard and access the verified `payerAddress`.\r\n\r\n```typescript:app/api/premium/route.ts\r\nimport { withUsageGate } from \"@atomic-rail/usage-gate\";\r\n\r\nconst config = {\r\n  actionId: \"premium-api\",\r\n  meter: {\r\n    projectId: process.env.METER_PROJECT_ID!,\r\n    hmacSecret: process.env.METER_HMAC_SECRET!,\r\n  }\r\n};\r\n\r\nexport const GET = withUsageGate(config, async (req) => {\r\n  return Response.json({\r\n    status: \"paid\",\r\n    payer: req.payerAddress,\r\n  });\r\n});\r\n```\r\n\r\n### 5. Register Actions (No-Code)\r\n\r\nYou don't need to hardcode prices or networks anymore.\r\n\r\n1.  Head to your [Atomic Rail Dashboard](https://atomicrail.com).\r\n2.  Go to the **Action Registry**.\r\n3.  Any new `actionId` you've used in your code will appear as a **\"Ghost\"**.\r\n4.  Click **\"Claim\"** to set the official Price, Network, and Status.\r\n\r\n---\r\n\r\n## 🔄 How It Works\r\n\r\n1. **Registry Fetch**: The `AtomicGate` fetches your latest pricing and status from the Atomic Rail Action Registry.\r\n2. **Payment Verification**: If a route is gated, the gate verifies the `PAYMENT-SIGNATURE` header via the x402 protocol.\r\n3. **Metering**: `withUsageGate` emits an HMAC-signed event to the Atomic Rail meter service after your handler successfully executes.\r\n4. **Analytics**: Real-time revenue and usage stats appear in your dashboard.\r\n\r\n---\r\n\r\n## ⚙️ Configuration\r\n\r\n### AtomicGateConfig\r\n\r\n| Option         | Description                                     |\r\n| -------------- | ----------------------------------------------- |\r\n| `projectId`    | Your Project ID from the Atomic Rail dashboard. |\r\n| `hmacSecret`   | Your HMAC Secret for signing registry requests. |\r\n| `sellerWallet` | The EVM address where payments should be sent.  |\r\n| `debug`        | Enable verbose logging for development.         |\r\n\r\n---\r\n\r\n## 📋 Requirements\r\n\r\n- **Node.js 18+** (or Bun/Deno with Web Standard APIs)\r\n- Any framework using Web Standard `Request`/`Response`\r\n- No complex x402 configuration required (handled by `AtomicGate`)\r\n\r\n---\r\n\r\n## ❓ FAQ\r\n\r\n**Where do payments go?**  \r\nDirectly to your wallet. We don't touch your funds — only track usage and provide the gating infrastructure.\r\n\r\n**What if the Action Registry is down?**  \r\n`AtomicGate` uses a stale-while-revalidate caching strategy. If the registry is unreachable, it uses the last known configuration to ensure your API stays live.\r\n\r\n**How do I view analytics?**  \r\nSign in at [atomicrail.com](https://atomicrail.com) and check your project dashboard.\r\n\r\n---\r\n\r\n## 📄 License\r\n\r\nMIT © [Atomic Rail](https://atomicrail.com)\r\n","readmeFilename":"README.md"}