{"_id":"@anas-setti/n8n-nodes-x402-api","name":"@anas-setti/n8n-nodes-x402-api","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@anas-setti/n8n-nodes-x402-api","version":"1.0.0","description":"n8n community node for x402 API — pay-per-use AI services via USDC micropayments on Base. Halal Screening, Web Search, Code Analysis, Data Processing, Translation, Text Generation.","keywords":["n8n-community-node-package","n8n","x402","usdc","base","micropayments","halal","web-search","code-analysis","translation","ai","api","ethereum","web3"],"license":"MIT","author":{"name":"Anas Setti","email":"anas_setti@gmx.de"},"homepage":"https://github.com/anassetti20-prog/x402-n8n-node","repository":{"type":"git","url":"git+https://github.com/anassetti20-prog/x402-n8n-node.git"},"bugs":{"url":"https://github.com/anassetti20-prog/x402-n8n-node/issues"},"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc && node -e \"const fs=require('fs');const path=require('path');const files=['logoLight.svg','logoDark.svg'];const srcDir=path.join('nodes','X402Node');const dstDir=path.join('dist','nodes','X402Node');fs.mkdirSync(dstDir,{recursive:true});let ok=true;for(const f of files){const src=path.join(srcDir,f);const dst=path.join(dstDir,f);if(!fs.existsSync(src)){console.error('ERROR:',f,'not found at',src);ok=false;continue;}fs.copyFileSync(src,dst);console.log('OK: copied',src,'->',dst);}if(!ok) process.exit(1);\"","dev":"tsc --watch","test":"echo \"No tests configured\" && exit 1","release":"npm version patch --force --no-git-tag-version","prepack":"npm run build","prepublishOnly":"npm run build"},"n8n":{"credentials":["dist/credentials/X402Api.credentials.js"],"nodes":["dist/nodes/X402Node/X402Node.node.js"]},"devDependencies":{"n8n-workflow":"^1.80.0","typescript":"^5.9.3"},"dependencies":{},"engines":{"node":">=18.0.0"},"gitHead":"3e553b8440a301ba0fff2c1cfbd0afac1125885b","_id":"@anas-setti/n8n-nodes-x402-api@1.0.0","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-I31zOfO0Vlxeup7ikaB1FxqlbHIFv2qjamZL7aSe3GPojK2pGrr4amUpJOEy32/7S7AHurTF5MdztApMDsv36w==","shasum":"6d0fc7b9a79e9943180ac065550311abbd78b8e0","tarball":"https://registry.npmjs.org/@anas-setti/n8n-nodes-x402-api/-/n8n-nodes-x402-api-1.0.0.tgz","fileCount":17,"unpackedSize":51481,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anas-setti%2fn8n-nodes-x402-api@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICzV6L9ofOjvwlG5lLnUvnRKAhKhoOm/v7DJW2YORrg+AiBGwBF+P7lFJgXR9QE0ArVImycmlZxBi1l6mrS0PD4TMg=="}]},"_npmUser":{"name":"anas-setti","email":"anas_setti@gmx.de"},"directories":{},"maintainers":[{"name":"anas-setti","email":"anas_setti@gmx.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/n8n-nodes-x402-api_1.0.0_1777810622424_0.8081568689633731"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-03T12:17:02.287Z","1.0.0":"2026-05-03T12:17:02.572Z","modified":"2026-05-03T12:17:02.989Z"},"maintainers":[{"name":"anas-setti","email":"anas_setti@gmx.de"}],"description":"n8n community node for x402 API — pay-per-use AI services via USDC micropayments on Base. Halal Screening, Web Search, Code Analysis, Data Processing, Translation, Text Generation.","homepage":"https://github.com/anassetti20-prog/x402-n8n-node","keywords":["n8n-community-node-package","n8n","x402","usdc","base","micropayments","halal","web-search","code-analysis","translation","ai","api","ethereum","web3"],"repository":{"type":"git","url":"git+https://github.com/anassetti20-prog/x402-n8n-node.git"},"author":{"name":"Anas Setti","email":"anas_setti@gmx.de"},"bugs":{"url":"https://github.com/anassetti20-prog/x402-n8n-node/issues"},"license":"MIT","readme":"# @anas-setti/n8n-nodes-x402-api\n\n[![npm version](https://img.shields.io/npm/v/@anas-setti%2Fn8n-nodes-x402-api.svg)](https://www.npmjs.com/package/@anas-setti/n8n-nodes-x402-api)\n\n**Pay-per-use AI services via USDC micropayments on Base chain.**\nAn n8n community node for the x402 API — a collection of utility AI tools you pay for per request with USDC.\n\n---\n\n## Features\n\n- **14 services** — from code analysis to QR code generation\n- **Pay-per-use** — $0.01–$0.02 USDC per request on Base chain (no subscriptions)\n- **Two payment modes**: Internal API key (server-side) or manual TX hash (public nodes)\n- **Halal-compliant** — designed for Sharia-friendly workflows\n\n### Available Services\n\n| Service | Price | Description |\n|---------|-------|-------------|\n| Halal Screening | $0.01 | Check if a cryptocurrency is Sharia-compliant |\n| Web Search | $0.01 | Search the web for information |\n| Code Analysis | $0.01 | Analyze source code for bugs and security issues |\n| Data Processing | $0.01 | Transform, filter, validate structured data |\n| Translation | $0.01 | Translate text between languages |\n| Text Generation | $0.02 | Generate AI text in various styles |\n| UUID Generator | $0.01 | Generate UUIDs (v4) |\n| Hash Generator | $0.01 | Generate cryptographic hashes |\n| Base64 Process | $0.01 | Encode or decode Base64 |\n| Password Generator | $0.01 | Generate secure random passwords |\n| Text Statistics | $0.01 | Get detailed text statistics |\n| JSON Processor | $0.01 | Validate, format, or minify JSON |\n| QR Code Generator | $0.01 | Generate QR codes |\n| Sentiment Analysis | $0.01 | Analyze sentiment of text |\n\n---\n\n## Installation\n\n### Via n8n Community Nodes\n\n1. Go to **Settings → Community Nodes** in your n8n instance\n2. Enter `@anas-setti/n8n-nodes-x402-api` as the package name\n3. Click **Install**\n\n### Via npm\n\n```bash\nnpm install @anas-setti/n8n-nodes-x402-api\n```\n\n---\n\n## Credentials\n\nThe node requires **x402 API** credentials with the following fields:\n\n| Field | Description |\n|-------|-------------|\n| **API Base URL** | x402 API server URL (default: Cloudflare tunnel URL) |\n| **Internal API Key** | *(Optional)* Server-side key to bypass x402 payment |\n| **Web3 Private Key** | *(Optional)* Ethereum private key for signing payments |\n| **USDC Contract Address** | USDC contract on Base (default: `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`) |\n| **Base RPC URL** | Base chain RPC endpoint (default: `https://mainnet.base.org`) |\n\n---\n\n## Usage\n\n### Basic Workflow\n\n1. Add an **x402 API** node to your workflow\n2. Configure credentials\n3. Select a **Service** from the dropdown\n4. Fill in the service parameters\n5. Choose **Payment Mode**:\n   - **Internal Key** — uses an internal API key (no USDC needed, server-side only)\n   - **Manual** — send USDC and provide the transaction hash\n6. Run the workflow\n\n### Example: Web Search\n\n```\n[Webhook Trigger] → [x402 API: Web Search] → [Set] → [Respond]\n```\n\n**Parameters:**\n- Service: `Web Search`\n- Query: `latest AI news`\n- Payment Mode: `Manual`\n- TX Hash: *(your USDC transaction hash on Base)*\n\n### Example: Halal Screening\n\n```\n[Manual Trigger] → [x402 API: Halal Screening] → [IF (halal)] → [...]\n```\n\n**Parameters:**\n- Service: `Halal Screening`\n- Symbol: `BTC`\n- Payment Mode: `Internal Key`\n\n---\n\n## Output Format\n\nEach node execution returns a JSON object with:\n\n```json\n{\n  \"service\": \"web_search\",\n  \"service_name\": \"Web Search\",\n  \"price_paid\": 0.01,\n  \"statusCode\": 200,\n  // ... response data from the API\n}\n```\n\nIf payment is required (HTTP 402), the node returns payment instructions instead:\n\n```json\n{\n  \"error\": \"Payment Required\",\n  \"service\": \"web_search\",\n  \"price_usdc\": 0.01,\n  \"instruction\": \"Send 0.01 USDC on Base chain (8453)...\",\n  \"payment\": {\n    \"price_usdc\": 0.01,\n    \"chain\": \"Base (8453)\",\n    \"chain_id\": 8453,\n    \"recipient\": \"0xeB262928D55A92f2EAac946807CeC4d80E9EdD6B\",\n    \"token\": \"USDC\"\n  }\n}\n```\n\n---\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Build TypeScript\nnpm run build\n\n# Watch mode\nnpm run dev\n```\n\n---\n\n## Publishing\n\nThis package is published to npm via GitHub Actions with provenance statements.\n\n---\n\n## License\n\n[MIT](LICENSE)\n\n---\n\n## Support\n\n- [GitHub Issues](https://github.com/anassetti20-prog/x402-n8n-node/issues)\n","readmeFilename":"README.md","_rev":"1-712351cdfd2d9b020b36fd0e49d11f26"}