1.0.1 • Published 1 year ago

@dogenet/moonrank-sol v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

@dogenet/moonrank-sol

@dogenet/moonrank-sol is a lightweight Node.js library for finding the rarity rank of a Moonrank NFT on the Solana blockchain.

Installation

To use @dogenet/moonrank-sol, you'll need to have Node.js installed. You can install using npm:

npm install @dogenet/moonrank-sol

Usage

Here's an example of how to use @dogenet/moonrank-sol to find the rarity rank of a Moonrank NFT:

const rarity = require('@dogenet/moonrank-sol').rarity;
const find = new rarity();

find.findRarity({
  collection: 'slimey',
  tokenId: '9rZs17pdNQfRHhowkE6dbJqGyxJZR1Vv7dajxZgTB1Ff'
}).then(r => console.log(`The rarity rank of the token is ${r}`));

findRarity takes an object with two required parameters:

collection (string): The name of the Moonrank collection (e.g. "slimey")

tokenId (string): The Solana token ID of the Moonrank NFT (e.g. "9rZs17pdNQfRHhowkE6dbJqGyxJZR1Vv7dajxZgTB1Ff")

If the Moonrank NFT has a rarity rank, findRarity will return the rarity rank as a number. If the Moonrank NFT does not have a rarity rank, findRarity will return null.

Information

This is an unofficial package and rarity here is fetched with axios and rarity filtered with cheerio!

License

@dogenet/moonrank-sol is licensed under the ISC License. See the LICENSE file for more information.