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

snacktesting

v0.0.1

Published

A CLI tool for sending USDC payments on Twitter and Farcaster using x402.

Readme

🍪 Snack Money API – x402 Example

This repository contains example scripts that demonstrate how to use the Snack Money API to send USDC to any Farcaster or Twitter user — no wallet address required, thanks to the x402 protocol.

Prerequisites

  • Node.js v20+ (Install via nvm)
  • Yarn v1
  • An Ethereum private key to sign and send transactions

Setup

  1. Clone the repository:

    git clone https://github.com/snack-money/x402-axios-example.git
    cd x402-axios-example
  2. Install dependencies:

    yarn install
  3. Configure environment variables:

    cp .env-local .env
    • Edit .env and add your Ethereum private key.

Single Account Payment

Usage

Send USDC to a single user via Twitter or Farcaster:

yarn pay --receiver_identity <identity_type> --receiver_username <receiver_username> --amount <amount>
  • <identity_type>: Either farcaster or twitter
  • <receiver_username>: Receiver’s username (e.g., 0xmesuthere, mesut)
  • <amount>: Amount of USDC to send (e.g., 0.01)

Examples

yarn pay --receiver_identity twitter --receiver_username 0xmesuthere --amount 0.01
yarn pay --receiver_identity farcaster--receiver_username mesut --amount 0.01

Batch Payments

Usage

Send USDC to multiple recipients in a single batch:

yarn batch-pay --receiver_identity <identity_type> --receivers '<receivers_json>'
  • <identity_type>: farcaster or twitter
  • <receivers_json>: A JSON array of recipients containing username and amount

Examples

yarn batch-pay --receiver_identity farcaster --receivers '[{"username":"lincoln","amount":0.5},{"username":"mesut","amount":0.25}]'

yarn batch-pay --receiver_identity twitter --receivers '[{"username":"MurrLincoln","amount":0.5},{"username":"0xmesuthere","amount":0.25}]'

Reward Distribution Creation

Usage

Create a reward distribution order with reward budget:

yarn create-reward-distribution --budget <budget> --platform <platform> --content_id <content_id>
  • <budget>: Amount of USDC to send (e.g., 10)
  • <platform>: farcaster or twitter
  • <content_id>: The platform-provided Content ID associated with the content eligible for reward distribution.

Examples

yarn create-reward-distribution --budget 10 --platform farcaster --content_id 0xb87cf233790dd2d8a3ed9549f9e15069c02b1da0

Reward Distribution Confirmation

Usage

Confirms and distributes reward budget among participants:

yarn confirm-reward-distribution --order_id <order_id>
  • <order_id>: An Order Id obtained from reward distribution creation

Examples

yarn confirm-reward-distribution --order_id x987ASCbjHk

Notes

  • The identity type must match the platform the user is on.
  • Ensure your private key is secure and funded with sufficient USDC.