@tokenops/sdk 2.0.0-alpha.1 → 2.0.0-alpha.3

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 (155) hide show
  1. package/CHANGELOG.md +67 -2
  2. package/README.md +14 -8
  3. package/dist/{chunk-PUX5VXDB.cjs → chunk-4AWQJQXY.cjs} +1415 -69
  4. package/dist/{chunk-74QFZ5MK.js → chunk-4IB4IY5Y.js} +1 -1
  5. package/dist/{chunk-DZHYSUGY.js → chunk-6HCT4QIX.js} +12 -5
  6. package/dist/{chunk-FGEB7RMY.cjs → chunk-6XOAYDC6.cjs} +4 -4
  7. package/dist/{chunk-XAYGD4E4.cjs → chunk-AHU2HMNE.cjs} +3 -3
  8. package/dist/{chunk-6NAVMWZQ.js → chunk-BPIVVCSQ.js} +2 -2
  9. package/dist/{chunk-GKKDAW44.js → chunk-BXX5TETM.js} +1401 -59
  10. package/dist/{chunk-456VDDA3.js → chunk-GCJFAY4X.js} +78 -25
  11. package/dist/{chunk-CTED3MTR.cjs → chunk-GKYZQJGP.cjs} +82 -29
  12. package/dist/{chunk-JZLGCTGK.cjs → chunk-IEKTGJ4J.cjs} +2 -2
  13. package/dist/{chunk-6PXXGACR.cjs → chunk-JVNJSDQ4.cjs} +2 -2
  14. package/dist/{chunk-O5676ZWY.js → chunk-LEYYG4RF.js} +232 -6
  15. package/dist/{chunk-335Z2W67.js → chunk-NGU4JYIR.js} +1 -1
  16. package/dist/{chunk-5576FRT3.cjs → chunk-PG3WXT3K.cjs} +12 -5
  17. package/dist/{chunk-H5POPGOZ.js → chunk-PK6Q6J5F.js} +1 -1
  18. package/dist/chunk-TND5NDV7.cjs +263 -0
  19. package/dist/chunk-U3TBQRT7.js +253 -0
  20. package/dist/{chunk-EAJ7SYHE.js → chunk-WRWRA4TN.js} +1 -1
  21. package/dist/{chunk-JQYC66TO.cjs → chunk-YABHXJNH.cjs} +5 -5
  22. package/dist/{chunk-M4IT6DNJ.cjs → chunk-YTIYTV4K.cjs} +236 -4
  23. package/dist/core/addresses.d.ts +4 -4
  24. package/dist/core/errors.d.ts +1 -1
  25. package/dist/fhe/types.d.ts +2 -2
  26. package/dist/fhe-airdrop/abis/airdrop-base.d.ts +19 -0
  27. package/dist/fhe-airdrop/abis/ecdsa.d.ts +19 -0
  28. package/dist/fhe-airdrop/abis/factory.d.ts +113 -0
  29. package/dist/fhe-airdrop/abis/merkle.d.ts +43 -12
  30. package/dist/fhe-airdrop/advanced/index.cjs +4 -4
  31. package/dist/fhe-airdrop/advanced/index.js +1 -1
  32. package/dist/fhe-airdrop/advanced/react/index.cjs +620 -9
  33. package/dist/fhe-airdrop/advanced/react/index.d.cts +35 -0
  34. package/dist/fhe-airdrop/advanced/react/index.d.ts +35 -0
  35. package/dist/fhe-airdrop/advanced/react/index.js +590 -7
  36. package/dist/fhe-airdrop/advanced/react/useClearCompliancePolicy.d.ts +28 -0
  37. package/dist/fhe-airdrop/advanced/react/useClearUpgradeabilityPolicy.d.ts +26 -0
  38. package/dist/fhe-airdrop/advanced/react/useDisableCustomFee.d.ts +26 -0
  39. package/dist/fhe-airdrop/advanced/react/useEcdsaInitCodeHash.d.ts +30 -0
  40. package/dist/fhe-airdrop/advanced/react/useFactoryComplianceDelegate.d.ts +25 -0
  41. package/dist/fhe-airdrop/advanced/react/useFactoryCompliancePolicy.d.ts +38 -0
  42. package/dist/fhe-airdrop/advanced/react/useFactoryCustomFee.d.ts +24 -0
  43. package/dist/fhe-airdrop/advanced/react/useFactoryGrantRole.d.ts +32 -0
  44. package/dist/fhe-airdrop/advanced/react/useFactoryHasRole.d.ts +27 -0
  45. package/dist/fhe-airdrop/advanced/react/useFactoryImplementations.d.ts +33 -0
  46. package/dist/fhe-airdrop/advanced/react/useFactoryRenounceRole.d.ts +37 -0
  47. package/dist/fhe-airdrop/advanced/react/useFactoryRevokeRole.d.ts +37 -0
  48. package/dist/fhe-airdrop/advanced/react/useFactoryRoleConstants.d.ts +46 -0
  49. package/dist/fhe-airdrop/advanced/react/useFactoryRoleMembers.d.ts +48 -0
  50. package/dist/fhe-airdrop/advanced/react/useFactoryUpgradeabilityPolicy.d.ts +39 -0
  51. package/dist/fhe-airdrop/advanced/react/useMerkleInitCodeHash.d.ts +24 -0
  52. package/dist/fhe-airdrop/advanced/react/useSetComplianceDelegate.d.ts +33 -0
  53. package/dist/fhe-airdrop/advanced/react/useSetComplianceManagerImpl.d.ts +27 -0
  54. package/dist/fhe-airdrop/advanced/react/useSetCompliancePolicy.d.ts +28 -0
  55. package/dist/fhe-airdrop/advanced/react/useSetCustomFee.d.ts +29 -0
  56. package/dist/fhe-airdrop/advanced/react/useSetDefaultDelegateToCompliance.d.ts +31 -0
  57. package/dist/fhe-airdrop/advanced/react/useSetDefaultGasFee.d.ts +30 -0
  58. package/dist/fhe-airdrop/advanced/react/useSetDefaultUpgradeable.d.ts +27 -0
  59. package/dist/fhe-airdrop/advanced/react/useSetEcdsaImplementation.d.ts +34 -0
  60. package/dist/fhe-airdrop/advanced/react/useSetFeeCollector.d.ts +27 -0
  61. package/dist/fhe-airdrop/advanced/react/useSetMaxGasFee.d.ts +33 -0
  62. package/dist/fhe-airdrop/advanced/react/useSetMerkleImplementation.d.ts +30 -0
  63. package/dist/fhe-airdrop/advanced/react/useSetUpgradeabilityPolicy.d.ts +31 -0
  64. package/dist/fhe-airdrop/airdrop-base.d.ts +55 -8
  65. package/dist/fhe-airdrop/campaign.d.ts +61 -20
  66. package/dist/fhe-airdrop/constants.d.ts +9 -1
  67. package/dist/fhe-airdrop/ecdsa.d.ts +13 -0
  68. package/dist/fhe-airdrop/errors.d.ts +87 -0
  69. package/dist/fhe-airdrop/factory.d.ts +62 -22
  70. package/dist/fhe-airdrop/guards.d.ts +133 -4
  71. package/dist/fhe-airdrop/index.cjs +86 -971
  72. package/dist/fhe-airdrop/index.d.cts +4 -4
  73. package/dist/fhe-airdrop/index.d.ts +4 -4
  74. package/dist/fhe-airdrop/index.js +8 -927
  75. package/dist/fhe-airdrop/merkle-tree.d.ts +32 -38
  76. package/dist/fhe-airdrop/merkle.d.ts +52 -31
  77. package/dist/fhe-airdrop/react/_shared.d.ts +13 -0
  78. package/dist/fhe-airdrop/react/index.cjs +997 -87
  79. package/dist/fhe-airdrop/react/index.d.cts +53 -4
  80. package/dist/fhe-airdrop/react/index.d.ts +53 -4
  81. package/dist/fhe-airdrop/react/index.js +887 -27
  82. package/dist/fhe-airdrop/react/keys.d.ts +98 -0
  83. package/dist/fhe-airdrop/react/useAccessEcdsaClaimAmount.d.ts +26 -0
  84. package/dist/fhe-airdrop/react/useAccessMerkleClaimAmount.d.ts +27 -0
  85. package/dist/fhe-airdrop/react/useAddComplianceDelegate.d.ts +37 -0
  86. package/dist/fhe-airdrop/react/useAdminBatchDiscloseBalanceToParties.d.ts +36 -0
  87. package/dist/fhe-airdrop/react/useAdminDiscloseBalanceToParty.d.ts +31 -0
  88. package/dist/fhe-airdrop/react/useAdminGetCurrentBalance.d.ts +27 -0
  89. package/dist/fhe-airdrop/react/useAirdropConfig.d.ts +49 -0
  90. package/dist/fhe-airdrop/react/useAirdropDeploymentMode.d.ts +28 -0
  91. package/dist/fhe-airdrop/react/useAirdropGrantRole.d.ts +35 -0
  92. package/dist/fhe-airdrop/react/useAirdropRenounceRole.d.ts +36 -0
  93. package/dist/fhe-airdrop/react/useAirdropRevokeRole.d.ts +33 -0
  94. package/dist/fhe-airdrop/react/useAirdropRoleAdmin.d.ts +28 -0
  95. package/dist/fhe-airdrop/react/useAirdropRoleConstants.d.ts +67 -0
  96. package/dist/fhe-airdrop/react/useAirdropRoleMembers.d.ts +49 -0
  97. package/dist/fhe-airdrop/react/useAirdropUpgradeToAndCall.d.ts +45 -0
  98. package/dist/fhe-airdrop/react/useBatchDiscloseHandlesToParty.d.ts +32 -0
  99. package/dist/fhe-airdrop/react/useBuildMerkleCampaign.d.ts +68 -0
  100. package/dist/fhe-airdrop/react/useComplianceGrantRole.d.ts +32 -0
  101. package/dist/fhe-airdrop/react/useComplianceHasRole.d.ts +37 -0
  102. package/dist/fhe-airdrop/react/useComplianceInfo.d.ts +50 -0
  103. package/dist/fhe-airdrop/react/useComplianceManagerOf.d.ts +32 -0
  104. package/dist/fhe-airdrop/react/useComplianceRenounceRole.d.ts +38 -0
  105. package/dist/fhe-airdrop/react/useComplianceRevokeRole.d.ts +36 -0
  106. package/dist/fhe-airdrop/react/useComplianceRoleConstants.d.ts +41 -0
  107. package/dist/fhe-airdrop/react/useComplianceRoleMembers.d.ts +45 -0
  108. package/dist/fhe-airdrop/react/useCreateAndFundEcdsaAirdrop.d.ts +55 -0
  109. package/dist/fhe-airdrop/react/useCreateAndFundMerkleAirdrop.d.ts +52 -0
  110. package/dist/fhe-airdrop/react/useDiscloseHandleToParty.d.ts +35 -0
  111. package/dist/fhe-airdrop/react/useEcdsaClaim.d.ts +4 -3
  112. package/dist/fhe-airdrop/react/useEcdsaClaimAndUnwrap.d.ts +27 -0
  113. package/dist/fhe-airdrop/react/useEcdsaDomain.d.ts +41 -0
  114. package/dist/fhe-airdrop/react/useEffectiveDelegateToCompliance.d.ts +26 -0
  115. package/dist/fhe-airdrop/react/useEncryptCampaignAmounts.d.ts +59 -0
  116. package/dist/fhe-airdrop/react/useFactoryFees.d.ts +11 -4
  117. package/dist/fhe-airdrop/react/useIsActiveDelegate.d.ts +29 -0
  118. package/dist/fhe-airdrop/react/useIsAirdrop.d.ts +44 -0
  119. package/dist/fhe-airdrop/react/useIsMerkleRootMutable.d.ts +21 -0
  120. package/dist/fhe-airdrop/react/useIsSignatureValid.d.ts +46 -0
  121. package/dist/fhe-airdrop/react/useMerkleClaim.d.ts +7 -19
  122. package/dist/fhe-airdrop/react/useMerkleClaimAndUnwrap.d.ts +29 -0
  123. package/dist/fhe-airdrop/react/usePlanMerkleCampaign.d.ts +53 -0
  124. package/dist/fhe-airdrop/react/usePreflightClaim.d.ts +46 -0
  125. package/dist/fhe-airdrop/react/usePreflightCreateAirdrop.d.ts +67 -0
  126. package/dist/fhe-airdrop/react/useRefreshComplianceBalance.d.ts +36 -0
  127. package/dist/fhe-airdrop/react/useRescueERC20.d.ts +30 -0
  128. package/dist/fhe-airdrop/react/useRescueOtherConfidentialToken.d.ts +34 -0
  129. package/dist/fhe-airdrop/react/useResolveGasFee.d.ts +30 -0
  130. package/dist/fhe-airdrop/react/useRevokeComplianceDelegate.d.ts +37 -0
  131. package/dist/fhe-airdrop/react/useRotateMerkleRoot.d.ts +52 -0
  132. package/dist/fhe-airdrop/react/useSignClaimAuthorization.d.ts +42 -0
  133. package/dist/fhe-airdrop/react/useWithdrawGasFee.d.ts +37 -0
  134. package/dist/fhe-airdrop/types.d.ts +27 -1
  135. package/dist/fhe-disperse/index.cjs +21 -21
  136. package/dist/fhe-disperse/index.js +2 -2
  137. package/dist/fhe-disperse/react/index.cjs +22 -22
  138. package/dist/fhe-disperse/react/index.js +3 -3
  139. package/dist/fhe-vesting/advanced/index.cjs +5 -5
  140. package/dist/fhe-vesting/advanced/index.js +3 -3
  141. package/dist/fhe-vesting/advanced/react/index.cjs +7 -7
  142. package/dist/fhe-vesting/advanced/react/index.js +4 -4
  143. package/dist/fhe-vesting/index.cjs +8 -8
  144. package/dist/fhe-vesting/index.js +2 -2
  145. package/dist/fhe-vesting/react/index.cjs +114 -114
  146. package/dist/fhe-vesting/react/index.js +3 -3
  147. package/dist/index.cjs +18 -18
  148. package/dist/index.js +1 -1
  149. package/dist/testnet-faucet/index.cjs +14 -14
  150. package/dist/testnet-faucet/index.js +2 -2
  151. package/dist/testnet-faucet/react/index.cjs +8 -8
  152. package/dist/testnet-faucet/react/index.js +3 -3
  153. package/package.json +1 -1
  154. package/dist/chunk-NCVX3K2N.cjs +0 -161
  155. package/dist/chunk-VP2B4WM2.js +0 -154
