npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@anas-setti/n8n-nodes-x402-api

v1.0.0

Published

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.

Readme

@anas-setti/n8n-nodes-x402-api

npm version

Pay-per-use AI services via USDC micropayments on Base chain. An n8n community node for the x402 API — a collection of utility AI tools you pay for per request with USDC.


Features

  • 14 services — from code analysis to QR code generation
  • Pay-per-use — $0.01–$0.02 USDC per request on Base chain (no subscriptions)
  • Two payment modes: Internal API key (server-side) or manual TX hash (public nodes)
  • Halal-compliant — designed for Sharia-friendly workflows

Available Services

| Service | Price | Description | |---------|-------|-------------| | Halal Screening | $0.01 | Check if a cryptocurrency is Sharia-compliant | | Web Search | $0.01 | Search the web for information | | Code Analysis | $0.01 | Analyze source code for bugs and security issues | | Data Processing | $0.01 | Transform, filter, validate structured data | | Translation | $0.01 | Translate text between languages | | Text Generation | $0.02 | Generate AI text in various styles | | UUID Generator | $0.01 | Generate UUIDs (v4) | | Hash Generator | $0.01 | Generate cryptographic hashes | | Base64 Process | $0.01 | Encode or decode Base64 | | Password Generator | $0.01 | Generate secure random passwords | | Text Statistics | $0.01 | Get detailed text statistics | | JSON Processor | $0.01 | Validate, format, or minify JSON | | QR Code Generator | $0.01 | Generate QR codes | | Sentiment Analysis | $0.01 | Analyze sentiment of text |


Installation

Via n8n Community Nodes

  1. Go to Settings → Community Nodes in your n8n instance
  2. Enter @anas-setti/n8n-nodes-x402-api as the package name
  3. Click Install

Via npm

npm install @anas-setti/n8n-nodes-x402-api

Credentials

The node requires x402 API credentials with the following fields:

| Field | Description | |-------|-------------| | API Base URL | x402 API server URL (default: Cloudflare tunnel URL) | | Internal API Key | (Optional) Server-side key to bypass x402 payment | | Web3 Private Key | (Optional) Ethereum private key for signing payments | | USDC Contract Address | USDC contract on Base (default: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) | | Base RPC URL | Base chain RPC endpoint (default: https://mainnet.base.org) |


Usage

Basic Workflow

  1. Add an x402 API node to your workflow
  2. Configure credentials
  3. Select a Service from the dropdown
  4. Fill in the service parameters
  5. Choose Payment Mode:
    • Internal Key — uses an internal API key (no USDC needed, server-side only)
    • Manual — send USDC and provide the transaction hash
  6. Run the workflow

Example: Web Search

[Webhook Trigger] → [x402 API: Web Search] → [Set] → [Respond]

Parameters:

  • Service: Web Search
  • Query: latest AI news
  • Payment Mode: Manual
  • TX Hash: (your USDC transaction hash on Base)

Example: Halal Screening

[Manual Trigger] → [x402 API: Halal Screening] → [IF (halal)] → [...]

Parameters:

  • Service: Halal Screening
  • Symbol: BTC
  • Payment Mode: Internal Key

Output Format

Each node execution returns a JSON object with:

{
  "service": "web_search",
  "service_name": "Web Search",
  "price_paid": 0.01,
  "statusCode": 200,
  // ... response data from the API
}

If payment is required (HTTP 402), the node returns payment instructions instead:

{
  "error": "Payment Required",
  "service": "web_search",
  "price_usdc": 0.01,
  "instruction": "Send 0.01 USDC on Base chain (8453)...",
  "payment": {
    "price_usdc": 0.01,
    "chain": "Base (8453)",
    "chain_id": 8453,
    "recipient": "0xeB262928D55A92f2EAac946807CeC4d80E9EdD6B",
    "token": "USDC"
  }
}

Development

# Install dependencies
npm install

# Build TypeScript
npm run build

# Watch mode
npm run dev

Publishing

This package is published to npm via GitHub Actions with provenance statements.


License

MIT


Support