useIsSignatureValid
Whether an ECDSA claim authorization would be accepted right now for recipient, without spending an FHE op or a transaction.
@tokenops/sdk/fhe-airdrop/react{ data, isLoading, error, refetch }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
function useIsSignatureValid(args: UseIsSignatureValidArgs): UseQueryResult<boolean, Error>;Parameters
Shape of the options object passed to the hook itself.
| Property | Type | Description |
|---|---|---|
| recipient | Address | The address the signature was made out to. The digest binds msg.sender, so the read is simulated FROM this address. |
| encryptedAmountHandle | Hex | The external encrypted allocation handle. No input proof: a view never calls FHE.fromExternal. |
| dedupId | Hex | The off-chain claim id bound into the signature. |
| deadline | bigint | Unix seconds the signature expires at. |
| signer | Address | The SIGNER_ROLE holder that authorized the claim. |
| signature | Hex | The EIP-712 signature from signClaimAuthorization. |
Example
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:
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.