{"_id":"@blockchainhq-xyz/n8n-nodes-pocket-client","_rev":"3-5c5a842b3cb4f3288c87d8c676490a48","name":"@blockchainhq-xyz/n8n-nodes-pocket-client","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@blockchainhq-xyz/n8n-nodes-pocket-client","version":"1.0.0","keywords":["n8n-community-node-package","n8n","solana","x402","payment","client"],"author":{"name":"Mahima Thacker"},"license":"MIT","_id":"@blockchainhq-xyz/n8n-nodes-pocket-client@1.0.0","maintainers":[{"name":"blockchainhq-xyz","email":"gmblockchainhq@gmail.com"}],"homepage":"https://github.com/blockchain-hq/x402-n8n-client-node","bugs":{"url":"https://github.com/blockchain-hq/x402-n8n-client-node/issues"},"n8n":{"nodes":["dist/nodes/SolanaX402Client/SolanaX402Client.node.js"],"credentials":["dist/credentials/SolanaX402ClientApi.credentials.js"],"n8nNodesApiVersion":1},"dist":{"shasum":"e25d609dbbffc135ee646ca3d4881690f413e45e","tarball":"https://registry.npmjs.org/@blockchainhq-xyz/n8n-nodes-pocket-client/-/n8n-nodes-pocket-client-1.0.0.tgz","fileCount":9,"integrity":"sha512-rMpEn/wB3rlkxN6LFuR0PMnClIAERGCRp95dGB1Jjwgr6XwD0vQ34MwlcggVjN/u00qt8QcbXl9FV070khyQ4w==","signatures":[{"sig":"MEUCIQCPfcaLkG6Xn5LQzOwYLisekyjHYY5XuQBCekgbftBSNAIgIWsyoZ7NbQ0vW8+qoIYFgjTHPILorW4nNZ5N6E7mx3o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":99202},"main":"index.js","gitHead":"ba6252e5d40086935f7060cec4d38d173c3da5c7","scripts":{"dev":"tsc --watch","lint":"eslint nodes credentials package.json","build":"tsc && gulp build:icons","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-client-node.git","type":"git"},"_npmVersion":"11.4.2","description":"n8n node for making SOL payments via x402 protocol","directories":{},"_nodeVersion":"24.3.0","dependencies":{"bs58":"^5.0.0","@solana/web3.js":"^1.95.0","x402-client-sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"gulp":"^4.0.2","eslint":"^8.0.0","prettier":"^3.0.0","typescript":"^5.0.0","@types/node":"^20.0.0","n8n-workflow":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/n8n-nodes-pocket-client_1.0.0_1762431221087_0.7037720035171378","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@blockchainhq-xyz/n8n-nodes-pocket-client","version":"1.0.1","keywords":["n8n-community-node-package","n8n","solana","x402","payment","client"],"author":{"name":"Mahima Thacker"},"license":"MIT","_id":"@blockchainhq-xyz/n8n-nodes-pocket-client@1.0.1","maintainers":[{"name":"blockchainhq-xyz","email":"gmblockchainhq@gmail.com"}],"homepage":"https://github.com/blockchain-hq/x402-pocket-node-client","bugs":{"url":"https://github.com/blockchain-hq/x402-pocket-node-client/issues"},"n8n":{"nodes":["dist/nodes/SolanaX402Client/SolanaX402Client.node.js"],"credentials":["dist/credentials/SolanaX402ClientApi.credentials.js"],"n8nNodesApiVersion":1},"dist":{"shasum":"fabde4997cfe5439190630121ef79a47ea76a9fa","tarball":"https://registry.npmjs.org/@blockchainhq-xyz/n8n-nodes-pocket-client/-/n8n-nodes-pocket-client-1.0.1.tgz","fileCount":10,"integrity":"sha512-oQpPdWMTZBarAwTOua92OkzBlahrmX065X4XXbkAitGxeUbeDnWP49jV/O28ccSCbJqRT7Af2c12TN/hZWH00g==","signatures":[{"sig":"MEUCIQCEZZPIVrRtCWZumQggAKxKmsHP5nQKqr9irwmZaxsyNAIgKDxQlxSMU/43O2CZ7xN3OXb8Ct5GbZ/wnZlEom8+XNY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":99584},"main":"index.js","gitHead":"fe495ac2a08cb85b0fca356a58cd8404d941f225","scripts":{"dev":"tsc --watch","lint":"eslint nodes credentials package.json","build":"tsc && gulp build:icons","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-client.git","type":"git"},"_npmVersion":"11.4.2","description":"n8n node for making SOL payments via x402 protocol","directories":{},"_nodeVersion":"24.3.0","dependencies":{"bs58":"^5.0.0","@solana/web3.js":"^1.95.0","x402-client-sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"gulp":"^4.0.2","eslint":"^8.0.0","prettier":"^3.0.0","typescript":"^5.0.0","@types/node":"^20.0.0","n8n-workflow":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/n8n-nodes-pocket-client_1.0.1_1762433366333_0.32102120005295265","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@blockchainhq-xyz/n8n-nodes-pocket-client","version":"1.0.2","description":"n8n node for making USDC payments via x402 protocol","keywords":["n8n-community-node-package","n8n","solana","x402","payment","client"],"license":"MIT","homepage":"https://github.com/blockchain-hq/x402-pocket-node-client","author":{"name":"Mahima Thacker"},"repository":{"type":"git","url":"git+https://github.com/blockchain-hq/x402-pocket-node-client.git"},"main":"index.js","scripts":{"build":"tsc && gulp build:icons","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"},"n8n":{"n8nNodesApiVersion":1,"credentials":["dist/credentials/PocketNodeWallet.credentials.js"],"nodes":["dist/nodes/PocketNodeClient/PocketNodeClient.node.js"]},"dependencies":{"x402-client-sdk":"^1.0.0","@solana/web3.js":"^1.95.0","bs58":"^5.0.0"},"devDependencies":{"@types/node":"^20.0.0","n8n-workflow":"^1.0.0","typescript":"^5.0.0","gulp":"^4.0.2","prettier":"^3.0.0","eslint":"^8.0.0"},"_id":"@blockchainhq-xyz/n8n-nodes-pocket-client@1.0.2","gitHead":"a9a4cbb6fb1a3c2d53a67d47184882fb844418ed","bugs":{"url":"https://github.com/blockchain-hq/x402-pocket-node-client/issues"},"_nodeVersion":"24.3.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-UY3+xn9+POuN7qxNEWyDXFcYOX7aWIfGf1JnhcqluU2WSuHzDzhYboDWD2DWi7iLTWi+OPei9xzrP1Qs5ArGLA==","shasum":"948b66598284a9cf3ae512892cfbf569427390d9","tarball":"https://registry.npmjs.org/@blockchainhq-xyz/n8n-nodes-pocket-client/-/n8n-nodes-pocket-client-1.0.2.tgz","fileCount":10,"unpackedSize":123765,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDM2k/ZQdR9MPA7kqWOa7xT03Qvk1+biyiZ5N0J6hK9YgIgCBrTxZfg3WJdsj+pl0y6sSR04fNT7g4WvojUgz1Sbz0="}]},"_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-client_1.0.2_1762753757966_0.40860443459279105"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-06T12:13:41.017Z","modified":"2025-11-10T05:49:18.404Z","1.0.0":"2025-11-06T12:13:41.272Z","1.0.1":"2025-11-06T12:49:26.522Z","1.0.2":"2025-11-10T05:49:18.189Z"},"bugs":{"url":"https://github.com/blockchain-hq/x402-pocket-node-client/issues"},"author":{"name":"Mahima Thacker"},"license":"MIT","homepage":"https://github.com/blockchain-hq/x402-pocket-node-client","keywords":["n8n-community-node-package","n8n","solana","x402","payment","client"],"repository":{"type":"git","url":"git+https://github.com/blockchain-hq/x402-pocket-node-client.git"},"description":"n8n node for making USDC payments via x402 protocol","maintainers":[{"name":"blockchainhq-xyz","email":"gmblockchainhq@gmail.com"}],"readme":"# @blockchainhq-xyz/n8n-nodes-pocket-client\n\nn8n community node for making USDC payments in response to HTTP 402 errors. Client-side implementation of x402 protocol.\n\n[![npm version](https://badge.fury.io/js/@blockchainhq-xyz%2Fn8n-nodes-pocket-client.svg)](https://www.npmjs.com/package/@blockchainhq-xyz%2Fn8n-nodes-pocket-client)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n## What It Does\n\n- Parse 402 payment requirements\n- Make USDC payments automatically\n- Return transaction signatures\n- Integrate with any 402-enabled API\n\n## Installation\n\n### In n8n (Recommended)\n\n1. Go to **Settings > Community Nodes**\n2. Click **Install**\n3. Enter: `@blockchainhq-xyz/n8n-nodes-pocket-client`\n4. Click **Install**\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-client.git\ncd x402-pocket-node-client\n\n# 2. Install dependencies\nnpm install\n\n# 3. Link the server SDK\nnpm link x402-client-sdk\n# If SDK not published yet, link local SDK first:\n# cd /path/to/x402-server-sdk && npm link\n# cd /path/to/n8n-nodes-solana-x402 && npm 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#   ├── n8n-nodes-solana-x402/         (this server node)\n#   └── n8n-nodes-pocket-client/  (client node, if needed)\n\n# 6. Start n8n\nn8n start\n\n# 7. In n8n, search for: \"Pocket node client\"\n```\n\n## Operations\n\n### 1. Parse 402 Response\n\nExtracts payment details from 402 response.\n\n**Input:** 402 response body\n**Output:** Payment details (amount, recipient)\n\n### 2. Make Payment\n\nSends USDC to specified address.\n\n**Input:**\n- Recipient address\n- Amount (USDC)\n- Payment ID (optional)\n\n**Output:** Transaction signature\n\n### 3. Parse and Pay\n\nParse and pay in one step (recommended!)\n\n**Input:** 402 response body\n**Output:** Transaction signature\n\n## Credentials\n\n**Pocket node client API:**\n- Network: Devnet or Mainnet\n- Wallet Private Key: Base58 encoded\n- RPC URL: (optional)\n\n**Get Private Key:**\n```bash\nsolana address -k ~/wallet.json\ncat ~/wallet.json\n```\n\n## Example Workflow\n\n**Works with Mock Server node for testing:**\n\n```\nSolana x402 (Mock Server) → Returns 402\n    ↓\nPocket node client → Parse and Pay\n    ↓\nSolana x402 (Mock Server) → Verify Payment\n    ↓\nGet Content\n```\n\n**Or with real API:**\n\n```\nHTTP Request → Get 402 from real API\n    ↓\nPocket node client → Parse and Pay (sends USDC)\n    ↓\nHTTP Request → Retry with X-Payment signature\n    ↓\nGet Content\n```\n\n## Use Cases\n\n| Use Case | Description |\n|----------|-------------|\n| **Testing with Mock** | Use with Solana x402 Mock Server node |\n| **Auto-pay APIs** | Automatic payment on 402 |\n| **Content Access** | Pay for premium content |\n| **Subscription** | Automated renewal |\n| **Pay-per-use** | Pay as you go |\n\n**Perfect combo:** Use with the Solana x402 Mock Server node to test complete payment flows in n8n without building APIs!\n\n## Wallet Setup\n\n**Devnet (Testing):**\n```bash\n# Generate wallet\nsolana-keygen new -o ~/devnet-wallet.json\n\n# Get SOL (for transaction fees)\nsolana airdrop 2 YOUR_ADDRESS --url devnet\n\n# Get private key\ncat ~/devnet-wallet.json\n```\n\n**Mainnet (Production):**\n- Use existing wallet\n- Ensure sufficient USDC balance (and SOL for transaction fees)\n- Keep private key secure\n\n## Full Payment Flow\n\n```\n1. Request API\n2. Get 402 response\n3. Use \"Parse and Pay\"\n4. Get signature\n5. Retry request with X-Payment header\n6. Access granted\n```\n\n## Security\n\n**Best Practices:**\n- Never commit private keys\n- Use environment variables\n- Start with small amounts on devnet\n- Test thoroughly before mainnet\n\n## Troubleshooting\n\n| Issue | Fix |\n|-------|-----|\n| Node not visible | Restart n8n, clear cache |\n| Invalid private key | Use base58 format |\n| Insufficient balance | Get more USDC (and SOL for fees) |\n| Transaction failed | Check network and balance |\n\n## Networks\n\n**Devnet:**\n- Free testing\n- Get SOL via airdrop (for transaction fees)\n- Get USDC from faucets or swaps\n- Same as mainnet\n\n**Mainnet:**\n- Real USDC\n- Purchase from exchange\n- Production ready\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- USDC balance for payments (and SOL for transaction fees)\n\n## License\n\nMIT\n\n## Contributing\n\nIssues and PRs welcome!\n\n## Support\n\n- [GitHub Issues](https://github.com/blockchain-hq/x402-pocket-node-client/issues)\n- [n8n Community](https://community.n8n.io/)\n\n---\n\n**Star if useful!**","readmeFilename":"README.md"}