@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
@@ -1,6 +1,6 @@
1
1
  import { useWagmiAccount } from './chunk-FT4LNBOS.js';
2
- import { isOperator, ensureOperator } from './chunk-4KJ66YRH.js';
3
- import { MissingPublicClientError, MissingWalletClientError } from './chunk-DRSPMIZ7.js';
2
+ import { isOperator, ensureOperator } from './chunk-4TSDNZQ3.js';
3
+ import { MissingPublicClientError, MissingWalletClientError } from './chunk-QBJ7O2B4.js';
4
4
  import { useQuery, useMutation } from '@tanstack/react-query';
5
5
  import { usePublicClient, useWalletClient } from 'wagmi';
6
6
 
@@ -0,0 +1,255 @@
1
+ 'use strict';
2
+
3
+ var chunkPZZK3O3S_cjs = require('./chunk-PZZK3O3S.cjs');
4
+ var chunkFT5H2Q7Y_cjs = require('./chunk-FT5H2Q7Y.cjs');
5
+ var chunk67OV5CX2_cjs = require('./chunk-67OV5CX2.cjs');
6
+ var react = require('react');
7
+ var wagmi = require('wagmi');
8
+
9
+ var FHE_AIRDROP_KEY = "tokenops-sdk";
10
+ var FHE_AIRDROP_NAMESPACE = "fhe-airdrop";
11
+ function airdropQueryKey(params) {
12
+ return [
13
+ FHE_AIRDROP_KEY,
14
+ FHE_AIRDROP_NAMESPACE,
15
+ params.chainId ?? null,
16
+ params.address ? normalizeKeyArg(params.address) : null,
17
+ params.fn,
18
+ params.args.map(normalizeKeyArg)
19
+ ];
20
+ }
21
+ function airdropQueryKeyPrefix(params) {
22
+ const prefix = [
23
+ FHE_AIRDROP_KEY,
24
+ FHE_AIRDROP_NAMESPACE,
25
+ params.chainId ?? null,
26
+ params.address ? normalizeKeyArg(params.address) : null
27
+ ];
28
+ if (params.fn !== void 0) prefix.push(params.fn);
29
+ return prefix;
30
+ }
31
+ function normalizeKeyArg(value) {
32
+ if (typeof value === "bigint") return value.toString();
33
+ if (Array.isArray(value)) return value.map(normalizeKeyArg);
34
+ if (value && typeof value === "object") {
35
+ return Object.fromEntries(
36
+ Object.entries(value).map(([k, v]) => [k, normalizeKeyArg(v)])
37
+ );
38
+ }
39
+ if (typeof value === "string" && value.startsWith("0x")) return value.toLowerCase();
40
+ return value;
41
+ }
42
+ function tryResolveAirdropFactoryAddress(override, chainId) {
43
+ if (override) return override;
44
+ if (chainId === void 0) return void 0;
45
+ return chunkFT5H2Q7Y_cjs.getFheAirdropFactoryAddress(chainId);
46
+ }
47
+ function computeAirdropFactoryResolutionError(override, chainId) {
48
+ if (override) return void 0;
49
+ if (chainId === void 0) {
50
+ return new chunk67OV5CX2_cjs.DeploymentAddressUnavailableError({
51
+ reason: "chain-id-missing",
52
+ product: "fheAirdrop",
53
+ contract: "airdropFactory",
54
+ clientLabel: "ConfidentialAirdropFactoryClient"
55
+ });
56
+ }
57
+ const resolved = chunkFT5H2Q7Y_cjs.getFheAirdropFactoryAddress(chainId);
58
+ if (!resolved) {
59
+ return new chunk67OV5CX2_cjs.DeploymentAddressUnavailableError({
60
+ reason: "registry-not-deployed",
61
+ product: "fheAirdrop",
62
+ contract: "airdropFactory",
63
+ chainId,
64
+ clientLabel: "ConfidentialAirdropFactoryClient"
65
+ });
66
+ }
67
+ return void 0;
68
+ }
69
+ function useMemoAirdropFactoryClient(opts = {}) {
70
+ const publicClient = wagmi.usePublicClient({ chainId: opts.chainId });
71
+ const { data: walletClient } = wagmi.useWalletClient({ chainId: opts.chainId });
72
+ const chainId = opts.chainId ?? publicClient?.chain?.id;
73
+ const resolvedAddress = tryResolveAirdropFactoryAddress(opts.address, chainId);
74
+ const resolutionError = computeAirdropFactoryResolutionError(opts.address, chainId);
75
+ const encryptorSourceRef = react.useRef(opts.encryptor);
76
+ encryptorSourceRef.current = opts.encryptor;
77
+ const telemetry = opts.telemetry;
78
+ const client = react.useMemo(() => {
79
+ if (!publicClient) return void 0;
80
+ if (!resolvedAddress) return void 0;
81
+ return chunkPZZK3O3S_cjs.createConfidentialAirdropFactoryClient({
82
+ publicClient,
83
+ ...walletClient ? { walletClient } : {},
84
+ address: resolvedAddress,
85
+ ...chainId !== void 0 ? { chainId } : {},
86
+ // Lazy — invoked per-encryption inside the headless client.
87
+ encryptor: () => chunkPZZK3O3S_cjs.resolveEncryptor(encryptorSourceRef.current),
88
+ ...telemetry ? { telemetry } : {}
89
+ });
90
+ }, [publicClient, walletClient, resolvedAddress, chainId, telemetry]);
91
+ return {
92
+ client,
93
+ resolutionError,
94
+ publicClient,
95
+ walletClient: walletClient ?? void 0,
96
+ chainId,
97
+ resolvedAddress
98
+ };
99
+ }
100
+ function useMemoAirdropBaseClient(opts) {
101
+ const publicClient = wagmi.usePublicClient({ chainId: opts.chainId });
102
+ const { data: walletClient } = wagmi.useWalletClient({ chainId: opts.chainId });
103
+ const chainId = opts.chainId ?? publicClient?.chain?.id;
104
+ const telemetry = opts.telemetry;
105
+ const client = react.useMemo(() => {
106
+ if (!publicClient) return void 0;
107
+ if (!opts.address) return void 0;
108
+ return chunkPZZK3O3S_cjs.createAirdropBaseClient({
109
+ publicClient,
110
+ ...walletClient ? { walletClient } : {},
111
+ address: opts.address,
112
+ ...chainId !== void 0 ? { chainId } : {},
113
+ ...telemetry ? { telemetry } : {}
114
+ });
115
+ }, [publicClient, walletClient, opts.address, chainId, telemetry]);
116
+ return { client, publicClient, walletClient: walletClient ?? void 0, chainId };
117
+ }
118
+ function useMemoMerkleAirdropClient(opts) {
119
+ const publicClient = wagmi.usePublicClient({ chainId: opts.chainId });
120
+ const { data: walletClient } = wagmi.useWalletClient({ chainId: opts.chainId });
121
+ const chainId = opts.chainId ?? publicClient?.chain?.id;
122
+ const telemetry = opts.telemetry;
123
+ const client = react.useMemo(() => {
124
+ if (!publicClient) return void 0;
125
+ if (!opts.address) return void 0;
126
+ return chunkPZZK3O3S_cjs.createMerkleAirdropClient({
127
+ publicClient,
128
+ ...walletClient ? { walletClient } : {},
129
+ address: opts.address,
130
+ ...chainId !== void 0 ? { chainId } : {},
131
+ ...telemetry ? { telemetry } : {}
132
+ });
133
+ }, [publicClient, walletClient, opts.address, chainId, telemetry]);
134
+ return { client, publicClient, walletClient: walletClient ?? void 0, chainId };
135
+ }
136
+ function useMemoComplianceManagerClient(opts) {
137
+ const publicClient = wagmi.usePublicClient({ chainId: opts.chainId });
138
+ const { data: walletClient } = wagmi.useWalletClient({ chainId: opts.chainId });
139
+ const chainId = opts.chainId ?? publicClient?.chain?.id;
140
+ const telemetry = opts.telemetry;
141
+ const client = react.useMemo(() => {
142
+ if (!publicClient) return void 0;
143
+ if (!opts.address) return void 0;
144
+ return chunkPZZK3O3S_cjs.createComplianceManagerClient({
145
+ publicClient,
146
+ ...walletClient ? { walletClient } : {},
147
+ address: opts.address,
148
+ ...chainId !== void 0 ? { chainId } : {},
149
+ ...telemetry ? { telemetry } : {}
150
+ });
151
+ }, [publicClient, walletClient, opts.address, chainId, telemetry]);
152
+ return { client, publicClient, walletClient: walletClient ?? void 0, chainId };
153
+ }
154
+ function useMemoEcdsaAirdropClient(opts) {
155
+ const publicClient = wagmi.usePublicClient({ chainId: opts.chainId });
156
+ const { data: walletClient } = wagmi.useWalletClient({ chainId: opts.chainId });
157
+ const chainId = opts.chainId ?? publicClient?.chain?.id;
158
+ const telemetry = opts.telemetry;
159
+ const client = react.useMemo(() => {
160
+ if (!publicClient) return void 0;
161
+ if (!opts.address) return void 0;
162
+ return chunkPZZK3O3S_cjs.createEcdsaAirdropClient({
163
+ publicClient,
164
+ ...walletClient ? { walletClient } : {},
165
+ address: opts.address,
166
+ dedupMode: opts.dedupMode,
167
+ ...chainId !== void 0 ? { chainId } : {},
168
+ ...telemetry ? { telemetry } : {}
169
+ });
170
+ }, [publicClient, walletClient, opts.address, opts.dedupMode, chainId, telemetry]);
171
+ return { client, publicClient, walletClient: walletClient ?? void 0, chainId };
172
+ }
173
+
174
+ // src/fhe-airdrop/react/keys.ts
175
+ var AIRDROP_FN = {
176
+ // instance reads
177
+ claimedAmount: "getClaimedAmount",
178
+ paused: "paused",
179
+ window: "window",
180
+ config: "config",
181
+ merkleRoot: "merkleRoot",
182
+ merkleRootMutable: "isMerkleRootMutable",
183
+ hasRole: "hasRole",
184
+ roleMembers: "roleMembers",
185
+ gasFee: "gasFee",
186
+ preflightCreate: "preflightCreate",
187
+ isSignatureValid: "isSignatureValid",
188
+ // factory reads
189
+ fees: "fees",
190
+ registry: "registry",
191
+ customFee: "customFee",
192
+ implementations: "implementations",
193
+ compliancePolicy: "compliancePolicy",
194
+ upgradeabilityPolicy: "upgradeabilityPolicy",
195
+ factoryHasRole: "factoryHasRole",
196
+ factoryRoleMembers: "factoryRoleMembers",
197
+ // compliance-manager reads
198
+ complianceInfo: "complianceInfo",
199
+ activeDelegate: "isActiveDelegate",
200
+ clientDelegates: "clientDelegates",
201
+ complianceHasRole: "complianceHasRole",
202
+ complianceRoleMembers: "complianceRoleMembers"
203
+ };
204
+ var airdropKeys = {
205
+ /** One account's cumulative delivered total. Keyed on the CLAIM IDENTITY, never the sender. */
206
+ claimedAmount: (s, account) => airdropQueryKey({ ...s, fn: AIRDROP_FN.claimedAmount, args: [account] }),
207
+ paused: (s) => airdropQueryKey({ ...s, fn: AIRDROP_FN.paused, args: [] }),
208
+ window: (s) => airdropQueryKey({ ...s, fn: AIRDROP_FN.window, args: [] }),
209
+ config: (s) => airdropQueryKey({ ...s, fn: AIRDROP_FN.config, args: [] }),
210
+ gasFee: (s) => airdropQueryKey({ ...s, fn: AIRDROP_FN.gasFee, args: [] }),
211
+ merkleRoot: (s) => airdropQueryKey({ ...s, fn: AIRDROP_FN.merkleRoot, args: [] }),
212
+ merkleRootMutable: (s) => airdropQueryKey({ ...s, fn: AIRDROP_FN.merkleRootMutable, args: [] }),
213
+ hasRole: (s, role, holder) => airdropQueryKey({ ...s, fn: AIRDROP_FN.hasRole, args: [role, holder] }),
214
+ /** Every cached `hasRole` for this instance, whatever role/holder pair was queried. */
215
+ hasRoleAll: (s) => airdropQueryKeyPrefix({ ...s, fn: AIRDROP_FN.hasRole }),
216
+ roleMembers: (s, role) => airdropQueryKey({ ...s, fn: AIRDROP_FN.roleMembers, args: [role] }),
217
+ roleMembersAll: (s) => airdropQueryKeyPrefix({ ...s, fn: AIRDROP_FN.roleMembers }),
218
+ /** Every cached create-preflight, whatever params/mode/salt combination was queried. */
219
+ preflightCreateAll: (s) => airdropQueryKeyPrefix({ ...s, fn: AIRDROP_FN.preflightCreate }),
220
+ /** Every cached signature check on this instance; a claim consumes a digest and flips it. */
221
+ isSignatureValidAll: (s) => airdropQueryKeyPrefix({ ...s, fn: AIRDROP_FN.isSignatureValid }),
222
+ fees: (s) => airdropQueryKey({ ...s, fn: AIRDROP_FN.fees, args: [] }),
223
+ customFee: (s, creator) => airdropQueryKey({ ...s, fn: AIRDROP_FN.customFee, args: [creator] }),
224
+ customFeeAll: (s) => airdropQueryKeyPrefix({ ...s, fn: AIRDROP_FN.customFee }),
225
+ /** Every registry page, whatever offset/limit was queried. */
226
+ registryAll: (s) => airdropQueryKeyPrefix({ ...s, fn: AIRDROP_FN.registry }),
227
+ implementations: (s) => airdropQueryKey({ ...s, fn: AIRDROP_FN.implementations, args: [] }),
228
+ compliancePolicy: (s, creator) => airdropQueryKey({ ...s, fn: AIRDROP_FN.compliancePolicy, args: [creator] }),
229
+ compliancePolicyAll: (s) => airdropQueryKeyPrefix({ ...s, fn: AIRDROP_FN.compliancePolicy }),
230
+ upgradeabilityPolicy: (s, creator) => airdropQueryKey({ ...s, fn: AIRDROP_FN.upgradeabilityPolicy, args: [creator] }),
231
+ upgradeabilityPolicyAll: (s) => airdropQueryKeyPrefix({ ...s, fn: AIRDROP_FN.upgradeabilityPolicy }),
232
+ factoryHasRole: (s, role, holder) => airdropQueryKey({ ...s, fn: AIRDROP_FN.factoryHasRole, args: [role, holder] }),
233
+ factoryHasRoleAll: (s) => airdropQueryKeyPrefix({ ...s, fn: AIRDROP_FN.factoryHasRole }),
234
+ factoryRoleMembers: (s, role) => airdropQueryKey({ ...s, fn: AIRDROP_FN.factoryRoleMembers, args: [role] }),
235
+ factoryRoleMembersAll: (s) => airdropQueryKeyPrefix({ ...s, fn: AIRDROP_FN.factoryRoleMembers }),
236
+ complianceInfo: (s) => airdropQueryKey({ ...s, fn: AIRDROP_FN.complianceInfo, args: [] }),
237
+ activeDelegate: (s, delegate) => airdropQueryKey({ ...s, fn: AIRDROP_FN.activeDelegate, args: [delegate] }),
238
+ activeDelegateAll: (s) => airdropQueryKeyPrefix({ ...s, fn: AIRDROP_FN.activeDelegate }),
239
+ clientDelegates: (s, index) => airdropQueryKey({ ...s, fn: AIRDROP_FN.clientDelegates, args: [index] }),
240
+ clientDelegatesAll: (s) => airdropQueryKeyPrefix({ ...s, fn: AIRDROP_FN.clientDelegates }),
241
+ complianceHasRole: (s, role, holder) => airdropQueryKey({ ...s, fn: AIRDROP_FN.complianceHasRole, args: [role, holder] }),
242
+ complianceHasRoleAll: (s) => airdropQueryKeyPrefix({ ...s, fn: AIRDROP_FN.complianceHasRole }),
243
+ complianceRoleMembers: (s, role) => airdropQueryKey({ ...s, fn: AIRDROP_FN.complianceRoleMembers, args: [role] }),
244
+ complianceRoleMembersAll: (s) => airdropQueryKeyPrefix({ ...s, fn: AIRDROP_FN.complianceRoleMembers })
245
+ };
246
+
247
+ exports.AIRDROP_FN = AIRDROP_FN;
248
+ exports.airdropKeys = airdropKeys;
249
+ exports.airdropQueryKey = airdropQueryKey;
250
+ exports.airdropQueryKeyPrefix = airdropQueryKeyPrefix;
251
+ exports.useMemoAirdropBaseClient = useMemoAirdropBaseClient;
252
+ exports.useMemoAirdropFactoryClient = useMemoAirdropFactoryClient;
253
+ exports.useMemoComplianceManagerClient = useMemoComplianceManagerClient;
254
+ exports.useMemoEcdsaAirdropClient = useMemoEcdsaAirdropClient;
255
+ exports.useMemoMerkleAirdropClient = useMemoMerkleAirdropClient;
@@ -0,0 +1,245 @@
1
+ import { createConfidentialAirdropFactoryClient, resolveEncryptor, createAirdropBaseClient, createMerkleAirdropClient, createComplianceManagerClient, createEcdsaAirdropClient } from './chunk-X7WBPCEU.js';
2
+ import { getFheAirdropFactoryAddress } from './chunk-A4DCEE33.js';
3
+ import { DeploymentAddressUnavailableError } from './chunk-QBJ7O2B4.js';
4
+ import { useRef, useMemo } from 'react';
5
+ import { usePublicClient, useWalletClient } from 'wagmi';
6
+
7
+ var FHE_AIRDROP_KEY = "tokenops-sdk";
8
+ var FHE_AIRDROP_NAMESPACE = "fhe-airdrop";
9
+ function airdropQueryKey(params) {
10
+ return [
11
+ FHE_AIRDROP_KEY,
12
+ FHE_AIRDROP_NAMESPACE,
13
+ params.chainId ?? null,
14
+ params.address ? normalizeKeyArg(params.address) : null,
15
+ params.fn,
16
+ params.args.map(normalizeKeyArg)
17
+ ];
18
+ }
19
+ function airdropQueryKeyPrefix(params) {
20
+ const prefix = [
21
+ FHE_AIRDROP_KEY,
22
+ FHE_AIRDROP_NAMESPACE,
23
+ params.chainId ?? null,
24
+ params.address ? normalizeKeyArg(params.address) : null
25
+ ];
26
+ if (params.fn !== void 0) prefix.push(params.fn);
27
+ return prefix;
28
+ }
29
+ function normalizeKeyArg(value) {
30
+ if (typeof value === "bigint") return value.toString();
31
+ if (Array.isArray(value)) return value.map(normalizeKeyArg);
32
+ if (value && typeof value === "object") {
33
+ return Object.fromEntries(
34
+ Object.entries(value).map(([k, v]) => [k, normalizeKeyArg(v)])
35
+ );
36
+ }
37
+ if (typeof value === "string" && value.startsWith("0x")) return value.toLowerCase();
38
+ return value;
39
+ }
40
+ function tryResolveAirdropFactoryAddress(override, chainId) {
41
+ if (override) return override;
42
+ if (chainId === void 0) return void 0;
43
+ return getFheAirdropFactoryAddress(chainId);
44
+ }
45
+ function computeAirdropFactoryResolutionError(override, chainId) {
46
+ if (override) return void 0;
47
+ if (chainId === void 0) {
48
+ return new DeploymentAddressUnavailableError({
49
+ reason: "chain-id-missing",
50
+ product: "fheAirdrop",
51
+ contract: "airdropFactory",
52
+ clientLabel: "ConfidentialAirdropFactoryClient"
53
+ });
54
+ }
55
+ const resolved = getFheAirdropFactoryAddress(chainId);
56
+ if (!resolved) {
57
+ return new DeploymentAddressUnavailableError({
58
+ reason: "registry-not-deployed",
59
+ product: "fheAirdrop",
60
+ contract: "airdropFactory",
61
+ chainId,
62
+ clientLabel: "ConfidentialAirdropFactoryClient"
63
+ });
64
+ }
65
+ return void 0;
66
+ }
67
+ function useMemoAirdropFactoryClient(opts = {}) {
68
+ const publicClient = usePublicClient({ chainId: opts.chainId });
69
+ const { data: walletClient } = useWalletClient({ chainId: opts.chainId });
70
+ const chainId = opts.chainId ?? publicClient?.chain?.id;
71
+ const resolvedAddress = tryResolveAirdropFactoryAddress(opts.address, chainId);
72
+ const resolutionError = computeAirdropFactoryResolutionError(opts.address, chainId);
73
+ const encryptorSourceRef = useRef(opts.encryptor);
74
+ encryptorSourceRef.current = opts.encryptor;
75
+ const telemetry = opts.telemetry;
76
+ const client = useMemo(() => {
77
+ if (!publicClient) return void 0;
78
+ if (!resolvedAddress) return void 0;
79
+ return createConfidentialAirdropFactoryClient({
80
+ publicClient,
81
+ ...walletClient ? { walletClient } : {},
82
+ address: resolvedAddress,
83
+ ...chainId !== void 0 ? { chainId } : {},
84
+ // Lazy — invoked per-encryption inside the headless client.
85
+ encryptor: () => resolveEncryptor(encryptorSourceRef.current),
86
+ ...telemetry ? { telemetry } : {}
87
+ });
88
+ }, [publicClient, walletClient, resolvedAddress, chainId, telemetry]);
89
+ return {
90
+ client,
91
+ resolutionError,
92
+ publicClient,
93
+ walletClient: walletClient ?? void 0,
94
+ chainId,
95
+ resolvedAddress
96
+ };
97
+ }
98
+ function useMemoAirdropBaseClient(opts) {
99
+ const publicClient = usePublicClient({ chainId: opts.chainId });
100
+ const { data: walletClient } = useWalletClient({ chainId: opts.chainId });
101
+ const chainId = opts.chainId ?? publicClient?.chain?.id;
102
+ const telemetry = opts.telemetry;
103
+ const client = useMemo(() => {
104
+ if (!publicClient) return void 0;
105
+ if (!opts.address) return void 0;
106
+ return createAirdropBaseClient({
107
+ publicClient,
108
+ ...walletClient ? { walletClient } : {},
109
+ address: opts.address,
110
+ ...chainId !== void 0 ? { chainId } : {},
111
+ ...telemetry ? { telemetry } : {}
112
+ });
113
+ }, [publicClient, walletClient, opts.address, chainId, telemetry]);
114
+ return { client, publicClient, walletClient: walletClient ?? void 0, chainId };
115
+ }
116
+ function useMemoMerkleAirdropClient(opts) {
117
+ const publicClient = usePublicClient({ chainId: opts.chainId });
118
+ const { data: walletClient } = useWalletClient({ chainId: opts.chainId });
119
+ const chainId = opts.chainId ?? publicClient?.chain?.id;
120
+ const telemetry = opts.telemetry;
121
+ const client = useMemo(() => {
122
+ if (!publicClient) return void 0;
123
+ if (!opts.address) return void 0;
124
+ return createMerkleAirdropClient({
125
+ publicClient,
126
+ ...walletClient ? { walletClient } : {},
127
+ address: opts.address,
128
+ ...chainId !== void 0 ? { chainId } : {},
129
+ ...telemetry ? { telemetry } : {}
130
+ });
131
+ }, [publicClient, walletClient, opts.address, chainId, telemetry]);
132
+ return { client, publicClient, walletClient: walletClient ?? void 0, chainId };
133
+ }
134
+ function useMemoComplianceManagerClient(opts) {
135
+ const publicClient = usePublicClient({ chainId: opts.chainId });
136
+ const { data: walletClient } = useWalletClient({ chainId: opts.chainId });
137
+ const chainId = opts.chainId ?? publicClient?.chain?.id;
138
+ const telemetry = opts.telemetry;
139
+ const client = useMemo(() => {
140
+ if (!publicClient) return void 0;
141
+ if (!opts.address) return void 0;
142
+ return createComplianceManagerClient({
143
+ publicClient,
144
+ ...walletClient ? { walletClient } : {},
145
+ address: opts.address,
146
+ ...chainId !== void 0 ? { chainId } : {},
147
+ ...telemetry ? { telemetry } : {}
148
+ });
149
+ }, [publicClient, walletClient, opts.address, chainId, telemetry]);
150
+ return { client, publicClient, walletClient: walletClient ?? void 0, chainId };
151
+ }
152
+ function useMemoEcdsaAirdropClient(opts) {
153
+ const publicClient = usePublicClient({ chainId: opts.chainId });
154
+ const { data: walletClient } = useWalletClient({ chainId: opts.chainId });
155
+ const chainId = opts.chainId ?? publicClient?.chain?.id;
156
+ const telemetry = opts.telemetry;
157
+ const client = useMemo(() => {
158
+ if (!publicClient) return void 0;
159
+ if (!opts.address) return void 0;
160
+ return createEcdsaAirdropClient({
161
+ publicClient,
162
+ ...walletClient ? { walletClient } : {},
163
+ address: opts.address,
164
+ dedupMode: opts.dedupMode,
165
+ ...chainId !== void 0 ? { chainId } : {},
166
+ ...telemetry ? { telemetry } : {}
167
+ });
168
+ }, [publicClient, walletClient, opts.address, opts.dedupMode, chainId, telemetry]);
169
+ return { client, publicClient, walletClient: walletClient ?? void 0, chainId };
170
+ }
171
+
172
+ // src/fhe-airdrop/react/keys.ts
173
+ var AIRDROP_FN = {
174
+ // instance reads
175
+ claimedAmount: "getClaimedAmount",
176
+ paused: "paused",
177
+ window: "window",
178
+ config: "config",
179
+ merkleRoot: "merkleRoot",
180
+ merkleRootMutable: "isMerkleRootMutable",
181
+ hasRole: "hasRole",
182
+ roleMembers: "roleMembers",
183
+ gasFee: "gasFee",
184
+ preflightCreate: "preflightCreate",
185
+ isSignatureValid: "isSignatureValid",
186
+ // factory reads
187
+ fees: "fees",
188
+ registry: "registry",
189
+ customFee: "customFee",
190
+ implementations: "implementations",
191
+ compliancePolicy: "compliancePolicy",
192
+ upgradeabilityPolicy: "upgradeabilityPolicy",
193
+ factoryHasRole: "factoryHasRole",
194
+ factoryRoleMembers: "factoryRoleMembers",
195
+ // compliance-manager reads
196
+ complianceInfo: "complianceInfo",
197
+ activeDelegate: "isActiveDelegate",
198
+ clientDelegates: "clientDelegates",
199
+ complianceHasRole: "complianceHasRole",
200
+ complianceRoleMembers: "complianceRoleMembers"
201
+ };
202
+ var airdropKeys = {
203
+ /** One account's cumulative delivered total. Keyed on the CLAIM IDENTITY, never the sender. */
204
+ claimedAmount: (s, account) => airdropQueryKey({ ...s, fn: AIRDROP_FN.claimedAmount, args: [account] }),
205
+ paused: (s) => airdropQueryKey({ ...s, fn: AIRDROP_FN.paused, args: [] }),
206
+ window: (s) => airdropQueryKey({ ...s, fn: AIRDROP_FN.window, args: [] }),
207
+ config: (s) => airdropQueryKey({ ...s, fn: AIRDROP_FN.config, args: [] }),
208
+ gasFee: (s) => airdropQueryKey({ ...s, fn: AIRDROP_FN.gasFee, args: [] }),
209
+ merkleRoot: (s) => airdropQueryKey({ ...s, fn: AIRDROP_FN.merkleRoot, args: [] }),
210
+ merkleRootMutable: (s) => airdropQueryKey({ ...s, fn: AIRDROP_FN.merkleRootMutable, args: [] }),
211
+ hasRole: (s, role, holder) => airdropQueryKey({ ...s, fn: AIRDROP_FN.hasRole, args: [role, holder] }),
212
+ /** Every cached `hasRole` for this instance, whatever role/holder pair was queried. */
213
+ hasRoleAll: (s) => airdropQueryKeyPrefix({ ...s, fn: AIRDROP_FN.hasRole }),
214
+ roleMembers: (s, role) => airdropQueryKey({ ...s, fn: AIRDROP_FN.roleMembers, args: [role] }),
215
+ roleMembersAll: (s) => airdropQueryKeyPrefix({ ...s, fn: AIRDROP_FN.roleMembers }),
216
+ /** Every cached create-preflight, whatever params/mode/salt combination was queried. */
217
+ preflightCreateAll: (s) => airdropQueryKeyPrefix({ ...s, fn: AIRDROP_FN.preflightCreate }),
218
+ /** Every cached signature check on this instance; a claim consumes a digest and flips it. */
219
+ isSignatureValidAll: (s) => airdropQueryKeyPrefix({ ...s, fn: AIRDROP_FN.isSignatureValid }),
220
+ fees: (s) => airdropQueryKey({ ...s, fn: AIRDROP_FN.fees, args: [] }),
221
+ customFee: (s, creator) => airdropQueryKey({ ...s, fn: AIRDROP_FN.customFee, args: [creator] }),
222
+ customFeeAll: (s) => airdropQueryKeyPrefix({ ...s, fn: AIRDROP_FN.customFee }),
223
+ /** Every registry page, whatever offset/limit was queried. */
224
+ registryAll: (s) => airdropQueryKeyPrefix({ ...s, fn: AIRDROP_FN.registry }),
225
+ implementations: (s) => airdropQueryKey({ ...s, fn: AIRDROP_FN.implementations, args: [] }),
226
+ compliancePolicy: (s, creator) => airdropQueryKey({ ...s, fn: AIRDROP_FN.compliancePolicy, args: [creator] }),
227
+ compliancePolicyAll: (s) => airdropQueryKeyPrefix({ ...s, fn: AIRDROP_FN.compliancePolicy }),
228
+ upgradeabilityPolicy: (s, creator) => airdropQueryKey({ ...s, fn: AIRDROP_FN.upgradeabilityPolicy, args: [creator] }),
229
+ upgradeabilityPolicyAll: (s) => airdropQueryKeyPrefix({ ...s, fn: AIRDROP_FN.upgradeabilityPolicy }),
230
+ factoryHasRole: (s, role, holder) => airdropQueryKey({ ...s, fn: AIRDROP_FN.factoryHasRole, args: [role, holder] }),
231
+ factoryHasRoleAll: (s) => airdropQueryKeyPrefix({ ...s, fn: AIRDROP_FN.factoryHasRole }),
232
+ factoryRoleMembers: (s, role) => airdropQueryKey({ ...s, fn: AIRDROP_FN.factoryRoleMembers, args: [role] }),
233
+ factoryRoleMembersAll: (s) => airdropQueryKeyPrefix({ ...s, fn: AIRDROP_FN.factoryRoleMembers }),
234
+ complianceInfo: (s) => airdropQueryKey({ ...s, fn: AIRDROP_FN.complianceInfo, args: [] }),
235
+ activeDelegate: (s, delegate) => airdropQueryKey({ ...s, fn: AIRDROP_FN.activeDelegate, args: [delegate] }),
236
+ activeDelegateAll: (s) => airdropQueryKeyPrefix({ ...s, fn: AIRDROP_FN.activeDelegate }),
237
+ clientDelegates: (s, index) => airdropQueryKey({ ...s, fn: AIRDROP_FN.clientDelegates, args: [index] }),
238
+ clientDelegatesAll: (s) => airdropQueryKeyPrefix({ ...s, fn: AIRDROP_FN.clientDelegates }),
239
+ complianceHasRole: (s, role, holder) => airdropQueryKey({ ...s, fn: AIRDROP_FN.complianceHasRole, args: [role, holder] }),
240
+ complianceHasRoleAll: (s) => airdropQueryKeyPrefix({ ...s, fn: AIRDROP_FN.complianceHasRole }),
241
+ complianceRoleMembers: (s, role) => airdropQueryKey({ ...s, fn: AIRDROP_FN.complianceRoleMembers, args: [role] }),
242
+ complianceRoleMembersAll: (s) => airdropQueryKeyPrefix({ ...s, fn: AIRDROP_FN.complianceRoleMembers })
243
+ };
244
+
245
+ export { AIRDROP_FN, airdropKeys, airdropQueryKey, airdropQueryKeyPrefix, useMemoAirdropBaseClient, useMemoAirdropFactoryClient, useMemoComplianceManagerClient, useMemoEcdsaAirdropClient, useMemoMerkleAirdropClient };
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk2RNW4MIJ_cjs = require('./chunk-2RNW4MIJ.cjs');
3
+ var chunk67OV5CX2_cjs = require('./chunk-67OV5CX2.cjs');
4
4
  var viem = require('viem');
5
5
 
6
6
  var FHEVM_ACL_ADDRESS_BY_CHAIN = {
@@ -16,7 +16,7 @@ function getFhevmAclAddress(chainId) {
16
16
  }
17
17
  function requireFhevmAclAddress(chainId, clientLabel) {
18
18
  if (chainId === void 0) {
19
- throw new chunk2RNW4MIJ_cjs.DeploymentAddressUnavailableError({
19
+ throw new chunk67OV5CX2_cjs.DeploymentAddressUnavailableError({
20
20
  reason: "chain-id-missing",
21
21
  product: "fhevm",
22
22
  contract: "acl",
@@ -26,7 +26,7 @@ function requireFhevmAclAddress(chainId, clientLabel) {
26
26
  }
27
27
  const addr = FHEVM_ACL_ADDRESS_BY_CHAIN[chainId];
28
28
  if (addr) return addr;
29
- throw new chunk2RNW4MIJ_cjs.DeploymentAddressUnavailableError({
29
+ throw new chunk67OV5CX2_cjs.DeploymentAddressUnavailableError({
30
30
  reason: "registry-unknown-chain",
31
31
  product: "fhevm",
32
32
  contract: "acl",