useClaimerProofs

Hook to get the claimer proofs for an address for ERC20 , ERC721 , and ERC1155 drop contracts.

A claimer proof is a set of data about a claimer's claim condition, including the claimer's address, the claimer's proof, and the claimer's max claimable amount, price, and currency address.

This is available for available for contracts that implement the "ClaimConditions" interface; such as NFT Drop , Edition Drop , and Token Drop .

Example

import { useClaimerProofs, useContract } from "@thirdweb-dev/react";
function App() {
const { contract } = useContract(contractAddress);
const {
data: proof,
isLoading,
error,
} = useClaimerProofs(contract, "{{claimer_address}}");
}
function useClaimerProofs(
contract: RequiredParam<DropContract>,
claimerAddress: string,
tokenId?: BigNumberish,
claimConditionId?: BigNumberish,
): UseQueryResult<
{
address: string;
currencyAddress?: string;
maxClaimable: string;
price?: string;
proof: Array<string>;
} | null,
unknown
>;

Parameters

Instance of a contract that extends the ERC721, ERC1155 or ERC20 spec and implements the "ClaimConditions" extension.

Type

let contract: RequiredParam<DropContract>;

This is the address of the user you want to get the proof for.

Likely, you will want to check proofs of the currently connected wallet address. You can use the useAddress hook to get this value.

Type

let claimerAddress: string;

When using the hook with ERC1155 contracts, pass the tokenId ; as each token can have unique claim conditions.

Pass undefined , or leave this field out if you are using ERC721 or ERC20 drop contracts.

Type

let tokenId: BigNumberish;

This is the ID of the claim condition you want to get the proof for.

Type

let claimConditionId: BigNumberish;

Returns

let returnType: UseQueryResult<
{
address: string;
currencyAddress?: string;
maxClaimable: string;
price?: string;
proof: Array<string>;
} | null,
unknown
>;

Query result object with the snapshot for the provided address