LYNC
  • 👋INTRODUCTION
    • 👋Introducing LYNC
    • ⚙️Pre-Requisites
  • Products
    • LYNC Account Abstraction SDK
    • Metamask Wallet
    • OKX Wallet
    • LYNC In-Game Marketplace SDK
    • NFT Fetcher
    • LYNC Portal: Game Launcher
    • LYNC NFT Deployer
  • FEVM Support
    • LYNC Wallet SDK supporting FEVM
    • NFT Deployer -> FEVM
  • NPM Packages
    • Marketplace
      • Hook: useAllCollectionNFT
      • Hook: useAllBuyNFT
      • Hook: useAllOwnerNFT
      • Hook: useNFTDetails
      • Hook: useAllNFTForRent
Powered by GitBook
On this page
  1. NPM Packages
  2. Marketplace

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}
/>
PreviousHook: useAllCollectionNFTNextHook: useAllOwnerNFT

Last updated 1 year ago