Skip to main content

useClaimerProofs() function

This feature is currently in beta and may change based on feedback that we receive.

Use this to get the claimer proofs for an adddress for ERC20, ERC721 or ERC1155 based contracts. They need to extend the claimCondition extension for this hook to work.

Example 1

const { data: claimerProofs, isLoading, error } = useClaimerProofs(<YourERC20ContractInstance>);

Example 2

const { data: claimerProofs, isLoading, error } = useClaimerProofs(<YourERC721ContractInstance>);

Example 3

const { data: claimerProofs, isLoading, error } = useClaimerProofs(<YourERC1155ContractInstance>, <tokenId>);

Signature:

export declare function useClaimerProofs(
contract: RequiredParam<DropContract>,
claimerAddress: string,
tokenId?: BigNumberish,
claimConditionId?: BigNumberish,
): import("@tanstack/react-query").UseQueryResult<
{
price?: string | undefined;
currencyAddress?: string | undefined;
address: string;
proof: string[];
maxClaimable: string;
} | null,
unknown
>;

Parameters

ParameterTypeDescription
contractRequiredParam<DropContract>an instance of a contract that extends the ERC721, ERC1155 or ERC20 spec and implements the claimConditions extension.
claimerAddressstringthe address of the claimer to fetch the claimer proofs for
tokenIdBigNumberish(Optional) the id of the token to fetch the claimer proofs for (if the contract is an ERC1155 contract)
claimConditionIdBigNumberish(Optional) optional the claim condition id to get the proofs for

Returns:

import("@tanstack/react-query").UseQueryResult<{ price?: string | undefined; currencyAddress?: string | undefined; address: string; proof: string[]; maxClaimable: string; } | null, unknown>

a response object with the snapshot for the provided address