@tokenops/sdk 1.0.0

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 (371) hide show
  1. package/CHANGELOG.md +207 -0
  2. package/CONTRIBUTING.md +113 -0
  3. package/LICENSE +32 -0
  4. package/README.md +677 -0
  5. package/SECURITY.md +59 -0
  6. package/dist/chunk-52TC6BF7.js +2755 -0
  7. package/dist/chunk-56UI7LUR.cjs +516 -0
  8. package/dist/chunk-5SA2HF2W.cjs +1635 -0
  9. package/dist/chunk-5SGMJADP.cjs +139 -0
  10. package/dist/chunk-62DF53UQ.cjs +749 -0
  11. package/dist/chunk-66IHPTOK.cjs +20 -0
  12. package/dist/chunk-6ECAHP5O.cjs +1496 -0
  13. package/dist/chunk-72YGZEQE.js +742 -0
  14. package/dist/chunk-7VELUOMI.js +35 -0
  15. package/dist/chunk-BE2AIZ3K.js +23 -0
  16. package/dist/chunk-CMRETRZO.js +46 -0
  17. package/dist/chunk-COPFW5Z4.js +82 -0
  18. package/dist/chunk-CQIPRNS7.cjs +25 -0
  19. package/dist/chunk-ECT3NL2L.js +124 -0
  20. package/dist/chunk-FWHYQZ5E.cjs +37 -0
  21. package/dist/chunk-FYQ2UW4T.js +37 -0
  22. package/dist/chunk-HGXNRR25.js +105 -0
  23. package/dist/chunk-HTOMTEA3.cjs +3406 -0
  24. package/dist/chunk-ITQ7WKVC.cjs +101 -0
  25. package/dist/chunk-IVE3QEGD.js +478 -0
  26. package/dist/chunk-JFLEEXKP.js +325 -0
  27. package/dist/chunk-JFR5J4FL.cjs +128 -0
  28. package/dist/chunk-K6MFFDBJ.cjs +109 -0
  29. package/dist/chunk-KWFFIJYX.js +11 -0
  30. package/dist/chunk-NS44KBV5.cjs +89 -0
  31. package/dist/chunk-OLDGMKW2.cjs +93 -0
  32. package/dist/chunk-Q2GP5UDC.js +29 -0
  33. package/dist/chunk-Q7ARQSUH.cjs +42 -0
  34. package/dist/chunk-QCA7O2Q5.cjs +49 -0
  35. package/dist/chunk-QIHZVLIK.js +3388 -0
  36. package/dist/chunk-SUOG3BQS.cjs +2772 -0
  37. package/dist/chunk-T5LVV3KY.cjs +44 -0
  38. package/dist/chunk-UOG4PJL5.js +1488 -0
  39. package/dist/chunk-VDXVNZCO.cjs +329 -0
  40. package/dist/chunk-VJKZWYYJ.cjs +32 -0
  41. package/dist/chunk-WRCUDSUJ.js +96 -0
  42. package/dist/chunk-XSNLAS5M.js +135 -0
  43. package/dist/chunk-XXXDQSHE.js +1628 -0
  44. package/dist/chunk-ZHFLRKFY.js +41 -0
  45. package/dist/chunk-ZXCOJY2Z.js +87 -0
  46. package/dist/core/addresses.d.ts +59 -0
  47. package/dist/core/brands.d.ts +87 -0
  48. package/dist/core/chains.d.ts +102 -0
  49. package/dist/core/errors.d.ts +687 -0
  50. package/dist/core/index.d.ts +7 -0
  51. package/dist/core/normalise.d.ts +27 -0
  52. package/dist/core/preflight.d.ts +25 -0
  53. package/dist/core/revert-mapper.d.ts +74 -0
  54. package/dist/core/telemetry.d.ts +50 -0
  55. package/dist/core/types.d.ts +10 -0
  56. package/dist/core/version.d.ts +15 -0
  57. package/dist/core/zama-error-mapper.d.ts +27 -0
  58. package/dist/fhe/acl.d.ts +73 -0
  59. package/dist/fhe/erc7984-abi.d.ts +53 -0
  60. package/dist/fhe/index.cjs +599 -0
  61. package/dist/fhe/index.d.cts +11 -0
  62. package/dist/fhe/index.d.ts +11 -0
  63. package/dist/fhe/index.js +394 -0
  64. package/dist/fhe/mock-encryptor.d.ts +90 -0
  65. package/dist/fhe/mock-erc7984.d.ts +134 -0
  66. package/dist/fhe/operators.d.ts +190 -0
  67. package/dist/fhe/react/index.cjs +102 -0
  68. package/dist/fhe/react/index.d.cts +10 -0
  69. package/dist/fhe/react/index.d.ts +10 -0
  70. package/dist/fhe/react/index.js +85 -0
  71. package/dist/fhe/react/use-decrypted-handle.d.ts +102 -0
  72. package/dist/fhe/scale-ratio.d.ts +168 -0
  73. package/dist/fhe/sepolia-encryptor-web.d.ts +101 -0
  74. package/dist/fhe/sepolia-encryptor.d.ts +132 -0
  75. package/dist/fhe/types.d.ts +62 -0
  76. package/dist/fhe-airdrop/abis/cloneable.d.ts +781 -0
  77. package/dist/fhe-airdrop/abis/factory.d.ts +714 -0
  78. package/dist/fhe-airdrop/abis/index.d.ts +2 -0
  79. package/dist/fhe-airdrop/advanced/factory-advanced.d.ts +53 -0
  80. package/dist/fhe-airdrop/advanced/index.cjs +21 -0
  81. package/dist/fhe-airdrop/advanced/index.d.cts +13 -0
  82. package/dist/fhe-airdrop/advanced/index.d.ts +13 -0
  83. package/dist/fhe-airdrop/advanced/index.js +8 -0
  84. package/dist/fhe-airdrop/advanced/react/index.cjs +61 -0
  85. package/dist/fhe-airdrop/advanced/react/index.d.cts +5 -0
  86. package/dist/fhe-airdrop/advanced/react/index.d.ts +5 -0
  87. package/dist/fhe-airdrop/advanced/react/index.js +59 -0
  88. package/dist/fhe-airdrop/advanced/react/usePredictAirdropAddress.d.ts +49 -0
  89. package/dist/fhe-airdrop/airdrop.d.ts +308 -0
  90. package/dist/fhe-airdrop/encryption.d.ts +109 -0
  91. package/dist/fhe-airdrop/errors.d.ts +60 -0
  92. package/dist/fhe-airdrop/factory.d.ts +281 -0
  93. package/dist/fhe-airdrop/index.cjs +227 -0
  94. package/dist/fhe-airdrop/index.d.cts +10 -0
  95. package/dist/fhe-airdrop/index.d.ts +10 -0
  96. package/dist/fhe-airdrop/index.js +10 -0
  97. package/dist/fhe-airdrop/react/_shared.d.ts +107 -0
  98. package/dist/fhe-airdrop/react/index.cjs +638 -0
  99. package/dist/fhe-airdrop/react/index.d.cts +90 -0
  100. package/dist/fhe-airdrop/react/index.d.ts +90 -0
  101. package/dist/fhe-airdrop/react/index.js +430 -0
  102. package/dist/fhe-airdrop/react/useAccessClaimAmount.d.ts +31 -0
  103. package/dist/fhe-airdrop/react/useAirdropCanExtendClaimWindow.d.ts +7 -0
  104. package/dist/fhe-airdrop/react/useAirdropClaim.d.ts +25 -0
  105. package/dist/fhe-airdrop/react/useAirdropClaimTypehash.d.ts +10 -0
  106. package/dist/fhe-airdrop/react/useAirdropClaimedSignatures.d.ts +16 -0
  107. package/dist/fhe-airdrop/react/useAirdropDeploymentBlockNumber.d.ts +6 -0
  108. package/dist/fhe-airdrop/react/useAirdropDomainSeparator.d.ts +8 -0
  109. package/dist/fhe-airdrop/react/useAirdropEndTime.d.ts +10 -0
  110. package/dist/fhe-airdrop/react/useAirdropFactoryCustomFee.d.ts +17 -0
  111. package/dist/fhe-airdrop/react/useAirdropFactoryDefaultGasFee.d.ts +10 -0
  112. package/dist/fhe-airdrop/react/useAirdropFactoryDisableCustomFee.d.ts +15 -0
  113. package/dist/fhe-airdrop/react/useAirdropFactoryFeeCollector.d.ts +11 -0
  114. package/dist/fhe-airdrop/react/useAirdropFactoryInitCodeHash.d.ts +17 -0
  115. package/dist/fhe-airdrop/react/useAirdropFactorySetCustomFee.d.ts +17 -0
  116. package/dist/fhe-airdrop/react/useAirdropFactorySetDefaultGasFee.d.ts +16 -0
  117. package/dist/fhe-airdrop/react/useAirdropFactorySetFeeCollector.d.ts +15 -0
  118. package/dist/fhe-airdrop/react/useAirdropGasFee.d.ts +11 -0
  119. package/dist/fhe-airdrop/react/useAirdropGrantRole.d.ts +16 -0
  120. package/dist/fhe-airdrop/react/useAirdropHasClaimEnded.d.ts +7 -0
  121. package/dist/fhe-airdrop/react/useAirdropHasClaimStarted.d.ts +7 -0
  122. package/dist/fhe-airdrop/react/useAirdropHasRole.d.ts +14 -0
  123. package/dist/fhe-airdrop/react/useAirdropIsClaimWindowActive.d.ts +9 -0
  124. package/dist/fhe-airdrop/react/useAirdropIsPaused.d.ts +8 -0
  125. package/dist/fhe-airdrop/react/useAirdropIsSignatureClaimed.d.ts +22 -0
  126. package/dist/fhe-airdrop/react/useAirdropIsSignatureValid.d.ts +50 -0
  127. package/dist/fhe-airdrop/react/useAirdropRevokeRole.d.ts +15 -0
  128. package/dist/fhe-airdrop/react/useAirdropStartTime.d.ts +10 -0
  129. package/dist/fhe-airdrop/react/useAirdropToken.d.ts +11 -0
  130. package/dist/fhe-airdrop/react/useAirdropWithdrawGasFee.d.ts +15 -0
  131. package/dist/fhe-airdrop/react/useAirdropWithdrawOtherConfidentialToken.d.ts +14 -0
  132. package/dist/fhe-airdrop/react/useAirdropWithdrawOtherToken.d.ts +14 -0
  133. package/dist/fhe-airdrop/react/useClaim.d.ts +29 -0
  134. package/dist/fhe-airdrop/react/useConfidentialAirdropFactoryImplementation.d.ts +11 -0
  135. package/dist/fhe-airdrop/react/useCreateAndFundConfidentialAirdrop.d.ts +33 -0
  136. package/dist/fhe-airdrop/react/useCreateAndFundConfidentialAirdropAndGetAddress.d.ts +40 -0
  137. package/dist/fhe-airdrop/react/useCreateConfidentialAirdrop.d.ts +29 -0
  138. package/dist/fhe-airdrop/react/useCreateConfidentialAirdropAndGetAddress.d.ts +31 -0
  139. package/dist/fhe-airdrop/react/useDisableCustomFee.d.ts +14 -0
  140. package/dist/fhe-airdrop/react/useExtendClaimWindow.d.ts +16 -0
  141. package/dist/fhe-airdrop/react/useFactoryCustomFee.d.ts +17 -0
  142. package/dist/fhe-airdrop/react/useFactoryDefaultGasFee.d.ts +10 -0
  143. package/dist/fhe-airdrop/react/useFactoryFeeCollector.d.ts +11 -0
  144. package/dist/fhe-airdrop/react/useFactoryInitCodeHash.d.ts +17 -0
  145. package/dist/fhe-airdrop/react/useFundConfidentialAirdrop.d.ts +25 -0
  146. package/dist/fhe-airdrop/react/useGetClaimAmount.d.ts +30 -0
  147. package/dist/fhe-airdrop/react/useSetCustomFee.d.ts +16 -0
  148. package/dist/fhe-airdrop/react/useSetDefaultGasFee.d.ts +15 -0
  149. package/dist/fhe-airdrop/react/useSetFeeCollector.d.ts +14 -0
  150. package/dist/fhe-airdrop/react/useSetPaused.d.ts +14 -0
  151. package/dist/fhe-airdrop/react/useSignClaimAuthorization.d.ts +31 -0
  152. package/dist/fhe-airdrop/react/useWithdraw.d.ts +12 -0
  153. package/dist/fhe-airdrop/react/useWithdrawOtherConfidentialToken.d.ts +13 -0
  154. package/dist/fhe-airdrop/react/useWithdrawOtherToken.d.ts +13 -0
  155. package/dist/fhe-airdrop/types.d.ts +21 -0
  156. package/dist/fhe-disperse/abis/index.d.ts +2 -0
  157. package/dist/fhe-disperse/abis/singleton.d.ts +1297 -0
  158. package/dist/fhe-disperse/abis/wallet.d.ts +111 -0
  159. package/dist/fhe-disperse/encryption.d.ts +77 -0
  160. package/dist/fhe-disperse/errors.d.ts +39 -0
  161. package/dist/fhe-disperse/index.cjs +248 -0
  162. package/dist/fhe-disperse/index.d.cts +14 -0
  163. package/dist/fhe-disperse/index.d.ts +14 -0
  164. package/dist/fhe-disperse/index.js +11 -0
  165. package/dist/fhe-disperse/react/_shared.d.ts +104 -0
  166. package/dist/fhe-disperse/react/index.cjs +752 -0
  167. package/dist/fhe-disperse/react/index.d.cts +82 -0
  168. package/dist/fhe-disperse/react/index.d.ts +82 -0
  169. package/dist/fhe-disperse/react/index.js +522 -0
  170. package/dist/fhe-disperse/react/useAccessEncryptedFeeReserve.d.ts +35 -0
  171. package/dist/fhe-disperse/react/useApproveTokenOnWallets.d.ts +25 -0
  172. package/dist/fhe-disperse/react/useBatchDiscloseHandlesToParty.d.ts +16 -0
  173. package/dist/fhe-disperse/react/useCalculateFee.d.ts +26 -0
  174. package/dist/fhe-disperse/react/useDeploymentBlockNumber.d.ts +11 -0
  175. package/dist/fhe-disperse/react/useDisableCustomFee.d.ts +20 -0
  176. package/dist/fhe-disperse/react/useDiscloseHandleToParty.d.ts +20 -0
  177. package/dist/fhe-disperse/react/useDisperse.d.ts +28 -0
  178. package/dist/fhe-disperse/react/useGetBatchLimits.d.ts +12 -0
  179. package/dist/fhe-disperse/react/useGetFeeConfig.d.ts +15 -0
  180. package/dist/fhe-disperse/react/useGetFees.d.ts +19 -0
  181. package/dist/fhe-disperse/react/useGetWallets.d.ts +19 -0
  182. package/dist/fhe-disperse/react/useGrantRole.d.ts +24 -0
  183. package/dist/fhe-disperse/react/useHasApprovedSubwallets.d.ts +25 -0
  184. package/dist/fhe-disperse/react/useHasRole.d.ts +22 -0
  185. package/dist/fhe-disperse/react/useIsPaused.d.ts +11 -0
  186. package/dist/fhe-disperse/react/useIsRegistered.d.ts +15 -0
  187. package/dist/fhe-disperse/react/usePause.d.ts +18 -0
  188. package/dist/fhe-disperse/react/usePredictWallets.d.ts +19 -0
  189. package/dist/fhe-disperse/react/usePreflightDisperse.d.ts +37 -0
  190. package/dist/fhe-disperse/react/useRecoverERC20FromWallets.d.ts +21 -0
  191. package/dist/fhe-disperse/react/useRecoverFromWallets.d.ts +21 -0
  192. package/dist/fhe-disperse/react/useRegister.d.ts +40 -0
  193. package/dist/fhe-disperse/react/useRescueConfidentialTokens.d.ts +21 -0
  194. package/dist/fhe-disperse/react/useRescueERC20.d.ts +21 -0
  195. package/dist/fhe-disperse/react/useRevokeRole.d.ts +24 -0
  196. package/dist/fhe-disperse/react/useRevokeTokenOnWallets.d.ts +24 -0
  197. package/dist/fhe-disperse/react/useSetCustomFee.d.ts +24 -0
  198. package/dist/fhe-disperse/react/useSetFeeConfig.d.ts +23 -0
  199. package/dist/fhe-disperse/react/useSetMaxBatchSizeDirect.d.ts +20 -0
  200. package/dist/fhe-disperse/react/useSetMaxBatchSizeHolding.d.ts +20 -0
  201. package/dist/fhe-disperse/react/useSetMaxBatchSizeTokenFee.d.ts +20 -0
  202. package/dist/fhe-disperse/react/useSingletonBatchDiscloseHandlesToParty.d.ts +13 -0
  203. package/dist/fhe-disperse/react/useSingletonBatchLimits.d.ts +12 -0
  204. package/dist/fhe-disperse/react/useSingletonCalculateFee.d.ts +26 -0
  205. package/dist/fhe-disperse/react/useSingletonDeploymentBlockNumber.d.ts +11 -0
  206. package/dist/fhe-disperse/react/useSingletonDisableCustomFee.d.ts +21 -0
  207. package/dist/fhe-disperse/react/useSingletonDiscloseHandleToParty.d.ts +17 -0
  208. package/dist/fhe-disperse/react/useSingletonFees.d.ts +19 -0
  209. package/dist/fhe-disperse/react/useSingletonGrantRole.d.ts +26 -0
  210. package/dist/fhe-disperse/react/useSingletonHasApprovedSubwallets.d.ts +25 -0
  211. package/dist/fhe-disperse/react/useSingletonHasRole.d.ts +23 -0
  212. package/dist/fhe-disperse/react/useSingletonIsPaused.d.ts +11 -0
  213. package/dist/fhe-disperse/react/useSingletonIsRegistered.d.ts +15 -0
  214. package/dist/fhe-disperse/react/useSingletonPause.d.ts +19 -0
  215. package/dist/fhe-disperse/react/useSingletonPredictWallets.d.ts +19 -0
  216. package/dist/fhe-disperse/react/useSingletonRevokeRole.d.ts +26 -0
  217. package/dist/fhe-disperse/react/useSingletonSetCustomFee.d.ts +25 -0
  218. package/dist/fhe-disperse/react/useSingletonUnpause.d.ts +18 -0
  219. package/dist/fhe-disperse/react/useSingletonWalletImplementation.d.ts +12 -0
  220. package/dist/fhe-disperse/react/useSingletonWallets.d.ts +19 -0
  221. package/dist/fhe-disperse/react/useSingletonWithdrawGasFee.d.ts +21 -0
  222. package/dist/fhe-disperse/react/useSingletonWithdrawTokenFee.d.ts +50 -0
  223. package/dist/fhe-disperse/react/useUnpause.d.ts +17 -0
  224. package/dist/fhe-disperse/react/useWalletImplementation.d.ts +12 -0
  225. package/dist/fhe-disperse/react/useWithdrawGasFee.d.ts +26 -0
  226. package/dist/fhe-disperse/react/useWithdrawTokenFee.d.ts +70 -0
  227. package/dist/fhe-disperse/singleton.d.ts +442 -0
  228. package/dist/fhe-disperse/subtotals.d.ts +14 -0
  229. package/dist/fhe-disperse/types.d.ts +332 -0
  230. package/dist/fhe-disperse/validate.d.ts +78 -0
  231. package/dist/fhe-vesting/abis/factory.d.ts +676 -0
  232. package/dist/fhe-vesting/abis/index.d.ts +3 -0
  233. package/dist/fhe-vesting/abis/manager.d.ts +1797 -0
  234. package/dist/fhe-vesting/advanced/factory-advanced.d.ts +52 -0
  235. package/dist/fhe-vesting/advanced/index.cjs +21 -0
  236. package/dist/fhe-vesting/advanced/index.d.cts +12 -0
  237. package/dist/fhe-vesting/advanced/index.d.ts +12 -0
  238. package/dist/fhe-vesting/advanced/index.js +8 -0
  239. package/dist/fhe-vesting/advanced/react/index.cjs +75 -0
  240. package/dist/fhe-vesting/advanced/react/index.d.cts +5 -0
  241. package/dist/fhe-vesting/advanced/react/index.d.ts +5 -0
  242. package/dist/fhe-vesting/advanced/react/index.js +73 -0
  243. package/dist/fhe-vesting/advanced/react/usePredictManagerAddress.d.ts +41 -0
  244. package/dist/fhe-vesting/encryption.d.ts +104 -0
  245. package/dist/fhe-vesting/errors.d.ts +183 -0
  246. package/dist/fhe-vesting/factory.d.ts +207 -0
  247. package/dist/fhe-vesting/index.cjs +269 -0
  248. package/dist/fhe-vesting/index.d.cts +9 -0
  249. package/dist/fhe-vesting/index.d.ts +9 -0
  250. package/dist/fhe-vesting/index.js +12 -0
  251. package/dist/fhe-vesting/manager.d.ts +808 -0
  252. package/dist/fhe-vesting/react/_shared.d.ts +122 -0
  253. package/dist/fhe-vesting/react/index.cjs +1054 -0
  254. package/dist/fhe-vesting/react/index.d.cts +123 -0
  255. package/dist/fhe-vesting/react/index.d.ts +123 -0
  256. package/dist/fhe-vesting/react/index.js +771 -0
  257. package/dist/fhe-vesting/react/useAcceptVestingTransfer.d.ts +12 -0
  258. package/dist/fhe-vesting/react/useAccessClaimableAmount.d.ts +14 -0
  259. package/dist/fhe-vesting/react/useAccessSettledAmount.d.ts +15 -0
  260. package/dist/fhe-vesting/react/useAccessTotalAllocation.d.ts +14 -0
  261. package/dist/fhe-vesting/react/useAccessVestedAmount.d.ts +26 -0
  262. package/dist/fhe-vesting/react/useAdminBatchDiscloseToParty.d.ts +16 -0
  263. package/dist/fhe-vesting/react/useAdminClaim.d.ts +9 -0
  264. package/dist/fhe-vesting/react/useAdminDiscloseToParty.d.ts +8 -0
  265. package/dist/fhe-vesting/react/useAdminGetClaimableAmount.d.ts +13 -0
  266. package/dist/fhe-vesting/react/useAdminGetSettledAmount.d.ts +13 -0
  267. package/dist/fhe-vesting/react/useAdminGetTokenBalance.d.ts +13 -0
  268. package/dist/fhe-vesting/react/useAdminGetTotalAllocation.d.ts +13 -0
  269. package/dist/fhe-vesting/react/useAdminGetVestedAmount.d.ts +15 -0
  270. package/dist/fhe-vesting/react/useAdminPartialClaim.d.ts +8 -0
  271. package/dist/fhe-vesting/react/useAllRecipients.d.ts +8 -0
  272. package/dist/fhe-vesting/react/useAllRecipientsLength.d.ts +6 -0
  273. package/dist/fhe-vesting/react/useAllRecipientsSliced.d.ts +13 -0
  274. package/dist/fhe-vesting/react/useBatchCreateVesting.d.ts +24 -0
  275. package/dist/fhe-vesting/react/useBatchDiscloseHandlesToParty.d.ts +13 -0
  276. package/dist/fhe-vesting/react/useBatchDiscloseToParty.d.ts +18 -0
  277. package/dist/fhe-vesting/react/useBatchRevokeVesting.d.ts +12 -0
  278. package/dist/fhe-vesting/react/useCancelVestingTransfer.d.ts +12 -0
  279. package/dist/fhe-vesting/react/useClaim.d.ts +19 -0
  280. package/dist/fhe-vesting/react/useConfidentialVestingFactoryImplementation.d.ts +11 -0
  281. package/dist/fhe-vesting/react/useCreateManager.d.ts +32 -0
  282. package/dist/fhe-vesting/react/useCreateManagerAndGetAddress.d.ts +31 -0
  283. package/dist/fhe-vesting/react/useCreateVesting.d.ts +38 -0
  284. package/dist/fhe-vesting/react/useDirectVestingTransfer.d.ts +13 -0
  285. package/dist/fhe-vesting/react/useDisableCustomFee.d.ts +14 -0
  286. package/dist/fhe-vesting/react/useDiscloseHandleToParty.d.ts +14 -0
  287. package/dist/fhe-vesting/react/useDiscloseToParty.d.ts +14 -0
  288. package/dist/fhe-vesting/react/useFactoryCustomFee.d.ts +17 -0
  289. package/dist/fhe-vesting/react/useFactoryDefaultFeeType.d.ts +11 -0
  290. package/dist/fhe-vesting/react/useFactoryDefaultGasFee.d.ts +10 -0
  291. package/dist/fhe-vesting/react/useFactoryDefaultTokenFee.d.ts +10 -0
  292. package/dist/fhe-vesting/react/useFactoryFeeCollector.d.ts +10 -0
  293. package/dist/fhe-vesting/react/useFactoryInitCodeHash.d.ts +18 -0
  294. package/dist/fhe-vesting/react/useGetClaimableAmount.d.ts +13 -0
  295. package/dist/fhe-vesting/react/useGetSettledAmount.d.ts +14 -0
  296. package/dist/fhe-vesting/react/useGetTotalAllocation.d.ts +13 -0
  297. package/dist/fhe-vesting/react/useGetVestedAmount.d.ts +25 -0
  298. package/dist/fhe-vesting/react/useGrantRole.d.ts +15 -0
  299. package/dist/fhe-vesting/react/useHasRole.d.ts +14 -0
  300. package/dist/fhe-vesting/react/useInitiateVestingTransfer.d.ts +12 -0
  301. package/dist/fhe-vesting/react/useIsRecipient.d.ts +10 -0
  302. package/dist/fhe-vesting/react/useManagerBatchDiscloseHandlesToParty.d.ts +15 -0
  303. package/dist/fhe-vesting/react/useManagerDeploymentBlockNumber.d.ts +7 -0
  304. package/dist/fhe-vesting/react/useManagerDiscloseHandleToParty.d.ts +16 -0
  305. package/dist/fhe-vesting/react/useManagerFactoryCustomFee.d.ts +17 -0
  306. package/dist/fhe-vesting/react/useManagerFactoryDefaultGasFee.d.ts +10 -0
  307. package/dist/fhe-vesting/react/useManagerFactoryDisableCustomFee.d.ts +15 -0
  308. package/dist/fhe-vesting/react/useManagerFactoryFeeCollector.d.ts +10 -0
  309. package/dist/fhe-vesting/react/useManagerFactoryInitCodeHash.d.ts +18 -0
  310. package/dist/fhe-vesting/react/useManagerFactorySetCustomFee.d.ts +19 -0
  311. package/dist/fhe-vesting/react/useManagerFactorySetDefaultGasFee.d.ts +13 -0
  312. package/dist/fhe-vesting/react/useManagerFactorySetFeeCollector.d.ts +14 -0
  313. package/dist/fhe-vesting/react/useManagerFee.d.ts +7 -0
  314. package/dist/fhe-vesting/react/useManagerFeeInfo.d.ts +18 -0
  315. package/dist/fhe-vesting/react/useManagerFeeType.d.ts +7 -0
  316. package/dist/fhe-vesting/react/useManagerGrantRole.d.ts +17 -0
  317. package/dist/fhe-vesting/react/useManagerHasRole.d.ts +15 -0
  318. package/dist/fhe-vesting/react/useManagerIsPausable.d.ts +6 -0
  319. package/dist/fhe-vesting/react/useManagerIsSplitEnabled.d.ts +6 -0
  320. package/dist/fhe-vesting/react/useManagerMaxBatchSize.d.ts +6 -0
  321. package/dist/fhe-vesting/react/useManagerMaxRevokeBatchSize.d.ts +6 -0
  322. package/dist/fhe-vesting/react/useManagerPause.d.ts +13 -0
  323. package/dist/fhe-vesting/react/useManagerPaused.d.ts +6 -0
  324. package/dist/fhe-vesting/react/useManagerRevokeRole.d.ts +17 -0
  325. package/dist/fhe-vesting/react/useManagerToken.d.ts +11 -0
  326. package/dist/fhe-vesting/react/useManagerUnpause.d.ts +12 -0
  327. package/dist/fhe-vesting/react/useManagerWithdrawGasFee.d.ts +14 -0
  328. package/dist/fhe-vesting/react/useManagerWithdrawOtherConfidentialToken.d.ts +14 -0
  329. package/dist/fhe-vesting/react/useManagerWithdrawOtherToken.d.ts +14 -0
  330. package/dist/fhe-vesting/react/useManagerWithdrawTokenFee.d.ts +11 -0
  331. package/dist/fhe-vesting/react/usePartialClaim.d.ts +15 -0
  332. package/dist/fhe-vesting/react/usePause.d.ts +12 -0
  333. package/dist/fhe-vesting/react/usePendingVestingTransfer.d.ts +20 -0
  334. package/dist/fhe-vesting/react/useRecipientVestings.d.ts +11 -0
  335. package/dist/fhe-vesting/react/useRecipientVestingsLength.d.ts +10 -0
  336. package/dist/fhe-vesting/react/useRecipientVestingsSliced.d.ts +12 -0
  337. package/dist/fhe-vesting/react/useRenounceRole.d.ts +16 -0
  338. package/dist/fhe-vesting/react/useResetGasFee.d.ts +10 -0
  339. package/dist/fhe-vesting/react/useResetTokenFee.d.ts +10 -0
  340. package/dist/fhe-vesting/react/useRevokeRole.d.ts +15 -0
  341. package/dist/fhe-vesting/react/useRevokeVesting.d.ts +15 -0
  342. package/dist/fhe-vesting/react/useRoleConstants.d.ts +19 -0
  343. package/dist/fhe-vesting/react/useSetCustomFee.d.ts +18 -0
  344. package/dist/fhe-vesting/react/useSetDefaultFeeType.d.ts +14 -0
  345. package/dist/fhe-vesting/react/useSetDefaultGasFee.d.ts +12 -0
  346. package/dist/fhe-vesting/react/useSetDefaultTokenFee.d.ts +13 -0
  347. package/dist/fhe-vesting/react/useSetFeeCollector.d.ts +13 -0
  348. package/dist/fhe-vesting/react/useSetMaxBatchSize.d.ts +12 -0
  349. package/dist/fhe-vesting/react/useSetMaxRevokeBatchSize.d.ts +12 -0
  350. package/dist/fhe-vesting/react/useSplitVesting.d.ts +28 -0
  351. package/dist/fhe-vesting/react/useTransferFeeCollectorRole.d.ts +12 -0
  352. package/dist/fhe-vesting/react/useUnpause.d.ts +11 -0
  353. package/dist/fhe-vesting/react/useVestingClaim.d.ts +19 -0
  354. package/dist/fhe-vesting/react/useVestingInfo.d.ts +25 -0
  355. package/dist/fhe-vesting/react/useWithdrawAdmin.d.ts +17 -0
  356. package/dist/fhe-vesting/react/useWithdrawGasFee.d.ts +13 -0
  357. package/dist/fhe-vesting/react/useWithdrawOtherConfidentialToken.d.ts +13 -0
  358. package/dist/fhe-vesting/react/useWithdrawOtherToken.d.ts +13 -0
  359. package/dist/fhe-vesting/react/useWithdrawTokenFee.d.ts +18 -0
  360. package/dist/fhe-vesting/types.d.ts +72 -0
  361. package/dist/index.cjs +237 -0
  362. package/dist/index.d.cts +3 -0
  363. package/dist/index.d.ts +3 -0
  364. package/dist/index.js +14 -0
  365. package/dist/telemetry/console.d.ts +29 -0
  366. package/dist/telemetry/index.cjs +113 -0
  367. package/dist/telemetry/index.d.cts +3 -0
  368. package/dist/telemetry/index.d.ts +3 -0
  369. package/dist/telemetry/index.js +102 -0
  370. package/dist/telemetry/tokenops.d.ts +15 -0
  371. package/package.json +316 -0
