got-nfts

<p align="center"> <img alt="got-nfts" title="got-nfts" src="https://user-images.githubusercontent.com/29695350/131254760-cf2722dc-32a9-4ec2-b106-c9ce70035a35.png" /> </p>

Usage no npm install needed!

<script type="module">
  import gotNfts from 'https://cdn.skypack.dev/got-nfts';
</script>

README

got-nfts

got-nfts provides the most comprehensive, yet simple and consistent toolset
for getting Ethereum NFTs.


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", ... }