@@ -9,3 +9,38 @@
9
9
  */
10
10
  export { usePredictEcdsaAirdropAddress, type UsePredictEcdsaAirdropAddressArgs, } from "./usePredictEcdsaAirdropAddress.js";
11
11
  export { usePredictMerkleAirdropAddress, type UsePredictMerkleAirdropAddressArgs, } from "./usePredictMerkleAirdropAddress.js";
12
+ export { useClearCompliancePolicy, type ClearCompliancePolicyArgs, } from "./useClearCompliancePolicy.js";
13
+ export { useClearUpgradeabilityPolicy, type ClearUpgradeabilityPolicyArgs, } from "./useClearUpgradeabilityPolicy.js";
14
+ export { useDisableCustomFee, type DisableCustomFeeArgs } from "./useDisableCustomFee.js";
15
+ export { useEcdsaInitCodeHash, type UseEcdsaInitCodeHashArgs } from "./useEcdsaInitCodeHash.js";
16
+ export { useFactoryComplianceDelegate, type UseFactoryComplianceDelegateArgs, } from "./useFactoryComplianceDelegate.js";
17
+ export { useFactoryCompliancePolicy, type FactoryCompliancePolicy, type UseFactoryCompliancePolicyArgs, } from "./useFactoryCompliancePolicy.js";
18
+ export { useFactoryCustomFee, type UseFactoryCustomFeeArgs } from "./useFactoryCustomFee.js";
19
+ export { useFactoryGrantRole, type FactoryGrantRoleArgs } from "./useFactoryGrantRole.js";
20
+ export { useFactoryHasRole, type UseFactoryHasRoleArgs } from "./useFactoryHasRole.js";
21
+ export { useFactoryImplementations, type FactoryImplementations, type UseFactoryImplementationsArgs, } from "./useFactoryImplementations.js";
22
+ export { useFactoryRenounceRole, type FactoryRenounceRoleArgs } from "./useFactoryRenounceRole.js";
23
+ export { useFactoryRevokeRole, type FactoryRevokeRoleArgs } from "./useFactoryRevokeRole.js";
24
+ export { useFactoryRoleConstants, type FactoryRoleConstants, type UseFactoryRoleConstantsArgs, } from "./useFactoryRoleConstants.js";
25
+ export { useFactoryRoleMembers, type FactoryRoleMembership, type UseFactoryRoleMembersArgs, } from "./useFactoryRoleMembers.js";
26
+ export { useFactoryUpgradeabilityPolicy, type FactoryUpgradeabilityPolicy, type UseFactoryUpgradeabilityPolicyArgs, } from "./useFactoryUpgradeabilityPolicy.js";
27
+ export { useMerkleInitCodeHash, type UseMerkleInitCodeHashArgs } from "./useMerkleInitCodeHash.js";
28
+ export { useSetComplianceDelegate, type SetComplianceDelegateArgs, } from "./useSetComplianceDelegate.js";
29
+ export { useSetComplianceManagerImpl, type SetComplianceManagerImplArgs, } from "./useSetComplianceManagerImpl.js";
30
+ export { useSetCompliancePolicy, type SetCompliancePolicyArgs } from "./useSetCompliancePolicy.js";
31
+ export { useSetCustomFee, type SetCustomFeeArgs } from "./useSetCustomFee.js";
32
+ export { useSetDefaultDelegateToCompliance, type SetDefaultDelegateToComplianceArgs, } from "./useSetDefaultDelegateToCompliance.js";
33
+ export { useSetDefaultGasFee, type SetDefaultGasFeeArgs } from "./useSetDefaultGasFee.js";
34
+ export { useSetMaxGasFee, type SetMaxGasFeeArgs } from "./useSetMaxGasFee.js";
35
+ export { useSetDefaultUpgradeable, type SetDefaultUpgradeableArgs, } from "./useSetDefaultUpgradeable.js";
36
+ export { useSetEcdsaImplementation, type SetEcdsaImplementationArgs, } from "./useSetEcdsaImplementation.js";
37
+ export { useSetFeeCollector, type SetFeeCollectorArgs } from "./useSetFeeCollector.js";
38
+ export { useSetMerkleImplementation, type SetMerkleImplementationArgs, } from "./useSetMerkleImplementation.js";
39
+ export { useSetUpgradeabilityPolicy, type SetUpgradeabilityPolicyArgs, } from "./useSetUpgradeabilityPolicy.js";
40
+ export type { AirdropClientOptions, AirdropHookOptions } from "../../react/_shared.js";
41
+ export type { WriteAccountOverride } from "../../airdrop-base.js";
42
+ export type { CustomFee } from "../../factory.js";
43
+ export type { DeploymentMode } from "../../constants.js";
44
+ export type { CommonAirdropParams, EcdsaAirdropParams, MerkleAirdropParams } from "../../types.js";
45
+ export type { DedupMode } from "../../constants.js";
46
+ export type { EncryptorSource } from "../../encryption.js";
@@ -9,3 +9,38 @@
9
9
  */
