@tokenops/sdk 1.6.0 → 2.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. package/CHANGELOG.md +77 -8
  2. package/CONTRIBUTING.md +4 -2
  3. package/README.md +146 -90
  4. package/SUPPORT.md +47 -0
  5. package/dist/{chunk-BD4LZBVF.cjs → chunk-3QHNYEQD.cjs} +18 -17
  6. package/dist/{chunk-YFIWCYHC.cjs → chunk-3YHBO2DL.cjs} +56 -54
  7. package/dist/{chunk-QET3Q4JP.js → chunk-44YJPMQC.js} +8 -6
  8. package/dist/{chunk-6WSNS3UV.js → chunk-4RAAATVY.js} +2 -4
  9. package/dist/{chunk-4KJ66YRH.js → chunk-4TSDNZQ3.js} +2 -2
  10. package/dist/chunk-66IHPTOK.cjs +20 -0
  11. package/dist/{chunk-2RNW4MIJ.cjs → chunk-67OV5CX2.cjs} +0 -18
  12. package/dist/{chunk-PD7ME2BT.js → chunk-6GNR22OV.js} +2 -1
  13. package/dist/{chunk-WOEETTH7.cjs → chunk-7AFPOE7N.cjs} +6 -6
  14. package/dist/{chunk-QKKBBH7I.js → chunk-A4DCEE33.js} +34 -7
  15. package/dist/chunk-AREQJHKA.cjs +713 -0
  16. package/dist/{chunk-U57COLUE.js → chunk-AXIPOR3C.js} +2 -2
  17. package/dist/chunk-EBLBPUPI.cjs +255 -0
  18. package/dist/chunk-EYDA6Q6C.js +245 -0
  19. package/dist/{chunk-SYHNZSZZ.cjs → chunk-FAXIIH5R.cjs} +3 -3
  20. package/dist/{chunk-AYGRYDBX.cjs → chunk-FEDX7B6T.cjs} +37 -35
  21. package/dist/{chunk-CBRL2PJA.cjs → chunk-FHWSBGWE.cjs} +12 -12
  22. package/dist/{chunk-WUXUWTFW.cjs → chunk-FT5H2Q7Y.cjs} +37 -7
  23. package/dist/chunk-GADGBQJO.js +423 -0
  24. package/dist/{chunk-VHSNYUYV.js → chunk-IGO5XSPS.js} +5 -5
  25. package/dist/chunk-IUKKNJ2R.cjs +433 -0
  26. package/dist/{chunk-VR3FREBX.cjs → chunk-JK4XMMKM.cjs} +3 -3
  27. package/dist/{chunk-4ZCXK4VI.cjs → chunk-KFRDLKMA.cjs} +14 -14
  28. package/dist/chunk-KWFFIJYX.js +11 -0
  29. package/dist/{chunk-7G7UOQV4.cjs → chunk-MM5BV5CS.cjs} +4 -4
  30. package/dist/{chunk-43RFBQ73.cjs → chunk-MVDQMV25.cjs} +29 -32
  31. package/dist/chunk-NWFMBLSQ.js +4 -0
  32. package/dist/{chunk-HETNKZEE.js → chunk-PYYSB5ZN.js} +1 -1
  33. package/dist/chunk-PZZK3O3S.cjs +9843 -0
  34. package/dist/{chunk-DRSPMIZ7.js → chunk-QBJ7O2B4.js} +1 -11
  35. package/dist/{chunk-WTK6JDSI.js → chunk-SPLNGUFF.js} +6 -4
  36. package/dist/{chunk-UJS4N2XM.cjs → chunk-TEBM66WA.cjs} +12 -12
  37. package/dist/{chunk-TN65XNTI.js → chunk-TWT3STIX.js} +8 -6
  38. package/dist/chunk-UG5RKLU2.cjs +6 -0
  39. package/dist/{chunk-EUKPOXWR.cjs → chunk-UHHMVBLU.cjs} +17 -15
  40. package/dist/chunk-VW356KR3.js +688 -0
  41. package/dist/{chunk-BK7YIVLK.cjs → chunk-WJLECC22.cjs} +75 -73
  42. package/dist/{chunk-V5D7BHW3.js → chunk-WJMEBBU7.js} +6 -4
  43. package/dist/{chunk-NFW7AUEX.js → chunk-WMACINXO.js} +1 -1
  44. package/dist/chunk-X7WBPCEU.js +9817 -0
  45. package/dist/{chunk-46T67CE2.js → chunk-ZA673I3O.js} +1 -1
  46. package/dist/{chunk-YPYCWLYP.js → chunk-ZWXJTBZO.js} +1 -1
  47. package/dist/core/addresses.d.ts +14 -2
  48. package/dist/core/brands.d.ts +8 -2
  49. package/dist/core/errors.d.ts +71 -10
  50. package/dist/core/preflight.d.ts +1 -0
  51. package/dist/fhe/erc7984-abi.d.ts +1 -0
  52. package/dist/fhe/index.cjs +64 -63
  53. package/dist/fhe/index.js +7 -6
  54. package/dist/fhe/operators.d.ts +22 -5
  55. package/dist/fhe/react/index.cjs +13 -12
  56. package/dist/fhe/react/index.js +6 -5
  57. package/dist/fhe/types.d.ts +8 -2
  58. package/dist/fhe-airdrop/abis/{cloneable.d.ts → airdrop-base.d.ts} +254 -396
  59. package/dist/fhe-airdrop/abis/compliance.d.ts +422 -0
  60. package/dist/fhe-airdrop/abis/ecdsa.d.ts +1316 -0
  61. package/dist/fhe-airdrop/abis/factory.d.ts +1319 -190
  62. package/dist/fhe-airdrop/abis/index.d.ts +5 -2
  63. package/dist/fhe-airdrop/abis/merkle.d.ts +1250 -0
  64. package/dist/fhe-airdrop/advanced/index.cjs +11 -12
  65. package/dist/fhe-airdrop/advanced/index.d.cts +34 -11
  66. package/dist/fhe-airdrop/advanced/index.d.ts +34 -11
  67. package/dist/fhe-airdrop/advanced/index.js +3 -8
  68. package/dist/fhe-airdrop/advanced/react/index.cjs +619 -51
  69. package/dist/fhe-airdrop/advanced/react/index.d.cts +43 -3
  70. package/dist/fhe-airdrop/advanced/react/index.d.ts +43 -3
  71. package/dist/fhe-airdrop/advanced/react/index.js +592 -52
  72. package/dist/fhe-airdrop/advanced/react/useClearCompliancePolicy.d.ts +28 -0
  73. package/dist/fhe-airdrop/advanced/react/useClearUpgradeabilityPolicy.d.ts +26 -0
  74. package/dist/fhe-airdrop/advanced/react/useDisableCustomFee.d.ts +25 -0
  75. package/dist/fhe-airdrop/advanced/react/useEcdsaInitCodeHash.d.ts +30 -0
  76. package/dist/fhe-airdrop/advanced/react/useFactoryComplianceDelegate.d.ts +25 -0
  77. package/dist/fhe-airdrop/advanced/react/useFactoryCompliancePolicy.d.ts +38 -0
  78. package/dist/fhe-airdrop/advanced/react/useFactoryCustomFee.d.ts +24 -0
  79. package/dist/fhe-airdrop/advanced/react/useFactoryGrantRole.d.ts +32 -0
  80. package/dist/fhe-airdrop/advanced/react/useFactoryHasRole.d.ts +27 -0
  81. package/dist/fhe-airdrop/advanced/react/useFactoryImplementations.d.ts +33 -0
  82. package/dist/fhe-airdrop/advanced/react/useFactoryRenounceRole.d.ts +36 -0
  83. package/dist/fhe-airdrop/advanced/react/useFactoryRevokeRole.d.ts +35 -0
  84. package/dist/fhe-airdrop/advanced/react/useFactoryRoleConstants.d.ts +46 -0
  85. package/dist/fhe-airdrop/advanced/react/useFactoryRoleMembers.d.ts +47 -0
  86. package/dist/fhe-airdrop/advanced/react/useFactoryUpgradeabilityPolicy.d.ts +39 -0
  87. package/dist/fhe-airdrop/advanced/react/useMerkleInitCodeHash.d.ts +24 -0
  88. package/dist/fhe-airdrop/advanced/react/usePredictEcdsaAirdropAddress.d.ts +33 -0
  89. package/dist/fhe-airdrop/advanced/react/usePredictMerkleAirdropAddress.d.ts +27 -0
  90. package/dist/fhe-airdrop/advanced/react/useSetComplianceDelegate.d.ts +33 -0
  91. package/dist/fhe-airdrop/advanced/react/useSetComplianceManagerImpl.d.ts +27 -0
  92. package/dist/fhe-airdrop/advanced/react/useSetCompliancePolicy.d.ts +28 -0
  93. package/dist/fhe-airdrop/advanced/react/useSetCustomFee.d.ts +28 -0
  94. package/dist/fhe-airdrop/advanced/react/useSetDefaultDelegateToCompliance.d.ts +31 -0
  95. package/dist/fhe-airdrop/advanced/react/useSetDefaultGasFee.d.ts +28 -0
  96. package/dist/fhe-airdrop/advanced/react/useSetDefaultUpgradeable.d.ts +27 -0
  97. package/dist/fhe-airdrop/advanced/react/useSetEcdsaImplementation.d.ts +34 -0
  98. package/dist/fhe-airdrop/advanced/react/useSetFeeCollector.d.ts +27 -0
  99. package/dist/fhe-airdrop/advanced/react/useSetMerkleImplementation.d.ts +30 -0
  100. package/dist/fhe-airdrop/advanced/react/useSetUpgradeabilityPolicy.d.ts +31 -0
  101. package/dist/fhe-airdrop/airdrop-base.d.ts +608 -0
  102. package/dist/fhe-airdrop/campaign.d.ts +338 -0
  103. package/dist/fhe-airdrop/compliance.d.ts +302 -0
  104. package/dist/fhe-airdrop/constants.d.ts +33 -0
  105. package/dist/fhe-airdrop/ecdsa.d.ts +263 -0
  106. package/dist/fhe-airdrop/encryption.d.ts +92 -14
  107. package/dist/fhe-airdrop/errors.d.ts +273 -15
  108. package/dist/fhe-airdrop/factory.d.ts +533 -274
  109. package/dist/fhe-airdrop/guards.d.ts +317 -0
  110. package/dist/fhe-airdrop/index.cjs +233 -73
  111. package/dist/fhe-airdrop/index.d.cts +46 -8
  112. package/dist/fhe-airdrop/index.d.ts +46 -8
  113. package/dist/fhe-airdrop/index.js +11 -7
  114. package/dist/fhe-airdrop/merkle-tree.d.ts +97 -0
  115. package/dist/fhe-airdrop/merkle.d.ts +201 -0
  116. package/dist/fhe-airdrop/react/_shared.d.ts +156 -70
  117. package/dist/fhe-airdrop/react/index.cjs +1174 -384
  118. package/dist/fhe-airdrop/react/index.d.cts +99 -74
  119. package/dist/fhe-airdrop/react/index.d.ts +99 -74
  120. package/dist/fhe-airdrop/react/index.js +993 -303
  121. package/dist/fhe-airdrop/react/keys.d.ts +90 -0
  122. package/dist/fhe-airdrop/react/useAccessEcdsaClaimAmount.d.ts +26 -0
  123. package/dist/fhe-airdrop/react/useAccessMerkleClaimAmount.d.ts +27 -0
  124. package/dist/fhe-airdrop/react/useAddComplianceDelegate.d.ts +37 -0
  125. package/dist/fhe-airdrop/react/useAdminBatchDiscloseBalanceToParties.d.ts +36 -0
  126. package/dist/fhe-airdrop/react/useAdminDiscloseBalanceToParty.d.ts +31 -0
  127. package/dist/fhe-airdrop/react/useAdminGetCurrentBalance.d.ts +27 -0
  128. package/dist/fhe-airdrop/react/useAirdropConfig.d.ts +49 -0
  129. package/dist/fhe-airdrop/react/useAirdropDeploymentMode.d.ts +28 -0
  130. package/dist/fhe-airdrop/react/useAirdropGasFee.d.ts +10 -5
  131. package/dist/fhe-airdrop/react/useAirdropGrantRole.d.ts +29 -10
  132. package/dist/fhe-airdrop/react/useAirdropHasRole.d.ts +15 -6
  133. package/dist/fhe-airdrop/react/useAirdropPause.d.ts +30 -0
  134. package/dist/fhe-airdrop/react/useAirdropPaused.d.ts +17 -0
  135. package/dist/fhe-airdrop/react/useAirdropRenounceRole.d.ts +36 -0
  136. package/dist/fhe-airdrop/react/useAirdropRevokeRole.d.ts +27 -9
  137. package/dist/fhe-airdrop/react/useAirdropRoleAdmin.d.ts +28 -0
  138. package/dist/fhe-airdrop/react/useAirdropRoleConstants.d.ts +67 -0
  139. package/dist/fhe-airdrop/react/useAirdropRoleMembers.d.ts +49 -0
  140. package/dist/fhe-airdrop/react/useAirdropToken.d.ts +11 -4
  141. package/dist/fhe-airdrop/react/useAirdropUpgradeToAndCall.d.ts +45 -0
  142. package/dist/fhe-airdrop/react/useAirdropWindow.d.ts +37 -0
  143. package/dist/fhe-airdrop/react/useBatchDiscloseHandlesToParty.d.ts +32 -0
  144. package/dist/fhe-airdrop/react/useBuildMerkleCampaign.d.ts +68 -0
  145. package/dist/fhe-airdrop/react/useClaimedAmount.d.ts +29 -0
  146. package/dist/fhe-airdrop/react/useComplianceGrantRole.d.ts +32 -0
  147. package/dist/fhe-airdrop/react/useComplianceHasRole.d.ts +37 -0
  148. package/dist/fhe-airdrop/react/useComplianceInfo.d.ts +50 -0
  149. package/dist/fhe-airdrop/react/useComplianceManager.d.ts +16 -0
  150. package/dist/fhe-airdrop/react/useComplianceManagerOf.d.ts +32 -0
  151. package/dist/fhe-airdrop/react/useComplianceRenounceRole.d.ts +38 -0
  152. package/dist/fhe-airdrop/react/useComplianceRevokeRole.d.ts +36 -0
  153. package/dist/fhe-airdrop/react/useComplianceRoleConstants.d.ts +41 -0
  154. package/dist/fhe-airdrop/react/useComplianceRoleMembers.d.ts +45 -0
  155. package/dist/fhe-airdrop/react/useCreateAndFundEcdsaAirdrop.d.ts +55 -0
  156. package/dist/fhe-airdrop/react/useCreateAndFundMerkleAirdrop.d.ts +52 -0
  157. package/dist/fhe-airdrop/react/useCreateEcdsaAirdrop.d.ts +28 -0
  158. package/dist/fhe-airdrop/react/useCreateMerkleAirdrop.d.ts +25 -0
  159. package/dist/fhe-airdrop/react/useDiscloseHandleToParty.d.ts +35 -0
  160. package/dist/fhe-airdrop/react/useEcdsaClaim.d.ts +24 -0
  161. package/dist/fhe-airdrop/react/useEcdsaClaimAndUnwrap.d.ts +27 -0
  162. package/dist/fhe-airdrop/react/useEcdsaDomain.d.ts +41 -0
  163. package/dist/fhe-airdrop/react/useEffectiveDelegateToCompliance.d.ts +26 -0
  164. package/dist/fhe-airdrop/react/useEffectiveUpgradeable.d.ts +20 -0
  165. package/dist/fhe-airdrop/react/useEncryptCampaignAmounts.d.ts +59 -0
  166. package/dist/fhe-airdrop/react/useExtendClaimWindow.d.ts +17 -12
  167. package/dist/fhe-airdrop/react/useFactoryFees.d.ts +28 -0
  168. package/dist/fhe-airdrop/react/useFactoryRegistry.d.ts +35 -0
  169. package/dist/fhe-airdrop/react/useFundAirdrop.d.ts +35 -0
  170. package/dist/fhe-airdrop/react/useGrantInstanceRoles.d.ts +35 -0
  171. package/dist/fhe-airdrop/react/useIsActiveDelegate.d.ts +29 -0
  172. package/dist/fhe-airdrop/react/useIsMerkleRootMutable.d.ts +21 -0
  173. package/dist/fhe-airdrop/react/useIsSignatureValid.d.ts +46 -0
  174. package/dist/fhe-airdrop/react/useMerkleClaim.d.ts +22 -0
  175. package/dist/fhe-airdrop/react/useMerkleClaimAndUnwrap.d.ts +29 -0
  176. package/dist/fhe-airdrop/react/useMerkleRoot.d.ts +15 -0
  177. package/dist/fhe-airdrop/react/usePlanMerkleCampaign.d.ts +53 -0
  178. package/dist/fhe-airdrop/react/usePreflightClaim.d.ts +46 -0
  179. package/dist/fhe-airdrop/react/usePreflightCreateAirdrop.d.ts +51 -35
  180. package/dist/fhe-airdrop/react/useRescueERC20.d.ts +30 -0
  181. package/dist/fhe-airdrop/react/useRescueOtherConfidentialToken.d.ts +34 -0
  182. package/dist/fhe-airdrop/react/useRevokeComplianceDelegate.d.ts +37 -0
  183. package/dist/fhe-airdrop/react/useRotateMerkleRoot.d.ts +52 -0
  184. package/dist/fhe-airdrop/react/useSetMerkleRoot.d.ts +22 -0
  185. package/dist/fhe-airdrop/react/useSignClaimAuthorization.d.ts +32 -21
  186. package/dist/fhe-airdrop/react/useWithdrawConfidential.d.ts +23 -0
  187. package/dist/fhe-airdrop/react/useWithdrawGasFee.d.ts +37 -0
  188. package/dist/fhe-airdrop/roles.d.ts +147 -0
  189. package/dist/fhe-airdrop/types.d.ts +78 -63
  190. package/dist/fhe-disperse/index.cjs +70 -68
  191. package/dist/fhe-disperse/index.js +10 -8
  192. package/dist/fhe-disperse/react/index.cjs +94 -92
  193. package/dist/fhe-disperse/react/index.js +13 -11
  194. package/dist/fhe-vesting/advanced/index.cjs +10 -8
  195. package/dist/fhe-vesting/advanced/index.js +8 -6
  196. package/dist/fhe-vesting/advanced/react/index.cjs +16 -14
  197. package/dist/fhe-vesting/advanced/react/index.js +13 -11
  198. package/dist/fhe-vesting/index.cjs +74 -72
  199. package/dist/fhe-vesting/index.js +11 -9
  200. package/dist/fhe-vesting/react/index.cjs +228 -226
  201. package/dist/fhe-vesting/react/index.js +15 -13
  202. package/dist/index.cjs +100 -87
  203. package/dist/index.js +3 -2
  204. package/dist/testnet-faucet/index.cjs +57 -55
  205. package/dist/testnet-faucet/index.js +7 -5
  206. package/dist/testnet-faucet/react/index.cjs +55 -53
  207. package/dist/testnet-faucet/react/index.js +9 -7
  208. package/package.json +6 -2
  209. package/dist/chunk-CNP4L3GF.js +0 -105
  210. package/dist/chunk-KSDSXJ34.js +0 -41
  211. package/dist/chunk-LBWRFZR3.cjs +0 -1681
  212. package/dist/chunk-OL6SHN3D.cjs +0 -44
  213. package/dist/chunk-S2XD75JM.js +0 -1637
  214. package/dist/chunk-SPGSO5SO.cjs +0 -1644
  215. package/dist/chunk-UE5XK2SY.js +0 -1673
  216. package/dist/chunk-WO72UBQD.cjs +0 -109
  217. package/dist/fhe-airdrop/advanced/factory-advanced.d.ts +0 -53
  218. package/dist/fhe-airdrop/advanced/react/usePredictAirdropAddress.d.ts +0 -49
  219. package/dist/fhe-airdrop/airdrop.d.ts +0 -317
  220. package/dist/fhe-airdrop/react/useAccessClaimAmount.d.ts +0 -37
  221. package/dist/fhe-airdrop/react/useAirdropCanExtendClaimWindow.d.ts +0 -7
  222. package/dist/fhe-airdrop/react/useAirdropClaimTypehash.d.ts +0 -10
  223. package/dist/fhe-airdrop/react/useAirdropClaimedSignatures.d.ts +0 -16
  224. package/dist/fhe-airdrop/react/useAirdropDeploymentBlockNumber.d.ts +0 -6
  225. package/dist/fhe-airdrop/react/useAirdropDomainSeparator.d.ts +0 -8
  226. package/dist/fhe-airdrop/react/useAirdropEndTime.d.ts +0 -10
  227. package/dist/fhe-airdrop/react/useAirdropFactoryCustomFee.d.ts +0 -17
  228. package/dist/fhe-airdrop/react/useAirdropFactoryDefaultGasFee.d.ts +0 -10
  229. package/dist/fhe-airdrop/react/useAirdropFactoryDisableCustomFee.d.ts +0 -15
  230. package/dist/fhe-airdrop/react/useAirdropFactoryFeeCollector.d.ts +0 -11
  231. package/dist/fhe-airdrop/react/useAirdropFactoryInitCodeHash.d.ts +0 -17
  232. package/dist/fhe-airdrop/react/useAirdropFactorySetCustomFee.d.ts +0 -17
  233. package/dist/fhe-airdrop/react/useAirdropFactorySetDefaultGasFee.d.ts +0 -16
  234. package/dist/fhe-airdrop/react/useAirdropFactorySetFeeCollector.d.ts +0 -15
  235. package/dist/fhe-airdrop/react/useAirdropHasClaimEnded.d.ts +0 -7
  236. package/dist/fhe-airdrop/react/useAirdropHasClaimStarted.d.ts +0 -7
  237. package/dist/fhe-airdrop/react/useAirdropIsClaimWindowActive.d.ts +0 -9
  238. package/dist/fhe-airdrop/react/useAirdropIsPaused.d.ts +0 -8
  239. package/dist/fhe-airdrop/react/useAirdropIsSignatureClaimed.d.ts +0 -22
  240. package/dist/fhe-airdrop/react/useAirdropIsSignatureValid.d.ts +0 -51
  241. package/dist/fhe-airdrop/react/useAirdropStartTime.d.ts +0 -10
  242. package/dist/fhe-airdrop/react/useAirdropWithdrawGasFee.d.ts +0 -15
  243. package/dist/fhe-airdrop/react/useAirdropWithdrawOtherConfidentialToken.d.ts +0 -14
  244. package/dist/fhe-airdrop/react/useAirdropWithdrawOtherToken.d.ts +0 -14
  245. package/dist/fhe-airdrop/react/useClaim.d.ts +0 -39
  246. package/dist/fhe-airdrop/react/useConfidentialAirdropFactoryImplementation.d.ts +0 -11
  247. package/dist/fhe-airdrop/react/useCreateAndFundConfidentialAirdrop.d.ts +0 -41
  248. package/dist/fhe-airdrop/react/useCreateAndFundConfidentialAirdropAndGetAddress.d.ts +0 -48
  249. package/dist/fhe-airdrop/react/useCreateConfidentialAirdrop.d.ts +0 -29
  250. package/dist/fhe-airdrop/react/useCreateConfidentialAirdropAndGetAddress.d.ts +0 -31
  251. package/dist/fhe-airdrop/react/useDisableCustomFee.d.ts +0 -14
  252. package/dist/fhe-airdrop/react/useFactoryCustomFee.d.ts +0 -17
  253. package/dist/fhe-airdrop/react/useFactoryDefaultGasFee.d.ts +0 -10
  254. package/dist/fhe-airdrop/react/useFactoryFeeCollector.d.ts +0 -11
  255. package/dist/fhe-airdrop/react/useFactoryInitCodeHash.d.ts +0 -17
  256. package/dist/fhe-airdrop/react/useFundConfidentialAirdrop.d.ts +0 -33
  257. package/dist/fhe-airdrop/react/useSetCustomFee.d.ts +0 -16
  258. package/dist/fhe-airdrop/react/useSetDefaultGasFee.d.ts +0 -15
  259. package/dist/fhe-airdrop/react/useSetFeeCollector.d.ts +0 -14
  260. package/dist/fhe-airdrop/react/useSetPaused.d.ts +0 -14
  261. package/dist/fhe-airdrop/react/useWithdraw.d.ts +0 -12
  262. package/dist/fhe-airdrop/react/useWithdrawOtherConfidentialToken.d.ts +0 -13
  263. package/dist/fhe-airdrop/react/useWithdrawOtherToken.d.ts +0 -13
@@ -0,0 +1,26 @@
1
+ import { type UseMutationResult } from "@tanstack/react-query";
2
+ import type { Address, Hex } from "viem";
3
+ import type { WriteAccountOverride } from "../../airdrop-base.js";
4
+ import { type AirdropClientOptions } from "../../react/_shared.js";
5
+ /** @alpha */
6
+ export interface ClearUpgradeabilityPolicyArgs extends WriteAccountOverride {
7
+ /** The creator whose override is dropped - not the admin sending the transaction. */
8
+ creator: Address;
9
+ }
10
+ /**
11
+ * Drop a creator's {@link useSetUpgradeabilityPolicy} override, reverting
12
+ * them to the factory default. Requires `UPGRADE_MANAGER_ROLE`.
13
+ *
14
+ * **Invalidates:** `fn "effectiveUpgradeable"` and `fn "upgradeabilityPolicy"`, both
15
+ * keyed on `args.creator`, plus the `fn "preflightCreate"` PREFIX. Reverting to the
16
+ * default flips `effectiveUpgradeable` exactly as setting an override does, and
17
+ * `preflightCreate` reads it to decide whether a `mode: "uups"` create is refused - so
18
+ * omitting the prefix here would leave a create form showing a stale allow/deny.
19
+ *
20
+ * @example
21
+ * const clearPolicy = useClearUpgradeabilityPolicy();
22
+ * await clearPolicy.mutateAsync({ creator });
23
+ *
24
+ * @alpha
25
+ */
26
+ export declare function useClearUpgradeabilityPolicy(options?: AirdropClientOptions): UseMutationResult<Hex, Error, ClearUpgradeabilityPolicyArgs>;
@@ -0,0 +1,25 @@
1
+ import { type UseMutationResult } from "@tanstack/react-query";
2
+ import type { Address, Hex } from "viem";
3
+ import type { WriteAccountOverride } from "../../airdrop-base.js";
4
+ import { type AirdropClientOptions } from "../../react/_shared.js";
5
+ /** @alpha */
6
+ export interface DisableCustomFeeArgs extends WriteAccountOverride {
7
+ /** The creator whose override is dropped - NOT the admin sending the transaction. */
8
+ creator: Address;
9
+ }
10
+ /**
11
+ * Drop a creator's per-creator fee override, reverting them to the factory's
12
+ * `defaultGasFee`.
13
+ *
14
+ * Requires `FEE_MANAGER_ROLE`.
15
+ *
16
+ * **Invalidates:** `useFactoryCustomFee({ creator })` for the TARGET creator -
17
+ * `variables.creator`, never the sending admin.
18
+ *
19
+ * @example
20
+ * const disableCustomFee = useDisableCustomFee();
21
+ * await disableCustomFee.mutateAsync({ creator });
22
+ *
23
+ * @alpha
24
+ */
25
+ export declare function useDisableCustomFee(options?: AirdropClientOptions): UseMutationResult<Hex, Error, DisableCustomFeeArgs>;
@@ -0,0 +1,30 @@
1
+ import { type UseQueryResult } from "@tanstack/react-query";
2
+ import type { Hex } from "viem";
3
+ import type { DeploymentMode } from "../../constants.js";
4
+ import { type AirdropHookOptions } from "../../react/_shared.js";
5
+ import type { EcdsaAirdropParams } from "../../types.js";
6
+ /** @alpha */
7
+ export interface UseEcdsaInitCodeHashArgs extends AirdropHookOptions<Hex> {
8
+ params: EcdsaAirdropParams;
9
+ mode: DeploymentMode;
10
+ }
11
+ /**
12
+ * Init-code hash of the ECDSA proxy the factory would deploy for `mode`.
13
+ *
14
+ * The hash tracks the factory's current implementation pointer, so it exists
15
+ * to bracket a prediction for freshness: read it before a campaign build and
16
+ * again after, and a change between the two means an implementation swap
17
+ * landed mid-flight and every address derived from
18
+ * {@link usePredictEcdsaAirdropAddress} is stale. Feed the first observation
19
+ * to `usePreflightCreateAirdrop`'s `expectedInitCodeHash` to have the drift
20
+ * check made for you.
21
+ *
22
+ * Lives on `/advanced/react` beside the predict hooks rather than the
23
+ * headline subpath: on its own the hash answers nothing a UI can act on.
24
+ *
25
+ * @example
26
+ * const before = useEcdsaInitCodeHash({ params, mode: "clone" });
27
+ *
28
+ * @alpha
29
+ */
30
+ export declare function useEcdsaInitCodeHash(args: UseEcdsaInitCodeHashArgs): UseQueryResult<Hex, Error>;
@@ -0,0 +1,25 @@
1
+ import { type UseQueryResult } from "@tanstack/react-query";
2
+ import type { Address } from "viem";
3
+ import { type AirdropHookOptions } from "../../react/_shared.js";
4
+ /** @alpha */
5
+ export type UseFactoryComplianceDelegateArgs = AirdropHookOptions<Address>;
6
+ /**
7
+ * The platform-designated compliance delegate the FACTORY wires into every
8
+ * new compliance-manager clone.
9
+ *
10
+ * Deliberately unbundled: its being set is what gates
11
+ * {@link useSetDefaultDelegateToCompliance} with `on: true` (that write
12
+ * reverts `ZeroComplianceDelegate` against the zero address), so an admin
13
+ * panel reads it alone to decide whether to enable the toggle at all.
14
+ *
15
+ * **Not** `ComplianceManagerClient.complianceDelegate()`. That method has the
16
+ * same name on a different contract and returns the delegate one already-
17
+ * deployed manager clone actually uses; this is the factory-level value
18
+ * applied to future clones.
19
+ *
20
+ * @example
21
+ * const { data: delegate } = useFactoryComplianceDelegate();
22
+ *
23
+ * @alpha
24
+ */
25
+ export declare function useFactoryComplianceDelegate(args?: UseFactoryComplianceDelegateArgs): UseQueryResult<Address, Error>;
@@ -0,0 +1,38 @@
1
+ import { type UseQueryResult } from "@tanstack/react-query";
2
+ import type { Address } from "viem";
3
+ import { type AirdropHookOptions } from "../../react/_shared.js";
4
+ /**
5
+ * One creator's delegate-to-compliance override plus what actually applies.
6
+ *
7
+ * @alpha
8
+ */
9
+ export interface FactoryCompliancePolicy {
10
+ /** Whether this creator has an override at all. `false` means the factory default applies. */
11
+ overridden: boolean;
12
+ /** The override's value. Meaningless while `overridden` is `false`. */
13
+ delegateToCompliance: boolean;
14
+ /** What the factory actually resolves for this creator - the override if `overridden`, else the default. */
15
+ effective: boolean;
16
+ }
17
+ /** @alpha */
18
+ export interface UseFactoryCompliancePolicyArgs extends AirdropHookOptions<FactoryCompliancePolicy> {
19
+ /** The creator whose policy to inspect. */
20
+ creator?: Address;
21
+ }
22
+ /**
23
+ * The admin's per-creator compliance view: the stored override AND the value
24
+ * the factory resolves for that creator. Bundled because only the pair
25
+ * answers "is this creator's setting doing anything?" - an `overridden: true`
26
+ * whose `delegateToCompliance` already matches the default is a no-op a panel
27
+ * should show as such.
28
+ *
29
+ * Overlaps the creator-facing `useEffectiveDelegateToCompliance` by its
30
+ * `effective` field. Intentional: different subpath, different audience, same
31
+ * split as `useEffectiveUpgradeable` vs {@link useFactoryUpgradeabilityPolicy}.
32
+ *
33
+ * @example
34
+ * const { data: policy } = useFactoryCompliancePolicy({ creator });
35
+ *
36
+ * @alpha
37
+ */
38
+ export declare function useFactoryCompliancePolicy(args?: UseFactoryCompliancePolicyArgs): UseQueryResult<FactoryCompliancePolicy, Error>;
@@ -0,0 +1,24 @@
1
+ import { type UseQueryResult } from "@tanstack/react-query";
2
+ import type { Address } from "viem";
3
+ import type { CustomFee } from "../../factory.js";
4
+ import { type AirdropHookOptions } from "../../react/_shared.js";
5
+ /** @alpha */
6
+ export interface UseFactoryCustomFeeArgs extends AirdropHookOptions<CustomFee> {
7
+ /** The creator whose override to read. Disabled until set. */
8
+ creator?: Address;
9
+ }
10
+ /**
11
+ * Read one creator's per-claim fee override. `enabled: false` means the
12
+ * factory's `defaultGasFee` (see `useFactoryFees`) applies to them instead.
13
+ *
14
+ * Kept out of the `useFactoryFees` bundle on purpose: this read is
15
+ * per-creator, and folding it in would put a creator address into that
16
+ * chain-wide fee key and fragment the cache one slot per creator.
17
+ *
18
+ * @example
19
+ * const { data: custom } = useFactoryCustomFee({ creator });
20
+ * const fee = custom?.enabled ? custom.gasFee : fees?.defaultGasFee;
21
+ *
22
+ * @alpha
23
+ */
24
+ export declare function useFactoryCustomFee(args?: UseFactoryCustomFeeArgs): UseQueryResult<CustomFee, Error>;
@@ -0,0 +1,32 @@
1
+ import { type UseMutationResult } from "@tanstack/react-query";
2
+ import type { Address, Hex } from "viem";
3
+ import type { WriteAccountOverride } from "../../airdrop-base.js";
4
+ import { type AirdropClientOptions } from "../../react/_shared.js";
5
+ /** @alpha */
6
+ export interface FactoryGrantRoleArgs extends WriteAccountOverride {
7
+ /** A `bytes32` role identifier - from {@link useFactoryRoleConstants}, never hand-hashed. */
8
+ role: Hex;
9
+ /** The account receiving the role. Distinct from `account`, which is who sends the transaction. */
10
+ holder: Address;
11
+ }
12
+ /**
13
+ * Grant one factory role.
14
+ *
15
+ * Requires `DEFAULT_ADMIN_ROLE`: the factory administers all five of its roles
16
+ * through the root role and never calls `_setRoleAdmin`, so unlike an airdrop
17
+ * instance there is no self-administered role here - one admin key can grant
18
+ * every one of them.
19
+ *
20
+ * **Invalidates:** this factory's {@link useFactoryHasRole} entry for exactly
21
+ * `(role, holder)` and its {@link useFactoryRoleMembers} entry for `role` (the
22
+ * list and the count both move). Keyed off `variables.holder`, never the
23
+ * sending `account` - the submitter is an admin whose own membership does not
24
+ * change here.
25
+ *
26
+ * @example
27
+ * const grant = useFactoryGrantRole();
28
+ * await grant.mutateAsync({ role: roles.FEE_MANAGER_ROLE, holder: opsAddress });
29
+ *
30
+ * @alpha
31
+ */
32
+ export declare function useFactoryGrantRole(options?: AirdropClientOptions): UseMutationResult<Hex, Error, FactoryGrantRoleArgs>;
@@ -0,0 +1,27 @@
1
+ import { type UseQueryResult } from "@tanstack/react-query";
2
+ import type { Address, Hex } from "viem";
3
+ import { type AirdropHookOptions } from "../../react/_shared.js";
4
+ /** @alpha */
5
+ export interface UseFactoryHasRoleArgs extends AirdropHookOptions<boolean> {
6
+ /** A `bytes32` role identifier - from {@link useFactoryRoleConstants}, never hand-hashed. */
7
+ role?: Hex;
8
+ /** The account to check. */
9
+ holder?: Address;
10
+ }
11
+ /**
12
+ * Whether `holder` holds `role` on the factory.
13
+ *
14
+ * Stays disabled (no request fired) until both `role` and `holder` are defined,
15
+ * so a UI can call it unconditionally while a form is still being filled in.
16
+ *
17
+ * Named apart from the instance-level `useAirdropHasRole` and the clone-level
18
+ * `useComplianceHasRole` because these are three different contracts' role
19
+ * sets; the cache never confuses them either, since the key's address segment
20
+ * is the factory.
21
+ *
22
+ * @example
23
+ * const { data: isFeeManager } = useFactoryHasRole({ role: roles?.FEE_MANAGER_ROLE, holder });
24
+ *
25
+ * @alpha
26
+ */
27
+ export declare function useFactoryHasRole(args?: UseFactoryHasRoleArgs): UseQueryResult<boolean, Error>;
@@ -0,0 +1,33 @@
1
+ import { type UseQueryResult } from "@tanstack/react-query";
2
+ import type { Address } from "viem";
3
+ import { type AirdropHookOptions } from "../../react/_shared.js";
4
+ /**
5
+ * The three implementation pointers future clones are cut from.
6
+ *
7
+ * @alpha
8
+ */
9
+ export interface FactoryImplementations {
10
+ /** What `createEcdsaAirdrop*` currently clones. */
11
+ ecdsa: Address;
12
+ /** What `createMerkleAirdrop*` currently clones. */
13
+ merkle: Address;
14
+ /** What each new compliance-manager clone is cut from. */
15
+ complianceManager: Address;
16
+ }
17
+ /** @alpha */
18
+ export type UseFactoryImplementationsArgs = AirdropHookOptions<FactoryImplementations>;
19
+ /**
20
+ * Read all three of the factory's implementation pointers in one round trip -
21
+ * the row an admin panel shows together, so they are bundled rather than
22
+ * shipped as three one-line hooks over three parallel `eth_call`s.
23
+ *
24
+ * These describe FUTURE creates only. Already-deployed instances and
25
+ * compliance-manager clones stay pinned to whatever was live when they were
26
+ * created.
27
+ *
28
+ * @example
29
+ * const { data: impls } = useFactoryImplementations();
30
+ *
31
+ * @alpha
32
+ */
33
+ export declare function useFactoryImplementations(args?: UseFactoryImplementationsArgs): UseQueryResult<FactoryImplementations, Error>;
@@ -0,0 +1,36 @@
1
+ import { type UseMutationResult } from "@tanstack/react-query";
2
+ import type { Hex } from "viem";
3
+ import type { WriteAccountOverride } from "../../airdrop-base.js";
4
+ import { type AirdropClientOptions } from "../../react/_shared.js";
5
+ /** @alpha */
6
+ export interface FactoryRenounceRoleArgs extends WriteAccountOverride {
7
+ /** A `bytes32` role identifier - from {@link useFactoryRoleConstants}, never hand-hashed. */
8
+ role: Hex;
9
+ }
10
+ /**
11
+ * Give up a factory role yourself.
12
+ *
13
+ * Self-only by construction: the contract's `renounceRole(role, callerConfirmation)`
14
+ * reverts `AccessControlBadConfirmation` unless the confirmation is the sender,
15
+ * so there is no holder to pass - the headless client fills it from the
16
+ * resolved sending account. To remove a role from somebody else use
17
+ * {@link useFactoryRevokeRole}.
18
+ *
19
+ * **No floor stops a sole admin renouncing here**, unlike an airdrop instance's
20
+ * `LastAdmin` guard. A sole `DEFAULT_ADMIN_ROLE` holder renouncing freezes role
21
+ * administration permanently; grant a successor first.
22
+ *
23
+ * **Invalidates:** every {@link useFactoryHasRole} entry for this factory
24
+ * (prefix, all role/holder pairs), plus its {@link useFactoryRoleMembers} entry
25
+ * for `role`. The prefix is deliberate - the holder here is whichever account
26
+ * the wallet client resolves at submit time, which need not match any
27
+ * `(role, holder)` pair a component happens to have cached, and a narrower key
28
+ * would invalidate nothing while throwing nothing.
29
+ *
30
+ * @example
31
+ * const renounce = useFactoryRenounceRole();
32
+ * await renounce.mutateAsync({ role: roles.UPGRADE_MANAGER_ROLE });
33
+ *
34
+ * @alpha
35
+ */
36
+ export declare function useFactoryRenounceRole(options?: AirdropClientOptions): UseMutationResult<Hex, Error, FactoryRenounceRoleArgs>;
@@ -0,0 +1,35 @@
1
+ import { type UseMutationResult } from "@tanstack/react-query";
2
+ import type { Address, Hex } from "viem";
3
+ import type { WriteAccountOverride } from "../../airdrop-base.js";
4
+ import { type AirdropClientOptions } from "../../react/_shared.js";
5
+ /** @alpha */
6
+ export interface FactoryRevokeRoleArgs extends WriteAccountOverride {
7
+ /** A `bytes32` role identifier - from {@link useFactoryRoleConstants}, never hand-hashed. */
8
+ role: Hex;
9
+ /** The account losing the role. Distinct from `account`, which is who sends the transaction. */
10
+ holder: Address;
11
+ }
12
+ /**
13
+ * Revoke one factory role from one holder.
14
+ *
15
+ * Requires `DEFAULT_ADMIN_ROLE`, which administers all five factory roles.
16
+ *
17
+ * **The factory declares no "never empty" floor.** Revoking the last
18
+ * `DEFAULT_ADMIN_ROLE` holder succeeds and permanently freezes role
19
+ * administration - no role can ever be granted or revoked again, including
20
+ * putting an admin back. The four operational roles keep working for whoever
21
+ * already holds them, with no way to rotate them. On the live deployment all
22
+ * five roles sit on one key, so show {@link useFactoryRoleMembers}'s `count`
23
+ * next to the button and grant the successor first.
24
+ *
25
+ * **Invalidates:** this factory's {@link useFactoryHasRole} entry for exactly
26
+ * `(role, holder)` and its {@link useFactoryRoleMembers} entry for `role`.
27
+ * Keyed off `variables.holder`, never the sending `account`.
28
+ *
29
+ * @example
30
+ * const revoke = useFactoryRevokeRole();
31
+ * await revoke.mutateAsync({ role: roles.IMPL_MANAGER_ROLE, holder: formerOpsAddress });
32
+ *
33
+ * @alpha
34
+ */
35
+ export declare function useFactoryRevokeRole(options?: AirdropClientOptions): UseMutationResult<Hex, Error, FactoryRevokeRoleArgs>;
@@ -0,0 +1,46 @@
1
+ import { type UseQueryResult } from "@tanstack/react-query";
2
+ import type { Hex } from "viem";
3
+ import { type AirdropHookOptions } from "../../react/_shared.js";
4
+ /**
5
+ * The five `bytes32` role identifiers the factory's admin surface is gated on.
6
+ *
7
+ * @alpha
8
+ */
9
+ export interface FactoryRoleConstants {
10
+ /** Gates `useSetFeeCollector`, `useSetDefaultGasFee`, `useSetCustomFee`, `useDisableCustomFee`. */
11
+ FEE_MANAGER_ROLE: Hex;
12
+ /** Gates `useSetEcdsaImplementation` and `useSetMerkleImplementation`. */
13
+ IMPL_MANAGER_ROLE: Hex;
14
+ /** Gates the compliance-wiring setters. */
15
+ COMPLIANCE_WIRING_ROLE: Hex;
16
+ /** Gates the upgradeability-policy setters. */
17
+ UPGRADE_MANAGER_ROLE: Hex;
18
+ /** OpenZeppelin's root role, read off the factory rather than assumed to be `bytes32(0)`. It administers the other four and itself. */
19
+ DEFAULT_ADMIN_ROLE: Hex;
20
+ }
21
+ /** @alpha */
22
+ export type UseFactoryRoleConstantsArgs = AirdropHookOptions<FactoryRoleConstants>;
23
+ /**
24
+ * Read the factory's role identifiers in one fan-out.
25
+ *
26
+ * Every value is a bytecode constant, so this defaults to `staleTime: Infinity`
27
+ * (overridable through `query`). Feed the results into
28
+ * {@link useFactoryHasRole}, {@link useFactoryRoleMembers} and the three
29
+ * factory role mutations - hand-hashing `keccak256("FEE_MANAGER_ROLE")`
30
+ * client-side would turn a constant renamed in a future factory version into a
31
+ * `grantRole` that silently grants a role nothing checks.
32
+ *
33
+ * Bundled rather than shipped as five one-liners: a role panel needs the whole
34
+ * palette to render at all. Paired with {@link useFactoryRoleMembers} it is
35
+ * also the live check `FACTORY_ROLE_CONCENTRATION_NOTE` asks for - read the
36
+ * five roles, list each one's holders, and see for yourself whether they sit on
37
+ * one key on the chain you are actually connected to, rather than trusting a
38
+ * fixed string about one deployment at one point in time.
39
+ *
40
+ * @example
41
+ * const { data: roles } = useFactoryRoleConstants();
42
+ * const { data: feeManagers } = useFactoryRoleMembers({ role: roles?.FEE_MANAGER_ROLE });
43
+ *
44
+ * @alpha
45
+ */
46
+ export declare function useFactoryRoleConstants(args?: UseFactoryRoleConstantsArgs): UseQueryResult<FactoryRoleConstants, Error>;
@@ -0,0 +1,47 @@
1
+ import { type UseQueryResult } from "@tanstack/react-query";
2
+ import type { Address, Hex } from "viem";
3
+ import { type AirdropHookOptions } from "../../react/_shared.js";
4
+ /**
5
+ * One factory role's membership - the set and its size, read together.
6
+ *
7
+ * @alpha
8
+ */
9
+ export interface FactoryRoleMembership {
10
+ /** Every account currently holding the role, in the contract's `EnumerableSet` order. */
11
+ members: readonly Address[];
12
+ /** How many accounts hold it. */
13
+ count: bigint;
14
+ }
15
+ /** @alpha */
16
+ export interface UseFactoryRoleMembersArgs extends AirdropHookOptions<FactoryRoleMembership> {
17
+ /** The role whose members to list - from {@link useFactoryRoleConstants}, never hand-hashed. */
18
+ role?: Hex;
19
+ }
20
+ /**
21
+ * List who holds `role` on the factory, with the member count.
22
+ *
23
+ * This is the live half of the role-concentration check
24
+ * `FACTORY_ROLE_CONCENTRATION_NOTE` prescribes: run it over the five roles from
25
+ * {@link useFactoryRoleConstants} and compare the holder sets, instead of
26
+ * trusting a fixed string that describes one deployment at one moment.
27
+ *
28
+ * `count` is bundled with the list rather than split into its own hook because
29
+ * it is what a UI needs in the same render to decide whether a revoke is safe -
30
+ * the factory declares no "never empty" floor, so revoking the last
31
+ * `DEFAULT_ADMIN_ROLE` holder succeeds and permanently freezes all role
32
+ * administration.
33
+ *
34
+ * Unpaginated: factory role sets are operator-sized, not user-sized.
35
+ *
36
+ * @remarks
37
+ * Invalidated by {@link useFactoryGrantRole}, {@link useFactoryRevokeRole} and
38
+ * {@link useFactoryRenounceRole}. Member order is `EnumerableSet`'s and is not
39
+ * stable across grants and revokes - treat it as a set, not a list.
40
+ *
41
+ * @example
42
+ * const { data } = useFactoryRoleMembers({ role: roles?.DEFAULT_ADMIN_ROLE });
43
+ * const lastAdmin = data?.count === 1n;
44
+ *
45
+ * @alpha
46
+ */
47
+ export declare function useFactoryRoleMembers(args?: UseFactoryRoleMembersArgs): UseQueryResult<FactoryRoleMembership, Error>;
@@ -0,0 +1,39 @@
1
+ import { type UseQueryResult } from "@tanstack/react-query";
2
+ import type { Address } from "viem";
3
+ import { type AirdropHookOptions } from "../../react/_shared.js";
4
+ /**
5
+ * The factory default, one creator's override, and the resolved value.
6
+ *
7
+ * @alpha
8
+ */
9
+ export interface FactoryUpgradeabilityPolicy {
10
+ /** What applies to creators with no override. */
11
+ defaultUpgradeable: boolean;
12
+ /** Whether this creator has an override at all. */
13
+ overridden: boolean;
14
+ /** The override's value. Meaningless while `overridden` is `false`. */
15
+ allowed: boolean;
16
+ /** What the factory actually resolves for this creator, and what a `mode: "uups"` create is checked against. */
17
+ effective: boolean;
18
+ }
19
+ /** @alpha */
20
+ export interface UseFactoryUpgradeabilityPolicyArgs extends AirdropHookOptions<FactoryUpgradeabilityPolicy> {
21
+ /** The creator whose policy to inspect. */
22
+ creator?: Address;
23
+ }
24
+ /**
25
+ * The admin panel's full upgradeability answer for one creator, in one round
26
+ * trip: the factory default, the per-creator override, and the resolved
27
+ * value. Absorbing `defaultUpgradeable()` here is why it needs no hook of its
28
+ * own.
29
+ *
30
+ * Duplicates the creator-facing `useEffectiveUpgradeable`'s single field
31
+ * rather than replacing it - that hook stays the cheap read a create form
32
+ * uses to decide whether to offer UUPS.
33
+ *
34
+ * @example
35
+ * const { data: policy } = useFactoryUpgradeabilityPolicy({ creator });
36
+ *
37
+ * @alpha
38
+ */
39
+ export declare function useFactoryUpgradeabilityPolicy(args?: UseFactoryUpgradeabilityPolicyArgs): UseQueryResult<FactoryUpgradeabilityPolicy, Error>;
@@ -0,0 +1,24 @@
1
+ import { type UseQueryResult } from "@tanstack/react-query";
2
+ import type { Hex } from "viem";
3
+ import type { DeploymentMode } from "../../constants.js";
4
+ import { type AirdropHookOptions } from "../../react/_shared.js";
5
+ import type { MerkleAirdropParams } from "../../types.js";
6
+ /** @alpha */
7
+ export interface UseMerkleInitCodeHashArgs extends AirdropHookOptions<Hex> {
8
+ params: MerkleAirdropParams;
9
+ mode: DeploymentMode;
10
+ }
11
+ /**
12
+ * Init-code hash of the Merkle proxy the factory would deploy for `mode` -
13
+ * the Merkle counterpart of {@link useEcdsaInitCodeHash}, with the same
14
+ * before/after bracketing job and the same `/advanced/react` home.
15
+ *
16
+ * `usePlanMerkleCampaign` already brackets its own build with this read, so
17
+ * reach for the hook only when driving prediction by hand.
18
+ *
19
+ * @example
20
+ * const before = useMerkleInitCodeHash({ params, mode: "clone" });
21
+ *
22
+ * @alpha
23
+ */
24
+ export declare function useMerkleInitCodeHash(args: UseMerkleInitCodeHashArgs): UseQueryResult<Hex, Error>;
@@ -0,0 +1,33 @@
1
+ import { type UseQueryResult } from "@tanstack/react-query";
2
+ import type { Address, Hex } from "viem";
3
+ import type { DeploymentMode } from "../../constants.js";
4
+ import type { EcdsaAirdropParams } from "../../types.js";
5
+ import { type AirdropHookOptions } from "../../react/_shared.js";
6
+ /** @alpha */
7
+ export interface UsePredictEcdsaAirdropAddressArgs extends AirdropHookOptions<Address> {
8
+ params: EcdsaAirdropParams;
9
+ mode: DeploymentMode;
10
+ deployer: Address;
11
+ userSalt: Hex;
12
+ }
13
+ /**
14
+ * Where an ECDSA `create*` from `deployer` with this `(mode, userSalt)` pair
15
+ * would land.
16
+ *
17
+ * **What a prediction commits to.** Only `(implementation, mode, deployer,
18
+ * userSalt)` — `params` is required because the ABI declares it, but the
19
+ * factory ignores it for this variant's oracle. Changing the token, window
20
+ * or signer does NOT move the predicted address.
21
+ *
22
+ * A returned address is not evidence the create will succeed — prediction is
23
+ * a pure oracle that answers even for a deployer not currently allowed to
24
+ * deploy the requested `mode`.
25
+ *
26
+ * @example
27
+ * const { data: predicted } = usePredictEcdsaAirdropAddress({
28
+ * params, mode: "clone", deployer, userSalt,
29
+ * });
30
+ *
31
+ * @alpha
32
+ */
33
+ export declare function usePredictEcdsaAirdropAddress(args: UsePredictEcdsaAirdropAddressArgs): UseQueryResult<Address, Error>;
@@ -0,0 +1,27 @@
1
+ import { type UseQueryResult } from "@tanstack/react-query";
2
+ import type { Address, Hex } from "viem";
3
+ import type { DeploymentMode } from "../../constants.js";
4
+ import type { MerkleAirdropParams } from "../../types.js";
5
+ import { type AirdropHookOptions } from "../../react/_shared.js";
6
+ /** @alpha */
7
+ export interface UsePredictMerkleAirdropAddressArgs extends AirdropHookOptions<Address> {
8
+ params: MerkleAirdropParams;
9
+ mode: DeploymentMode;
10
+ deployer: Address;
11
+ userSalt: Hex;
12
+ }
13
+ /**
14
+ * Where a Merkle `create*` from `deployer` with this `(mode, userSalt)` pair
15
+ * would land.
16
+ *
17
+ * Same "only `(implementation, mode, deployer, userSalt)` matters" contract
18
+ * as {@link usePredictEcdsaAirdropAddress} — see its TSDoc.
19
+ *
20
+ * @example
21
+ * const { data: predicted } = usePredictMerkleAirdropAddress({
22
+ * params, mode: "clone", deployer, userSalt,
23
+ * });
24
+ *
25
+ * @alpha
26
+ */
27
+ export declare function usePredictMerkleAirdropAddress(args: UsePredictMerkleAirdropAddressArgs): UseQueryResult<Address, Error>;
@@ -0,0 +1,33 @@
1
+ import { type UseMutationResult } from "@tanstack/react-query";
2
+ import type { Address, Hex } from "viem";
3
+ import type { WriteAccountOverride } from "../../airdrop-base.js";
4
+ import { type AirdropClientOptions } from "../../react/_shared.js";
5
+ /** @alpha */
6
+ export interface SetComplianceDelegateArgs extends WriteAccountOverride {
7
+ /** Platform delegate wired into future compliance-manager clones. The zero address reverts `ZeroComplianceDelegate`. */
8
+ delegate: Address;
9
+ }
10
+ /**
11
+ * Set the platform-designated compliance delegate that every new
12
+ * compliance-manager clone wires in. Requires `COMPLIANCE_WIRING_ROLE`.
13
+ *
14
+ * **Ordering is load-bearing.** Call this before
15
+ * {@link useSetDefaultDelegateToCompliance} with `on: true` - turning
16
+ * delegation on while no delegate is set reverts `ZeroComplianceDelegate`. An
17
+ * admin panel must sequence the two writes, and read
18
+ * {@link useFactoryComplianceDelegate} to decide whether the toggle is even
19
+ * offerable.
20
+ *
21
+ * Applies to FUTURE clones only; it cannot retro-wire managers that already
22
+ * exist.
23
+ *
24
+ * **Invalidates:** the factory's `fn "complianceDelegate"` entry
25
+ * ({@link useFactoryComplianceDelegate}).
26
+ *
27
+ * @example
28
+ * const setDelegate = useSetComplianceDelegate();
29
+ * await setDelegate.mutateAsync({ delegate: platformDelegate });
30
+ *
31
+ * @alpha
32
+ */
33
+ export declare function useSetComplianceDelegate(options?: AirdropClientOptions): UseMutationResult<Hex, Error, SetComplianceDelegateArgs>;
@@ -0,0 +1,27 @@
1
+ import { type UseMutationResult } from "@tanstack/react-query";
2
+ import type { Address, Hex } from "viem";
3
+ import type { WriteAccountOverride } from "../../airdrop-base.js";
4
+ import { type AirdropClientOptions } from "../../react/_shared.js";
5
+ /** @alpha */
6
+ export interface SetComplianceManagerImplArgs extends WriteAccountOverride {
7
+ /** New compliance-manager implementation. The zero address reverts `ZeroComplianceManagerImpl`. */
8
+ implementation: Address;
9
+ }
10
+ /**
11
+ * Point future compliance-manager clones at a new implementation. Requires
12
+ * `COMPLIANCE_WIRING_ROLE`.
13
+ *
14
+ * Only clones created after this lands use the new code — already-deployed
15
+ * managers keep the implementation they were cloned from, so this is not a
16
+ * fleet-wide upgrade.
17
+ *
18
+ * **Invalidates:** the factory's `fn "implementations"` entry, which carries
19
+ * `complianceManagerImpl` alongside the ECDSA/Merkle pointers.
20
+ *
21
+ * @example
22
+ * const setImpl = useSetComplianceManagerImpl();
23
+ * await setImpl.mutateAsync({ implementation: newManagerImpl });
24
+ *
25
+ * @alpha
26
+ */
27
+ export declare function useSetComplianceManagerImpl(options?: AirdropClientOptions): UseMutationResult<Hex, Error, SetComplianceManagerImplArgs>;
@@ -0,0 +1,28 @@
1
+ import { type UseMutationResult } from "@tanstack/react-query";
2
+ import type { Address, Hex } from "viem";
3
+ import type { WriteAccountOverride } from "../../airdrop-base.js";
4
+ import { type AirdropClientOptions } from "../../react/_shared.js";
5
+ /** @alpha */
6
+ export interface SetCompliancePolicyArgs extends WriteAccountOverride {
7
+ /** The creator the override applies to - not the admin sending the transaction. */
8
+ creator: Address;
9
+ /** Whether that creator's new instances delegate compliance disclosure to the platform delegate. */
10
+ delegateToCompliance: boolean;
11
+ }
12
+ /**
13
+ * Override the factory's default delegate-to-compliance policy for one
14
+ * creator. Requires `COMPLIANCE_WIRING_ROLE`.
15
+ *
16
+ * **Invalidates:** `fn "compliancePolicy"` and
17
+ * `fn "effectiveDelegateToCompliance"`, both keyed on `args.creator` - the
18
+ * TARGET creator, never the sending admin. Keying on the sender would leave
19
+ * the panel's view of the creator it just edited stale while invalidating an
20
+ * entry nobody rendered.
21
+ *
22
+ * @example
23
+ * const setPolicy = useSetCompliancePolicy();
24
+ * await setPolicy.mutateAsync({ creator, delegateToCompliance: true });
25
+ *
26
+ * @alpha
27
+ */
28
+ export declare function useSetCompliancePolicy(options?: AirdropClientOptions): UseMutationResult<Hex, Error, SetCompliancePolicyArgs>;