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/rental

v0.2.0

Published

Backchain Rental — NFT rental marketplace

Downloads

129

Readme

@backchain/rental

Rental module for the Backchain DeFi ecosystem on opBNB. NFT booster rental marketplace — list your NFTs for rent and earn BNB, or rent a booster to amplify your staking rewards.

Install

npm install @backchain/rental

Quick Start

import { RentalModule } from '@backchain/rental';

const rental = new RentalModule(context); // context from @backchain/core
await rental.listNft(tokenId, ethers.parseEther('0.001')); // 0.001 BNB/day
const cost = await rental.getRentalCost(tokenId);
await rental.rentNft(tokenId); // renter receives the NFT boost

API

Write Methods

listNft(tokenId: number, pricePerDay: bigint): Promise<TransactionResult> List an NFT booster for rent. pricePerDay is the daily rental price in BNB (wei). The NFT is transferred to the rental contract escrow. The owner retains ownership and can withdraw at any time when the NFT is not actively rented.

rentNft(tokenId: number): Promise<TransactionResult> Rent a listed NFT. Automatically calculates and sends the required BNB based on the listing's pricePerDay and a fixed rental period. The renter receives the NFT's boost effect for the duration of the rental.

withdrawNft(tokenId: number): Promise<TransactionResult> Return a listed (but not currently rented) NFT to the owner's wallet. Removes the listing. Reverts if the NFT is actively rented.

updateListing(tokenId: number, pricePerDay: bigint): Promise<TransactionResult> Update the daily rental price of an existing listing. Only the listing owner can call this. Takes effect on the next rental.

withdrawEarnings(): Promise<TransactionResult> Withdraw all accumulated BNB rental earnings to the caller's wallet. Collects earnings across all of the caller's listings.

boostListing(tokenId: number, days: number): Promise<TransactionResult> Pay a fee to feature a listing in the marketplace's promoted section for the given number of days. Increases visibility to prospective renters.

Read Methods

getListing(tokenId: number): Promise<Listing> Returns full listing data for an NFT: owner, tier, price per day, current renter address (zero if available), rental start time, rental end time, and total earnings accumulated.

getRentalCost(tokenId: number): Promise<bigint> Returns the total BNB required to rent the NFT for one standard rental period. Equivalent to pricePerDay * rentalPeriodDays plus any applicable protocol fee.

getStats(): Promise<RentalStats> Returns global rental marketplace statistics: total listings, active rentals, total BNB earned by owners, total rental volume, and the current standard rental period in days.

License

MIT