ReaduseQuery Curated

useAirdropIsSignatureClaimed

Has this admin signature already been redeemed?

Import
@tokenops/sdk/fhe-airdrop/react
Return
{ data, isLoading, error, refetch }
Lifecycle
Read

Description

Check whether a claim has been consumed for a (user, encryptedAmountHandle) pair on this airdrop clone. The contract recomputes the struct hash internally and looks it up in storage.

Most frontends want this hook over useAirdropClaimedSignatures — pass the same user + encryptedAmountHandle that appear in the admin-issued claim payload.

After a successful useClaim, invalidate this query for the claimed (user, encryptedAmountHandle) pair.

Signature

@tokenops/sdk/fhe-airdrop/react
ts
function useAirdropIsSignatureClaimed(args: UseAirdropIsSignatureClaimedArgs): UseQueryResult<boolean, Error>;

Parameters

Shape of the options object passed to the hook itself.

PropertyTypeDescription
userAddressRecipient address from the claim authorization.
encryptedAmountHandleHexexternalEuint64 handle (as Hex) from the claim payload.
Want to run a similar shape interactively? The Playground ships 8 ready presets across vesting / airdrop / disperse — deploy a manager, create a vesting, claim, and the airdrop / disperse equivalents. The deep-link above auto-selects the closest preset to useAirdropIsSignatureClaimed; pick another from the dropdown if you'd rather start there.

Example

components/useAirdropIsSignatureClaimedExample.tsx
tsx
"use client";
import { useAirdropIsSignatureClaimed } from "@tokenops/sdk/fhe-airdrop/react";

export function Example() {
  const { data, isLoading } = useAirdropIsSignatureClaimed(/* args */);

  if (isLoading) return "loading…";
  return <pre>{JSON.stringify(data, null, 2)}</pre>;
}

Auto-generated from the hook's shape (the SDK doesn't carry a TSDoc @example here yet).

See also

Other Read hooks in airdrop: