@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,27 +1,255 @@
1
- import type { Address } from "viem";
1
+ import type { Address, Hex } from "viem";
2
2
  import { TokenOpsSdkError } from "../core/errors.js";
3
+ import type { RevertNameMapper } from "../core/revert-mapper.js";
3
4
  /**
4
- * The admin-signed claim signature has already been used. Airdrops use a
5
- * per-signature replay guard (`claimedSignatures[structHash]`); each signed
6
- * `(recipient, encryptedAmount)` pair is single-use.
5
+ * A Merkle campaign's per-account claim state (`claimedAmount`) sits at an
6
+ * ERC-7201 namespaced slot that a previous revision of the contract typed
7
+ * differently. Namespaced slots are derived from the namespace string, not
8
+ * from the field's type, so the retype keeps the same address: an in-place
9
+ * UUPS upgrade across that change hands existing storage to code that reads it
10
+ * as the new type, which reinterprets every account's settled claim total and
11
+ * can re-open claims that were already paid.
12
+ *
13
+ * A fresh deployment is unaffected - there is no prior storage to
14
+ * reinterpret. The constraint the SDK enforces is narrow and static: `mode:
15
+ * "uups"` is refused for Merkle campaigns at create time, so no Merkle
16
+ * instance the SDK creates can ever be upgraded across the boundary. Clone
17
+ * mode is unaffected, and ECDSA campaigns are unaffected in either mode (their
18
+ * storage lives in a different namespace and was not retyped).
19
+ *
20
+ * The refusal does not depend on the factory's `defaultUpgradeable` policy,
21
+ * which is mutable admin state and could permit UUPS at any time.
22
+ *
23
+ * @alpha
24
+ */
25
+ export declare class MerkleUupsUnsupportedError extends TokenOpsSdkError {
26
+ readonly name = "MerkleUupsUnsupportedError";
27
+ readonly context: {
28
+ constraint: "merkle-uups-storage-retype";
29
+ };
30
+ constructor(options?: {
31
+ cause?: unknown;
32
+ });
33
+ }
34
+ /**
35
+ * `claimAndUnwrap` routes the claim straight into the wrapper's `unwrap`,
36
+ * which burns from the airdrop instance's own pooled `ERC7984ERC20Wrapper`
37
+ * balance rather than from any per-claimant sub-balance — the instance holds
38
+ * one aggregate confidential balance, not a ledger of individual
39
+ * entitlements. The wrapper's burn succeeds or fails as a whole against that
40
+ * POOL balance, so the amount it actually delivers is bounded by what the
41
+ * pool holds, not by the claimant's own outstanding amount.
42
+ *
43
+ * Under a stock `ERC7984ERC20Wrapper` that bound is exact: burn succeeds for
44
+ * the full requested amount whenever the pool can cover it. A wrapper
45
+ * composed with transfer hooks, or one wrapping a fee-on-transfer underlying
46
+ * token, can make the amount actually released diverge from what the
47
+ * airdrop's own accounting assumed, so a claimant can end up credited against
48
+ * pool balance that was never theirs.
49
+ *
50
+ * Thrown by `assertStockWrapper` (`guards.ts`) when `unwrappable: true` is
51
+ * requested for a token that doesn't probe as a recognised stock wrapper, and
52
+ * reused here for the on-chain `TokenNotAWrapper` revert (the same
53
+ * mechanism, caught on-chain instead of pre-flight).
54
+ *
55
+ * @alpha
56
+ */
57
+ export declare class NonStockWrapperError extends TokenOpsSdkError {
58
+ readonly name = "NonStockWrapperError";
59
+ readonly context: {
60
+ constraint: "wrapper-unwrap-pool-bound";
61
+ token?: Address;
62
+ };
63
+ constructor(args?: {
64
+ token?: Address;
65
+ cause?: unknown;
66
+ });
67
+ }
68
+ /**
69
+ * A third party tried to redirect someone else's Merkle payout.
70
+ *
71
+ * `to` may differ from the claim identity only when the submitter IS that identity, so a
72
+ * relayer must leave `to` at `account` (or omit it). Raised by the SDK before the write
73
+ * and mapped from the contract's `UnauthorizedRedirect` revert, since the rule is decidable
74
+ * from the arguments alone — same two-producer shape as {@link NonStockWrapperError}.
75
+ *
76
+ * Carries all three addresses because the relation is the error: `to` on its own is a
77
+ * perfectly good address, and blaming it alone would be misleading.
78
+ *
79
+ * @alpha
80
+ */
81
+ export declare class UnauthorizedRedirectError extends TokenOpsSdkError {
82
+ readonly name = "UnauthorizedRedirectError";
83
+ readonly context: {
84
+ constraint: "merkle-third-party-redirect";
85
+ account?: Address;
86
+ to?: Address;
87
+ submitter?: Address;
88
+ };
89
+ constructor(args?: {
90
+ account?: Address;
91
+ to?: Address;
92
+ submitter?: Address;
93
+ cause?: unknown;
94
+ });
95
+ }
96
+ /**
97
+ * The two campaign variants, as used to label a prediction guard's context.
98
+ *
99
+ * @alpha
100
+ */
101
+ export type AirdropVariant = "ecdsa" | "merkle";
102
+ /**
103
+ * A `create*` was about to be sent for a `(variant, mode, deployer, userSalt)`
104
+ * tuple whose predicted address already holds code.
105
+ *
106
+ * The factory's prediction oracles commit to `(implementation, mode, deployer,
107
+ * userSalt)` and nothing else - the params struct is accepted and ignored
108
+ * (`predictECDSAAirdropAddress` does not even name its params argument). Two
109
+ * campaigns therefore collide on one address however different their token,
110
+ * window, signer or root, and the contracts' own default salt label
111
+ * (`airdrop.<type>.<token>.<caller>`) collides on the second campaign a caller
112
+ * runs for the same token. Thrown before the transaction is sent so the caller
113
+ * gets a named cause rather than a `SaltAlreadyUsed` revert or, worse, a
114
+ * `FailedDeployment` from the proxy factory.
115
+ *
116
+ * @alpha
117
+ */
118
+ export declare class SaltCollisionError extends TokenOpsSdkError {
119
+ readonly name = "SaltCollisionError";
120
+ readonly context: {
121
+ method: string;
122
+ variant: AirdropVariant;
123
+ mode: string;
124
+ deployer: Address;
125
+ userSalt: Hex;
126
+ predictedAddress: Address;
127
+ };
128
+ constructor(args: {
129
+ method: string;
130
+ variant: AirdropVariant;
131
+ mode: string;
132
+ deployer: Address;
133
+ userSalt: Hex;
134
+ predictedAddress: Address;
135
+ cause?: unknown;
136
+ });
137
+ }
138
+ /**
139
+ * The factory's init-code hash for a variant changed between the moment an
140
+ * address was predicted and the moment the prediction was about to be used.
141
+ *
142
+ * The hash tracks the factory's implementation pointer, so a change means
143
+ * `setEcdsaImplementation` / `setMerkleImplementation` landed in the window.
144
+ * The predicted address is then stale: a Merkle campaign's every ciphertext is
145
+ * bound to an address the create will no longer produce, and on an
146
+ * immutable-root instance there is no on-chain repair. Rebuild against a fresh
147
+ * prediction.
148
+ *
149
+ * @alpha
150
+ */
151
+ export declare class PredictionDriftError extends TokenOpsSdkError {
152
+ readonly name = "PredictionDriftError";
153
+ readonly context: {
154
+ method: string;
155
+ variant: AirdropVariant;
156
+ initCodeHashBefore: Hex;
157
+ initCodeHashAfter: Hex;
158
+ predictedAddress?: Address;
159
+ };
160
+ constructor(args: {
161
+ method: string;
162
+ variant: AirdropVariant;
163
+ initCodeHashBefore: Hex;
164
+ initCodeHashAfter: Hex;
165
+ predictedAddress?: Address;
166
+ cause?: unknown;
167
+ });
168
+ }
169
+ /**
170
+ * Factory `create*` reverted with `UpgradeabilityNotAllowed`: the creator's effective upgradeability policy is off.
171
+ *
172
+ * @alpha
173
+ */
174
+ export declare class UpgradeabilityNotAllowedError extends TokenOpsSdkError {
175
+ readonly name = "UpgradeabilityNotAllowedError";
176
+ readonly context: {
177
+ method?: string;
178
+ contractAddress?: Address;
179
+ creator?: Address;
180
+ };
181
+ constructor(args: {
182
+ creator?: Address;
183
+ method?: string;
184
+ contractAddress?: Address;
185
+ cause?: unknown;
186
+ });
187
+ }
188
+ /**
189
+ * `planInstanceRoleSplit` (`roles.ts`, Task 13) refuses to plan a
190
+ * `FEE_COLLECTOR_ROLE` grant: the role is its own role-admin (not
191
+ * `DEFAULT_ADMIN_ROLE`), so a grant issued from the caller's admin role would
192
+ * simply fail on-chain with `AccessControlUnauthorizedAccount`. An existing
193
+ * `FEE_COLLECTOR_ROLE` holder must call `grantRole` directly.
194
+ *
195
+ * @alpha
196
+ */
197
+ export declare class FeeCollectorSelfAdministeredError extends TokenOpsSdkError {
198
+ readonly name = "FeeCollectorSelfAdministeredError";
199
+ readonly context: {
200
+ requestedGrantee?: Address;
201
+ };
202
+ constructor(args?: {
203
+ requestedGrantee?: Address;
204
+ cause?: unknown;
205
+ });
206
+ }
207
+ /**
208
+ * ECDSA claim reverted with `DedupIdAlreadyClaimed`: this `dedupId`'s slot was already consumed under `PerDedupId`/`Both`.
209
+ *
210
+ * @alpha
211
+ */
212
+ export declare class DedupIdConsumedError extends TokenOpsSdkError {
213
+ readonly name = "DedupIdConsumedError";
214
+ readonly context: {
215
+ method: string;
216
+ contractAddress: Address;
217
+ dedupId?: Hex;
218
+ };
219
+ constructor(args: {
220
+ method: string;
221
+ contractAddress: Address;
222
+ dedupId?: Hex;
223
+ cause?: unknown;
224
+ });
225
+ }
226
+ /**
227
+ * A claim was already settled for this replay-protection dimension.
228
+ * `replayGuard` names which on-chain guard fired: `"address"` for ECDSA
229
+ * `AddressAlreadyClaimed` (the `PerAddress`/`Both` dedup slot), `"signature"`
230
+ * for `SignatureAlreadyUsed` (the EIP-712 digest replay guard, which is the
231
+ * ONLY guard active under `DedupMode.None`).
232
+ *
233
+ * @alpha
7
234
  */
8
235
  export declare class AlreadyClaimedError extends TokenOpsSdkError {
9
236
  readonly name = "AlreadyClaimedError";
10
237
  readonly context: {
11
238
  method: string;
12
239
  contractAddress: Address;
13
- caller?: Address;
240
+ replayGuard: "address" | "signature";
14
241
  };
15
242
  constructor(args: {
16
243
  method: string;
17
244
  contractAddress: Address;
18
- caller?: Address;
245
+ replayGuard: "address" | "signature";
19
246
  cause?: unknown;
20
247
  });
21
248
  }
22
249
  /**
23
- * The airdrop's claim window has not opened yet. `startsAt` is populated
24
- * when the SDK has read the immutable start time; UIs can render a countdown.
250
+ * Claim reverted with `ClaimNotStarted`: `block.timestamp` is still before the instance's `startTime`.
251
+ *
252
+ * @alpha
25
253
  */
26
254
  export declare class ClaimNotStartedError extends TokenOpsSdkError {
27
255
  readonly name = "ClaimNotStartedError";
@@ -29,19 +257,46 @@ export declare class ClaimNotStartedError extends TokenOpsSdkError {
29
257
  method: string;
30
258
  contractAddress: Address;
31
259
  /** Unix seconds. Multiply by 1000 for `new Date(...)`. */
32
- startsAt?: number;
260
+ startTime?: number;
261
+ currentTime?: number;
262
+ };
263
+ constructor(args: {
264
+ method: string;
265
+ contractAddress: Address;
266
+ startTime?: number;
267
+ currentTime?: number;
268
+ cause?: unknown;
269
+ });
270
+ }
271
+ /**
272
+ * ECDSA claim reverted with `SignatureExpired`: `block.timestamp` is past the signature's `deadline`.
273
+ * Deliberately distinct from `InvalidSignatureError` — that class's message directs a developer to check
274
+ * `SIGNER_ROLE` membership, which is the wrong fix here and discards both decoded revert arguments. The fix
275
+ * for this error is always to re-sign with a later `deadline` via `signClaimAuthorization`.
276
+ *
277
+ * @alpha
278
+ */
279
+ export declare class SignatureExpiredError extends TokenOpsSdkError {
280
+ readonly name = "SignatureExpiredError";
281
+ readonly context: {
282
+ method: string;
283
+ contractAddress: Address;
284
+ /** Unix seconds — the signature's expiry, chosen by whoever called `signClaimAuthorization`. */
285
+ deadline?: bigint;
286
+ currentTime?: bigint;
33
287
  };
34
288
  constructor(args: {
35
289
  method: string;
36
290
  contractAddress: Address;
37
- startsAt?: number;
291
+ deadline?: bigint;
292
+ currentTime?: bigint;
38
293
  cause?: unknown;
39
294
  });
40
295
  }
