Skip to main content

useOwnedNFTs

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

ParameterTypeDescription
contractRequiredParam<TContract>an instance of a NFTContract
ownerWalletAddressRequiredParam<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