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 🙏

© 2025 – Pkg Stats / Ryan Hefner

unwallet-horizen

v0.2.0

Published

UnWallet - x402 Payment Protocol with Horizen Testnet support - A comprehensive blockchain payment solution with multi-network support

Readme

UnWallet Horizen

A comprehensive blockchain payment solution based on Coinbase's x402 Payment Protocol with additional support for Horizen Testnet and other blockchain networks.

Features

  • Horizen Testnet Support: Full integration with Horizen Testnet (Chain ID: 845320009)
  • USDC Integration: Pre-configured USDC contract support for Horizen Testnet
  • Payment Protocol: Complete x402 payment protocol implementation
  • Multi-Network Support: Support for Base, Avalanche, IoTeX, Sei, and more
  • TypeScript: Full TypeScript support with comprehensive type definitions
  • Wallet Integration: Seamless wallet connectivity and transaction management

Installation

npm install unwallet-horizen
# or
yarn add unwallet-horizen
# or
pnpm add unwallet-horizen

Quick Start

Using Horizen Testnet

import { createConnectedClient, createSigner } from "unwallet-horizen";

// Create a public client for Horizen Testnet
const client = createConnectedClient("horizen-testnet");

// Create a wallet client for Horizen Testnet
const signer = createSigner("horizen-testnet", privateKey);

// Use in payment requirements
const paymentRequirements = {
  scheme: "exact",
  network: "horizen-testnet",
  asset: "0xD1DFf45486Ed0d172b40B54e0565276eE7936049", // USDC contract
  maxAmountRequired: "1000000", // $1.00 USDC (6 decimals)
  resource: "https://api.example.com/protected-endpoint",
  description: "API access fee",
  payTo: "0x1234567890123456789012345678901234567890",
  maxTimeoutSeconds: 60,
};

Network Configuration

Horizen Testnet Details:

  • Chain ID: 845320009
  • RPC URL: https://horizen-rpc-testnet.appchain.base.org
  • Block Explorer: https://horizen-explorer-testnet.appchain.base.org
  • Native Currency: ETH
  • USDC Contract: 0xD1DFf45486Ed0d172b40B54e0565276eE7936049

Arbitrum Sepolia Details:

  • Chain ID: 421614
  • RPC URL: https://sepolia-rollup.arbitrum.io/rpc
  • Block Explorer: https://sepolia.arbiscan.io
  • Native Currency: ETH
  • USDC Contract: 0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d

Arbitrum Mainnet Details:

  • Chain ID: 42161
  • RPC URL: https://arb1.arbitrum.io/rpc
  • Block Explorer: https://arbiscan.io
  • Native Currency: ETH
  • USDC Contract: 0xaf88d065e77c8cC2239327C5EDb3A432268e5831

Supported Networks

This package supports the following networks:

  • Base (Mainnet & Sepolia)
  • Avalanche (Mainnet & Fuji)
  • IoTeX (Mainnet)
  • Sei (Mainnet & Testnet)
  • Horizen Testnet (New!)
  • Arbitrum (Mainnet & Sepolia) (New!)

API Reference

Core Functions

// Create clients
createConnectedClient(network: string): ConnectedClient
createSigner(network: string, privateKey: Hex): SignerWallet

// Payment utilities
createPaymentHeader(paymentRequirements: PaymentRequirements, wallet: SignerWallet): Promise<string>
verifyPayment(payload: PaymentPayload, requirements: PaymentRequirements): Promise<VerifyResponse>
settlePayment(payload: PaymentPayload, requirements: PaymentRequirements): Promise<SettleResponse>

Network Types

type Network =
  | "base"
  | "base-sepolia"
  | "avalanche"
  | "avalanche-fuji"
  | "iotex"
  | "sei"
  | "sei-testnet"
  | "horizen-testnet" // New!
  | "arbitrum-sepolia" // New!
  | "arbitrum"; // New!

Differences from Original x402

This package is a fork of Coinbase's x402 with the following additions:

  1. Horizen Testnet Support: Full integration including chain configuration, RPC endpoints, and USDC contract
  2. Arbitrum Support: Full integration for both Arbitrum Sepolia and Arbitrum Mainnet including chain configuration, RPC endpoints, and USDC contracts
  3. Updated Network Schema: Extended to include horizen-testnet, arbitrum-sepolia, and arbitrum
  4. Enhanced USDC Configuration: Added Horizen Testnet and Arbitrum USDC contract mappings
  5. Custom Chain Definition: Complete chain configuration for Horizen Testnet and Arbitrum networks

Development

Building

npm run build

Testing

npm test

Linting

npm run lint

License

Apache License 2.0 - see LICENSE file for details.

Acknowledgments

This package is based on Coinbase's x402 Payment Protocol. Original work by Coinbase Inc.

  • Original Repository: https://github.com/coinbase/x402
  • Original Author: Coinbase Inc.
  • Contributor: DevSwayam (Horizen Testnet & Arbitrum support)

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

For issues and questions, please open an issue on the GitHub repository.