usePreflightClaim
Report what would stop a claim right now - chain support, the pause flag, both ends of the claim window, whether claimant can cover the exact-equality gas fee, the Merkle argument-relation rules when account/entrypoint are given, and for an ECDSA campaign given signature, whether the authorisation is valid and unconsumed.
@tokenops/sdk/fhe-airdrop/react{ data, isLoading, error, refetch }Description
Report what would stop a claim right now - chain support, the pause flag, both ends of
the claim window, whether claimant can cover the exact-equality gas fee, the Merkle
argument-relation rules when account/entrypoint are given, and for an ECDSA
campaign given signature, whether the authorisation is valid and unconsumed.
`ready: true` does not mean the claimant has anything to claim. The allocation is encrypted, so an SDK-side "nothing to claim" would require decrypting it; this checks only what is decidable without the ciphertext. Use it to disable a button, not to promise a payout.
Does not run the factory-registry genuineness check (headless preflightClaim's
factory option); pair it with useIsAirdrop for an instance address you did
not create.
Every field below variant feeds the blockers and is therefore part of the cache key.
The fee check reads claimant's live ETH balance, so keep staleTime short - the
default 0 is right for a claim button.
Signature
function usePreflightClaim(args: UsePreflightClaimArgs): UseQueryResult<PreflightResult, Error>;Parameters
Shape of the options object passed to the hook itself.
| Property | Type | Description |
|---|---|---|
| variantrequired | AirdropVariant | Which variant this instance is - picks the client the preflight reads through. |
| claimant | Address | The account that will SEND the claim and therefore pays the exact-equality gas fee. On a relayed Merkle claim this is the relayer. |
| account | Address | Merkle campaigns only: the claim identity, when it is not the sender. Defaults to claimant. Any address may send a Merkle claim; only the account itself may redirect with to. |
| to | Address | The payout destination, if one will be passed. |
| entrypoint | "claim" | "claimAndUnwrap" | Set for claimAndUnwrap, which is always submitted for the caller. |
| signature | EcdsaClaimPreflightSignature | ECDSA campaigns only: adds the authorisation check to the report. |
Example
const { data } = usePreflightClaim({ address: airdropAddress, variant: "merkle", claimant });
<button disabled={!data?.ready}>Claim</button>Pulled directly from the hook's TSDoc block — the same snippet your IDE shows on hover.
See also
Other Read hooks in airdrop v2:
useAirdropTokenRead the ERC-7984 token an airdrop instance distributes.useAirdropWindowRead an airdrop instance's claim-window snapshot in one round trip.useAirdropGasFeeRead the per-claim ETH fee (wei) an instance charges; 0n on a fee-free campaign.useMerkleRootRead a MerkleConfidentialAirdrop instance's currently published root.