Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fetch-nft-metadata

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fetch-nft-metadata

Fetch Ethereum NFT metadata and images

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

NodeJS Fetch Ethereum NFT Metadata

This package fetches an NFT Metadata from a contract using ERC721 or ERC1155 (Most NFTs)

It also proxies ipfs urls to https

Installation

Install fetch-nft-metadata with npm

  npm install fetch-nft-metadata

Usage/Examples

A full example is availible in ./example.js

(async () => {
  var FetchNFTMetadata = require("fetch-nft-metadata")(
    "ETH-RPC-URL" // YOUR ETHEREUM RPC URL HERE default is "https://cloudflare-eth.com/v1/mainnet"
  );

  var result = await FetchNFTMetadata.fetch(
    "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d", // YOUR TOKEN CONTRACT ADDRESS HERE
    476 // YOUR TOKEN ID HERE
  );
  console.log(result); // result is the metadata object, ipfs is proxied to https://ipfs.io/ipfs/
})();

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Authors

  • Ryan Trattner @RTISCOOL

License

MIT

Keywords

FAQs

Package last updated on 31 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc