useOwnedNFTs
Hook for accessing a list of NFTs owned by a single wallet address.
Available to use on smart contracts that implement either ERC721Enumerable, ERC1155Enumerable, or ERC721Supply extensions.
import { useOwnedNFTs } from "@thirdweb-dev/react";
const { data, isLoading, error } = useOwnedNFTs(contract, "{{wallet_address}}");
Usage
Provide your NFT collection contract and a wallet address as the arguments.
import { useOwnedNFTs, useContract, useAddress } from "@thirdweb-dev/react";
// Your smart contract address
const contractAddress = "{{contract_address}}";
function App() {
const address = useAddress();
const { contract } = useContract(contractAddress);
const { data, isLoading, error } = useOwnedNFTs(contract, address);
}