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

gondi

v0.26.3

Published

A JavaScript library for crypto-native lending: borrow, lend & refinance NFTs (non-fungible tokens).

Readme

Gondi.js

A JavaScript library for crypto-native lending: borrow, lend & refinance NFTs (non-fungible tokens).

Table of Contents

Installation

You can install it via npm:

npm install --save gondi
# or
yarn add gondi

Getting Started

To get started, you need to provide a wallet only.

import { Gondi } from 'gondi';
import { createWalletClient, http } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';
import { mainnet } from 'viem/chains';
const transport = http('https://eth-mainnet.g.alchemy.com/v2/...');

const wallet = createWalletClient({
  account: privateKeyToAccount(privateKey),
  transport,
  chain: mainnet,
});
const gondi = new Gondi({ wallet });

Typescript types are included in the package.

Examples

Getting NFT/Collection ids

We use integer ids to identify collections and NFTs. We provide helper functions to get them:

const nftId = await gondi.nftId({ slug: 'collection-slug', tokenId: 0n });
const collectionId = await gondi.collectionId({ slug: 'collection-slug' });
const collectionId = (
  await gondi.collectionId({
    contractAddress: '0x0000000000000000000000000000000000000000',
  })
)[0]; // It's an array because some collections use same contract (e.g. Artblocks)

Making Offers

Single NFT Offer

const offers = await gondi.makeSingleNftOffer({
    nftId=1,
    principalAddress="0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",  // Principal currency address. (e.g. WETH)
    principalAmount=1_000_000_000_000_000_000n,                     // Principal amount. In units of currency (e.g. WETH is wei)(e.g. 1WETH)
    capacity=1_000_000_000_000_000_000n,                            // How much money do you want to loan in total,
                                                                    // valid for collection offers.
                                                                    // If you want N loans for example, it should be N*principalAmount.
    fee=0n,                                                         // Origination fee.
    aprBps=100n,                                                    // Apr expressed in basis points. (e.g. 1% apr)
    expirationTime=1700000000n,                                     // Expiration time expressed in seconds since epoch. (e.g. 2023/11/14)
    duration=31_536_000n,                                           // Duration expressed in secconds. (e.g. 1 year)
    requiresLiquidation,                                            // Sets the collateral to be liquidated on default.
    borrowerAddress,                                                // Optional: allow only this borrower to accept the offer.
});

Collection Offer

const offer = await gondi.makeCollectionOffer({
    collectionId,
    ... // Same as Single NFT Offer

});

Listing Offers

import { OffersSortField, Ordering } from 'gondi';
const offer = await gondi.offers({
  cusor, // Cursor returned by previous calls.
  limit, // Number results.
  sortBy: {
    // Sort criteria.
    field: OffersSortField.CreatedDate,
    order: Ordering.Asc,
  },
  filterBy, // Filter criteria, result is conjunction of components.
});

Listing Listings

const listings = await gondi.listings({
  cusor, // Cursor returned by previous calls.
  limit, // Number results.
  sortBy, // Sort criteria.
  filterBy, // Filter criteria, result is conjunction of components.
});