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

@backchain/nft

v0.2.0

Published

Backchain NFT — Buy/sell NFT Boosters via bonding curves

Readme

@backchain/nft

NFT module for the Backchain DeFi ecosystem on opBNB. Buy and sell booster NFTs that trade on bonding curves and increase staking reward yields.

Install

npm install @backchain/nft

Quick Start

import { NftModule } from '@backchain/nft';

const nft = new NftModule(context); // context from @backchain/core
const price = await nft.getBuyPrice(0); // get Bronze NFT price
await nft.buy(0, 50); // buy Bronze NFT with 0.5% slippage tolerance
const tokens = await nft.getUserTokens();

API

Tiers

| Tier | Name | Reward Boost | |------|---------|--------------| | 0 | Bronze | 10% | | 1 | Silver | 25% | | 2 | Gold | 40% | | 3 | Diamond | 50% |

NFTs can be upgraded via @backchain/fusion.

Write Methods

buy(tier: number, slippageBps?: number): Promise<TransactionResult> Purchase an NFT from the bonding curve pool for the given tier. slippageBps sets the maximum acceptable price increase in basis points (default: 100 = 1%). Automatically pays the required ETH/BNB.

sell(tier: number, tokenId: number, minPayout?: bigint): Promise<TransactionResult> Sell an NFT back to the bonding curve pool. minPayout is the minimum BNB the caller will accept; the transaction reverts if the pool price has dropped below this value.

Read Methods

getBuyPrice(tier: number): Promise<bigint> Returns the current buy price in BNB for one NFT of the given tier, as determined by the bonding curve.

getSellPrice(tier: number): Promise<bigint> Returns the current sell price in BNB for one NFT of the given tier.

getPoolInfo(tier: number): Promise<PoolInfo> Returns pool state for a tier: reserve BNB, NFT supply, bonding curve parameters, and pool address.

getAvailableNFTs(tier: number): Promise<number[]> Returns an array of token IDs currently available for purchase in the given tier's pool.

getPoolStats(tier: number): Promise<PoolStats> Returns aggregate statistics for a tier pool: total volume, number of holders, and all-time buy/sell counts.

getUserTokens(address?: string): Promise<UserToken[]> Returns all NFTs owned by the given address (defaults to connected wallet). Each entry includes token ID, tier, and current sell price.

getUserBestBoost(address?: string): Promise<number> Returns the highest boost percentage among all NFTs held by the given address. This is the effective boost applied to staking rewards and claim burn reduction.

getTokenInfo(tokenId: number): Promise<TokenInfo> Returns metadata for a specific token: tier, owner, acquisition price, and current sell price.

License

MIT