41
296
  /**
42
- * The airdrop's claim window has closed. `endedAt` is populated when the SDK
43
- * has read the current end time. For airdrops with `CAN_EXTEND_CLAIM_WINDOW`
44
- * set, the admin can extend via `extendClaimWindow`.
297
+ * Claim reverted with `ClaimWindowFinished`: `block.timestamp` is past the instance's `endTime` (end is inclusive on-chain).
298
+ *
299
+ * @alpha
45
300
  */
46
301
  export declare class ClaimWindowClosedError extends TokenOpsSdkError {
47
302
  readonly name = "ClaimWindowClosedError";
@@ -49,12 +304,15 @@ export declare class ClaimWindowClosedError extends TokenOpsSdkError {
49
304
  method: string;
50
305
  contractAddress: Address;
51
306
  /** Unix seconds. Multiply by 1000 for `new Date(...)`. */
52
- endedAt?: number;
307
+ endTime?: number;
308
+ currentTime?: number;
53
309
  };
54
310
  constructor(args: {
55
311
  method: string;
56
312
  contractAddress: Address;
57
- endedAt?: number;
313
+ endTime?: number;
314
+ currentTime?: number;
58
315
  cause?: unknown;
59
316
  });
60
317
  }
318
+ export declare const airdropProductMapper: RevertNameMapper;