{"_id":"@anshu007/falcone-sdk","_rev":"2-c445819d5800be5af66319f4ed70adb7","name":"@anshu007/falcone-sdk","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@anshu007/falcone-sdk","version":"1.0.0","keywords":["stellar","api","monetization","payment","xlm","blockchain","express","middleware"],"author":{"name":"Falcone Labs"},"license":"MIT","_id":"@anshu007/falcone-sdk@1.0.0","maintainers":[{"name":"anshu007","email":"anshukumarthakur7725@gmail.com"}],"homepage":"https://falcone.dev","bugs":{"url":"https://github.com/falcone-labs/falcone-sdk/issues"},"bin":{"falcone":"bin/cli.js"},"dist":{"shasum":"2575320913d5b8eac5feca6a149ae5fc4213374e","tarball":"https://registry.npmjs.org/@anshu007/falcone-sdk/-/falcone-sdk-1.0.0.tgz","fileCount":6,"integrity":"sha512-U7dBDN2EAPXt4d/Et7hJpYm+q5GlCNeoyqEi3Q1JTZU7b9kp3VYuQra9JVGYSIx/te4FTbNa1Rvt3FNnSMxjdg==","signatures":[{"sig":"MEUCIQCwi6gwUzFMQnyq7z4/vRUswfM5Jqi48u5mxT2IR60BnAIgYqx96ppgGagyNLw+UC4CiRIdra2Eh+Mv4U5VyUYx8/o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16976},"main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"anshu007","email":"anshukumarthakur7725@gmail.com"},"repository":{"url":"git+https://github.com/falcone-labs/falcone-sdk.git","type":"git"},"_npmVersion":"11.7.0","description":"Monetize your APIs with Stellar payments. Wrap any Express endpoint with pay-per-call protection.","directories":{},"_nodeVersion":"25.3.0","dependencies":{"axios":"^1.6.0"},"_hasShrinkwrap":false,"peerDependencies":{"express":"^4.0.0 || ^5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/falcone-sdk_1.0.0_1769899149666_0.7616408346223542","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@anshu007/falcone-sdk","version":"1.0.1","description":"Monetize your APIs with Stellar payments. Wrap any Express endpoint with pay-per-call protection.","main":"index.js","bin":{"falcone":"bin/cli.js"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["stellar","api","monetization","payment","xlm","blockchain","express","middleware"],"author":{"name":"Falcone Labs"},"license":"MIT","dependencies":{"axios":"^1.6.0"},"peerDependencies":{"express":"^4.0.0 || ^5.0.0"},"repository":{"type":"git","url":"git+https://github.com/falcone-labs/falcone-sdk.git"},"homepage":"https://falcone.dev","_id":"@anshu007/falcone-sdk@1.0.1","bugs":{"url":"https://github.com/falcone-labs/falcone-sdk/issues"},"_nodeVersion":"25.3.0","_npmVersion":"11.7.0","dist":{"integrity":"sha512-TUIPhZqLKWTEwMlV6ci3mJm7YI1IG0hpbMYLY+u2nGokhMu3TnkS8atnMz3fIIqb6YYaP/ythZ+VmH4KF7VkFA==","shasum":"081d03a3602262e95d33bfabe2892f4ecaa71ad5","tarball":"https://registry.npmjs.org/@anshu007/falcone-sdk/-/falcone-sdk-1.0.1.tgz","fileCount":6,"unpackedSize":16976,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGAajDkW1kGHwMHb0t2a0tlJ+RUYGTUxIOjOwZTCBs6xAiBfpI0yikghtJBY5koU8qzNT5KhgEStz2aDBU74jTjMnw=="}]},"_npmUser":{"name":"anshu007","email":"anshukumarthakur7725@gmail.com"},"directories":{},"maintainers":[{"name":"anshu007","email":"anshukumarthakur7725@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/falcone-sdk_1.0.1_1769899424060_0.16718047053004126"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-31T22:39:09.601Z","modified":"2026-01-31T22:43:44.326Z","1.0.0":"2026-01-31T22:39:09.815Z","1.0.1":"2026-01-31T22:43:44.206Z"},"bugs":{"url":"https://github.com/falcone-labs/falcone-sdk/issues"},"author":{"name":"Falcone Labs"},"license":"MIT","homepage":"https://falcone.dev","keywords":["stellar","api","monetization","payment","xlm","blockchain","express","middleware"],"repository":{"type":"git","url":"git+https://github.com/falcone-labs/falcone-sdk.git"},"description":"Monetize your APIs with Stellar payments. Wrap any Express endpoint with pay-per-call protection.","maintainers":[{"name":"anshu007","email":"anshukumarthakur7725@gmail.com"}],"readme":"# Falcone SDK\n\n> 💰 Monetize your APIs with Stellar payments\n\nFalcone SDK allows developers to wrap their Express.js API endpoints with pay-per-call protection using Stellar blockchain payments.\n\n## Installation\n\n```bash\nnpm install falcone-sdk\n```\n\n## Quick Start\n\n### 1. Wrap Your API\n\n```javascript\nconst express = require('express');\nconst { protect } = require('falcone-sdk');\n\nconst app = express();\n\n// Protect your API endpoint\napp.get('/api/premium', protect({\n  price: { amount: '10', asset: 'XLM' },\n  receiver: 'GXXXXX...' // Your Stellar wallet address\n}), (req, res) => {\n  res.json({ data: 'Premium content!' });\n});\n\napp.listen(3000);\n```\n\n### 2. Register on Marketplace\n\n```bash\nnpx falcone register \\\n  --name \"My Premium API\" \\\n  --description \"Amazing API that does cool things\" \\\n  --endpoint \"https://myapi.com/api/premium\" \\\n  --price 10 \\\n  --wallet \"GXXXXX...\"\n```\n\n### 3. Done! 🎉\n\nYour API is now live on the Falcone Marketplace. Users can discover and pay for your API.\n\n## How It Works\n\n1. User calls your protected API\n2. API returns `402 Payment Required` with payment details\n3. User pays via Stellar (Freighter wallet or direct transfer)\n4. User retries API call with `x-payment-tx` header\n5. SDK verifies payment on Stellar blockchain\n6. API returns the premium content\n\n## API Reference\n\n### `protect(config)`\n\nExpress middleware that protects your API endpoint.\n\n```javascript\nprotect({\n  price: {\n    amount: '10',    // Price per call\n    asset: 'XLM'      // Payment asset (XLM, USDC, etc.)\n  },\n  receiver: 'GXXX...', // Your Stellar wallet address\n  validateRequest: (req) => true // Optional: custom validation\n})\n```\n\n### `registerAPI(config)`\n\nProgrammatically register your API on the marketplace.\n\n```javascript\nconst { registerAPI } = require('falcone-sdk');\n\nawait registerAPI({\n  name: 'My API',\n  description: 'Amazing API',\n  endpoint: 'https://myapi.com/api/endpoint',\n  price: '10',\n  asset: 'XLM',\n  receiver: 'GXXX...',\n  category: 'AI & ML',\n  owner: 'My Company'\n});\n```\n\n## CLI Commands\n\n```bash\n# Register an API\nnpx falcone register --name \"...\" --endpoint \"...\" --price 10 --wallet \"...\"\n\n# List all registered APIs\nnpx falcone list\n\n# Show setup instructions\nnpx falcone init\n\n# Help\nnpx falcone help\n```\n\n## Environment Variables\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `FALCONE_REGISTRY` | Override registry URL | `http://localhost:3001` |\n\n## License\n\nMIT © Falcone Labs\n","readmeFilename":"README.md"}