10
10
  export { usePredictEcdsaAirdropAddress, type UsePredictEcdsaAirdropAddressArgs, } from "./usePredictEcdsaAirdropAddress.js";
11
11
  export { usePredictMerkleAirdropAddress, type UsePredictMerkleAirdropAddressArgs, } from "./usePredictMerkleAirdropAddress.js";
12
+ export { useClearCompliancePolicy, type ClearCompliancePolicyArgs, } from "./useClearCompliancePolicy.js";
13
+ export { useClearUpgradeabilityPolicy, type ClearUpgradeabilityPolicyArgs, } from "./useClearUpgradeabilityPolicy.js";
14
+ export { useDisableCustomFee, type DisableCustomFeeArgs } from "./useDisableCustomFee.js";
15
+ export { useEcdsaInitCodeHash, type UseEcdsaInitCodeHashArgs } from "./useEcdsaInitCodeHash.js";
16
+ export { useFactoryComplianceDelegate, type UseFactoryComplianceDelegateArgs, } from "./useFactoryComplianceDelegate.js";
17
+ export { useFactoryCompliancePolicy, type FactoryCompliancePolicy, type UseFactoryCompliancePolicyArgs, } from "./useFactoryCompliancePolicy.js";
18
+ export { useFactoryCustomFee, type UseFactoryCustomFeeArgs } from "./useFactoryCustomFee.js";
19
+ export { useFactoryGrantRole, type FactoryGrantRoleArgs } from "./useFactoryGrantRole.js";
20
+ export { useFactoryHasRole, type UseFactoryHasRoleArgs } from "./useFactoryHasRole.js";
21
+ export { useFactoryImplementations, type FactoryImplementations, type UseFactoryImplementationsArgs, } from "./useFactoryImplementations.js";
22
+ export { useFactoryRenounceRole, type FactoryRenounceRoleArgs } from "./useFactoryRenounceRole.js";
23
+ export { useFactoryRevokeRole, type FactoryRevokeRoleArgs } from "./useFactoryRevokeRole.js";
24
+ export { useFactoryRoleConstants, type FactoryRoleConstants, type UseFactoryRoleConstantsArgs, } from "./useFactoryRoleConstants.js";
25
+ export { useFactoryRoleMembers, type FactoryRoleMembership, type UseFactoryRoleMembersArgs, } from "./useFactoryRoleMembers.js";
26
+ export { useFactoryUpgradeabilityPolicy, type FactoryUpgradeabilityPolicy, type UseFactoryUpgradeabilityPolicyArgs, } from "./useFactoryUpgradeabilityPolicy.js";
27
+ export { useMerkleInitCodeHash, type UseMerkleInitCodeHashArgs } from "./useMerkleInitCodeHash.js";
28
+ export { useSetComplianceDelegate, type SetComplianceDelegateArgs, } from "./useSetComplianceDelegate.js";
29
+ export { useSetComplianceManagerImpl, type SetComplianceManagerImplArgs, } from "./useSetComplianceManagerImpl.js";
30
+ export { useSetCompliancePolicy, type SetCompliancePolicyArgs } from "./useSetCompliancePolicy.js";
31
+ export { useSetCustomFee, type SetCustomFeeArgs } from "./useSetCustomFee.js";
32
+ export { useSetDefaultDelegateToCompliance, type SetDefaultDelegateToComplianceArgs, } from "./useSetDefaultDelegateToCompliance.js";
33
+ export { useSetDefaultGasFee, type SetDefaultGasFeeArgs } from "./useSetDefaultGasFee.js";
34
+ export { useSetMaxGasFee, type SetMaxGasFeeArgs } from "./useSetMaxGasFee.js";
35
+ export { useSetDefaultUpgradeable, type SetDefaultUpgradeableArgs, } from "./useSetDefaultUpgradeable.js";
36
+ export { useSetEcdsaImplementation, type SetEcdsaImplementationArgs, } from "./useSetEcdsaImplementation.js";
37
+ export { useSetFeeCollector, type SetFeeCollectorArgs } from "./useSetFeeCollector.js";
38
+ export { useSetMerkleImplementation, type SetMerkleImplementationArgs, } from "./useSetMerkleImplementation.js";
39
+ export { useSetUpgradeabilityPolicy, type SetUpgradeabilityPolicyArgs, } from "./useSetUpgradeabilityPolicy.js";
40
+ export type { AirdropClientOptions, AirdropHookOptions } from "../../react/_shared.js";
41
+ export type { WriteAccountOverride } from "../../airdrop-base.js";
42
+ export type { CustomFee } from "../../factory.js";
43
+ export type { DeploymentMode } from "../../constants.js";
44
+ export type { CommonAirdropParams, EcdsaAirdropParams, MerkleAirdropParams } from "../../types.js";
45
+ export type { DedupMode } from "../../constants.js";
46
+ export type { EncryptorSource } from "../../encryption.js";
@@ -1,15 +1,15 @@
1
- import { useMemoAirdropFactoryClient, airdropQueryKey } from '../../../chunk-VP2B4WM2.js';
2
- import '../../../chunk-GKKDAW44.js';
3
- import '../../../chunk-O5676ZWY.js';
1
+ import { useMemoAirdropFactoryClient, airdropQueryKey, airdropKeys, airdropQueryKeyPrefix } from '../../../chunk-U3TBQRT7.js';
2
+ import '../../../chunk-BXX5TETM.js';
3
+ import '../../../chunk-LEYYG4RF.js';
4
4
  import '../../../chunk-ZWXJTBZO.js';
