Airdrop · Client@tokenops/sdk/fhe-airdrop
ConfidentialAirdropClient
Mounts against a single airdrop clone. Recipients claim with the admin-issued { encryptedInput, signature } payload; the admin pauses, extends the window, and withdraws. Funding happens on the factory client, and claim authorizations are signed with the standalone signClaimAuthorization helper.
Construct
Headless TS — non-React consumers (Node, Vite, server workers). React hosts use the per-hook surface; same method names, lazy encryptor.
@tokenops/sdk/fhe-airdrop
ts
import { createConfidentialAirdropClient } from "@tokenops/sdk/fhe-airdrop";
const client = createConfidentialAirdropClient({
publicClient,
walletClient,
address, // required: deployed airdrop clone address
});Methods
Write · 1
Read · 3
- Returns true when the current timestamp is within [startTime, endTime] AND claims are not paused.
client.isClaimWindowActive()React:useAirdropIsClaimWindowActive - Has this admin signature already been redeemed?
client.isSignatureClaimed()React:useAirdropIsSignatureClaimed - On-chain view that checks whether the admin signature is valid for the connected caller before paying gas — returns false for a non-admin signer or already-claimed signature; throws if the claim window is inactive or the signature bytes are malformed.
client.isSignatureValid()React:useAirdropIsSignatureValid
Roles · RBAC · 3
- AccessControl: grant role to accountTarget on this airdrop clone.
client.grantRole()React:useAirdropGrantRole - AccessControl: revoke role from accountTarget on this airdrop clone.
client.revokeRole()React:useAirdropRevokeRole - Read AccessControl: is account a member of role on this airdrop clone? The role hashes are stable across deployments (DEFAULT_ADMIN_ROLE, FEE_COLLECTOR_ROLE, etc.).
client.hasRole()React:useAirdropHasRole