@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,7 @@
1
1
  'use strict';
2
2
 
3
- var chunk2RNW4MIJ_cjs = require('./chunk-2RNW4MIJ.cjs');
3
+ var chunk66IHPTOK_cjs = require('./chunk-66IHPTOK.cjs');
4
+ var chunk67OV5CX2_cjs = require('./chunk-67OV5CX2.cjs');
4
5
  var viem = require('viem');
5
6
 
6
7
  // src/fhe/scale-ratio.ts
@@ -16,7 +17,7 @@ function scaleRatio({
16
17
  width = "uint128"
17
18
  }) {
18
19
  if (denominator <= 0n) {
19
- throw new chunk2RNW4MIJ_cjs.InvalidArgumentError({
20
+ throw new chunk67OV5CX2_cjs.InvalidArgumentError({
20
21
  method: "scaleRatio",
21
22
  argument: "denominator",
22
23
  reason: `must be > 0, got ${denominator}`,
@@ -24,7 +25,7 @@ function scaleRatio({
24
25
  });
25
26
  }
26
27
  if (numerator < 0n) {
27
- throw new chunk2RNW4MIJ_cjs.InvalidArgumentError({
28
+ throw new chunk67OV5CX2_cjs.InvalidArgumentError({
28
29
  method: "scaleRatio",
29
30
  argument: "numerator",
30
31
  reason: `must be >= 0, got ${numerator}`,
@@ -32,7 +33,7 @@ function scaleRatio({
32
33
  });
33
34
  }
34
35
  if (minDenominator <= 0n) {
35
- throw new chunk2RNW4MIJ_cjs.InvalidArgumentError({
36
+ throw new chunk67OV5CX2_cjs.InvalidArgumentError({
36
37
  method: "scaleRatio",
37
38
  argument: "minDenominator",
38
39
  reason: `must be > 0, got ${minDenominator}`,
@@ -52,7 +53,7 @@ function scaleRatio({
52
53
  function assertWithinWidth(value, width, label) {
53
54
  const max = width === "uint64" ? MAX_UINT64 : MAX_UINT128;
54
55
  if (value > max) {
55
- throw new chunk2RNW4MIJ_cjs.InvalidArgumentError({
56
+ throw new chunk67OV5CX2_cjs.InvalidArgumentError({
56
57
  method: "scaleRatio",
57
58
  argument: label,
58
59
  reason: `exceeds ${width} range`,
@@ -79,7 +80,7 @@ var share = {
79
80
  const n = toIntegerBigInt(numerator, "share.fraction", "numerator");
80
81
  const m = toIntegerBigInt(denominator, "share.fraction", "denominator");
81
82
  if (m <= 0n || m > MAX_FRACTION_DENOMINATOR) {
82
- throw new chunk2RNW4MIJ_cjs.InvalidArgumentError({
83
+ throw new chunk67OV5CX2_cjs.InvalidArgumentError({
83
84
  method: "share.fraction",
84
85
  argument: "denominator",
85
86
  reason: `must be in 1..${MAX_FRACTION_DENOMINATOR}, got ${m}`,
@@ -87,7 +88,7 @@ var share = {
87
88
  });
88
89
  }
89
90
  if (n < 0n || n > m) {
90
- throw new chunk2RNW4MIJ_cjs.InvalidArgumentError({
91
+ throw new chunk67OV5CX2_cjs.InvalidArgumentError({
91
92
  method: "share.fraction",
92
93
  argument: "numerator",
93
94
  reason: `must be in 0..${m} (denominator), got ${n}`,
@@ -112,7 +113,7 @@ var share = {
112
113
  basisPoints(bps) {
113
114
  const value = toIntegerBigInt(bps, "share.basisPoints", "bps");
114
115
  if (value < 0n || value > BASIS_POINT_SCALE) {
115
- throw new chunk2RNW4MIJ_cjs.InvalidArgumentError({
116
+ throw new chunk67OV5CX2_cjs.InvalidArgumentError({
116
117
  method: "share.basisPoints",
117
118
  argument: "bps",
118
119
  reason: `must be in 0..${BASIS_POINT_SCALE}, got ${value}`,
@@ -125,7 +126,7 @@ var share = {
125
126
  function toIntegerBigInt(value, method, argument) {
126
127
  if (typeof value === "bigint") return value;
127
128
  if (!Number.isInteger(value)) {
128
- throw new chunk2RNW4MIJ_cjs.InvalidArgumentError({
129
+ throw new chunk67OV5CX2_cjs.InvalidArgumentError({
129
130
  method,
130
131
  argument,
131
132
  reason: `must be an integer, got ${value}`,
@@ -141,7 +142,7 @@ function resolveEncryptor(source) {
141
142
  var MAX_UINT642 = (1n << 64n) - 1n;
142
143
  function assertUint64(value, label) {
143
144
  if (value < 0n || value > MAX_UINT642) {
144
- throw new chunk2RNW4MIJ_cjs.InvalidArgumentError({
145
+ throw new chunk67OV5CX2_cjs.InvalidArgumentError({
145
146
  method: "encryptUint64",
146
147
  argument: label,
147
148
  reason: `does not fit in uint64 (0..2^64-1)`,
@@ -162,7 +163,7 @@ async function encryptUint64({
162
163
  userAddress
163
164
  });
164
165
  if (handles.length !== 1) {
165
- throw new chunk2RNW4MIJ_cjs.InvalidArgumentError({
166
+ throw new chunk67OV5CX2_cjs.InvalidArgumentError({
166
167
  method: "encryptUint64",
167
168
  argument: "handles",
168
169
  reason: `expected 1 handle, got ${handles.length}`,
@@ -170,8 +171,8 @@ async function encryptUint64({
170
171
  });
171
172
  }
172
173
  return {
173
- handle: chunk2RNW4MIJ_cjs.asEncryptedHandle(viem.bytesToHex(handles[0])),
174
- inputProof: chunk2RNW4MIJ_cjs.asExternalInputProof(viem.bytesToHex(inputProof))
174
+ handle: chunk66IHPTOK_cjs.asEncryptedHandle(viem.bytesToHex(handles[0])),
175
+ inputProof: chunk66IHPTOK_cjs.asExternalInputProof(viem.bytesToHex(inputProof))
175
176
  };
176
177
  }
177
178
  async function encryptUint64Batch({
@@ -181,7 +182,7 @@ async function encryptUint64Batch({
181
182
  values
182
183
  }) {
183
184
  if (values.length === 0) {
184
- throw new chunk2RNW4MIJ_cjs.InvalidArgumentError({
185
+ throw new chunk67OV5CX2_cjs.InvalidArgumentError({
185
186
  method: "encryptUint64Batch",
186
187
  argument: "values",
187
188
  reason: "must be non-empty"
@@ -194,7 +195,7 @@ async function encryptUint64Batch({
194
195
  userAddress
195
196
  });
196
197
  if (handles.length !== values.length) {
197
- throw new chunk2RNW4MIJ_cjs.InvalidArgumentError({
198
+ throw new chunk67OV5CX2_cjs.InvalidArgumentError({
198
199
  method: "encryptUint64Batch",
199
200
  argument: "handles",
200
201
  reason: `expected ${values.length} handles, got ${handles.length}`,
@@ -202,8 +203,8 @@ async function encryptUint64Batch({
202
203
  });
203
204
  }
204
205
  return {
205
- handles: handles.map((h) => chunk2RNW4MIJ_cjs.asEncryptedHandle(viem.bytesToHex(h))),
206
- inputProof: chunk2RNW4MIJ_cjs.asExternalInputProof(viem.bytesToHex(inputProof))
206
+ handles: handles.map((h) => chunk66IHPTOK_cjs.asEncryptedHandle(viem.bytesToHex(h))),
207
+ inputProof: chunk66IHPTOK_cjs.asExternalInputProof(viem.bytesToHex(inputProof))
207
208
  };
208
209
  }
209
210
 
@@ -1,11 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var chunkUJS4N2XM_cjs = require('./chunk-UJS4N2XM.cjs');
4
- var chunkSYHNZSZZ_cjs = require('./chunk-SYHNZSZZ.cjs');
5
- var chunk43RFBQ73_cjs = require('./chunk-43RFBQ73.cjs');
6
- var chunkWUXUWTFW_cjs = require('./chunk-WUXUWTFW.cjs');
7
- var chunkVR3FREBX_cjs = require('./chunk-VR3FREBX.cjs');
8
- var chunk2RNW4MIJ_cjs = require('./chunk-2RNW4MIJ.cjs');
3
+ var chunkTEBM66WA_cjs = require('./chunk-TEBM66WA.cjs');
4
+ var chunkFAXIIH5R_cjs = require('./chunk-FAXIIH5R.cjs');
5
+ var chunkUG5RKLU2_cjs = require('./chunk-UG5RKLU2.cjs');
6
+ var chunkMVDQMV25_cjs = require('./chunk-MVDQMV25.cjs');
7
+ var chunkFT5H2Q7Y_cjs = require('./chunk-FT5H2Q7Y.cjs');
8
+ var chunkJK4XMMKM_cjs = require('./chunk-JK4XMMKM.cjs');
9
+ var chunk66IHPTOK_cjs = require('./chunk-66IHPTOK.cjs');
10
+ var chunk67OV5CX2_cjs = require('./chunk-67OV5CX2.cjs');
9
11
  var chunkVJKZWYYJ_cjs = require('./chunk-VJKZWYYJ.cjs');
10
12
  var viem = require('viem');
11
13
 
@@ -1688,7 +1690,7 @@ function resolveEncryptor(source) {
1688
1690
  var MAX_UINT64 = (1n << 64n) - 1n;
1689
1691
  function assertUint64(value, label) {
1690
1692
  if (value < 0n || value > MAX_UINT64) {
1691
- throw new chunk2RNW4MIJ_cjs.InvalidArgumentError({
1693
+ throw new chunk67OV5CX2_cjs.InvalidArgumentError({
1692
1694
  method: "encryptUint64",
1693
1695
  argument: label,
1694
1696
  reason: "exceeds uint64 range (0..2^64-1)",
@@ -1709,7 +1711,7 @@ async function encryptUint64({
1709
1711
  userAddress
1710
1712
  });
1711
1713
  if (handles.length !== 1) {
1712
- throw new chunk2RNW4MIJ_cjs.InvalidArgumentError({
1714
+ throw new chunk67OV5CX2_cjs.InvalidArgumentError({
1713
1715
  method: "encryptUint64",
1714
1716
  argument: "handles",
1715
1717
  reason: `expected 1 handle, got ${handles.length}`,
@@ -1717,8 +1719,8 @@ async function encryptUint64({
1717
1719
  });
1718
1720
  }
1719
1721
  return {
1720
- handle: chunk2RNW4MIJ_cjs.asEncryptedHandle(viem.bytesToHex(handles[0])),
1721
- inputProof: chunk2RNW4MIJ_cjs.asExternalInputProof(viem.bytesToHex(inputProof))
1722
+ handle: chunk66IHPTOK_cjs.asEncryptedHandle(viem.bytesToHex(handles[0])),
1723
+ inputProof: chunk66IHPTOK_cjs.asExternalInputProof(viem.bytesToHex(inputProof))
1722
1724
  };
1723
1725
  }
1724
1726
  async function encryptUint64Batch({
@@ -1728,7 +1730,7 @@ async function encryptUint64Batch({
1728
1730
  values
1729
1731
  }) {
1730
1732
  if (values.length === 0) {
1731
- throw new chunk2RNW4MIJ_cjs.InvalidArgumentError({
1733
+ throw new chunk67OV5CX2_cjs.InvalidArgumentError({
1732
1734
  method: "encryptUint64Batch",
1733
1735
  argument: "values",
1734
1736
  reason: "must be non-empty"
@@ -1741,7 +1743,7 @@ async function encryptUint64Batch({
1741
1743
  userAddress
1742
1744
  });
1743
1745
  if (handles.length !== values.length) {
1744
- throw new chunk2RNW4MIJ_cjs.InvalidArgumentError({
1746
+ throw new chunk67OV5CX2_cjs.InvalidArgumentError({
1745
1747
  method: "encryptUint64Batch",
1746
1748
  argument: "handles",
1747
1749
  reason: `expected ${values.length} handles, got ${handles.length}`,
@@ -1749,13 +1751,13 @@ async function encryptUint64Batch({
1749
1751
  });
1750
1752
  }
1751
1753
  return {
1752
- handles: handles.map((h) => chunk2RNW4MIJ_cjs.asEncryptedHandle(viem.bytesToHex(h))),
1753
- inputProof: chunk2RNW4MIJ_cjs.asExternalInputProof(viem.bytesToHex(inputProof))
1754
+ handles: handles.map((h) => chunk66IHPTOK_cjs.asEncryptedHandle(viem.bytesToHex(h))),
1755
+ inputProof: chunk66IHPTOK_cjs.asExternalInputProof(viem.bytesToHex(inputProof))
1754
1756
  };
1755
1757
  }
1756
1758
 
1757
1759
  // src/fhe-disperse/errors.ts
1758
- var NotRegisteredError = class extends chunk2RNW4MIJ_cjs.TokenOpsSdkError {
1760
+ var NotRegisteredError = class extends chunk67OV5CX2_cjs.TokenOpsSdkError {
1759
1761
  name = "NotRegisteredError";
1760
1762
  constructor(args) {
1761
1763
  super(
@@ -1772,7 +1774,7 @@ var NotRegisteredError = class extends chunk2RNW4MIJ_cjs.TokenOpsSdkError {
1772
1774
  );
1773
1775
  }
1774
1776
  };
1775
- var SubwalletsNotApprovedError = class extends chunk2RNW4MIJ_cjs.TokenOpsSdkError {
1777
+ var SubwalletsNotApprovedError = class extends chunk67OV5CX2_cjs.TokenOpsSdkError {
1776
1778
  name = "SubwalletsNotApprovedError";
1777
1779
  constructor(args) {
1778
1780
  super(
@@ -1792,7 +1794,7 @@ var SubwalletsNotApprovedError = class extends chunk2RNW4MIJ_cjs.TokenOpsSdkErro
1792
1794
  );
1793
1795
  }
1794
1796
  };
1795
- var SingletonNotApprovedError = class extends chunk2RNW4MIJ_cjs.TokenOpsSdkError {
1797
+ var SingletonNotApprovedError = class extends chunk67OV5CX2_cjs.TokenOpsSdkError {
1796
1798
  name = "SingletonNotApprovedError";
1797
1799
  constructor(args) {
1798
1800
  super(
@@ -1810,7 +1812,7 @@ var SingletonNotApprovedError = class extends chunk2RNW4MIJ_cjs.TokenOpsSdkError
1810
1812
  );
1811
1813
  }
1812
1814
  };
1813
- var AlreadyRegisteredError = class extends chunk2RNW4MIJ_cjs.TokenOpsSdkError {
1815
+ var AlreadyRegisteredError = class extends chunk67OV5CX2_cjs.TokenOpsSdkError {
1814
1816
  name = "AlreadyRegisteredError";
1815
1817
  constructor(args) {
1816
1818
  super(
@@ -1847,7 +1849,7 @@ function validateDisperseInputs(args) {
1847
1849
  const errors = [];
1848
1850
  if (recipients.length === 0) {
1849
1851
  errors.push(
1850
- new chunk2RNW4MIJ_cjs.InvalidArgumentError({
1852
+ new chunk67OV5CX2_cjs.InvalidArgumentError({
1851
1853
  method,
1852
1854
  argument: "recipients",
1853
1855
  reason: "must be non-empty"
@@ -1856,7 +1858,7 @@ function validateDisperseInputs(args) {
1856
1858
  }
1857
1859
  if (amounts.length !== recipients.length) {
1858
1860
  errors.push(
1859
- new chunk2RNW4MIJ_cjs.InvalidArgumentError({
1861
+ new chunk67OV5CX2_cjs.InvalidArgumentError({
1860
1862
  method,
1861
1863
  argument: "amounts",
1862
1864
  reason: `length mismatch: recipients.length (${recipients.length}) !== amounts.length (${amounts.length})`
@@ -1866,7 +1868,7 @@ function validateDisperseInputs(args) {
1866
1868
  recipients.forEach((r, i) => {
1867
1869
  if (!viem.isAddress(r, { strict: true })) {
1868
1870
  errors.push(
1869
- new chunk2RNW4MIJ_cjs.InvalidArgumentError({
1871
+ new chunk67OV5CX2_cjs.InvalidArgumentError({
1870
1872
  method,
1871
1873
  argument: `recipients[${i}]`,
1872
1874
  reason: "must be a valid EIP-55 checksummed address",
@@ -1877,7 +1879,7 @@ function validateDisperseInputs(args) {
1877
1879
  }
1878
1880
  if (r === ZERO_ADDRESS) {
1879
1881
  errors.push(
1880
- new chunk2RNW4MIJ_cjs.InvalidArgumentError({
1882
+ new chunk67OV5CX2_cjs.InvalidArgumentError({
1881
1883
  method,
1882
1884
  argument: `recipients[${i}]`,
1883
1885
  reason: "zero address",
@@ -1889,7 +1891,7 @@ function validateDisperseInputs(args) {
1889
1891
  amounts.forEach((v, i) => {
1890
1892
  if (v < 0n || v > MAX_UINT642) {
1891
1893
  errors.push(
1892
- new chunk2RNW4MIJ_cjs.InvalidArgumentError({
1894
+ new chunk67OV5CX2_cjs.InvalidArgumentError({
1893
1895
  method,
1894
1896
  argument: `amounts[${i}]`,
1895
1897
  reason: "exceeds uint64 range (0..2^64-1)"
@@ -1903,7 +1905,7 @@ function validateDisperseInputs(args) {
1903
1905
  const { group0, group1 } = computeSubtotals([...amounts]);
1904
1906
  if (group0 > MAX_UINT642) {
1905
1907
  errors.push(
1906
- new chunk2RNW4MIJ_cjs.InvalidArgumentError({
1908
+ new chunk67OV5CX2_cjs.InvalidArgumentError({
1907
1909
  method,
1908
1910
  argument: "amounts",
1909
1911
  reason: "wallet-mode subtotal exceeds uint64 range"
@@ -1912,7 +1914,7 @@ function validateDisperseInputs(args) {
1912
1914
  }
1913
1915
  if (group1 > MAX_UINT642) {
1914
1916
  errors.push(
1915
- new chunk2RNW4MIJ_cjs.InvalidArgumentError({
1917
+ new chunk67OV5CX2_cjs.InvalidArgumentError({
1916
1918
  method,
1917
1919
  argument: "amounts",
1918
1920
  reason: "wallet-mode subtotal exceeds uint64 range"
@@ -1921,7 +1923,7 @@ function validateDisperseInputs(args) {
1921
1923
  }
1922
1924
  if (group0 <= MAX_UINT642 && group1 <= MAX_UINT642 && group0 + group1 > MAX_UINT642) {
1923
1925
  errors.push(
1924
- new chunk2RNW4MIJ_cjs.InvalidArgumentError({
1926
+ new chunk67OV5CX2_cjs.InvalidArgumentError({
1925
1927
  method,
1926
1928
  argument: "amounts",
1927
1929
  reason: "wallet-mode subtotals sum exceeds uint64 range (would silently zero on-chain)"
@@ -1931,7 +1933,7 @@ function validateDisperseInputs(args) {
1931
1933
  }
1932
1934
  if (batchLimit > 0n && BigInt(recipients.length) > batchLimit) {
1933
1935
  errors.push(
1934
- new chunk2RNW4MIJ_cjs.BatchTooLargeError({
1936
+ new chunk67OV5CX2_cjs.BatchTooLargeError({
1935
1937
  method,
1936
1938
  contractAddress,
1937
1939
  requested: recipients.length,
@@ -1944,7 +1946,7 @@ function validateDisperseInputs(args) {
1944
1946
  function assertChecksumAddress(value, argument, method) {
1945
1947
  if (value === void 0) return;
1946
1948
  if (!viem.isAddress(value, { strict: true })) {
1947
- throw new chunk2RNW4MIJ_cjs.InvalidArgumentError({
1949
+ throw new chunk67OV5CX2_cjs.InvalidArgumentError({
1948
1950
  method,
1949
1951
  argument,
1950
1952
  reason: "must be a valid EIP-55 checksummed address \u2014 use viem's getAddress(addr) to fix the checksum",
@@ -1956,7 +1958,7 @@ function assertNonZeroChecksumAddress(value, argument, method) {
1956
1958
  if (value === void 0) return;
1957
1959
  assertChecksumAddress(value, argument, method);
1958
1960
  if (value === ZERO_ADDRESS) {
1959
- throw new chunk2RNW4MIJ_cjs.InvalidArgumentError({
1961
+ throw new chunk67OV5CX2_cjs.InvalidArgumentError({
1960
1962
  method,
1961
1963
  argument,
1962
1964
  reason: "must not be the zero address",
@@ -1971,7 +1973,7 @@ function batchLimitForMode(mode, limits) {
1971
1973
  }
1972
1974
 
1973
1975
  // src/fhe-disperse/types.ts
1974
- var DisperseSubwalletNotFoundError = class extends chunk2RNW4MIJ_cjs.TokenOpsSdkError {
1976
+ var DisperseSubwalletNotFoundError = class extends chunk67OV5CX2_cjs.TokenOpsSdkError {
1975
1977
  name = "DisperseSubwalletNotFoundError";
1976
1978
  constructor(txHash, singletonAddress) {
1977
1979
  super(
@@ -1983,7 +1985,7 @@ var DisperseSubwalletNotFoundError = class extends chunk2RNW4MIJ_cjs.TokenOpsSdk
1983
1985
  );
1984
1986
  }
1985
1987
  };
1986
- var DisperseEncryptedReserveNotGrantedError = class extends chunk2RNW4MIJ_cjs.TokenOpsSdkError {
1988
+ var DisperseEncryptedReserveNotGrantedError = class extends chunk67OV5CX2_cjs.TokenOpsSdkError {
1987
1989
  name = "DisperseEncryptedReserveNotGrantedError";
1988
1990
  constructor(txHash, callerAddress) {
1989
1991
  super(
@@ -2005,7 +2007,7 @@ var disperseProductMapper = (name, _args, ctx) => {
2005
2007
  case "UserNotRegistered":
2006
2008
  return new NotRegisteredError({ ...ctx, user });
2007
2009
  case "ContractNotAllowed":
2008
- return new chunk2RNW4MIJ_cjs.InvalidArgumentError({
2010
+ return new chunk67OV5CX2_cjs.InvalidArgumentError({
2009
2011
  method: ctx.method,
2010
2012
  argument: "handle",
2011
2013
  reason: "the handle's origin contract did not grant this singleton persistent ACL on the handle. ERC-7984 `transferred` handles are scoped to the token contract \u2014 disclose them through the token, not through `DisperseConfidential`."
@@ -2049,10 +2051,10 @@ var ConfidentialDisperseClient = class {
2049
2051
  this.encryptor = config.encryptor;
2050
2052
  this.#telemetry = config.telemetry;
2051
2053
  const chainId = config.chainId ?? config.publicClient.chain?.id;
2052
- const addressOverride = config.address ? chunkVR3FREBX_cjs.normaliseAddress(config.address) : void 0;
2053
- const resolved = addressOverride ?? (chainId === void 0 ? void 0 : chunkWUXUWTFW_cjs.getFheDisperseSingletonAddress(chainId));
2054
+ const addressOverride = config.address ? chunkJK4XMMKM_cjs.normaliseAddress(config.address) : void 0;
2055
+ const resolved = addressOverride ?? (chainId === void 0 ? void 0 : chunkFT5H2Q7Y_cjs.getFheDisperseSingletonAddress(chainId));
2054
2056
  if (!resolved) {
2055
- throw new chunk2RNW4MIJ_cjs.DeploymentAddressUnavailableError({
2057
+ throw new chunk67OV5CX2_cjs.DeploymentAddressUnavailableError({
2056
2058
  reason: chainId === void 0 ? "chain-id-missing" : "registry-not-deployed",
2057
2059
  product: "fheDisperse",
2058
2060
  contract: "disperseConfidentialSingleton",
@@ -2066,8 +2068,8 @@ var ConfidentialDisperseClient = class {
2066
2068
  surface: "singleton",
2067
2069
  chainId: chainId ?? null,
2068
2070
  hasWallet: !!this.walletClient,
2069
- aclResolved: !!config.aclAddress || chainId !== void 0 && !!chunkSYHNZSZZ_cjs.getFhevmAclAddress(chainId),
2070
- sdkVersion: chunk43RFBQ73_cjs.SDK_VERSION
2071
+ aclResolved: !!config.aclAddress || chainId !== void 0 && !!chunkFAXIIH5R_cjs.getFhevmAclAddress(chainId),
2072
+ sdkVersion: chunkUG5RKLU2_cjs.SDK_VERSION
2071
2073
  });
2072
2074
  }
2073
2075
  /**
@@ -2078,7 +2080,7 @@ var ConfidentialDisperseClient = class {
2078
2080
  */
2079
2081
  get aclAddress() {
2080
2082
  if (this.#cachedAclAddress) return this.#cachedAclAddress;
2081
- this.#cachedAclAddress = this.#aclAddressOverride ?? chunkSYHNZSZZ_cjs.requireFhevmAclAddress(this.publicClient.chain?.id, "ConfidentialDisperseClient");
2083
+ this.#cachedAclAddress = this.#aclAddressOverride ?? chunkFAXIIH5R_cjs.requireFhevmAclAddress(this.publicClient.chain?.id, "ConfidentialDisperseClient");
2082
2084
  return this.#cachedAclAddress;
2083
2085
  }
2084
2086
  // ============================================================
@@ -2218,7 +2220,7 @@ var ConfidentialDisperseClient = class {
2218
2220
  const fees = await this.getFees(args.user);
2219
2221
  if (args.mode === "wallet-token-fee") {
2220
2222
  if (args.totalTokens === void 0) {
2221
- throw new chunk2RNW4MIJ_cjs.InvalidArgumentError({
2223
+ throw new chunk67OV5CX2_cjs.InvalidArgumentError({
2222
2224
  method: "calculateFee",
2223
2225
  argument: "totalTokens",
2224
2226
  reason: "is required for wallet-token-fee mode"
@@ -2404,12 +2406,12 @@ var ConfidentialDisperseClient = class {
2404
2406
  if (isPaused) {
2405
2407
  blockers.push("Singleton is paused");
2406
2408
  blockerErrors.push(
2407
- new chunk2RNW4MIJ_cjs.PausedError({ method: "preflightDisperse", contractAddress: this.address })
2409
+ new chunk67OV5CX2_cjs.PausedError({ method: "preflightDisperse", contractAddress: this.address })
2408
2410
  );
2409
2411
  }
2410
2412
  if (callerBalance < fee.ethValue) {
2411
2413
  blockerErrors.push(
2412
- new chunk2RNW4MIJ_cjs.InsufficientFeeError({
2414
+ new chunk67OV5CX2_cjs.InsufficientFeeError({
2413
2415
  method: "preflightDisperse",
2414
2416
  contractAddress: this.address,
2415
2417
  feeKind: "gas",
@@ -2566,7 +2568,7 @@ var ConfidentialDisperseClient = class {
2566
2568
  const account = this.#resolveAccount(wallet, args.account, "disperse");
2567
2569
  const enc = resolveEncryptor(this.encryptor);
2568
2570
  if (!enc) {
2569
- throw new chunk2RNW4MIJ_cjs.MissingEncryptorError("disperse", {
2571
+ throw new chunk67OV5CX2_cjs.MissingEncryptorError("disperse", {
2570
2572
  hint: "Pass `encryptor` to the call or the client config."
2571
2573
  });
2572
2574
  }
@@ -2661,7 +2663,7 @@ var ConfidentialDisperseClient = class {
2661
2663
  const aclLogs = receipt.logs.filter(
2662
2664
  (log) => log.address.toLowerCase() === this.aclAddress.toLowerCase()
2663
2665
  );
2664
- const events = viem.parseEventLogs({ abi: [chunkSYHNZSZZ_cjs.ACL_ALLOWED_EVENT], logs: aclLogs });
2666
+ const events = viem.parseEventLogs({ abi: [chunkFAXIIH5R_cjs.ACL_ALLOWED_EVENT], logs: aclLogs });
2665
2667
  const granted = events.filter(
2666
2668
  (ev) => ev.args.account.toLowerCase() === callerAddress && ev.args.caller.toLowerCase() === this.address.toLowerCase()
2667
2669
  );
@@ -2669,7 +2671,7 @@ var ConfidentialDisperseClient = class {
2669
2671
  throw new DisperseEncryptedReserveNotGrantedError(hash, accountAddress(account));
2670
2672
  }
2671
2673
  if (granted.length > 1) {
2672
- throw new chunk2RNW4MIJ_cjs.ReceiptEventAmbiguousError({
2674
+ throw new chunk67OV5CX2_cjs.ReceiptEventAmbiguousError({
2673
2675
  method: "getEncryptedFeeReserve",
2674
2676
  eventName: "Allowed",
2675
2677
  contractAddress: this.aclAddress,
@@ -3021,7 +3023,7 @@ var ConfidentialDisperseClient = class {
3021
3023
  values: amounts
3022
3024
  });
3023
3025
  } catch (err) {
3024
- throw chunkUJS4N2XM_cjs.mapZamaError(err, { method: "disperse[direct]", operation: "encrypt" });
3026
+ throw chunkTEBM66WA_cjs.mapZamaError(err, { method: "disperse[direct]", operation: "encrypt" });
3025
3027
  }
3026
3028
  let ethValue = gasFeeOverride;
3027
3029
  if (ethValue === void 0) {
@@ -3067,7 +3069,7 @@ var ConfidentialDisperseClient = class {
3067
3069
  values: allValues
3068
3070
  });
3069
3071
  } catch (err) {
3070
- throw chunkUJS4N2XM_cjs.mapZamaError(err, { method: `disperse[${mode}]`, operation: "encrypt" });
3072
+ throw chunkTEBM66WA_cjs.mapZamaError(err, { method: `disperse[${mode}]`, operation: "encrypt" });
3071
3073
  }
3072
3074
  const amountHandles = encrypted.handles.slice(0, count);
3073
3075
  const subtotal0Handle = encrypted.handles[count];
@@ -3194,14 +3196,14 @@ var ConfidentialDisperseClient = class {
3194
3196
  const hasAmount = amount !== void 0;
3195
3197
  const hasInput = preEncrypted !== void 0;
3196
3198
  if (hasAmount && hasInput) {
3197
- throw new chunk2RNW4MIJ_cjs.InvalidArgumentError({
3199
+ throw new chunk67OV5CX2_cjs.InvalidArgumentError({
3198
3200
  method,
3199
3201
  argument: "amount/encryptedInput",
3200
3202
  reason: "exactly one of `amount` (plaintext, SDK encrypts) or `encryptedInput` (pre-encrypted) must be supplied \u2014 got both"
3201
3203
  });
3202
3204
  }
3203
3205
  if (!hasAmount && !hasInput) {
3204
- throw new chunk2RNW4MIJ_cjs.InvalidArgumentError({
3206
+ throw new chunk67OV5CX2_cjs.InvalidArgumentError({
3205
3207
  method,
3206
3208
  argument: "amount/encryptedInput",
3207
3209
  reason: "exactly one of `amount` (plaintext, SDK encrypts) or `encryptedInput` (pre-encrypted) must be supplied \u2014 got neither"
@@ -3210,7 +3212,7 @@ var ConfidentialDisperseClient = class {
3210
3212
  if (hasInput) return preEncrypted;
3211
3213
  const enc = encryptor ?? resolveEncryptor(this.encryptor);
3212
3214
  if (!enc) {
3213
- throw new chunk2RNW4MIJ_cjs.MissingEncryptorError("encryptSingle", {
3215
+ throw new chunk67OV5CX2_cjs.MissingEncryptorError("encryptSingle", {
3214
3216
  hint: "Pass `encryptor` to the call or the client config (eager or lazy factory)."
3215
3217
  });
3216
3218
  }
@@ -3222,19 +3224,19 @@ var ConfidentialDisperseClient = class {
3222
3224
  value: amount
3223
3225
  });
3224
3226
  } catch (err) {
3225
- throw chunkUJS4N2XM_cjs.mapZamaError(err, { method: "encryptSingle", operation: "encrypt" });
3227
+ throw chunkTEBM66WA_cjs.mapZamaError(err, { method: "encryptSingle", operation: "encrypt" });
3226
3228
  }
3227
3229
  }
3228
3230
  #requireWallet(method) {
3229
3231
  if (!this.walletClient) {
3230
- throw new chunk2RNW4MIJ_cjs.MissingWalletClientError(method);
3232
+ throw new chunk67OV5CX2_cjs.MissingWalletClientError(method);
3231
3233
  }
3232
3234
  return this.walletClient;
3233
3235
  }
3234
3236
  #resolveAccount(wallet, override, method) {
3235
3237
  const acct = override ?? wallet.account;
3236
3238
  if (!acct) {
3237
- throw new chunk2RNW4MIJ_cjs.MissingAccountError(method);
3239
+ throw new chunk67OV5CX2_cjs.MissingAccountError(method);
3238
3240
  }
3239
3241
  return acct;
3240
3242
  }
@@ -3287,13 +3289,13 @@ var ConfidentialDisperseClient = class {
3287
3289
  ...value !== void 0 ? { value } : {}
3288
3290
  });
3289
3291
  } catch (err) {
3290
- if (chunk43RFBQ73_cjs.isContractRevert(err)) {
3292
+ if (chunkMVDQMV25_cjs.isContractRevert(err)) {
3291
3293
  throw this.#mapRevert(method, err, productContext, accountAddress(account));
3292
3294
  }
3293
3295
  }
3294
3296
  }
3295
3297
  #mapRevert(method, err, productContext, account) {
3296
- return chunk43RFBQ73_cjs.mapContractRevert(err, {
3298
+ return chunkMVDQMV25_cjs.mapContractRevert(err, {
3297
3299
  method,
3298
3300
  contractAddress: this.address,
3299
3301
  abi: disperseConfidentialAbi,
@@ -1,9 +1,11 @@
1
- import { mapZamaError } from './chunk-NFW7AUEX.js';
2
- import { getFhevmAclAddress, requireFhevmAclAddress, ACL_ALLOWED_EVENT } from './chunk-YPYCWLYP.js';
3
- import { SDK_VERSION, isContractRevert, mapContractRevert } from './chunk-6WSNS3UV.js';
4
- import { getFheDisperseSingletonAddress } from './chunk-QKKBBH7I.js';
5
- import { normaliseAddress } from './chunk-46T67CE2.js';
6
- import { InvalidArgumentError, asExternalInputProof, asEncryptedHandle, TokenOpsSdkError, DeploymentAddressUnavailableError, PausedError, InsufficientFeeError, MissingEncryptorError, ReceiptEventAmbiguousError, MissingWalletClientError, MissingAccountError, BatchTooLargeError } from './chunk-DRSPMIZ7.js';
1
+ import { mapZamaError } from './chunk-WMACINXO.js';
2
+ import { getFhevmAclAddress, requireFhevmAclAddress, ACL_ALLOWED_EVENT } from './chunk-ZWXJTBZO.js';
3
+ import { SDK_VERSION } from './chunk-NWFMBLSQ.js';
4
+ import { isContractRevert, mapContractRevert } from './chunk-4RAAATVY.js';
5
+ import { getFheDisperseSingletonAddress } from './chunk-A4DCEE33.js';
6
+ import { normaliseAddress } from './chunk-ZA673I3O.js';
7
+ import { asExternalInputProof, asEncryptedHandle } from './chunk-KWFFIJYX.js';
8
+ import { InvalidArgumentError, TokenOpsSdkError, DeploymentAddressUnavailableError, PausedError, InsufficientFeeError, MissingEncryptorError, ReceiptEventAmbiguousError, MissingWalletClientError, MissingAccountError, BatchTooLargeError } from './chunk-QBJ7O2B4.js';
7
9
  import { withTelemetry } from './chunk-Q2GP5UDC.js';
8
10
  import { bytesToHex, keccak256, encodePacked, parseEventLogs, isAddress, getCreate2Address } from 'viem';
9
11
 
@@ -1,8 +1,6 @@
1
- import { TokenOpsSdkError, ContractRevertError, InvalidArgumentError, OperatorNotApprovedError, InvalidSignatureError, FheHandleNotAllowedError, TransferFailedError, FeatureDisabledError, BatchTooLargeError, InsufficientBalanceError, InsufficientFeeError, ReentrancyError, AlreadyInitializedError, AccessDeniedError, PausedError, UnknownWriteFailureError, WalletRejectedError, WalletChainMismatchError, InsufficientGasFundsError, NetworkError } from './chunk-DRSPMIZ7.js';
1
+ import { TokenOpsSdkError, ContractRevertError, InvalidArgumentError, OperatorNotApprovedError, InvalidSignatureError, FheHandleNotAllowedError, TransferFailedError, FeatureDisabledError, BatchTooLargeError, InsufficientBalanceError, InsufficientFeeError, ReentrancyError, AlreadyInitializedError, AccessDeniedError, PausedError, UnknownWriteFailureError, WalletRejectedError, WalletChainMismatchError, InsufficientGasFundsError, NetworkError } from './chunk-QBJ7O2B4.js';
2
2
  import { decodeErrorResult, BaseError, ContractFunctionRevertedError, UserRejectedRequestError, TransactionRejectedRpcError, ChainMismatchError, InsufficientFundsError, HttpRequestError, TimeoutError } from 'viem';
3
3
 
4
- // src/core/version.ts
5
- var SDK_VERSION = "1.0.0";
6
4
  var ERC7984_ERRORS_ABI = [
7
5
  {
8
6
  type: "error",
@@ -378,4 +376,4 @@ function coerceRevertHex(value) {
378
376
  return void 0;
379
377
  }
380
378
 
381
- export { SDK_VERSION, isContractRevert, mapContractRevert };
379
+ export { isContractRevert, mapContractRevert };
@@ -1,6 +1,6 @@
1
1
  import { erc7984OperatorAbi } from './chunk-7VELUOMI.js';
2
- import { normaliseAddress } from './chunk-46T67CE2.js';
3
- import { TokenOpsContractError } from './chunk-DRSPMIZ7.js';
2
+ import { normaliseAddress } from './chunk-ZA673I3O.js';
3
+ import { TokenOpsContractError } from './chunk-QBJ7O2B4.js';
4
4
  import { withTelemetry } from './chunk-Q2GP5UDC.js';
5
5
 
6
6
  // src/fhe/operators.ts
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ // src/core/brands.ts
4
+ var asEncryptedHandle = (h) => h;
5
+ var asExternalInputProof = (h) => h;
6
+ var asTxHash = (h) => h;
7
+ var asVestingId = (h) => h;
8
+ var asAirdropId = (h) => h;
9
+ var asDisperseId = (h) => h;
10
+ var asRole = (h) => h;
11
+ var asSignature = (h) => h;
12
+
13
+ exports.asAirdropId = asAirdropId;
14
+ exports.asDisperseId = asDisperseId;
15
+ exports.asEncryptedHandle = asEncryptedHandle;
16
+ exports.asExternalInputProof = asExternalInputProof;
17
+ exports.asRole = asRole;
18
+ exports.asSignature = asSignature;
19
+ exports.asTxHash = asTxHash;
20
+ exports.asVestingId = asVestingId;
@@ -494,16 +494,6 @@ var TokenOpsContractError = class extends TokenOpsSdkError {
494
494
  }
495
495
  };
496
496
 
497
- // src/core/brands.ts
498
- var asEncryptedHandle = (h) => h;
499
- var asExternalInputProof = (h) => h;
500
- var asTxHash = (h) => h;
501
- var asVestingId = (h) => h;
502
- var asAirdropId = (h) => h;
503
- var asDisperseId = (h) => h;
504
- var asRole = (h) => h;
505
- var asSignature = (h) => h;
506
-
507
497
  exports.AccessDeniedError = AccessDeniedError;
508
498
  exports.AlreadyInitializedError = AlreadyInitializedError;
509
499
  exports.BatchTooLargeError = BatchTooLargeError;
@@ -542,12 +532,4 @@ exports.UserDecryptNotAllowedError = UserDecryptNotAllowedError;
542
532
  exports.UserRejectedSignatureError = UserRejectedSignatureError;
543
533
  exports.WalletChainMismatchError = WalletChainMismatchError;
544
534
  exports.WalletRejectedError = WalletRejectedError;
545
- exports.asAirdropId = asAirdropId;
546
- exports.asDisperseId = asDisperseId;
547
- exports.asEncryptedHandle = asEncryptedHandle;
548
- exports.asExternalInputProof = asExternalInputProof;
549
- exports.asRole = asRole;
550
- exports.asSignature = asSignature;
551
- exports.asTxHash = asTxHash;
552
- exports.asVestingId = asVestingId;
553
535
  exports.isTokenOpsSdkError = isTokenOpsSdkError;
@@ -1,4 +1,5 @@
1
- import { InvalidArgumentError, asExternalInputProof, asEncryptedHandle } from './chunk-DRSPMIZ7.js';
1
+ import { asExternalInputProof, asEncryptedHandle } from './chunk-KWFFIJYX.js';
2
+ import { InvalidArgumentError } from './chunk-QBJ7O2B4.js';
2
3
  import { bytesToHex } from 'viem';
3
4
 
4
5
  // src/fhe/scale-ratio.ts
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  var chunkZQUE2B3Q_cjs = require('./chunk-ZQUE2B3Q.cjs');
4
- var chunk4ZCXK4VI_cjs = require('./chunk-4ZCXK4VI.cjs');
5
- var chunk2RNW4MIJ_cjs = require('./chunk-2RNW4MIJ.cjs');
4
+ var chunkKFRDLKMA_cjs = require('./chunk-KFRDLKMA.cjs');
5
+ var chunk67OV5CX2_cjs = require('./chunk-67OV5CX2.cjs');
6
6
  var reactQuery = require('@tanstack/react-query');
7
7
  var wagmi = require('wagmi');
8
8
 
@@ -22,7 +22,7 @@ function useIsOperator(options = {}) {
22
22
  holder ? holder.toLowerCase() : null,
23
23
  spender ? spender.toLowerCase() : null
24
24
  ],
25
- queryFn: () => chunk4ZCXK4VI_cjs.isOperator({
25
+ queryFn: () => chunkKFRDLKMA_cjs.isOperator({
26
26
  publicClient,
27
27
  token,
28
28
  holder,
@@ -39,9 +39,9 @@ function useEnsureOperator(options = {}) {
39
39
  const telemetry = options.telemetry;
40
40
  return reactQuery.useMutation({
41
41
  mutationFn: async (vars) => {
42
- if (!publicClient) throw new chunk2RNW4MIJ_cjs.MissingPublicClientError("useEnsureOperator");
43
- if (!walletClient) throw new chunk2RNW4MIJ_cjs.MissingWalletClientError("useEnsureOperator");
44
- return chunk4ZCXK4VI_cjs.ensureOperator({
42
+ if (!publicClient) throw new chunk67OV5CX2_cjs.MissingPublicClientError("useEnsureOperator");
43
+ if (!walletClient) throw new chunk67OV5CX2_cjs.MissingWalletClientError("useEnsureOperator");
44
+ return chunkKFRDLKMA_cjs.ensureOperator({
45
45
  publicClient,
46
46
  walletClient,
47
47
  token: vars.token,