useNFTBalance() function
This feature is currently in beta and may change based on feedback that we receive.
Use this to get a the total balance of a NFTContract and wallet address.
Example
const { contract } = useContract(<ContractAddress>);
const { data: ownerBalance, isLoading, error } = useNFTBalance(contract, <OwnerWalletAddress>);
Signature:
export declare function useNFTBalance(
contract: RequiredParam<NFTContract>,
ownerWalletAddress: RequiredParam<WalletAddress>,
tokenId: RequiredParam<BigNumberish>,
): import("@tanstack/react-query").UseQueryResult<BigNumber, unknown>;
Parameters
Parameter | Type | Description |
---|---|---|
contract | RequiredParam<NFTContract> | an instance of a NFTContract |
ownerWalletAddress | RequiredParam<WalletAddress> | the wallet adress to check the balance of |
tokenId | RequiredParam<BigNumberish> |
Returns:
import("@tanstack/react-query").UseQueryResult<BigNumber, unknown>
a response object that includes the total balance of the owner