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

@net-protocol/netr

v0.1.4

Published

Netr Token SDK for deploying and interacting with memecoin-NFT pairs on Net Protocol

Readme

@net-protocol/netr

SDK for deploying and interacting with Netr tokens - memecoin-NFT pairs on Net Protocol.

What is a Netr Token?

A Netr token is a memecoin-NFT pairing:

  • ERC-20 Token: The memecoin itself with full liquidity
  • Optional NFT Drop: A paired ERC1155 NFT collection (via Inscribed Drops)
  • Automatic Liquidity: Uniswap V3 pool created at deployment
  • Locked Liquidity: LP locked for ~1000 years (rug-pull protection)
  • Fee split: The memecoin creator earns 50% of the memecoin trading fees

Note: At the smart contract level, this system is called "Banger" (e.g., BangerV4.sol). The SDK uses "Netr" for consistency with the Net Protocol brand.

Installation

npm install @net-protocol/netr
# or
yarn add @net-protocol/netr

Peer Dependencies

npm install react wagmi viem

Quick Start

React Hooks

import { useNetrToken, useNetrPrice, useNetrLocker } from "@net-protocol/netr";

function TokenInfo({ tokenAddress }: { tokenAddress: `0x${string}` }) {
  // Fetch token metadata
  const { data: token, isLoading } = useNetrToken({
    chainId: 8453, // Base
    tokenAddress,
  });

  // Fetch current price (auto-refreshes every 5 seconds)
  const { data: price, poolAddress } = useNetrPrice({
    chainId: 8453,
    tokenAddress,
    refreshInterval: 5000,
  });

  if (isLoading) return <div>Loading...</div>;

  return (
    <div>
      <h1>
        {token?.name} ({token?.symbol})
      </h1>
      <img src={token?.image} alt={token?.name} />
      <p>Deployer: {token?.deployer}</p>
      <p>Price: {price?.priceInEth} ETH</p>
    </div>
  );
}

Non-React Client

import { NetrClient } from "@net-protocol/netr";

const client = new NetrClient({ chainId: 8453 });

// Get token metadata
const token = await client.getToken("0x...");
console.log(token?.name, token?.symbol);

// Get current price
const price = await client.getPrice("0x...");
console.log(`Price: ${price?.priceInEth} ETH`);

// Get storage data (pool, locker addresses)
const storage = await client.getStorageData("0x...");
console.log(`Pool: ${storage?.poolAddress}`);
console.log(`Locker: ${storage?.lockerAddress}`);

// Get locker info
if (storage?.lockerAddress) {
  const locker = await client.getLocker(storage.lockerAddress);
  console.log(`Lock ends: ${new Date(Number(locker?.endTimestamp) * 1000)}`);
}

Building Deploy Transactions

import { NetrClient, DEFAULT_TOTAL_SUPPLY } from "@net-protocol/netr";

const client = new NetrClient({ chainId: 8453 });

// Generate salt and predict token address
const saltResult = await client.generateSalt({
  name: "My Token",
  symbol: "MTK",
  image: "https://example.com/image.png",
  deployer: "0x...", // Your address
});

console.log(`Predicted address: ${saltResult?.predictedAddress}`);

// Build deploy transaction config
const txConfig = client.buildDeployConfig(
  {
    name: "My Token",
    symbol: "MTK",
    image: "https://example.com/image.png",
    deployer: "0x...",
    // Optional NFT drop settings
    mintPrice: 0n, // Free mint
    mintEndTimestamp: 0n, // No end time
    maxMintSupply: 0n, // Unlimited
  },
  saltResult!.salt
);

// Use with wagmi's useWriteContract
// const { writeContract } = useWriteContract();
// writeContract(txConfig);

API Reference

React Hooks

| Hook | Purpose | | ---------------- | ---------------------------------------- | | useNetrToken | Fetch token metadata (name, symbol, etc) | | useNetrPrice | Fetch current WETH price with refresh | | useNetrLocker | Fetch LP locker data |

NetrClient Methods

| Method | Purpose | | -------------------- | ------------------------------------- | | getToken() | Get token metadata | | getStorageData() | Get pool, locker, drop addresses | | getPrice() | Get current price from Uniswap pool | | getPriceFromPool() | Get price from known pool address | | getLocker() | Get locker info | | generateSalt() | Generate salt and predict address | | buildDeployConfig()| Build deployment transaction config |

Utilities

import {
  addressToBytes32,
  calculatePriceFromSqrtPriceX96,
  decodeBangerStorageData,
  estimateMarketCap,
  formatPrice,
} from "@net-protocol/netr";

// Convert address for storage key lookup
const key = addressToBytes32("0x...");

// Calculate price from Uniswap sqrtPriceX96
const price = calculatePriceFromSqrtPriceX96(sqrtPriceX96, tick);

// Estimate market cap
const marketCap = estimateMarketCap(price.priceInEth, totalSupply, 3000); // ETH at $3000

Constants

import {
  DEFAULT_TOTAL_SUPPLY, // 100 billion tokens
  DEFAULT_INITIAL_TICK, // ~$35k market cap
  CHAIN_INITIAL_TICKS, // Chain-specific initial ticks
  POOL_FEE_TIER, // 1% (10000)
  TOKEN_DECIMALS, // 18
} from "@net-protocol/netr";

Chain Configuration

import {
  getNetrContract,
  isNetrSupportedChain,
  getNetrSupportedChainIds,
} from "@net-protocol/netr";

// Get contract for chain
const contract = getNetrContract(8453); // Base
console.log(contract.address);

// Check chain support
if (isNetrSupportedChain(chainId)) {
  // Chain is supported
}

// Get all supported chains
const chains = getNetrSupportedChainIds(); // [8453, 9745, 143, 999]

Supported Chains

| Chain | Chain ID | Status | | ----------- | -------- | ------ | | Base | 8453 | ✅ | | Plasma | 9745 | ✅ | | Monad | 143 | ✅ | | Hyperliquid | 999 | ✅ |

Types

All types are exported for TypeScript users:

import type {
  NetrTokenMetadata,
  NetrPriceData,
  NetrLockerData,
  NetrStorageData,
  NetrDeployConfig,
  UseNetrTokenOptions,
} from "@net-protocol/netr";

License

MIT