@@ -0,0 +1,752 @@
1
+ 'use strict';
2
+
3
+ var chunkHTOMTEA3_cjs = require('../../chunk-HTOMTEA3.cjs');
4
+ require('../../chunk-ITQ7WKVC.cjs');
5
+ require('../../chunk-FWHYQZ5E.cjs');
6
+ require('../../chunk-NS44KBV5.cjs');
7
+ require('../../chunk-Q7ARQSUH.cjs');
8
+ require('../../chunk-VDXVNZCO.cjs');
9
+ var chunkOLDGMKW2_cjs = require('../../chunk-OLDGMKW2.cjs');
10
+ require('../../chunk-CQIPRNS7.cjs');
11
+ require('../../chunk-VJKZWYYJ.cjs');
12
+ require('../../chunk-66IHPTOK.cjs');
13
+ var chunk56UI7LUR_cjs = require('../../chunk-56UI7LUR.cjs');
14
+ var reactQuery = require('@tanstack/react-query');
15
+ var react = require('react');
16
+ var wagmi = require('wagmi');
17
+
18
+ var FHE_DISPERSE_KEY = "tokenops-sdk";
19
+ var FHE_DISPERSE_NAMESPACE = "fhe-disperse";
20
+ function tryResolveSingletonAddress(override, chainId) {
21
+ if (override) return override;
22
+ if (chainId === void 0) return void 0;
23
+ return chunkOLDGMKW2_cjs.getFheDisperseSingletonAddress(chainId);
24
+ }
25
+ function useMemoDisperseClient(opts = {}) {
26
+ const publicClient = wagmi.usePublicClient({ chainId: opts.chainId });
27
+ const { data: walletClient } = wagmi.useWalletClient({ chainId: opts.chainId });
28
+ const chainId = opts.chainId ?? publicClient?.chain?.id;
29
+ const resolvedAddress = tryResolveSingletonAddress(opts.address, chainId);
30
+ const resolutionError = computeSingletonResolutionError(opts.address, chainId);
31
+ const encryptorSourceRef = react.useRef(opts.encryptor);
32
+ encryptorSourceRef.current = opts.encryptor;
33
+ const client = react.useMemo(() => {
34
+ if (!publicClient) return void 0;
35
+ if (!resolvedAddress) return void 0;
36
+ return chunkHTOMTEA3_cjs.createConfidentialDisperseClient({
37
+ publicClient,
38
+ ...walletClient ? { walletClient } : {},
39
+ address: resolvedAddress,
40
+ ...chainId !== void 0 ? { chainId } : {},
41
+ // Lazy — invoked per-encryption inside the headless client. Picks up
42
+ // whichever EncryptorSource the consumer last passed in.
43
+ encryptor: () => chunkHTOMTEA3_cjs.resolveEncryptor(encryptorSourceRef.current),
44
+ ...opts.aclAddress ? { aclAddress: opts.aclAddress } : {}
45
+ });
46
+ }, [publicClient, walletClient, resolvedAddress, chainId, opts.aclAddress]);
47
+ return {
48
+ client,
49
+ resolutionError,
50
+ publicClient,
51
+ walletClient: walletClient ?? void 0,
52
+ chainId,
53
+ resolvedAddress
54
+ };
55
+ }
56
+ function computeSingletonResolutionError(override, chainId) {
57
+ if (override) return void 0;
58
+ if (chainId === void 0) {
59
+ return new chunk56UI7LUR_cjs.DeploymentAddressUnavailableError({
60
+ reason: "chain-id-missing",
61
+ product: "fheDisperse",
62
+ contract: "disperseConfidentialSingleton",
63
+ clientLabel: "ConfidentialDisperseClient"
64
+ });
65
+ }
66
+ const resolved = chunkOLDGMKW2_cjs.getFheDisperseSingletonAddress(chainId);
67
+ if (!resolved) {
68
+ return new chunk56UI7LUR_cjs.DeploymentAddressUnavailableError({
69
+ reason: "registry-not-deployed",
70
+ product: "fheDisperse",
71
+ contract: "disperseConfidentialSingleton",
72
+ chainId,
73
+ clientLabel: "ConfidentialDisperseClient"
74
+ });
75
+ }
76
+ return void 0;
77
+ }
78
+ function buildQueryKey(method, chainId, address, ...args) {
79
+ return [
80
+ FHE_DISPERSE_KEY,
81
+ FHE_DISPERSE_NAMESPACE,
82
+ method,
83
+ chainId ?? null,
84
+ address ? address.toLowerCase() : null,
85
+ ...args.map(normalizeKeyArg)
86
+ ];
87
+ }
88
+ function normalizeKeyArg(value) {
89
+ if (typeof value === "bigint") return value.toString();
90
+ if (Array.isArray(value)) return value.map(normalizeKeyArg);
91
+ if (value && typeof value === "object") {
92
+ return Object.fromEntries(
93
+ Object.entries(value).map(([k, v]) => [k, normalizeKeyArg(v)])
94
+ );
95
+ }
96
+ if (typeof value === "string" && value.startsWith("0x")) return value.toLowerCase();
97
+ return value;
98
+ }
99
+
100
+ // src/fhe-disperse/react/useIsRegistered.ts
101
+ function useIsRegistered(args = {}) {
102
+ const { user, ...base } = args;
103
+ const { client, chainId, resolvedAddress } = useMemoDisperseClient(base);
104
+ return reactQuery.useQuery({
105
+ queryKey: buildQueryKey("disperse:isRegistered", chainId, resolvedAddress, user),
106
+ queryFn: () => client.isRegistered(user),
107
+ enabled: !!client && !!user,
108
+ staleTime: 0
109
+ });
110
+ }
111
+ function useGetWallets(args = {}) {
112
+ const { user, ...base } = args;
113
+ const { client, chainId, resolvedAddress } = useMemoDisperseClient(base);
114
+ return reactQuery.useQuery({
115
+ queryKey: buildQueryKey("disperse:getWallets", chainId, resolvedAddress, user),
116
+ queryFn: () => client.getWallets(user),
117
+ enabled: !!client && !!user,
118
+ staleTime: 0
119
+ });
120
+ }
121
+ function usePredictWallets(args = {}) {
122
+ const { user, ...base } = args;
123
+ const { client, chainId, resolvedAddress } = useMemoDisperseClient(base);
124
+ return reactQuery.useQuery({
125
+ queryKey: buildQueryKey("disperse:predictWallets", chainId, resolvedAddress, user),
126
+ queryFn: () => client.predictWallets(user),
127
+ enabled: !!client && !!user,
128
+ staleTime: 0
129
+ });
130
+ }
131
+ function useGetFees(args = {}) {
132
+ const { user, ...base } = args;
133
+ const { client, chainId, resolvedAddress } = useMemoDisperseClient(base);
134
+ return reactQuery.useQuery({
135
+ queryKey: buildQueryKey("disperse:getFees", chainId, resolvedAddress, user),
136
+ queryFn: () => client.getFees(user),
137
+ enabled: !!client && !!user,
138
+ staleTime: 0
139
+ });
140
+ }
141
+ function useGetFeeConfig(options = {}) {
142
+ const { client, chainId, resolvedAddress } = useMemoDisperseClient(options);
143
+ return reactQuery.useQuery({
144
+ queryKey: buildQueryKey("disperse:getFeeConfig", chainId, resolvedAddress),
145
+ queryFn: () => client.getFeeConfig(),
146
+ enabled: !!client,
147
+ staleTime: 0
148
+ });
149
+ }
150
+ function useGetBatchLimits(options = {}) {
151
+ const { client, chainId, resolvedAddress } = useMemoDisperseClient(options);
152
+ return reactQuery.useQuery({
153
+ queryKey: buildQueryKey("disperse:getBatchLimits", chainId, resolvedAddress),
154
+ queryFn: () => client.getBatchLimits(),
155
+ enabled: !!client,
156
+ staleTime: 0
157
+ });
158
+ }
159
+ function useCalculateFee(args = {}) {
160
+ const { user, mode, recipients, totalTokens, ...base } = args;
161
+ const { client, chainId, resolvedAddress } = useMemoDisperseClient(base);
162
+ return reactQuery.useQuery({
163
+ queryKey: buildQueryKey(
164
+ "disperse:calculateFee",
165
+ chainId,
166
+ resolvedAddress,
167
+ user,
168
+ mode,
169
+ recipients,
170
+ totalTokens
171
+ ),
172
+ queryFn: () => {
173
+ const callArgs = {
174
+ user,
175
+ mode,
176
+ recipients,
177
+ ...totalTokens !== void 0 ? { totalTokens } : {}
178
+ };
179
+ return client.calculateFee(callArgs);
180
+ },
181
+ enabled: !!client && !!user && !!mode && recipients !== void 0,
182
+ staleTime: 0
183
+ });
184
+ }
185
+ function useHasApprovedSubwallets(args = {}) {
186
+ const { user, token, ...base } = args;
187
+ const { client, chainId, resolvedAddress } = useMemoDisperseClient(base);
188
+ return reactQuery.useQuery({
189
+ queryKey: buildQueryKey(
190
+ "disperse:hasApprovedSubwallets",
191
+ chainId,
192
+ resolvedAddress,
193
+ user,
194
+ token
195
+ ),
196
+ queryFn: () => client.hasApprovedSubwallets({ user, token }),
197
+ enabled: !!client && !!user && !!token,
198
+ staleTime: 0
199
+ });
200
+ }
201
+ function useHasRole(args = {}) {
202
+ const { role, account, ...base } = args;
203
+ const { client, chainId, resolvedAddress } = useMemoDisperseClient(base);
204
+ return reactQuery.useQuery({
205
+ queryKey: buildQueryKey("disperse:hasRole", chainId, resolvedAddress, role, account),
206
+ queryFn: () => client.hasRole(role, account),
207
+ enabled: !!client && !!role && !!account,
208
+ staleTime: 0
209
+ });
210
+ }
211
+ function useIsPaused(options = {}) {
212
+ const { client, chainId, resolvedAddress } = useMemoDisperseClient(options);
213
+ return reactQuery.useQuery({
214
+ queryKey: buildQueryKey("disperse:paused", chainId, resolvedAddress),
215
+ queryFn: () => client.paused(),
216
+ enabled: !!client,
217
+ staleTime: 0
218
+ });
219
+ }
220
+ function useDeploymentBlockNumber(options = {}) {
221
+ const { client, chainId, resolvedAddress } = useMemoDisperseClient(options);
222
+ return reactQuery.useQuery({
223
+ queryKey: buildQueryKey("disperse:deploymentBlockNumber", chainId, resolvedAddress),
224
+ queryFn: () => client.deploymentBlockNumber(),
225
+ enabled: !!client,
226
+ staleTime: 0
227
+ });
228
+ }
229
+ function useWalletImplementation(options = {}) {
230
+ const { client, chainId, resolvedAddress } = useMemoDisperseClient(options);
231
+ return reactQuery.useQuery({
232
+ queryKey: buildQueryKey("disperse:walletImplementation", chainId, resolvedAddress),
233
+ queryFn: () => client.walletImplementation(),
234
+ enabled: !!client,
235
+ staleTime: 0
236
+ });
237
+ }
238
+ function usePreflightDisperse(args = {}) {
239
+ const { user, token, recipients, amounts, mode, ...base } = args;
240
+ const { client, chainId, resolvedAddress } = useMemoDisperseClient(base);
241
+ return reactQuery.useQuery({
242
+ queryKey: buildQueryKey(
243
+ "disperse:preflightDisperse",
244
+ chainId,
245
+ resolvedAddress,
246
+ user,
247
+ token,
248
+ recipients,
249
+ amounts,
250
+ mode
251
+ ),
252
+ queryFn: () => client.preflightDisperse({
253
+ user,
254
+ token,
255
+ recipients,
256
+ amounts,
257
+ mode
258
+ }),
259
+ // Empty arrays must surface as headless `EmptyRecipientsError` / `EmptyAmountsError`
260
+ // blockers, so the gate enables once each input is *defined* (even if empty).
261
+ // The SDK explains the invalid state; the UI shouldn't sit in an idle query.
262
+ enabled: !!client && !!user && !!token && !!mode && !!recipients && !!amounts,
263
+ staleTime: 0
264
+ });
265
+ }
266
+ function useRegister(options = {}) {
267
+ const { client, resolutionError } = useMemoDisperseClient(options);
268
+ return reactQuery.useMutation({
269
+ mutationFn: async (args) => {
270
+ if (!client) {
271
+ throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useRegister", "disperse");
272
+ }
273
+ return client.register(args);
274
+ }
275
+ });
276
+ }
277
+ function useApproveTokenOnWallets(options = {}) {
278
+ const { client, resolutionError } = useMemoDisperseClient(options);
279
+ return reactQuery.useMutation({
280
+ mutationFn: async (args) => {
281
+ if (!client) {
282
+ throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useApproveTokenOnWallets", "disperse");
283
+ }
284
+ return client.approveTokenOnWallets(args);
285
+ }
286
+ });
287
+ }
288
+ function useRevokeTokenOnWallets(options = {}) {
289
+ const { client, resolutionError } = useMemoDisperseClient(options);
290
+ return reactQuery.useMutation({
291
+ mutationFn: async (args) => {
292
+ if (!client) {
293
+ throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useRevokeTokenOnWallets", "disperse");
294
+ }
295
+ return client.revokeTokenOnWallets(args);
296
+ }
297
+ });
298
+ }
299
+ function useRecoverFromWallets(options = {}) {
300
+ const { client, resolutionError } = useMemoDisperseClient(options);
301
+ return reactQuery.useMutation({
302
+ mutationFn: async (args) => {
303
+ if (!client) {
304
+ throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useRecoverFromWallets", "disperse");
305
+ }
306
+ return client.recoverFromWallets(args);
307
+ }
308
+ });
309
+ }
310
+ function useRecoverERC20FromWallets(options = {}) {
311
+ const { client, resolutionError } = useMemoDisperseClient(options);
312
+ return reactQuery.useMutation({
313
+ mutationFn: async (args) => {
314
+ if (!client) {
315
+ throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useRecoverERC20FromWallets", "disperse");
316
+ }
317
+ return client.recoverERC20FromWallets(args);
318
+ }
319
+ });
320
+ }
321
+ function useDisperse(options = {}) {
322
+ const { client, resolutionError } = useMemoDisperseClient(options);
323
+ return reactQuery.useMutation({
324
+ mutationFn: async (args) => {
325
+ if (!client) {
326
+ throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useDisperse", "disperse");
327
+ }
328
+ return client.disperse(args);
329
+ }
330
+ });
331
+ }
332
+ function useAccessEncryptedFeeReserve(options = {}) {
333
+ const { client, resolutionError } = useMemoDisperseClient(options);
334
+ return reactQuery.useMutation({
335
+ mutationFn: async (args) => {
336
+ if (!client) {
337
+ throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useAccessEncryptedFeeReserve", "disperse");
338
+ }
339
+ return client.getEncryptedFeeReserve(args);
340
+ }
341
+ });
342
+ }
343
+ var useGetEncryptedFeeReserve = useAccessEncryptedFeeReserve;
344
+ function useDiscloseHandleToParty(options = {}) {
345
+ const { client, resolutionError } = useMemoDisperseClient(options);
346
+ return reactQuery.useMutation({
347
+ mutationFn: async (args) => {
348
+ if (!client) {
349
+ throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useDiscloseHandleToParty", "disperse");
350
+ }
351
+ return client.discloseHandleToParty(args);
352
+ }
353
+ });
354
+ }
355
+ function useBatchDiscloseHandlesToParty(options = {}) {
356
+ const { client, resolutionError } = useMemoDisperseClient(options);
357
+ return reactQuery.useMutation({
358
+ mutationFn: async (args) => {
359
+ if (!client) {
360
+ throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useBatchDiscloseHandlesToParty", "disperse");
361
+ }
362
+ return client.batchDiscloseHandlesToParty(args);
363
+ }
364
+ });
365
+ }
366
+ function usePause(options = {}) {
367
+ const { client, resolutionError } = useMemoDisperseClient(options);
368
+ return reactQuery.useMutation({
369
+ mutationFn: async ({ account }) => {
370
+ if (!client) throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("usePause", "disperse");
371
+ return client.pause(account);
372
+ }
373
+ });
374
+ }
375
+ function useUnpause(options = {}) {
376
+ const { client, resolutionError } = useMemoDisperseClient(options);
377
+ return reactQuery.useMutation({
378
+ mutationFn: async ({ account }) => {
379
+ if (!client) throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useUnpause", "disperse");
380
+ return client.unpause(account);
381
+ }
382
+ });
383
+ }
384
+ function useSetFeeConfig(options = {}) {
385
+ const { client, resolutionError } = useMemoDisperseClient(options);
386
+ return reactQuery.useMutation({
387
+ mutationFn: async ({ config, account }) => {
388
+ if (!client) throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useSetFeeConfig", "disperse");
389
+ return client.setFeeConfig(config, account);
390
+ }
391
+ });
392
+ }
393
+ function useSetCustomFee(options = {}) {
394
+ const { client, resolutionError } = useMemoDisperseClient(options);
395
+ return reactQuery.useMutation({
396
+ mutationFn: async ({ user, gasFee, tokenFee, account }) => {
397
+ if (!client) throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useSetCustomFee", "disperse");
398
+ return client.setCustomFee(user, gasFee, tokenFee, account);
399
+ }
400
+ });
401
+ }
402
+ function useDisableCustomFee(options = {}) {
403
+ const { client, resolutionError } = useMemoDisperseClient(options);
404
+ return reactQuery.useMutation({
405
+ mutationFn: async ({ user, account }) => {
406
+ if (!client) {
407
+ throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useDisableCustomFee", "disperse");
408
+ }
409
+ return client.disableCustomFee(user, account);
410
+ }
411
+ });
412
+ }
413
+ function useSetMaxBatchSizeHolding(options = {}) {
414
+ const { client, resolutionError } = useMemoDisperseClient(options);
415
+ return reactQuery.useMutation({
416
+ mutationFn: async ({ size, account }) => {
417
+ if (!client) {
418
+ throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useSetMaxBatchSizeHolding", "disperse");
419
+ }
420
+ return client.setMaxBatchSizeHolding(size, account);
421
+ }
422
+ });
423
+ }
424
+ function useSetMaxBatchSizeDirect(options = {}) {
425
+ const { client, resolutionError } = useMemoDisperseClient(options);
426
+ return reactQuery.useMutation({
427
+ mutationFn: async ({ size, account }) => {
428
+ if (!client) {
429
+ throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useSetMaxBatchSizeDirect", "disperse");
430
+ }
431
+ return client.setMaxBatchSizeDirect(size, account);
432
+ }
433
+ });
434
+ }
435
+ function useSetMaxBatchSizeTokenFee(options = {}) {
436
+ const { client, resolutionError } = useMemoDisperseClient(options);
437
+ return reactQuery.useMutation({
438
+ mutationFn: async ({ size, account }) => {
439
+ if (!client) {
440
+ throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useSetMaxBatchSizeTokenFee", "disperse");
441
+ }
442
+ return client.setMaxBatchSizeTokenFee(size, account);
443
+ }
444
+ });
445
+ }
446
+ function useWithdrawGasFee(options = {}) {
447
+ const { client, resolutionError } = useMemoDisperseClient(options);
448
+ return reactQuery.useMutation({
449
+ mutationFn: async ({ to, amount, account }) => {
450
+ if (!client) throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useWithdrawGasFee", "disperse");
451
+ return client.withdrawGasFee(to, amount, account);
452
+ }
453
+ });
454
+ }
455
+ function useWithdrawTokenFee(options = {}) {
456
+ const { client, resolutionError } = useMemoDisperseClient(options);
457
+ return reactQuery.useMutation({
458
+ mutationFn: async (args) => {
459
+ if (!client) {
460
+ throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useWithdrawTokenFee", "disperse");
461
+ }
462
+ if (args.encryptedInput !== void 0) {
463
+ const { token: token2, to: to2, encryptedInput, account: account2 } = args;
464
+ return client.withdrawTokenFee({
465
+ token: token2,
466
+ to: to2,
467
+ encryptedInput,
468
+ ...account2 !== void 0 ? { account: account2 } : {}
469
+ });
470
+ }
471
+ const { token, to, amount, encryptor: encryptorSource, account } = args;
472
+ const eager = encryptorSource ? chunkHTOMTEA3_cjs.resolveEncryptor(encryptorSource) : void 0;
473
+ return client.withdrawTokenFee({
474
+ token,
475
+ to,
476
+ amount,
477
+ ...eager ? { encryptor: eager } : {},
478
+ ...account !== void 0 ? { account } : {}
479
+ });
480
+ }
481
+ });
482
+ }
483
+ function useRescueConfidentialTokens(options = {}) {
484
+ const { client, resolutionError } = useMemoDisperseClient(options);
485
+ return reactQuery.useMutation({
486
+ mutationFn: async ({ token, to, account }) => {
487
+ if (!client) {
488
+ throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useRescueConfidentialTokens", "disperse");
489
+ }
490
+ return client.rescueConfidentialTokens(token, to, account);
491
+ }
492
+ });
493
+ }
494
+ function useRescueERC20(options = {}) {
495
+ const { client, resolutionError } = useMemoDisperseClient(options);
496
+ return reactQuery.useMutation({
497
+ mutationFn: async ({ token, to, account }) => {
498
+ if (!client) throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useRescueERC20", "disperse");
499
+ return client.rescueERC20(token, to, account);
500
+ }
501
+ });
502
+ }
503
+ function useGrantRole(options = {}) {
504
+ const { client, resolutionError } = useMemoDisperseClient(options);
505
+ return reactQuery.useMutation({
506
+ mutationFn: async ({ role, accountTarget, account }) => {
507
+ if (!client) throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useGrantRole", "disperse");
508
+ return client.grantRole(role, accountTarget, account);
509
+ }
510
+ });
511
+ }
512
+ function useRevokeRole(options = {}) {
513
+ const { client, resolutionError } = useMemoDisperseClient(options);
514
+ return reactQuery.useMutation({
515
+ mutationFn: async ({ role, accountTarget, account }) => {
516
+ if (!client) throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useRevokeRole", "disperse");
517
+ return client.revokeRole(role, accountTarget, account);
518
+ }
519
+ });
520
+ }
521
+
522
+ Object.defineProperty(exports, "AlreadyRegisteredError", {
523
+ enumerable: true,
524
+ get: function () { return chunkHTOMTEA3_cjs.AlreadyRegisteredError; }
525
+ });
526
+ Object.defineProperty(exports, "DEFAULT_ADMIN_ROLE", {
527
+ enumerable: true,
528
+ get: function () { return chunkHTOMTEA3_cjs.DEFAULT_ADMIN_ROLE; }
529
+ });
530
+ Object.defineProperty(exports, "DisperseEncryptedReserveNotGrantedError", {
531
+ enumerable: true,
532
+ get: function () { return chunkHTOMTEA3_cjs.DisperseEncryptedReserveNotGrantedError; }
533
+ });
534
+ Object.defineProperty(exports, "DisperseSubwalletNotFoundError", {
535
+ enumerable: true,
536
+ get: function () { return chunkHTOMTEA3_cjs.DisperseSubwalletNotFoundError; }
537
+ });
538
+ Object.defineProperty(exports, "FEE_COLLECTOR_ROLE", {
539
+ enumerable: true,
540
+ get: function () { return chunkHTOMTEA3_cjs.FEE_COLLECTOR_ROLE; }
541
+ });
542
+ Object.defineProperty(exports, "FEE_MANAGER_ROLE", {
543
+ enumerable: true,
544
+ get: function () { return chunkHTOMTEA3_cjs.FEE_MANAGER_ROLE; }
545
+ });
546
+ Object.defineProperty(exports, "NotRegisteredError", {
547
+ enumerable: true,
548
+ get: function () { return chunkHTOMTEA3_cjs.NotRegisteredError; }
549
+ });
550
+ Object.defineProperty(exports, "PAUSER_ROLE", {
551
+ enumerable: true,
552
+ get: function () { return chunkHTOMTEA3_cjs.PAUSER_ROLE; }
553
+ });
554
+ Object.defineProperty(exports, "WITHDRAWER_ROLE", {
555
+ enumerable: true,
556
+ get: function () { return chunkHTOMTEA3_cjs.WITHDRAWER_ROLE; }
557
+ });
558
+ Object.defineProperty(exports, "computeSubtotals", {
559
+ enumerable: true,
560
+ get: function () { return chunkHTOMTEA3_cjs.computeSubtotals; }
561
+ });
562
+ Object.defineProperty(exports, "encryptUint64", {
563
+ enumerable: true,
564
+ get: function () { return chunkHTOMTEA3_cjs.encryptUint64; }
565
+ });
566
+ Object.defineProperty(exports, "encryptUint64Batch", {
567
+ enumerable: true,
568
+ get: function () { return chunkHTOMTEA3_cjs.encryptUint64Batch; }
569
+ });
570
+ Object.defineProperty(exports, "resolveEncryptor", {
571
+ enumerable: true,
572
+ get: function () { return chunkHTOMTEA3_cjs.resolveEncryptor; }
573
+ });
574
+ Object.defineProperty(exports, "AccessDeniedError", {
575
+ enumerable: true,
576
+ get: function () { return chunk56UI7LUR_cjs.AccessDeniedError; }
577
+ });
578
+ Object.defineProperty(exports, "AlreadyInitializedError", {
579
+ enumerable: true,
580
+ get: function () { return chunk56UI7LUR_cjs.AlreadyInitializedError; }
581
+ });
582
+ Object.defineProperty(exports, "BatchTooLargeError", {
583
+ enumerable: true,
584
+ get: function () { return chunk56UI7LUR_cjs.BatchTooLargeError; }
585
+ });
586
+ Object.defineProperty(exports, "ContractRevertError", {
587
+ enumerable: true,
588
+ get: function () { return chunk56UI7LUR_cjs.ContractRevertError; }
589
+ });
590
+ Object.defineProperty(exports, "DecryptionFailedError", {
591
+ enumerable: true,
592
+ get: function () { return chunk56UI7LUR_cjs.DecryptionFailedError; }
593
+ });
594
+ Object.defineProperty(exports, "DeploymentAddressUnavailableError", {
595
+ enumerable: true,
596
+ get: function () { return chunk56UI7LUR_cjs.DeploymentAddressUnavailableError; }
597
+ });
598
+ Object.defineProperty(exports, "EncryptionFailedError", {
599
+ enumerable: true,
600
+ get: function () { return chunk56UI7LUR_cjs.EncryptionFailedError; }
601
+ });
602
+ Object.defineProperty(exports, "FeatureDisabledError", {
603
+ enumerable: true,
604
+ get: function () { return chunk56UI7LUR_cjs.FeatureDisabledError; }
605
+ });
606
+ Object.defineProperty(exports, "FheHandleNotAllowedError", {
607
+ enumerable: true,
608
+ get: function () { return chunk56UI7LUR_cjs.FheHandleNotAllowedError; }
609
+ });
610
+ Object.defineProperty(exports, "InsufficientBalanceError", {
611
+ enumerable: true,
612
+ get: function () { return chunk56UI7LUR_cjs.InsufficientBalanceError; }
613
+ });
614
+ Object.defineProperty(exports, "InsufficientFeeError", {
615
+ enumerable: true,
616
+ get: function () { return chunk56UI7LUR_cjs.InsufficientFeeError; }
617
+ });
618
+ Object.defineProperty(exports, "InsufficientGasFundsError", {
619
+ enumerable: true,
620
+ get: function () { return chunk56UI7LUR_cjs.InsufficientGasFundsError; }
621
+ });
622
+ Object.defineProperty(exports, "InvalidArgumentError", {
623
+ enumerable: true,
624
+ get: function () { return chunk56UI7LUR_cjs.InvalidArgumentError; }
625
+ });
626
+ Object.defineProperty(exports, "InvalidSignatureError", {
627
+ enumerable: true,
628
+ get: function () { return chunk56UI7LUR_cjs.InvalidSignatureError; }
629
+ });
630
+ Object.defineProperty(exports, "MissingAccountError", {
631
+ enumerable: true,
632
+ get: function () { return chunk56UI7LUR_cjs.MissingAccountError; }
633
+ });
634
+ Object.defineProperty(exports, "MissingClientError", {
635
+ enumerable: true,
636
+ get: function () { return chunk56UI7LUR_cjs.MissingClientError; }
637
+ });
638
+ Object.defineProperty(exports, "MissingEncryptorError", {
639
+ enumerable: true,
640
+ get: function () { return chunk56UI7LUR_cjs.MissingEncryptorError; }
641
+ });
642
+ Object.defineProperty(exports, "MissingPublicClientError", {
643
+ enumerable: true,
644
+ get: function () { return chunk56UI7LUR_cjs.MissingPublicClientError; }
645
+ });
646
+ Object.defineProperty(exports, "MissingWalletClientError", {
647
+ enumerable: true,
648
+ get: function () { return chunk56UI7LUR_cjs.MissingWalletClientError; }
649
+ });
650
+ Object.defineProperty(exports, "NetworkError", {
651
+ enumerable: true,
652
+ get: function () { return chunk56UI7LUR_cjs.NetworkError; }
653
+ });
654
+ Object.defineProperty(exports, "PausedError", {
655
+ enumerable: true,
656
+ get: function () { return chunk56UI7LUR_cjs.PausedError; }
657
+ });
658
+ Object.defineProperty(exports, "ReceiptEventAmbiguousError", {
659
+ enumerable: true,
660
+ get: function () { return chunk56UI7LUR_cjs.ReceiptEventAmbiguousError; }
661
+ });
662
+ Object.defineProperty(exports, "ReceiptEventNotFoundError", {
663
+ enumerable: true,
664
+ get: function () { return chunk56UI7LUR_cjs.ReceiptEventNotFoundError; }
665
+ });
666
+ Object.defineProperty(exports, "ReentrancyError", {
667
+ enumerable: true,
668
+ get: function () { return chunk56UI7LUR_cjs.ReentrancyError; }
669
+ });
670
+ Object.defineProperty(exports, "RelayerUnreachableError", {
671
+ enumerable: true,
672
+ get: function () { return chunk56UI7LUR_cjs.RelayerUnreachableError; }
673
+ });
674
+ Object.defineProperty(exports, "SigningFailedError", {
675
+ enumerable: true,
676
+ get: function () { return chunk56UI7LUR_cjs.SigningFailedError; }
677
+ });
678
+ Object.defineProperty(exports, "TokenOpsSdkError", {
679
+ enumerable: true,
680
+ get: function () { return chunk56UI7LUR_cjs.TokenOpsSdkError; }
681
+ });
682
+ Object.defineProperty(exports, "TransferFailedError", {
683
+ enumerable: true,
684
+ get: function () { return chunk56UI7LUR_cjs.TransferFailedError; }
685
+ });
686
+ Object.defineProperty(exports, "UnknownWriteFailureError", {
687
+ enumerable: true,
688
+ get: function () { return chunk56UI7LUR_cjs.UnknownWriteFailureError; }
689
+ });
690
+ Object.defineProperty(exports, "UnsupportedChainError", {
691
+ enumerable: true,
692
+ get: function () { return chunk56UI7LUR_cjs.UnsupportedChainError; }
693
+ });
694
+ Object.defineProperty(exports, "UserDecryptNotAllowedError", {
695
+ enumerable: true,
696
+ get: function () { return chunk56UI7LUR_cjs.UserDecryptNotAllowedError; }
697
+ });
698
+ Object.defineProperty(exports, "UserRejectedSignatureError", {
699
+ enumerable: true,
700
+ get: function () { return chunk56UI7LUR_cjs.UserRejectedSignatureError; }
701
+ });
702
+ Object.defineProperty(exports, "WalletChainMismatchError", {
703
+ enumerable: true,
704
+ get: function () { return chunk56UI7LUR_cjs.WalletChainMismatchError; }
705
+ });
706
+ Object.defineProperty(exports, "WalletRejectedError", {
707
+ enumerable: true,
708
+ get: function () { return chunk56UI7LUR_cjs.WalletRejectedError; }
709
+ });
710
+ Object.defineProperty(exports, "isTokenOpsSdkError", {
711
+ enumerable: true,
712
+ get: function () { return chunk56UI7LUR_cjs.isTokenOpsSdkError; }
713
+ });
714
+ exports.FHE_DISPERSE_KEY = FHE_DISPERSE_KEY;
715
+ exports.FHE_DISPERSE_NAMESPACE = FHE_DISPERSE_NAMESPACE;
716
+ exports.useAccessEncryptedFeeReserve = useAccessEncryptedFeeReserve;
717
+ exports.useApproveTokenOnWallets = useApproveTokenOnWallets;
718
+ exports.useBatchDiscloseHandlesToParty = useBatchDiscloseHandlesToParty;
719
+ exports.useCalculateFee = useCalculateFee;
720
+ exports.useDeploymentBlockNumber = useDeploymentBlockNumber;
721
+ exports.useDisableCustomFee = useDisableCustomFee;
722
+ exports.useDiscloseHandleToParty = useDiscloseHandleToParty;
723
+ exports.useDisperse = useDisperse;
724
+ exports.useGetBatchLimits = useGetBatchLimits;
725
+ exports.useGetEncryptedFeeReserve = useGetEncryptedFeeReserve;
726
+ exports.useGetFeeConfig = useGetFeeConfig;
727
+ exports.useGetFees = useGetFees;
728
+ exports.useGetWallets = useGetWallets;
729
+ exports.useGrantRole = useGrantRole;
730
+ exports.useHasApprovedSubwallets = useHasApprovedSubwallets;
731
+ exports.useHasRole = useHasRole;
732
+ exports.useIsPaused = useIsPaused;
733
+ exports.useIsRegistered = useIsRegistered;
734
+ exports.usePause = usePause;
735
+ exports.usePredictWallets = usePredictWallets;
736
+ exports.usePreflightDisperse = usePreflightDisperse;
737
+ exports.useRecoverERC20FromWallets = useRecoverERC20FromWallets;
738
+ exports.useRecoverFromWallets = useRecoverFromWallets;
739
+ exports.useRegister = useRegister;
740
+ exports.useRescueConfidentialTokens = useRescueConfidentialTokens;
741
+ exports.useRescueERC20 = useRescueERC20;
742
+ exports.useRevokeRole = useRevokeRole;
743
+ exports.useRevokeTokenOnWallets = useRevokeTokenOnWallets;
744
+ exports.useSetCustomFee = useSetCustomFee;
745
+ exports.useSetFeeConfig = useSetFeeConfig;
746
+ exports.useSetMaxBatchSizeDirect = useSetMaxBatchSizeDirect;
747
+ exports.useSetMaxBatchSizeHolding = useSetMaxBatchSizeHolding;
748
+ exports.useSetMaxBatchSizeTokenFee = useSetMaxBatchSizeTokenFee;
749
+ exports.useUnpause = useUnpause;
750
+ exports.useWalletImplementation = useWalletImplementation;
751
+ exports.useWithdrawGasFee = useWithdrawGasFee;
752
+ exports.useWithdrawTokenFee = useWithdrawTokenFee;