1.1.0 • Published 3 years ago

got-nfts v1.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Installation

This library is avaliable as an npm package. To install the package run:

npm install got-nfts --save

# or with yarn
yarn add got-nfts

Getting Started

import {
  getNftsMetadata,
  fetchNftsMetadata,
  getNftMetadata,
  fetchNftMetadata,
} from 'got-nfts'

/*
  FOR ALL OF A USER'S NFTs
*/

// Want to get all of the NFTs and the NFTs' metadata URIs for an address?
getNftsMetadata(address)
//=> ["http://api.chainbreakers.io/api/v1/items/metadata?tokenId=331", ...]

// Want to fetch all of the NFTs' metadata?
fetchNftsMetadata(address)
//=> [{"name":"Katana Of Strategy","background_color":"303030", ... }, ...]

/*
  FOR A SINGLE NFT
*/

// Want to get a specific NFT's metadata URIs?
getNftMetadata(contractAddress, tokenId)
//=>  "http://api.chainbreakers.io/api/v1/items/metadata?tokenId=331"

// Want to fetch the metadata for the NFT?
fetchNftMetadata(contractAddress, tokenId)
//=> {"name":"Katana Of Strategy","background_color":"303030", ... }
1.1.0

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago