ECDSA and Merkle airdrops, rebuilt for v2.
Signature or Merkle-proof claims, a per-instance compliance manager, and a role-gated factory admin surface.
Where to start
Install @tokenops/sdk@next, deploy a campaign, fund it, and claim, both variants side by side.
Deploy, fund, authorize, claim, and recover. Each flow lists the hooks that drive it.
Every method on the factory, base, variant, and compliance clients as a React hook, plus the shared FHE decryption and operator hooks.
The shape of airdrop v2
Two claim variants, one base client
AirdropBaseClient carries pause, window extension, treasury withdrawal, rescue, and roles. EcdsaAirdropClient and MerkleAirdropClient extend it, adding only what their claim path needs.
Nested params, no admin field
createEcdsaAirdrop and createMerkleAirdrop both take { params: { common, ...variant }, mode, userSalt }. common has no admin field, the factory injects admin = msg.sender; split roles afterward with grantInstanceRoles.
A compliance manager per instance
Every create returns the instance, its compliance manager clone, and the implementation and delegate it committed to. The manager clone gates which addresses can request delegated decrypt access to that campaign's balances.
Guardrails enforced in code
Non-stock ERC7984 wrappers, in-place UUPS upgrades on Merkle campaigns, salt collisions, and stale CREATE2 predictions all throw a typed error before a transaction is sent.
One deployment, two chains
The canonical factory and implementations sit at the same addresses on Ethereum mainnet and Sepolia, so the clients resolve the factory on either chain without an explicit address.
Padded gas and Safe-ready creates
Every write sends its estimate plus gasHeadroomPercent (25% by default). The four creates take waitForReceipt: false for a Safe signer and return the committed addresses with pending: true.
Reference
The lookup layer for the 2.0 line, every exported type, error class, role, event, and ABI, scoped to /v2/airdrop. The shared core (encryptors, gas, receipt-free writes, deployments) lives under /v2/fhe.
Factory, base, ECDSA, Merkle, and compliance-manager clients.
Nested create params, campaign entries, preflight results.
Typed error classes for claim, create, and role guardrails.
ConfidentialAirdropCreated, MerkleRootSet, Claimed, and role events.
Instance, factory, and compliance-manager role constants.
Raw ABI exports for the factory, both variants, and compliance.