{"_id":"@blockchainhq-xyz/n8n-nodes-pocket-mock","_rev":"3-1d9b11f4a220527588d08c2efc59f079","name":"@blockchainhq-xyz/n8n-nodes-pocket-mock","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.1":{"name":"@blockchainhq-xyz/n8n-nodes-pocket-mock","version":"1.0.1","keywords":["n8n-community-node-package","n8n","solana","x402","payment","http-402"],"author":{"name":"Mahima Thacker"},"license":"MIT","_id":"@blockchainhq-xyz/n8n-nodes-pocket-mock@1.0.1","maintainers":[{"name":"blockchainhq-xyz","email":"gmblockchainhq@gmail.com"}],"homepage":"https://github.com/blockchain-hq/x402-n8n-mock-node","bugs":{"url":"https://github.com/blockchain-hq/x402-n8n-mock-node/issues"},"n8n":{"nodes":["dist/nodes/SolanaX402/SolanaX402.node.js"],"credentials":["dist/credentials/SolanaX402Api.credentials.js"],"n8nNodesApiVersion":1},"dist":{"shasum":"6594c6a8d8f8e584b0d2ccba7283c20866a967d9","tarball":"https://registry.npmjs.org/@blockchainhq-xyz/n8n-nodes-pocket-mock/-/n8n-nodes-pocket-mock-1.0.1.tgz","fileCount":8,"integrity":"sha512-RcBTDIxyZLvZL/64CbywfL0AdJ+xdiV8Iq4bibZt+By3RUaKworGAMy077iLwHKs6Rx5AgSEN9+Q8ADEefDiyQ==","signatures":[{"sig":"MEUCIDE6a/dpunvxJPdOLD53LoRfLthMojxFhdQtv2m+XzyBAiEAsJoanFDmlp8r9cEtYdA0Kns3H+p6NzzSpMAZOC2VC7I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":96571},"main":"index.js","gitHead":"da9a2c4a8f0c55e88e5e19fbf0e20513b00daa33","scripts":{"dev":"tsc --watch","lint":"eslint nodes credentials package.json","test":"npx @n8n/scan-community-package n8n-nodes-pocket-mock","build":"tsc && cp nodes/SolanaX402/pocket.svg dist/nodes/SolanaX402/ && cp nodes/SolanaX402/SolanaX402.node.json dist/nodes/SolanaX402/ 2>/dev/null || true","format":"prettier nodes credentials --write","lintfix":"eslint nodes credentials package.json --fix","prepublishOnly":"npm run build"},"_npmUser":{"name":"blockchainhq-xyz","email":"gmblockchainhq@gmail.com"},"repository":{"url":"git+https://github.com/blockchain-hq/x402-n8n-mock-node.git","type":"git"},"_npmVersion":"11.4.2","description":"n8n node for Solana x402 payment protocol - Return HTTP 402 Payment Required","directories":{},"_nodeVersion":"24.3.0","dependencies":{"x402-server-sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"ts-node":"^10.9.2","typescript":"^5.9.3","@types/node":"^24.10.0","n8n-workflow":"*","@types/express":"^5.0.5"},"_npmOperationalInternal":{"tmp":"tmp/n8n-nodes-pocket-mock_1.0.1_1762431202277_0.5559703879548121","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@blockchainhq-xyz/n8n-nodes-pocket-mock","version":"1.0.2","keywords":["n8n-community-node-package","n8n","solana","x402","payment","http-402"],"author":{"name":"Mahima Thacker"},"license":"MIT","_id":"@blockchainhq-xyz/n8n-nodes-pocket-mock@1.0.2","maintainers":[{"name":"blockchainhq-xyz","email":"gmblockchainhq@gmail.com"}],"homepage":"https://github.com/blockchain-hq/x402-pocket-node-mock","bugs":{"url":"https://github.com/blockchain-hq/x402-pocket-node-mock/issues"},"n8n":{"nodes":["dist/nodes/SolanaX402/SolanaX402.node.js"],"credentials":["dist/credentials/SolanaX402Api.credentials.js"],"n8nNodesApiVersion":1},"dist":{"shasum":"7fbe88a8838062bd69221f15b5c48b4edae2cbdf","tarball":"https://registry.npmjs.org/@blockchainhq-xyz/n8n-nodes-pocket-mock/-/n8n-nodes-pocket-mock-1.0.2.tgz","fileCount":8,"integrity":"sha512-kKZxM52Zq3XIqZyW4VQG5th2tlLxnW8p681wrUBkfsVseAI/vq5VD8bcew4DprrZQfoDwA0kfVekGmvGUoXncw==","signatures":[{"sig":"MEUCIQCNEF4aFac0757y2QBfySlR+MwCXYdHzH7vLNWEi7hwTwIgY3Ifobv+t+v5tOx7uf8661ZqgCIXyOjI1Sw5489mvGc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":96589},"main":"index.js","gitHead":"892b0a35c94c9d7ed232dccb7e2960335b6f592e","scripts":{"dev":"tsc --watch","lint":"eslint nodes credentials package.json","test":"npx @n8n/scan-community-package n8n-nodes-pocket-mock","build":"tsc && cp nodes/SolanaX402/pocket.svg dist/nodes/SolanaX402/ && cp nodes/SolanaX402/SolanaX402.node.json dist/nodes/SolanaX402/ 2>/dev/null || true","format":"prettier nodes credentials --write","lintfix":"eslint nodes credentials package.json --fix","prepublishOnly":"npm run build"},"_npmUser":{"name":"blockchainhq-xyz","email":"gmblockchainhq@gmail.com"},"repository":{"url":"git+https://github.com/blockchain-hq/x402-pocket-node-mock.git","type":"git"},"_npmVersion":"11.4.2","description":"n8n node for Solana x402 payment protocol - Return HTTP 402 Payment Required","directories":{},"_nodeVersion":"24.3.0","dependencies":{"x402-server-sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"ts-node":"^10.9.2","typescript":"^5.9.3","@types/node":"^24.10.0","n8n-workflow":"*","@types/express":"^5.0.5"},"_npmOperationalInternal":{"tmp":"tmp/n8n-nodes-pocket-mock_1.0.2_1762433413912_0.20278629715040908","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@blockchainhq-xyz/n8n-nodes-pocket-mock","version":"1.0.3","description":"n8n node for Solana x402 payment protocol - Return HTTP 402 Payment Required","keywords":["n8n-community-node-package","n8n","solana","x402","payment","http-402"],"license":"MIT","homepage":"https://github.com/blockchain-hq/x402-pocket-node-mock","repository":{"type":"git","url":"git+https://github.com/blockchain-hq/x402-pocket-node-mock.git"},"author":{"name":"Mahima Thacker"},"main":"index.js","scripts":{"build":"tsc && cp nodes/PocketNodeMock/pocket.svg dist/nodes/PocketNodeMock/ && cp nodes/PocketNodeMock/PocketNodeMock.node.json dist/nodes/PocketNodeMock/ 2>/dev/null || true","dev":"tsc --watch","format":"prettier nodes credentials --write","lint":"eslint nodes credentials package.json","lintfix":"eslint nodes credentials package.json --fix","prepublishOnly":"npm run build","test":"npx @n8n/scan-community-package n8n-nodes-pocket-mock"},"n8n":{"n8nNodesApiVersion":1,"credentials":["dist/credentials/SolanaX402Api.credentials.js"],"nodes":["dist/nodes/PocketNodeMock/PocketNodeMock.node.js"]},"devDependencies":{"@types/express":"^5.0.5","@types/node":"^24.10.0","n8n-workflow":"*","ts-node":"^10.9.2","typescript":"^5.9.3"},"dependencies":{"x402-client-sdk":"^1.0.0","x402-server-sdk":"^1.0.0"},"_id":"@blockchainhq-xyz/n8n-nodes-pocket-mock@1.0.3","gitHead":"a9d0119dfc045970c4a20e33eebc51df1584e3aa","bugs":{"url":"https://github.com/blockchain-hq/x402-pocket-node-mock/issues"},"_nodeVersion":"24.3.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-Ovhzy1WmuDYPzlSW/jTJH023lQxUuMMFsYU5refhBuCspAubM80Y+w+aiP0uM4E+OqUp0KvxLg1HDi1EeWbaAQ==","shasum":"23ebc83c6a81d17af3bd1eb3c188c8f95ebf95d6","tarball":"https://registry.npmjs.org/@blockchainhq-xyz/n8n-nodes-pocket-mock/-/n8n-nodes-pocket-mock-1.0.3.tgz","fileCount":8,"unpackedSize":108735,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCywelOx5d8BmSdcT3t862f7oZI98+h7uFXIOMChjDrBwIhAN3Be23UEKf210kucvuMO4WVTjewlK85HIifis5RYQWc"}]},"_npmUser":{"name":"blockchainhq-xyz","email":"gmblockchainhq@gmail.com"},"directories":{},"maintainers":[{"name":"blockchainhq-xyz","email":"gmblockchainhq@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/n8n-nodes-pocket-mock_1.0.3_1762753684852_0.027923203012476083"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-06T12:13:22.210Z","modified":"2025-11-10T05:48:05.265Z","1.0.1":"2025-11-06T12:13:22.458Z","1.0.2":"2025-11-06T12:50:14.093Z","1.0.3":"2025-11-10T05:48:05.090Z"},"bugs":{"url":"https://github.com/blockchain-hq/x402-pocket-node-mock/issues"},"author":{"name":"Mahima Thacker"},"license":"MIT","homepage":"https://github.com/blockchain-hq/x402-pocket-node-mock","keywords":["n8n-community-node-package","n8n","solana","x402","payment","http-402"],"repository":{"type":"git","url":"git+https://github.com/blockchain-hq/x402-pocket-node-mock.git"},"description":"n8n node for Solana x402 payment protocol - Return HTTP 402 Payment Required","maintainers":[{"name":"blockchainhq-xyz","email":"gmblockchainhq@gmail.com"}],"readme":"# Pocket node Mock\n\n**Mock server node** for testing x402 payment flows in n8n. Test payment logic without creating actual APIs!\n\n[![npm version](https://badge.fury.io/js/@blockchainhq-xyz%2Fn8n-nodes-pocket-mock.svg)](https://www.npmjs.com/package/@blockchainhq-xyz%2Fn8n-nodes-pocket-mock)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## What It Does\n\nThis is a **mock server node** that simulates a payment-required API server directly in n8n:\n\n- Return HTTP 402 Payment Required (without building an API)\n- Verify SOL payments on-chain\n- Test payment flows in n8n\n- No separate API server needed\n- Perfect for development and prototyping\n\n**Why Mock?** Test your payment logic end-to-end in n8n without deploying actual APIs. Great for learning, testing, and prototyping!\n\n### Manual Installation (For Development)\n\n**Note:** This installs from source code, not npm.\n\n```bash\n# 1. Clone the server node repository\ngit clone https://github.com/blockchain-hq/x402-pocket-node-mock.git\ncd x402-pocket-node-mock\n\n# 2. Install dependencies\nnpm install\n\n# 3. Link the server SDK\nnpm link x402-server-sdk\n\n# 4. Build the node\nnpm run build\n\n# 5. Set custom extensions path\n# If running both server and client nodes, set path to parent folder:\nexport N8N_CUSTOM_EXTENSIONS=\"$HOME/x402-n8n-nodes\"\n# Make it permanent:\necho 'export N8N_CUSTOM_EXTENSIONS=\"$HOME/x402-n8n-nodes\"' >> ~/.zshrc\n\n# Note: Your folder structure should be:\n# ~/x402-n8n-nodes/\n#   ├── x402-pocket-node-mock/         (this server node)\n#   └── n8n-nodes-solana-x402-client/  (client node, if needed)\n\n# 6. Start n8n\nn8n start\n\n# 7. In n8n, search for: \"Pocket node Mock\"\n```\n\n\n## Operations\n\n### 1. Return 402 Payment Required\n\nReturns 402 response requiring SOL payment.\n\n**Input:**\n- Amount (SOL): e.g., 0.01\n- Resource ID: optional\n\n**Output:**\n```json\n{\n  \"statusCode\": 402,\n  \"body\": {\n    \"paymentOptions\": [{\n      \"amount\": \"0.01\",\n      \"recipient\": \"YOUR_WALLET\",\n      \"token\": \"USDC\"\n    }]\n  }\n}\n```\n\n### 2. Verify Payment\n\nVerifies SOL payment on-chain.\n\n**Input:**\n- Transaction Signature\n- Expected Amount (SOL)\n- Max Age (seconds)\n\n**Output:**\n```json\n{\n  \"valid\": true,\n  \"signature\": \"5VERv8...\",\n  \"amount\": 0.01,\n  \"from\": \"PAYER_ADDRESS\",\n  \"to\": \"YOUR_WALLET\"\n}\n```\n\n## Credentials\n\n**Pocket Mock API:**\n- Network: Devnet or Mainnet\n- Recipient Address: Your wallet\n- RPC URL: (optional)\n\n## Mock Server Workflow\n\n**Test payment flows without building an API:**\n\n```\nManual Trigger → Pocket node Mock (Mock Server)\n                  Return 402 with requirements\n    ↓\nSolana x402 Client → Parse and Pay\n                      (makes real payment on devnet)\n    ↓\nPocket node Mock (Mock Server) → Verify Payment\n                             (checks real transaction)\n    ↓\nIF Valid → Return Mock Content\n    ↓\nIF Invalid → Return 403 Error\n```\n\n**This simulates:** Client requesting paid content → Server requiring payment → Client paying → Server verifying → Access granted\n\n**No real API needed!** Perfect for testing, learning, and prototyping.\n\n## Use Cases\n\n| Use Case | Description |\n|----------|-------------|\n| **Learning x402** | Understand payment protocol without APIs |\n| **Testing Payment Flows** | Validate payment logic in n8n |\n| **Prototyping** | Quick proof-of-concept for paid features |\n| **Development** | Test before building real API |\n| **Demo** | Show payment flows to stakeholders |\n\n**Real-world deployment:** Use the x402 Server SDK in your actual Node.js/Express API. This mock node is for testing!\n\n## Security\n\n**Always:**\n- Set Max Age (recommended: 300s)\n- Store used signatures in database\n- Use environment variables for wallet\n- Enable rate limiting\n\n**Example:**\n```javascript\nMax Age: 300  // 5 minutes\n```\n\n## Networks\n\n**Devnet (Testing):**\n```bash\nsolana airdrop 2 YOUR_ADDRESS --url devnet\n```\n\n**Mainnet (Production):**\n- Use real wallet\n- Test on devnet first\n\n## Troubleshooting\n\n| Issue | Fix |\n|-------|-----|\n| Node not visible | Restart n8n, clear browser cache |\n| Transaction not found | Wait, check network |\n| Amount mismatch | Verify exact amount |\n| Transaction too old | Increase Max Age |\n\n## Resources\n\n- [n8n Docs](https://docs.n8n.io/)\n- [x402 Protocol](https://x402.org/)\n\n## Requirements\n\n- n8n: v0.220.0+\n- Node.js: v18+\n\n## License\n\nMIT\n\n## Support\n\n- [GitHub Issues](https://github.com/blockchain-hq/x402-pocket-node-mock/issues)\n- [n8n Community](https://community.n8n.io/)\n\n---\n\n**Star if useful!**","readmeFilename":"ReadMe.md"}