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

librty-dev-kit

v0.0.4

Published

A sdk wrapped around the apis provided by Lbrty for quering blockchain

Readme

LDK Javascript

Documentation

Librty Dev Kit wraps up all the apis and utility codes needed to query blockchain data Install the Librty Dev Kit for Javascript through npm.

npm i librty-dev-kit

Initialize

const { LibrtyDevKit, NETWORK } = require("librty-dev-kit");

const librtyInstance = new LibrtyDevKit("api_key", NETWORK.POLYGON);

Indexer

Indexer is solely responsible for read only data and has 3 major divisions: token, nft & account. For an example if we are looking for token balance of a wallet for a particular token

const tokenBalance = librtyInstance.indexer.token.getTokenBalance("0xc2132d05d31c914a87c6611c10748aeb04b58e8f", "0x6fe489d80a48caf7472cd45f4258b9ffb5208e3c");

Under token the available functions are:

| Function | Details | | ------------- | ------------- | | getTokenBalance(token, wallet) | Get the tokens available in a wallet | | getTokenInfo(token) | Get token name, ticker and other info. | | getNativeTokenBalance(wallet) | Get native token balance of a wallet. | | getTokenAllowance(token, wallet, spender) | Get token allowance approved by a wallet for a spender. |

token is the contract address of a particular token, wallet is the wallet address of a user and spender is the wallet address or contract address of the spender

Under nft the available functions are: | Function | Details | | ------------- | ------------- | | getNFTDetails(token, tokenId) | Get detail of a particular NFT | | getCollectionInfo(token) | Get detail of a collection |

token is the contract address of a NFT contract and tokenId is the id of the particular nft token.

Under account the available functions are:

| Function | Details | | ------------- | ------------- | | getTransactionDetails(hash) | Get transaction details of a given hash |

hash is the unique transaction hash of a particular transaction.

Simulation

We understand working with blockchain is new and interacting with it is time consuming as well, we introduce an option to simulate the response of apis, this will help developers seamlessly integrate the SDK.

const { LibrtyDevKit, NETWORK, LDKResponseMapper } = require("librty-dev-kit");

const responseMapper = new LDKResponseMapper();
responseMapper.setTokenBalance({
    "status": 1,
    "message": "SUCCESS",
    "data": "47099"
});
const librtyInstance = new LibrtyDevKit("api_key", NETWORK.SIMULATION, responseMapper);

const tokenBalance = librtyInstance.indexer.token.getTokenBalance("0xc2132d05d31c914a87c6611c10748aeb04b58e8f", "0x6fe489d80a48caf7472cd45f4258b9ffb5208e3c");