2.0 RC docsView 1.x docs
v2.0.0-rc.1 release candidate
The API is frozen and later candidates carry fixes only, except the receipt-free and Safe create surface of /fhe-airdrop, which is @beta. Published on the next dist-tag; latest stays on 1.6.0 until 2.0.0.
ReaduseQuery

useIsSignatureValid

Whether an ECDSA claim authorization would be accepted right now for recipient, without spending an FHE op or a transaction.

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

Description

Whether an ECDSA claim authorization would be accepted right now for recipient, without spending an FHE op or a transaction.

Never reverts - false covers every failure mode (paused, outside the claim window, past deadline, signer lacking SIGNER_ROLE, an invalid signature, a consumed digest, or an already-deduped claim). recipient is load-bearing and part of the cache key: the read is an eth_call FROM that address, so passing the wrong one returns false for a signature that would otherwise succeed. A SIGNER_ROLE key that has been EIP-7702-delegated makes every voucher read false; see EcdsaAirdropClient.isSignatureValid.

Stays disabled until all six signature fields are defined, so a UI can call it unconditionally while a form fills in.

Signature

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

Parameters

Shape of the options object passed to the hook itself.

PropertyTypeDescription
recipientAddressThe address the signature was made out to. The digest binds msg.sender, so the read is simulated FROM this address.
encryptedAmountHandleHexThe external encrypted allocation handle. No input proof: a view never calls FHE.fromExternal.
dedupIdHexThe off-chain claim id bound into the signature.
deadlinebigintUnix seconds the signature expires at.
signerAddressThe SIGNER_ROLE holder that authorized the claim.
signatureHexThe EIP-712 signature from signClaimAuthorization.
Want to run a similar shape interactively? The Playground ships 12 ready presets across vesting / airdrop / disperse / faucet — deploy a manager, create a vesting, claim, and run the product equivalents. The deep-link above auto-selects the closest preset to useIsSignatureValid; pick another from the dropdown if you'd rather start there.

Example

@tokenops/sdk/fhe-airdrop/react · @example
tsx
const { data: claimable } = useIsSignatureValid({
  address: airdropAddress,
  recipient, encryptedAmountHandle, dedupId, deadline, signer, signature,
});

Pulled directly from the hook's TSDoc block — the same snippet your IDE shows on hover.

See also

Other Read hooks in airdrop v2: