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

@blockchainhq-xyz/n8n-nodes-solana-x402-client

v1.0.0

Published

n8n node for making SOL payments via x402 protocol

Readme

n8n-nodes-solana-x402-client

n8n community node for making SOL payments in response to HTTP 402 errors. Client-side implementation of x402 protocol.

npm version License: MIT

🎯 What It Does

  • ✅ Parse 402 payment requirements
  • ✅ Make SOL payments automatically
  • ✅ Return transaction signatures
  • ✅ Integrate with any 402-enabled API

📦 Installation

In n8n (Recommended)

  1. Go to Settings > Community Nodes
  2. Click Install
  3. Enter: n8n-nodes-solana-x402-client
  4. Click Install

Manual Installation

# 1. Install the package
npm install x402-client-sdk

# 2. Link for development
npm link x402-client-sdk

# 3. Set custom extensions path
export N8N_CUSTOM_EXTENSIONS="$HOME/x402-n8n-nodes"

# 4. Start n8n
n8n start

# 5. In n8n, search for: "Solana x402 Client"
# The node will appear with a Solana icon

🚀 Operations

1. Parse 402 Response

Extracts payment details from 402 response.

Input: 402 response body Output: Payment details (amount, recipient)

2. Make Payment

Sends SOL to specified address.

Input:

  • Recipient address
  • Amount (SOL)
  • Payment ID (optional)

Output: Transaction signature

3. Parse and Pay ⭐

Parse and pay in one step (recommended!)

Input: 402 response body Output: Transaction signature

🔐 Credentials

Solana x402 Client API:

  • Network: Devnet or Mainnet
  • Wallet Private Key: Base58 encoded
  • RPC URL: (optional)

Get Private Key:

solana address -k ~/wallet.json
cat ~/wallet.json

📋 Example Workflow

Works with Mock Server node for testing:

Solana x402 (Mock Server) → Returns 402
    ↓
Solana x402 Client → Parse and Pay
    ↓
Solana x402 (Mock Server) → Verify Payment
    ↓
Get Content ✅

Or with real API:

HTTP Request → Get 402 from real API
    ↓
Solana x402 Client → Parse and Pay (sends SOL)
    ↓
HTTP Request → Retry with X-Payment signature
    ↓
Get Content ✅

🎓 Use Cases

| Use Case | Description | |----------|-------------| | Testing with Mock | Use with Solana x402 Mock Server node | | Auto-pay APIs | Automatic payment on 402 | | Content Access | Pay for premium content | | Subscription | Automated renewal | | Pay-per-use | Pay as you go |

Perfect combo: Use with the Solana x402 Mock Server node to test complete payment flows in n8n without building APIs!

💰 Wallet Setup

Devnet (Testing):

# Generate wallet
solana-keygen new -o ~/devnet-wallet.json

# Get SOL
solana airdrop 2 YOUR_ADDRESS --url devnet

# Get private key
cat ~/devnet-wallet.json

Mainnet (Production):

  • Use existing wallet
  • Ensure sufficient SOL balance
  • Keep private key secure

🔄 Full Payment Flow

1. Request API
2. Get 402 response
3. Use "Parse and Pay"
4. Get signature
5. Retry request with X-Payment header
6. Access granted ✅

🔒 Security

Best Practices:

  • Never commit private keys
  • Use environment variables
  • Start with small amounts on devnet
  • Test thoroughly before mainnet

🐛 Troubleshooting

| Issue | Fix | |-------|-----| | Node not visible | Restart n8n, clear cache | | Invalid private key | Use base58 format | | Insufficient balance | Get more SOL (airdrop/purchase) | | Transaction failed | Check network and balance |

🌐 Networks

Devnet:

  • Free testing
  • Get SOL via airdrop
  • Same as mainnet

Mainnet:

  • Real SOL
  • Purchase from exchange
  • Production ready

📚 Resources

🎯 Requirements

  • n8n: v0.220.0+
  • Node.js: v18+
  • SOL balance for payments

📄 License

MIT

🤝 Contributing

PRs welcome! See CONTRIBUTING.md

💬 Support


⭐ Star if useful!