@getsafle/nft-controller

2.3.1 • Public • Published

Safle NFT Controller

This library enables the developer to detect Non Fungible Tokens (NFT) for any public address across the supported chains.


Installation and Usage

Installation

Install the package by running the command,

npm install @getsafle/nft-controller

Import the package into your project using,

const safleNftController = require('@getsafle/nft-controller');

Initialization


Initialise the class using,

const nftController = new safleNftController.NftController(); 


Methods


Discover the NFTs and get their details

const nfts = await nftController.detectNFTs({ publicAddress, chain, ETHNFTContinuation, PolygonNFTContinuation });
  • publicAddress - Public address to detect NFTs.
  • chain (optional) - Optional chain parameter to detect the NFTs. Supported chains : Ethereum, Polygon.

Get Price Data

const price = await nftController.getPriceData([{ publicAddress, contractAddress, tokenId, chain }]);
  • publicAddress - Public address of the NFT holder.
  • chain - Chain where the NFT was minted. Supported chains : Ethereum, Polygon.
  • tokenId - TokenId of the NFT to get the price data.
  • contractAddress - Contract address of the NFT collection to get the price data.

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @getsafle/nft-controller

    Weekly Downloads

    2

    Version

    2.3.1

    License

    MIT

    Unpacked Size

    12.1 kB

    Total Files

    9

    Last publish

    Collaborators

    • subhanshugupta
    • apoorv31
    • shubham.3008
    • sidth