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

@make-software/casper-x402

v1.0.0

Published

x402 Payment Protocol Casper Implementation for JavaScript

Readme

@make-software/casper-x402

A TypeScript implementation of the x402 payment protocol for the Casper Network. It adds Casper as a supported network to the x402 ecosystem so HTTP APIs can require micropayments settled on-chain using CEP-18 tokens authorized via EIP-712 signatures.

This package is published as @make-software/casper-x402.


What is x402?

x402 is an open standard for internet-native payments over HTTP. When a client requests a paid resource:

  1. The resource server responds with 402 Payment Required plus PaymentRequirements describing accepted networks, schemes, prices and assets.
  2. The client builds a PaymentPayload — an EIP-712 signed authorization — and replays the request with a PAYMENT-SIGNATURE header.
  3. The resource server forwards the payload to a facilitator for verification and, on success, for on-chain settlement.
  4. The facilitator submits a Casper transfer_with_authorization deploy to the CEP-18 contract and waits for confirmation.
  5. The resource server returns the protected response.

This package implements the exact scheme on the casper:* CAIP-2 family, backed by the casper-ecosystem/casper-eip-712 typed-data specification.


Installation

npm install @make-software/casper-x402

Peer / transitive dependencies include @x402/core, casper-js-sdk and @casper-ecosystem/casper-eip-712.


Entry points

The package exposes a root entry with signer helpers and utilities, plus three subpaths for the exact scheme.

| Entry | Purpose | | --- | --- | | @make-software/casper-x402 | Signers, types, constants and utilities | | @make-software/casper-x402/exact/client | ExactCasperScheme for clients | | @make-software/casper-x402/exact/server | ExactCasperScheme and registration for resource servers | | @make-software/casper-x402/exact/facilitator | ExactCasperScheme and registration for facilitators |


Network identifiers

Casper networks use CAIP-2 format:

  • casper:casper — Casper Mainnet
  • casper:casper-test — Casper Testnet

These are exported as NETWORK_CASPER_MAINNET and NETWORK_CASPER_TESTNET from the package root.


Examples

Runnable examples are available in the casper-x402 monorepo under examples/.


License

This project is licensed under the Apache License 2.0.