1.0.3 • Published 9 months ago
fetchbazar v1.0.3
FetchBazar
This npm package provides utility functions for interacting with the BazAR NFT Marketplace on the Arweave blockchain. It includes functions to fetch NFT token IDs, retrieve token names, and get a leaderboard for the BazARmash game.
Features
- fetchTokens: Fetch all the token IDs of individual NFTs listed on the BazAR marketplace.
- tokenName: Fetch the corresponding name of a token ID from the marketplace.
- BazarmashLeaderboard: Fetch the ranking of tokens based on the BazARmash game, which uses NFTs from the marketplace.
Installation
Install the package using npm:
npm install fetchbazar
Usage
1. Fetch all token IDs
import { fetchTokens } from 'fetchbazar';
const tokens = await fetchTokens();
console.log(tokens);
2. Fetch token names with their corresponding IDs
import { tokenName } from 'fetchbazar';
const name = await tokenName();
console.log(name);
3. Fetch the BazAR Mash Game Leaderboard
import { BazarmashLeaderboard } from 'fetchbazar';
const leaderboard = await BazarmashLeaderboard();
console.log(leaderboard);
Functions
fetchTokens
- Fetches all token IDs of individual NFTs listed on the BazAR marketplace.
- Returns:
Array
of token IDs.
tokenName(tokenId)
- Fetches the name associated with a specific token ID from the marketplace.
- Params:
tokenId
(string): The ID of the token.
- Returns:
String
with the name of the token.
BazarmashLeaderboard
- Fetches the leaderboard based on rankings of NFTs in the BazAR Mash game.
- Returns:
Array
of ranked tokens and their respective scores.
License
This package is licensed under the MIT License.