useNFTBalance
Get NFT balance of a specific wallet
Example
const {
data: ownerBalance,
isLoading,
error,
} = useNFTBalance(contract, "{{wallet_address}}");
// for ERC1155 contracts, you can also pass a tokenId
const tokenId = 0;
const {
data: ownerBalance,
isLoading,
error,
} = useNFTBalance(contract, "{{wallet_address}}", tokenId);
Parameters
Returns
a response object that includes the total balance of the owner