5
5
  import '../../../chunk-NWFMBLSQ.js';
6
6
  import '../../../chunk-4RAAATVY.js';
7
- import '../../../chunk-DZHYSUGY.js';
7
+ import '../../../chunk-6HCT4QIX.js';
8
8
  import '../../../chunk-ZA673I3O.js';
9
9
  import '../../../chunk-KWFFIJYX.js';
10
- import '../../../chunk-QBJ7O2B4.js';
10
+ import { MissingClientError } from '../../../chunk-QBJ7O2B4.js';
11
11
  import '../../../chunk-Q2GP5UDC.js';
12
- import { useQuery } from '@tanstack/react-query';
12
+ import { useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
13
13
 
14
14
  function usePredictEcdsaAirdropAddress(args) {
15
15
  const { params, mode, deployer, userSalt, ...base } = args;
@@ -41,5 +41,588 @@ function usePredictMerkleAirdropAddress(args) {
41
41
  enabled: Boolean(client && (args.query?.enabled ?? true))
42
42
  });
43
43
  }
44
+ function useClearCompliancePolicy(options = {}) {
45
+ const { client, resolutionError, chainId, resolvedAddress } = useMemoAirdropFactoryClient(options);
46
+ const queryClient = useQueryClient();
47
+ return useMutation({
48
+ mutationFn: async (args) => {
49
+ if (!client) {
50
+ throw resolutionError ?? new MissingClientError("useClearCompliancePolicy", "factory");
51
+ }
52
+ return client.clearCompliancePolicy(args.creator, args.account);
53
+ },
54
+ onSuccess: (_hash, variables) => {
55
+ const scope = { chainId, address: resolvedAddress };
56
+ void queryClient.invalidateQueries({
57
+ queryKey: airdropKeys.compliancePolicy(scope, variables.creator)
58
+ });
59
+ void queryClient.invalidateQueries({
60
+ queryKey: airdropQueryKey({
61
+ ...scope,
62
+ fn: "effectiveDelegateToCompliance",
63
+ args: [variables.creator]
64
+ })
65
+ });
66
+ }
67
+ });
68
+ }
69
+ function useClearUpgradeabilityPolicy(options = {}) {
70
+ const { client, resolutionError, chainId, resolvedAddress } = useMemoAirdropFactoryClient(options);
71
+ const queryClient = useQueryClient();
72
+ return useMutation({
73
+ mutationFn: async (args) => {
74
+ if (!client) {
75
+ throw resolutionError ?? new MissingClientError("useClearUpgradeabilityPolicy", "factory");
76
+ }
77
+ return client.clearUpgradeabilityPolicy(args.creator, args.account);
78
+ },
79
+ onSuccess: (_hash, variables) => {
80
+ const scope = { chainId, address: resolvedAddress };
81
+ void queryClient.invalidateQueries({
82
+ queryKey: airdropQueryKey({
83
+ ...scope,
84
+ fn: "effectiveUpgradeable",
85
+ args: [variables.creator]
86
+ })
87
+ });
88
+ void queryClient.invalidateQueries({
89
+ queryKey: airdropKeys.upgradeabilityPolicy(scope, variables.creator)
90
+ });
91
+ void queryClient.invalidateQueries({
92
+ queryKey: airdropKeys.preflightCreateAll(scope)
93
+ });
94
+ }
95
+ });
96
+ }
97
+ function useDisableCustomFee(options = {}) {
98
+ const { client, resolutionError, chainId, resolvedAddress } = useMemoAirdropFactoryClient(options);
99
+ const queryClient = useQueryClient();
100
+ return useMutation({
101
+ mutationFn: async ({ creator, account }) => {
102
+ if (!client) {
103
+ throw resolutionError ?? new MissingClientError("useDisableCustomFee", "factory");
104
+ }
105
+ return client.disableCustomFee(creator, account);
106
+ },
107
+ onSuccess: (_hash, variables) => {
108
+ void queryClient.invalidateQueries({
109
+ queryKey: airdropKeys.resolvedGasFeeAll({ chainId, address: resolvedAddress })
110
+ });
111
+ void queryClient.invalidateQueries({
112
+ queryKey: airdropKeys.customFee({ chainId, address: resolvedAddress }, variables.creator)
113
+ });
114
+ }
115
+ });
116
+ }
117
+ function useEcdsaInitCodeHash(args) {
118
+ const { params, mode, ...base } = args;
119
+ const { client, chainId, resolvedAddress } = useMemoAirdropFactoryClient(base);
120
+ return useQuery({
121
+ ...args.query,
122
+ // `params` is omitted for the same reason the predict hooks omit it: the
123
+ // ABI demands it but the factory ignores it, so only `mode` (plus the
124
+ // implementation pointer, which is what this read reports) moves the
125
+ // result. If a future factory version makes params hash-affecting, this
126
+ // key has to grow with it.
127
+ queryKey: airdropQueryKey({
128
+ chainId,
129
+ address: resolvedAddress,
130
+ fn: "getEcdsaInitCodeHash",
131
+ args: [mode]
132
+ }),
133
+ queryFn: () => client.getEcdsaInitCodeHash({ params, mode }),
134
+ enabled: Boolean(client && (args.query?.enabled ?? true))
135
+ });
136
+ }
137
+ function useFactoryComplianceDelegate(args = {}) {
138
+ const { client, chainId, resolvedAddress } = useMemoAirdropFactoryClient(args);
139
+ return useQuery({
140
+ ...args.query,
141
+ queryKey: airdropQueryKey({
142
+ chainId,
143
+ address: resolvedAddress,
144
+ fn: "complianceDelegate",
145
+ args: []
146
+ }),
147
+ queryFn: () => client.complianceDelegate(),
148
+ enabled: Boolean(client && (args.query?.enabled ?? true))
149
+ });
150
+ }
151
+ function useFactoryCompliancePolicy(args = {}) {
152
+ const { creator, ...base } = args;
153
+ const { client, chainId, resolvedAddress } = useMemoAirdropFactoryClient(base);
154
+ return useQuery({
155
+ ...args.query,
156
+ queryKey: airdropKeys.compliancePolicy({ chainId, address: resolvedAddress }, creator),
157
+ queryFn: async () => {
158
+ const [policy, effective] = await Promise.all([
159
+ client.getCompliancePolicy(creator),
160
+ client.effectiveDelegateToCompliance(creator)
161
+ ]);
162
+ return {
163
+ overridden: policy.overridden,
164
+ delegateToCompliance: policy.delegateToCompliance,
165
+ effective
166
+ };
167
+ },
168
+ enabled: Boolean(client && creator && (args.query?.enabled ?? true))
169
+ });
170
+ }
171
+ function useFactoryCustomFee(args = {}) {
172
+ const { creator, ...base } = args;
173
+ const { client, chainId, resolvedAddress } = useMemoAirdropFactoryClient(base);
174
+ return useQuery({
175
+ ...args.query,
176
+ queryKey: airdropKeys.customFee({ chainId, address: resolvedAddress }, creator),
177
+ queryFn: () => client.getCustomFee(creator),
178
+ enabled: Boolean(client && creator && (args.query?.enabled ?? true))
179
+ });
180
+ }
181
+ function useFactoryGrantRole(options = {}) {
182
+ const { client, resolutionError, chainId, resolvedAddress } = useMemoAirdropFactoryClient(options);
183
+ const queryClient = useQueryClient();
184
+ return useMutation({
185
+ mutationFn: async (args) => {
186
+ if (!client) {
187
+ throw resolutionError ?? new MissingClientError("useFactoryGrantRole", "factory");
188
+ }
189
+ return client.grantRole(args);
190
+ },
191
+ onSuccess: (_hash, variables) => {
192
+ const scope = { chainId, address: resolvedAddress };
193
+ void queryClient.invalidateQueries({
194
+ queryKey: airdropKeys.factoryHasRole(scope, variables.role, variables.holder)
195
+ });
196
+ void queryClient.invalidateQueries({
197
+ queryKey: airdropKeys.factoryRoleMembers(scope, variables.role)
198
+ });
199
+ }
200
+ });
201
+ }
202
+ function useFactoryHasRole(args = {}) {
203
+ const { role, holder, ...base } = args;
204
+ const { client, chainId, resolvedAddress } = useMemoAirdropFactoryClient(base);
205
+ return useQuery({
206
+ ...args.query,
207
+ queryKey: airdropKeys.factoryHasRole({ chainId, address: resolvedAddress }, role, holder),
208
+ queryFn: () => client.hasRole({ role, holder }),
209
+ enabled: Boolean(client && role && holder && (args.query?.enabled ?? true))
210
+ });
211
+ }
212
+ function useFactoryImplementations(args = {}) {
213
+ const { client, chainId, resolvedAddress } = useMemoAirdropFactoryClient(args);
214
+ return useQuery({
215
+ ...args.query,
216
+ queryKey: airdropKeys.implementations({ chainId, address: resolvedAddress }),
217
+ queryFn: async () => {
218
+ const [ecdsa, merkle, complianceManager] = await Promise.all([
219
+ client.ecdsaImplementation(),
220
+ client.merkleImplementation(),
221
+ client.complianceManagerImpl()
222
+ ]);
223
+ return { ecdsa, merkle, complianceManager };
224
+ },
225
+ enabled: Boolean(client && (args.query?.enabled ?? true))
226
+ });
227
+ }
228
+ function useFactoryRenounceRole(options = {}) {
229
+ const { client, resolutionError, chainId, resolvedAddress } = useMemoAirdropFactoryClient(options);
230
+ const queryClient = useQueryClient();
231
+ return useMutation({
232
+ mutationFn: async (args) => {
233
+ if (!client) {
234
+ throw resolutionError ?? new MissingClientError("useFactoryRenounceRole", "factory");
235
+ }
236
+ return client.renounceRole(args);
237
+ },
238
+ onSuccess: (_hash, variables) => {
239
+ const scope = { chainId, address: resolvedAddress };
240
+ void queryClient.invalidateQueries({ queryKey: airdropKeys.factoryHasRoleAll(scope) });
241
+ void queryClient.invalidateQueries({
242
+ queryKey: airdropKeys.factoryRoleMembers(scope, variables.role)
243
+ });
244
+ }
245
+ });
246
+ }
247
+ function useFactoryRevokeRole(options = {}) {
248
+ const { client, resolutionError, chainId, resolvedAddress } = useMemoAirdropFactoryClient(options);
249
+ const queryClient = useQueryClient();
250
+ return useMutation({
251
+ mutationFn: async (args) => {
252
+ if (!client) {
253
+ throw resolutionError ?? new MissingClientError("useFactoryRevokeRole", "factory");
254
+ }
255
+ return client.revokeRole(args);
256
+ },
257
+ onSuccess: (_hash, variables) => {
258
+ const scope = { chainId, address: resolvedAddress };
259
+ void queryClient.invalidateQueries({
260
+ queryKey: airdropKeys.factoryHasRole(scope, variables.role, variables.holder)
261
+ });
262
+ void queryClient.invalidateQueries({
263
+ queryKey: airdropKeys.factoryRoleMembers(scope, variables.role)
264
+ });
265
+ }
266
+ });
267
+ }
268
+ function useFactoryRoleConstants(args = {}) {
269
+ const { client, chainId, resolvedAddress } = useMemoAirdropFactoryClient(args);
270
+ return useQuery({
271
+ // A default, not a lock: `query.staleTime` still wins if a consumer wants refetching.
272
+ staleTime: Infinity,
273
+ ...args.query,
274
+ // `fn` label is unique to this hook, so it stays inline rather than in keys.ts.
275
+ queryKey: airdropQueryKey({
276
+ chainId,
277
+ address: resolvedAddress,
278
+ fn: "factoryRoleConstants",
279
+ args: []
280
+ }),
281
+ queryFn: async () => {
282
+ const [
283
+ FEE_MANAGER_ROLE,
284
+ IMPL_MANAGER_ROLE,
285
+ COMPLIANCE_WIRING_ROLE,
286
+ UPGRADE_MANAGER_ROLE,
287
+ DEFAULT_ADMIN_ROLE
288
+ ] = await Promise.all([
289
+ client.FEE_MANAGER_ROLE(),
290
+ client.IMPL_MANAGER_ROLE(),
291
+ client.COMPLIANCE_WIRING_ROLE(),
292
+ client.UPGRADE_MANAGER_ROLE(),
293
+ client.DEFAULT_ADMIN_ROLE()
294
+ ]);
295
+ return {
296
+ FEE_MANAGER_ROLE,
297
+ IMPL_MANAGER_ROLE,
298
+ COMPLIANCE_WIRING_ROLE,
299
+ UPGRADE_MANAGER_ROLE,
300
+ DEFAULT_ADMIN_ROLE
301
+ };
302
+ },
303
+ enabled: Boolean(client && (args.query?.enabled ?? true))
304
+ });
305
+ }
306
+ function useFactoryRoleMembers(args = {}) {
307
+ const { role, ...base } = args;
308
+ const { client, chainId, resolvedAddress } = useMemoAirdropFactoryClient(base);
309
+ return useQuery({
310
+ ...args.query,
311
+ queryKey: airdropKeys.factoryRoleMembers({ chainId, address: resolvedAddress }, role),
312
+ queryFn: async () => {
313
+ const [members, count] = await Promise.all([
314
+ client.getRoleMembers(role),
315
+ client.getRoleMemberCount(role)
316
+ ]);
317
+ return { members, count };
318
+ },
319
+ enabled: Boolean(client && role && (args.query?.enabled ?? true))
320
+ });
321
+ }
322
+ function useFactoryUpgradeabilityPolicy(args = {}) {
323
+ const { creator, ...base } = args;
324
+ const { client, chainId, resolvedAddress } = useMemoAirdropFactoryClient(base);
325
+ return useQuery({
326
+ ...args.query,
327
+ queryKey: airdropKeys.upgradeabilityPolicy({ chainId, address: resolvedAddress }, creator),
328
+ queryFn: async () => {
329
+ const [defaultUpgradeable, policy, effective] = await Promise.all([
330
+ client.defaultUpgradeable(),
331
+ client.getUpgradeabilityPolicy(creator),
332
+ client.effectiveUpgradeable(creator)
333
+ ]);
334
+ return {
335
+ defaultUpgradeable,
336
+ overridden: policy.overridden,
337
+ allowed: policy.allowed,
338
+ effective
339
+ };
340
+ },
341
+ enabled: Boolean(client && creator && (args.query?.enabled ?? true))
342
+ });
343
+ }
344
+ function useMerkleInitCodeHash(args) {
345
+ const { params, mode, ...base } = args;
346
+ const { client, chainId, resolvedAddress } = useMemoAirdropFactoryClient(base);
347
+ return useQuery({
348
+ ...args.query,
349
+ // `params` omitted deliberately — see useEcdsaInitCodeHash for why.
350
+ queryKey: airdropQueryKey({
351
+ chainId,
352
+ address: resolvedAddress,
353
+ fn: "getMerkleInitCodeHash",
354
+ args: [mode]
355
+ }),
356
+ queryFn: () => client.getMerkleInitCodeHash({ params, mode }),
357
+ enabled: Boolean(client && (args.query?.enabled ?? true))
358
+ });
359
+ }
360
+ function useSetComplianceDelegate(options = {}) {
361
+ const { client, resolutionError, chainId, resolvedAddress } = useMemoAirdropFactoryClient(options);
362
+ const queryClient = useQueryClient();
363
+ return useMutation({
364
+ mutationFn: async (args) => {
365
+ if (!client) {
366
+ throw resolutionError ?? new MissingClientError("useSetComplianceDelegate", "factory");
367
+ }
368
+ return client.setComplianceDelegate(args.delegate, args.account);
369
+ },
370
+ onSuccess: () => {
371
+ void queryClient.invalidateQueries({
372
+ queryKey: airdropQueryKey({
373
+ chainId,
374
+ address: resolvedAddress,
375
+ fn: "complianceDelegate",
376
+ args: []
377
+ })
378
+ });
379
+ }
380
+ });
381
+ }
382
+ function useSetComplianceManagerImpl(options = {}) {
383
+ const { client, resolutionError, chainId, resolvedAddress } = useMemoAirdropFactoryClient(options);
384
+ const queryClient = useQueryClient();
385
+ return useMutation({
386
+ mutationFn: async (args) => {
387
+ if (!client) {
388
+ throw resolutionError ?? new MissingClientError("useSetComplianceManagerImpl", "factory");
389
+ }
390
+ return client.setComplianceManagerImpl(args.implementation, args.account);
391
+ },
392
+ onSuccess: () => {
393
+ void queryClient.invalidateQueries({
394
+ queryKey: airdropKeys.implementations({ chainId, address: resolvedAddress })
395
+ });
396
+ }
397
+ });
398
+ }
399
+ function useSetCompliancePolicy(options = {}) {
400
+ const { client, resolutionError, chainId, resolvedAddress } = useMemoAirdropFactoryClient(options);
401
+ const queryClient = useQueryClient();
402
+ return useMutation({
403
+ mutationFn: async (args) => {
404
+ if (!client) {
405
+ throw resolutionError ?? new MissingClientError("useSetCompliancePolicy", "factory");
406
+ }
407
+ return client.setCompliancePolicy(args.creator, args.delegateToCompliance, args.account);
408
+ },
409
+ onSuccess: (_hash, variables) => {
410
+ const scope = { chainId, address: resolvedAddress };
411
+ void queryClient.invalidateQueries({
412
+ queryKey: airdropKeys.compliancePolicy(scope, variables.creator)
413
+ });
414
+ void queryClient.invalidateQueries({
415
+ queryKey: airdropQueryKey({
416
+ ...scope,
417
+ fn: "effectiveDelegateToCompliance",
418
+ args: [variables.creator]
419
+ })
420
+ });
421
+ }
422
+ });
423
+ }
424
+ function useSetCustomFee(options = {}) {
425
+ const { client, resolutionError, chainId, resolvedAddress } = useMemoAirdropFactoryClient(options);
426
+ const queryClient = useQueryClient();
427
+ return useMutation({
428
+ mutationFn: async ({ creator, gasFee, account }) => {
429
+ if (!client) {
430
+ throw resolutionError ?? new MissingClientError("useSetCustomFee", "factory");
431
+ }
432
+ return client.setCustomFee(creator, gasFee, account);
433
+ },
434
+ onSuccess: (_hash, variables) => {
435
+ void queryClient.invalidateQueries({
436
+ queryKey: airdropKeys.resolvedGasFeeAll({ chainId, address: resolvedAddress })
437
+ });
438
+ void queryClient.invalidateQueries({
439
+ queryKey: airdropKeys.customFee({ chainId, address: resolvedAddress }, variables.creator)
440
+ });
441
+ }
442
+ });
443
+ }
444
+ function useSetDefaultDelegateToCompliance(options = {}) {
445
+ const { client, resolutionError, chainId, resolvedAddress } = useMemoAirdropFactoryClient(options);
446
+ const queryClient = useQueryClient();
447
+ return useMutation({
448
+ mutationFn: async (args) => {
449
+ if (!client) {
450
+ throw resolutionError ?? new MissingClientError("useSetDefaultDelegateToCompliance", "factory");
451
+ }
452
+ return client.setDefaultDelegateToCompliance(args.on, args.account);
453
+ },
454
+ onSuccess: () => {
455
+ void queryClient.invalidateQueries({
456
+ queryKey: airdropQueryKeyPrefix({
457
+ chainId,
458
+ address: resolvedAddress,
459
+ fn: "effectiveDelegateToCompliance"
460
+ })
461
+ });
462
+ void queryClient.invalidateQueries({
463
+ queryKey: airdropKeys.compliancePolicyAll({ chainId, address: resolvedAddress })
464
+ });
465
+ }
466
+ });
467
+ }
468
+ function useSetDefaultGasFee(options = {}) {
469
+ const { client, resolutionError, chainId, resolvedAddress } = useMemoAirdropFactoryClient(options);
470
+ const queryClient = useQueryClient();
471
+ return useMutation({
472
+ mutationFn: async ({ gasFee, account }) => {
473
+ if (!client) {
474
+ throw resolutionError ?? new MissingClientError("useSetDefaultGasFee", "factory");
475
+ }
476
+ return client.setDefaultGasFee(gasFee, account);
477
+ },
478
+ onSuccess: () => {
479
+ void queryClient.invalidateQueries({
480
+ queryKey: airdropKeys.resolvedGasFeeAll({ chainId, address: resolvedAddress })
481
+ });
482
+ void queryClient.invalidateQueries({
483
+ queryKey: airdropKeys.fees({ chainId, address: resolvedAddress })
484
+ });
485
+ }
486
+ });
487
+ }
488
+ function useSetMaxGasFee(options = {}) {
489
+ const { client, resolutionError, chainId, resolvedAddress } = useMemoAirdropFactoryClient(options);
490
+ const queryClient = useQueryClient();
491
+ return useMutation({
492
+ mutationFn: async ({ maxGasFee, account }) => {
493
+ if (!client) {
494
+ throw resolutionError ?? new MissingClientError("useSetMaxGasFee", "factory");
495
+ }
496
+ return client.setMaxGasFee(maxGasFee, account);
497
+ },
498
+ onSuccess: () => {
499
+ void queryClient.invalidateQueries({
500
+ queryKey: airdropKeys.fees({ chainId, address: resolvedAddress })
501
+ });
502
+ void queryClient.invalidateQueries({
503
+ queryKey: airdropKeys.resolvedGasFeeAll({ chainId, address: resolvedAddress })
504
+ });
505
+ }
506
+ });
507
+ }
508
+ function useSetDefaultUpgradeable(options = {}) {
509
+ const { client, resolutionError, chainId, resolvedAddress } = useMemoAirdropFactoryClient(options);
510
+ const queryClient = useQueryClient();
511
+ return useMutation({
512
+ mutationFn: async (args) => {
513
+ if (!client) {
514
+ throw resolutionError ?? new MissingClientError("useSetDefaultUpgradeable", "factory");
515
+ }
516
+ return client.setDefaultUpgradeable(args.allowed, args.account);
517
+ },
518
+ onSuccess: () => {
519
+ const scope = { chainId, address: resolvedAddress };
520
+ void queryClient.invalidateQueries({
521
+ queryKey: airdropQueryKeyPrefix({ ...scope, fn: "effectiveUpgradeable" })
522
+ });
523
+ void queryClient.invalidateQueries({
524
+ queryKey: airdropKeys.upgradeabilityPolicyAll(scope)
525
+ });
526
+ void queryClient.invalidateQueries({
527
+ queryKey: airdropKeys.preflightCreateAll(scope)
528
+ });
529
+ }
530
+ });
531
+ }
532
+ function useSetEcdsaImplementation(options = {}) {
533
+ const { client, resolutionError, chainId, resolvedAddress } = useMemoAirdropFactoryClient(options);
534
+ const queryClient = useQueryClient();
535
+ return useMutation({
536
+ mutationFn: async ({ implementation, account }) => {
537
+ if (!client) {
538
+ throw resolutionError ?? new MissingClientError("useSetEcdsaImplementation", "factory");
539
+ }
540
+ return client.setEcdsaImplementation(implementation, account);
541
+ },
542
+ onSuccess: () => {
543
+ const scope = { chainId, address: resolvedAddress };
544
+ void queryClient.invalidateQueries({ queryKey: airdropKeys.implementations(scope) });
545
+ void queryClient.invalidateQueries({
546
+ queryKey: airdropQueryKeyPrefix({ ...scope, fn: "getEcdsaInitCodeHash" })
547
+ });
548
+ void queryClient.invalidateQueries({
549
+ queryKey: airdropQueryKeyPrefix({ ...scope, fn: "predictEcdsaAirdropAddress" })
550
+ });
551
+ void queryClient.invalidateQueries({
552
+ queryKey: airdropKeys.preflightCreateAll(scope)
553
+ });
554
+ }
555
+ });
556
+ }
557
+ function useSetFeeCollector(options = {}) {
558
+ const { client, resolutionError, chainId, resolvedAddress } = useMemoAirdropFactoryClient(options);
559
+ const queryClient = useQueryClient();
560
+ return useMutation({
561
+ mutationFn: async ({ feeCollector, account }) => {
562
+ if (!client) {
563
+ throw resolutionError ?? new MissingClientError("useSetFeeCollector", "factory");
564
+ }
565
+ return client.setFeeCollector(feeCollector, account);
566
+ },
567
+ onSuccess: () => {
568
+ void queryClient.invalidateQueries({
569
+ queryKey: airdropKeys.fees({ chainId, address: resolvedAddress })
570
+ });
571
+ }
572
+ });
573
+ }
574
+ function useSetMerkleImplementation(options = {}) {
575
+ const { client, resolutionError, chainId, resolvedAddress } = useMemoAirdropFactoryClient(options);
576
+ const queryClient = useQueryClient();
577
+ return useMutation({
578
+ mutationFn: async ({ implementation, account }) => {
579
+ if (!client) {
580
+ throw resolutionError ?? new MissingClientError("useSetMerkleImplementation", "factory");
581
+ }
582
+ return client.setMerkleImplementation(implementation, account);
583
+ },
584
+ onSuccess: () => {
585
+ const scope = { chainId, address: resolvedAddress };
586
+ void queryClient.invalidateQueries({ queryKey: airdropKeys.implementations(scope) });
587
+ void queryClient.invalidateQueries({
588
+ queryKey: airdropQueryKeyPrefix({ ...scope, fn: "getMerkleInitCodeHash" })
589
+ });
590
+ void queryClient.invalidateQueries({
591
+ queryKey: airdropQueryKeyPrefix({ ...scope, fn: "predictMerkleAirdropAddress" })
592
+ });
593
+ void queryClient.invalidateQueries({
594
+ queryKey: airdropKeys.preflightCreateAll(scope)
595
+ });
596
+ }
597
+ });
598
+ }
599
+ function useSetUpgradeabilityPolicy(options = {}) {
600
+ const { client, resolutionError, chainId, resolvedAddress } = useMemoAirdropFactoryClient(options);
601
+ const queryClient = useQueryClient();
602
+ return useMutation({
603
+ mutationFn: async (args) => {
604
+ if (!client) {
605
+ throw resolutionError ?? new MissingClientError("useSetUpgradeabilityPolicy", "factory");
606
+ }
607
+ return client.setUpgradeabilityPolicy(args.creator, args.allowed, args.account);
608
+ },
609
+ onSuccess: (_hash, variables) => {
610
+ const scope = { chainId, address: resolvedAddress };
611
+ void queryClient.invalidateQueries({
612
+ queryKey: airdropQueryKey({
613
+ ...scope,
614
+ fn: "effectiveUpgradeable",
615
+ args: [variables.creator]
616
+ })
617
+ });
618
+ void queryClient.invalidateQueries({
619
+ queryKey: airdropKeys.upgradeabilityPolicy(scope, variables.creator)
620
+ });
621
+ void queryClient.invalidateQueries({
622
+ queryKey: airdropKeys.preflightCreateAll(scope)
623
+ });
624
+ }
625
+ });
626
+ }
44
627
 
45
- export { usePredictEcdsaAirdropAddress, usePredictMerkleAirdropAddress };
628
+ export { useClearCompliancePolicy, useClearUpgradeabilityPolicy, useDisableCustomFee, useEcdsaInitCodeHash, useFactoryComplianceDelegate, useFactoryCompliancePolicy, useFactoryCustomFee, useFactoryGrantRole, useFactoryHasRole, useFactoryImplementations, useFactoryRenounceRole, useFactoryRevokeRole, useFactoryRoleConstants, useFactoryRoleMembers, useFactoryUpgradeabilityPolicy, useMerkleInitCodeHash, usePredictEcdsaAirdropAddress, usePredictMerkleAirdropAddress, useSetComplianceDelegate, useSetComplianceManagerImpl, useSetCompliancePolicy, useSetCustomFee, useSetDefaultDelegateToCompliance, useSetDefaultGasFee, useSetDefaultUpgradeable, useSetEcdsaImplementation, useSetFeeCollector, useSetMaxGasFee, useSetMerkleImplementation, useSetUpgradeabilityPolicy };