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

@akcanetwork/x402

v0.2.2

Published

Akca x402 SDK - Pay-per-use proxy and VPN via Solana USDC

Readme

@akcanetwork/x402

Pay-per-use anonymous proxy and VPN SDK via Solana USDC. Built on the x402 protocol (HTTP 402 + on-chain payments).

Install

npm install @akcanetwork/x402

Peer dependencies: @solana/web3.js and @solana/spl-token

Quick Start

import { AkcaX402Client } from '@akcanetwork/x402';
import { Keypair } from '@solana/web3.js';

const wallet = Keypair.fromSecretKey(/* your key */);
const akca = new AkcaX402Client({ wallet });

// Proxy a request through German exit node
const result = await akca.fetch('https://api.example.com/data', {
  country: 'DE',
});
// 402 → auto-pay USDC → 200 OK
console.log(result.body);

API

new AkcaX402Client({ baseUrl?, wallet, rpcUrl? })

| Param | Type | Default | |-------|------|---------| | baseUrl | string | https://api.akca.network | | wallet | Keypair | required | | rpcUrl | string | Solana mainnet |

Proxy

// Single request (0.001 USDC)
await akca.fetch(url, { method, headers, body, country });

// 24h session (1.00 USDC)
await akca.createProxySession({ country: 'DE' });

VPN (Manual)

// List servers (free)
const servers = await akca.getVpnServers();

// Get pricing (free)
const pricing = await akca.getVpnPricing();

// Connect (0.50 USDC / 24h)
const vpn = await akca.connectVpn({
  serverId: servers[0].id,
  duration: '24h', // '24h' | '7d' | '30d'
});
console.log(vpn.config); // WireGuard config

// Disconnect
await akca.disconnectVpn(vpn.session.id);

VPN Auto-Install + Tunnel

import { quickVpn } from '@akcanetwork/x402';

// One line: auto-install WireGuard + pay USDC + bring up tunnel
const vpn = await quickVpn({
  wallet,
  country: 'US',
  duration: '24h',
});
// All system traffic now routes through VPN

await vpn.disconnect(); // tunnel down + peer removed

VPN Manager (Advanced)

import { AkcaX402Client, AkcaVpnManager } from '@akcanetwork/x402';

const akca = new AkcaX402Client({ wallet });
const mgr = new AkcaVpnManager();

// Auto-install AmneziaWG/WireGuard if missing
const info = await mgr.ensureInstalled();
// { installed: true, binary: 'awg-quick', type: 'amneziawg' }

// Connect and get config
const vpn = await akca.connectVpn({ serverId: 'us-virginia-1' });

// Bring up tunnel (writes config + wg-quick up)
await mgr.up(vpn.config);

// Check status
const status = await mgr.status();

// Bring down tunnel
await mgr.down();
await akca.disconnectVpn(vpn.session.id);

Supported platforms: Ubuntu/Debian (apt), Fedora/RHEL (dnf), Arch (pacman), macOS (brew). Prefers AmneziaWG (DPI bypass), falls back to standard WireGuard.

How x402 Works

  1. SDK sends request to Akca API
  2. API returns 402 Payment Required with USDC amount
  3. SDK creates and signs a Solana USDC transfer
  4. SDK retries with X-PAYMENT: <tx-signature> header
  5. API verifies on-chain, returns response + session cookie
  6. Subsequent requests use the session cookie (no re-payment)

Proxy vs VPN

| Requests | Proxy Cost | VPN Cost | Best Choice | |----------|-----------|----------|-------------| | 10 | $0.01 | $0.50 | Proxy | | 100 | $0.10 | $0.50 | Proxy | | 500 | $0.50 | $0.50 | Tie | | 1,000+ | $1.00+ | $0.50 | VPN |

Rule of thumb: < 500 requests → Proxy. 500+ requests → VPN.

Pricing

| Product | Tier | Price | |---------|------|-------| | Proxy | Per request | 0.001 USDC | | Proxy | 24h session | 1.00 USDC | | VPN | 24h | 0.50 USDC | | VPN | 7d | 2.00 USDC | | VPN | 30d | 6.00 USDC |

License

MIT - Akca Network