useOwnedNFTs() function
This feature is currently in beta and may change based on feedback that we receive.
Use this to get a the owned NFTs for a specific Erc721OrErc1155 and wallet address.
Example
const { contract } = useContract(<ContractAddress>);
const { data: ownedNFTs, isLoading, error } = useOwnedNFTs(contract, <OwnerWalletAddress>);
Signature:
export declare function useOwnedNFTs<TContract extends NFTContract>(
contract: RequiredParam<TContract>,
ownerWalletAddress: RequiredParam<WalletAddress>,
): import("@tanstack/react-query").UseQueryResult<NFT[], unknown>;
Parameters
Parameter | Type | Description |
---|---|---|
contract | RequiredParam<TContract> | an instance of a NFTContract |
ownerWalletAddress | RequiredParam<WalletAddress> | the wallet adress to get owned tokens for |
Returns:
import("@tanstack/react-query").UseQueryResult<NFT[], unknown>
a response object that includes the list of owned tokens