Hook: useAllBuyNFT

Fetch all NFT of Collection which are available for Buying with metadata.

Fetch all NFTs and their metadata for ERC-721 and ERC-1155, NFTs available to buy and takes in a contractAddress and chainId.

Interface

function useAllBuyNFT(
contractAddress?:string,
chainId?:string)

Response

type useAllBuyNFTType = {
allBuyNFT: [{Object}];
isLoading?: bool;
};

Example Code:

import {ChainConfig, useAllBuyNFT} from "@lyncworld/nft-marketplace";

function App() {
const { isLoading, allBuyNFT } = useAllBuyNFT(
"0x9342b1039949d536b2eb456de198c26362daa523",
ChainConfig.MATIC_MUMBAI
);

Not ready to create your own UI yet, don't worry we have got you covered!! Example Code:

import {ChainConfig, LyncListedNFTToBuy} from "@lyncworld/nft-marketplace";

<LyncListedNFTToBuy 
    contractAddress={"0xa879c01913f56419605fde494b5c140a6d146a1b"}
    chainId={ChainConfig.MATIC_MUMBAI}
/>

Last updated