@tokenops/sdk 2.0.0-alpha.2 → 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 (80) hide show
  1. package/CHANGELOG.md +39 -3
  2. package/README.md +11 -5
  3. package/dist/{chunk-PZZK3O3S.cjs → chunk-4AWQJQXY.cjs} +391 -43
  4. package/dist/{chunk-SPLNGUFF.js → chunk-4IB4IY5Y.js} +1 -1
  5. package/dist/{chunk-A4DCEE33.js → chunk-6HCT4QIX.js} +11 -10
  6. package/dist/{chunk-MM5BV5CS.cjs → chunk-6XOAYDC6.cjs} +4 -4
  7. package/dist/{chunk-FEDX7B6T.cjs → chunk-AHU2HMNE.cjs} +3 -3
  8. package/dist/{chunk-IGO5XSPS.js → chunk-BPIVVCSQ.js} +2 -2
  9. package/dist/{chunk-X7WBPCEU.js → chunk-BXX5TETM.js} +375 -27
  10. package/dist/{chunk-GADGBQJO.js → chunk-GCJFAY4X.js} +2 -2
  11. package/dist/{chunk-IUKKNJ2R.cjs → chunk-GKYZQJGP.cjs} +7 -7
  12. package/dist/{chunk-3YHBO2DL.cjs → chunk-IEKTGJ4J.cjs} +2 -2
  13. package/dist/{chunk-UHHMVBLU.cjs → chunk-JVNJSDQ4.cjs} +2 -2
  14. package/dist/{chunk-VW356KR3.js → chunk-LEYYG4RF.js} +126 -3
  15. package/dist/{chunk-PYYSB5ZN.js → chunk-NGU4JYIR.js} +1 -1
  16. package/dist/{chunk-FT5H2Q7Y.cjs → chunk-PG3WXT3K.cjs} +11 -10
  17. package/dist/{chunk-44YJPMQC.js → chunk-PK6Q6J5F.js} +1 -1
  18. package/dist/{chunk-EBLBPUPI.cjs → chunk-TND5NDV7.cjs} +18 -10
  19. package/dist/{chunk-EYDA6Q6C.js → chunk-U3TBQRT7.js} +10 -2
  20. package/dist/{chunk-WJMEBBU7.js → chunk-WRWRA4TN.js} +1 -1
  21. package/dist/{chunk-FHWSBGWE.cjs → chunk-YABHXJNH.cjs} +5 -5
  22. package/dist/{chunk-AREQJHKA.cjs → chunk-YTIYTV4K.cjs} +129 -2
  23. package/dist/core/addresses.d.ts +4 -4
  24. package/dist/core/errors.d.ts +1 -1
  25. package/dist/fhe-airdrop/abis/airdrop-base.d.ts +19 -0
  26. package/dist/fhe-airdrop/abis/ecdsa.d.ts +19 -0
  27. package/dist/fhe-airdrop/abis/factory.d.ts +113 -0
  28. package/dist/fhe-airdrop/abis/merkle.d.ts +19 -0
  29. package/dist/fhe-airdrop/advanced/index.cjs +4 -4
  30. package/dist/fhe-airdrop/advanced/index.js +1 -1
  31. package/dist/fhe-airdrop/advanced/react/index.cjs +110 -80
  32. package/dist/fhe-airdrop/advanced/react/index.d.cts +1 -0
  33. package/dist/fhe-airdrop/advanced/react/index.d.ts +1 -0
  34. package/dist/fhe-airdrop/advanced/react/index.js +34 -5
  35. package/dist/fhe-airdrop/advanced/react/useDisableCustomFee.d.ts +2 -1
  36. package/dist/fhe-airdrop/advanced/react/useFactoryRenounceRole.d.ts +4 -3
  37. package/dist/fhe-airdrop/advanced/react/useFactoryRevokeRole.d.ts +9 -7
  38. package/dist/fhe-airdrop/advanced/react/useFactoryRoleMembers.d.ts +6 -5
  39. package/dist/fhe-airdrop/advanced/react/useSetCustomFee.d.ts +2 -1
  40. package/dist/fhe-airdrop/advanced/react/useSetDefaultGasFee.d.ts +5 -3
  41. package/dist/fhe-airdrop/advanced/react/useSetMaxGasFee.d.ts +33 -0
  42. package/dist/fhe-airdrop/airdrop-base.d.ts +47 -8
  43. package/dist/fhe-airdrop/constants.d.ts +9 -1
  44. package/dist/fhe-airdrop/ecdsa.d.ts +13 -0
  45. package/dist/fhe-airdrop/errors.d.ts +59 -0
  46. package/dist/fhe-airdrop/factory.d.ts +62 -22
  47. package/dist/fhe-airdrop/guards.d.ts +87 -2
  48. package/dist/fhe-airdrop/index.cjs +67 -55
  49. package/dist/fhe-airdrop/index.d.cts +3 -3
  50. package/dist/fhe-airdrop/index.d.ts +3 -3
  51. package/dist/fhe-airdrop/index.js +4 -4
  52. package/dist/fhe-airdrop/react/index.cjs +237 -177
  53. package/dist/fhe-airdrop/react/index.d.cts +4 -1
  54. package/dist/fhe-airdrop/react/index.d.ts +4 -1
  55. package/dist/fhe-airdrop/react/index.js +72 -15
  56. package/dist/fhe-airdrop/react/keys.d.ts +8 -0
  57. package/dist/fhe-airdrop/react/useFactoryFees.d.ts +11 -4
  58. package/dist/fhe-airdrop/react/useIsAirdrop.d.ts +44 -0
  59. package/dist/fhe-airdrop/react/useRefreshComplianceBalance.d.ts +36 -0
  60. package/dist/fhe-airdrop/react/useResolveGasFee.d.ts +30 -0
  61. package/dist/fhe-airdrop/types.d.ts +13 -0
  62. package/dist/fhe-disperse/index.cjs +21 -21
  63. package/dist/fhe-disperse/index.js +2 -2
  64. package/dist/fhe-disperse/react/index.cjs +22 -22
  65. package/dist/fhe-disperse/react/index.js +3 -3
  66. package/dist/fhe-vesting/advanced/index.cjs +5 -5
  67. package/dist/fhe-vesting/advanced/index.js +3 -3
  68. package/dist/fhe-vesting/advanced/react/index.cjs +7 -7
  69. package/dist/fhe-vesting/advanced/react/index.js +4 -4
  70. package/dist/fhe-vesting/index.cjs +8 -8
  71. package/dist/fhe-vesting/index.js +2 -2
  72. package/dist/fhe-vesting/react/index.cjs +114 -114
  73. package/dist/fhe-vesting/react/index.js +3 -3
  74. package/dist/index.cjs +18 -18
  75. package/dist/index.js +1 -1
  76. package/dist/testnet-faucet/index.cjs +14 -14
  77. package/dist/testnet-faucet/index.js +2 -2
  78. package/dist/testnet-faucet/react/index.cjs +8 -8
  79. package/dist/testnet-faucet/react/index.js +3 -3
  80. package/package.json +1 -1
@@ -42,7 +42,9 @@ export { useMerkleRoot, type UseMerkleRootArgs } from "./useMerkleRoot.js";
42
42
  export { useClaimedAmount, type UseClaimedAmountArgs } from "./useClaimedAmount.js";
43
43
  export { useComplianceManager, type UseComplianceManagerArgs } from "./useComplianceManager.js";
44
44
  export { useFactoryFees, type FactoryFees, type UseFactoryFeesArgs } from "./useFactoryFees.js";
45
+ export { useResolveGasFee, type UseResolveGasFeeArgs } from "./useResolveGasFee.js";
45
46
  export { useFactoryRegistry, type FactoryRegistryPage, type UseFactoryRegistryArgs, } from "./useFactoryRegistry.js";
47
+ export { useIsAirdrop, type UseIsAirdropArgs } from "./useIsAirdrop.js";
46
48
  export { useEffectiveUpgradeable, type UseEffectiveUpgradeableArgs, } from "./useEffectiveUpgradeable.js";
47
49
  export { useAirdropConfig, type AirdropConfig, type UseAirdropConfigArgs, } from "./useAirdropConfig.js";
48
50
  export { useAirdropDeploymentMode, type UseAirdropDeploymentModeArgs, } from "./useAirdropDeploymentMode.js";
@@ -97,6 +99,7 @@ export { useWithdrawGasFee, type WithdrawGasFeeArgs } from "./useWithdrawGasFee.
97
99
  export { useAdminBatchDiscloseBalanceToParties, type UseAdminBatchDiscloseBalanceToPartiesArgs, } from "./useAdminBatchDiscloseBalanceToParties.js";
98
100
  export { useAdminDiscloseBalanceToParty, type UseAdminDiscloseBalanceToPartyArgs, } from "./useAdminDiscloseBalanceToParty.js";
99
101
  export { useAdminGetCurrentBalance } from "./useAdminGetCurrentBalance.js";
102
+ export { useRefreshComplianceBalance } from "./useRefreshComplianceBalance.js";
100
103
  export { useAccessEcdsaClaimAmount } from "./useAccessEcdsaClaimAmount.js";
101
104
  export { useAccessMerkleClaimAmount } from "./useAccessMerkleClaimAmount.js";
102
105
  export { airdropQueryKey, airdropQueryKeyPrefix, type AirdropClientOptions, type AirdropHookOptions, type AirdropInstanceClientOptions, type AirdropInstanceHookOptions, type EcdsaAirdropInstanceClientOptions, type EcdsaAirdropInstanceHookOptions, } from "./_shared.js";
@@ -110,7 +113,7 @@ export { buildMerkleTree, leafOf, type BuildMerkleTreeArgs, type BuiltMerkleTree
110
113
  export type { FundInput } from "../factory.js";
111
114
  export type { WriteAccountOverride } from "../airdrop-base.js";
112
115
  export { buildMerkleCampaign, encryptCampaignAmounts, planMerkleCampaign, rotateMerkleRoot, validateCampaignRecipients, type BuildMerkleCampaignArgs, type CampaignSubmitterOption, type EncryptCampaignAmountsArgs, type EncryptedCampaignLeaf, type PlanMerkleCampaignArgs, type PlannedCampaign, type RotatedCampaign, type RotateMerkleRootArgs, } from "../campaign.js";
113
- export { preflightClaim, preflightCreate, type ClaimPreflightTarget, type EcdsaClaimPreflightSignature, type PreflightClaimArgs, type PreflightCreateArgs, } from "../guards.js";
116
+ export { preflightClaim, preflightCreate, type AirdropRegistry, type ClaimPreflightTarget, type EcdsaClaimPreflightSignature, type PreflightClaimArgs, type PreflightCreateArgs, } from "../guards.js";
114
117
  export type { PreflightResult } from "../../core/preflight.js";
115
118
  export { grantInstanceRoles, planInstanceRoleSplit, type InstanceRoleAssignment, type RoleGrantOutcome, type RoleGrantStep, type RoleName, } from "../roles.js";
116
119
  export { type DedupMode, type DeploymentMode } from "../constants.js";
@@ -42,7 +42,9 @@ export { useMerkleRoot, type UseMerkleRootArgs } from "./useMerkleRoot.js";
42
42
  export { useClaimedAmount, type UseClaimedAmountArgs } from "./useClaimedAmount.js";
43
43
  export { useComplianceManager, type UseComplianceManagerArgs } from "./useComplianceManager.js";
44
44
  export { useFactoryFees, type FactoryFees, type UseFactoryFeesArgs } from "./useFactoryFees.js";
45
+ export { useResolveGasFee, type UseResolveGasFeeArgs } from "./useResolveGasFee.js";
45
46
  export { useFactoryRegistry, type FactoryRegistryPage, type UseFactoryRegistryArgs, } from "./useFactoryRegistry.js";
47
+ export { useIsAirdrop, type UseIsAirdropArgs } from "./useIsAirdrop.js";
46
48
  export { useEffectiveUpgradeable, type UseEffectiveUpgradeableArgs, } from "./useEffectiveUpgradeable.js";
47
49
  export { useAirdropConfig, type AirdropConfig, type UseAirdropConfigArgs, } from "./useAirdropConfig.js";
48
50
  export { useAirdropDeploymentMode, type UseAirdropDeploymentModeArgs, } from "./useAirdropDeploymentMode.js";
@@ -97,6 +99,7 @@ export { useWithdrawGasFee, type WithdrawGasFeeArgs } from "./useWithdrawGasFee.
97
99
  export { useAdminBatchDiscloseBalanceToParties, type UseAdminBatchDiscloseBalanceToPartiesArgs, } from "./useAdminBatchDiscloseBalanceToParties.js";
98
100
  export { useAdminDiscloseBalanceToParty, type UseAdminDiscloseBalanceToPartyArgs, } from "./useAdminDiscloseBalanceToParty.js";
99
101
  export { useAdminGetCurrentBalance } from "./useAdminGetCurrentBalance.js";
102
+ export { useRefreshComplianceBalance } from "./useRefreshComplianceBalance.js";
100
103
  export { useAccessEcdsaClaimAmount } from "./useAccessEcdsaClaimAmount.js";
101
104
  export { useAccessMerkleClaimAmount } from "./useAccessMerkleClaimAmount.js";
102
105
  export { airdropQueryKey, airdropQueryKeyPrefix, type AirdropClientOptions, type AirdropHookOptions, type AirdropInstanceClientOptions, type AirdropInstanceHookOptions, type EcdsaAirdropInstanceClientOptions, type EcdsaAirdropInstanceHookOptions, } from "./_shared.js";
@@ -110,7 +113,7 @@ export { buildMerkleTree, leafOf, type BuildMerkleTreeArgs, type BuiltMerkleTree
110
113
  export type { FundInput } from "../factory.js";
111
114
  export type { WriteAccountOverride } from "../airdrop-base.js";
112
115
  export { buildMerkleCampaign, encryptCampaignAmounts, planMerkleCampaign, rotateMerkleRoot, validateCampaignRecipients, type BuildMerkleCampaignArgs, type CampaignSubmitterOption, type EncryptCampaignAmountsArgs, type EncryptedCampaignLeaf, type PlanMerkleCampaignArgs, type PlannedCampaign, type RotatedCampaign, type RotateMerkleRootArgs, } from "../campaign.js";
113
- export { preflightClaim, preflightCreate, type ClaimPreflightTarget, type EcdsaClaimPreflightSignature, type PreflightClaimArgs, type PreflightCreateArgs, } from "../guards.js";
116
+ export { preflightClaim, preflightCreate, type AirdropRegistry, type ClaimPreflightTarget, type EcdsaClaimPreflightSignature, type PreflightClaimArgs, type PreflightCreateArgs, } from "../guards.js";
114
117
  export type { PreflightResult } from "../../core/preflight.js";
115
118
  export { grantInstanceRoles, planInstanceRoleSplit, type InstanceRoleAssignment, type RoleGrantOutcome, type RoleGrantStep, type RoleName, } from "../roles.js";
116
119
  export { type DedupMode, type DeploymentMode } from "../constants.js";
@@ -1,15 +1,15 @@
1
- import { grantInstanceRoles, buildMerkleCampaign, encryptCampaignAmounts, planMerkleCampaign, rotateMerkleRoot } from '../../chunk-GADGBQJO.js';
2
- export { buildMerkleCampaign, buildMerkleTree, encryptCampaignAmounts, grantInstanceRoles, leafOf, planInstanceRoleSplit, planMerkleCampaign, rotateMerkleRoot, validateCampaignRecipients } from '../../chunk-GADGBQJO.js';
3
- import { useMemoAirdropBaseClient, airdropQueryKey, useMemoMerkleAirdropClient, useMemoAirdropFactoryClient, airdropKeys, useMemoEcdsaAirdropClient, useMemoComplianceManagerClient, AIRDROP_FN, airdropQueryKeyPrefix } from '../../chunk-EYDA6Q6C.js';
4
- export { airdropQueryKey, airdropQueryKeyPrefix } from '../../chunk-EYDA6Q6C.js';
5
- import { resolveEncryptor, signClaimAuthorization } from '../../chunk-X7WBPCEU.js';
6
- export { encryptUint64, encryptUint64Batch, resolveEncryptor, signClaimAuthorization } from '../../chunk-X7WBPCEU.js';
7
- import { preflightClaim, preflightCreate } from '../../chunk-VW356KR3.js';
8
- export { AlreadyClaimedError, ClaimNotStartedError, ClaimWindowClosedError, DedupIdConsumedError, FeeCollectorSelfAdministeredError, MerkleUupsUnsupportedError, NonStockWrapperError, PredictionDriftError, SaltCollisionError, SignatureExpiredError, UnauthorizedRedirectError, UpgradeabilityNotAllowedError, preflightClaim, preflightCreate } from '../../chunk-VW356KR3.js';
1
+ import { grantInstanceRoles, buildMerkleCampaign, encryptCampaignAmounts, planMerkleCampaign, rotateMerkleRoot } from '../../chunk-GCJFAY4X.js';
2
+ export { buildMerkleCampaign, buildMerkleTree, encryptCampaignAmounts, grantInstanceRoles, leafOf, planInstanceRoleSplit, planMerkleCampaign, rotateMerkleRoot, validateCampaignRecipients } from '../../chunk-GCJFAY4X.js';
3
+ import { useMemoAirdropBaseClient, airdropQueryKey, useMemoMerkleAirdropClient, useMemoAirdropFactoryClient, AIRDROP_FN, airdropKeys, useMemoEcdsaAirdropClient, useMemoComplianceManagerClient } from '../../chunk-U3TBQRT7.js';
4
+ export { airdropQueryKey, airdropQueryKeyPrefix } from '../../chunk-U3TBQRT7.js';
5
+ import { resolveEncryptor, signClaimAuthorization } from '../../chunk-BXX5TETM.js';
6
+ export { encryptUint64, encryptUint64Batch, resolveEncryptor, signClaimAuthorization } from '../../chunk-BXX5TETM.js';
7
+ import { preflightClaim, preflightCreate } from '../../chunk-LEYYG4RF.js';
8
+ export { AlreadyClaimedError, ClaimNotStartedError, ClaimWindowClosedError, DedupIdConsumedError, FeeCollectorSelfAdministeredError, MerkleUupsUnsupportedError, NonStockWrapperError, PredictionDriftError, SaltCollisionError, SignatureExpiredError, UnauthorizedRedirectError, UpgradeabilityNotAllowedError, preflightClaim, preflightCreate } from '../../chunk-LEYYG4RF.js';
9
9
  import '../../chunk-ZWXJTBZO.js';
10
10
  import '../../chunk-NWFMBLSQ.js';
11
11
  import '../../chunk-4RAAATVY.js';
12
- import '../../chunk-A4DCEE33.js';
12
+ import '../../chunk-6HCT4QIX.js';
13
13
  import '../../chunk-ZA673I3O.js';
14
14
  import '../../chunk-KWFFIJYX.js';
15
15
  import { MissingClientError, MissingWalletClientError } from '../../chunk-QBJ7O2B4.js';
@@ -122,15 +122,31 @@ function useFactoryFees(args = {}) {
122
122
  ...args.query,
123
123
  queryKey: airdropQueryKey({ chainId, address: resolvedAddress, fn: "fees", args: [] }),
124
124
  queryFn: async () => {
125
- const [feeCollector, defaultGasFee] = await Promise.all([
125
+ const [feeCollector, defaultGasFee, maxGasFee] = await Promise.all([
126
126
  client.feeCollector(),
127
- client.defaultGasFee()
127
+ client.defaultGasFee(),
128
+ client.maxGasFee()
128
129
  ]);
129
- return { feeCollector, defaultGasFee };
130
+ return { feeCollector, defaultGasFee, maxGasFee };
130
131
  },
131
132
  enabled: Boolean(client && (args.query?.enabled ?? true))
132
133
  });
133
134
  }
135
+ function useResolveGasFee(args = {}) {
136
+ const { creator, ...base } = args;
137
+ const { client, chainId, resolvedAddress } = useMemoAirdropFactoryClient(base);
138
+ return useQuery({
139
+ ...args.query,
140
+ queryKey: airdropQueryKey({
141
+ chainId,
142
+ address: resolvedAddress,
143
+ fn: AIRDROP_FN.resolvedGasFee,
144
+ args: [creator]
145
+ }),
146
+ queryFn: () => client.resolveGasFee(creator),
147
+ enabled: Boolean(client && creator && (args.query?.enabled ?? true))
148
+ });
149
+ }
134
150
  function useFactoryRegistry(args = {}) {
135
151
  const { offset = 0n, limit = 50n, ...base } = args;
136
152
  const { client, chainId, resolvedAddress } = useMemoAirdropFactoryClient(base);
@@ -152,6 +168,24 @@ function useFactoryRegistry(args = {}) {
152
168
  enabled: Boolean(client && (args.query?.enabled ?? true))
153
169
  });
154
170
  }
171
+ function useIsAirdrop(args = {}) {
172
+ const { candidate, ...base } = args;
173
+ const { client, chainId, resolvedAddress } = useMemoAirdropFactoryClient(base);
174
+ return useQuery({
175
+ // Per-result, not blanket: `true` is immutable (append-only registry),
176
+ // `false` is not. See the TSDoc above.
177
+ staleTime: (query) => query.state.data === true ? Infinity : 0,
178
+ ...args.query,
179
+ queryKey: airdropQueryKey({
180
+ chainId,
181
+ address: resolvedAddress,
182
+ fn: AIRDROP_FN.isAirdrop,
183
+ args: [candidate]
184
+ }),
185
+ queryFn: () => client.isAirdrop(candidate),
186
+ enabled: Boolean(client && candidate && (args.query?.enabled ?? true))
187
+ });
188
+ }
155
189
  function useEffectiveUpgradeable(args = {}) {
156
190
  const { creator, ...base } = args;
157
191
  const { client, chainId, resolvedAddress } = useMemoAirdropFactoryClient(base);
@@ -531,7 +565,10 @@ function useCreateEcdsaAirdrop(options = {}) {
531
565
  },
532
566
  onSuccess: () => {
533
567
  void queryClient.invalidateQueries({
534
- queryKey: airdropQueryKeyPrefix({ chainId, address: resolvedAddress, fn: "registry" })
568
+ queryKey: airdropKeys.registryAll({ chainId, address: resolvedAddress })
569
+ });
570
+ void queryClient.invalidateQueries({
571
+ queryKey: airdropKeys.isAirdropAll({ chainId, address: resolvedAddress })
535
572
  });
536
573
  }
537
574
  });
@@ -548,7 +585,10 @@ function useCreateMerkleAirdrop(options = {}) {
548
585
  },
549
586
  onSuccess: () => {
550
587
  void queryClient.invalidateQueries({
551
- queryKey: airdropQueryKeyPrefix({ chainId, address: resolvedAddress, fn: "registry" })
588
+ queryKey: airdropKeys.registryAll({ chainId, address: resolvedAddress })
589
+ });
590
+ void queryClient.invalidateQueries({
591
+ queryKey: airdropKeys.isAirdropAll({ chainId, address: resolvedAddress })
552
592
  });
553
593
  }
554
594
  });
@@ -885,6 +925,9 @@ function useCreateAndFundEcdsaAirdrop(options = {}) {
885
925
  void queryClient.invalidateQueries({
886
926
  queryKey: airdropKeys.registryAll({ chainId, address: resolvedAddress })
887
927
  });
928
+ void queryClient.invalidateQueries({
929
+ queryKey: airdropKeys.isAirdropAll({ chainId, address: resolvedAddress })
930
+ });
888
931
  }
889
932
  });
890
933
  }
@@ -902,6 +945,9 @@ function useCreateAndFundMerkleAirdrop(options = {}) {
902
945
  void queryClient.invalidateQueries({
903
946
  queryKey: airdropKeys.registryAll({ chainId, address: resolvedAddress })
904
947
  });
948
+ void queryClient.invalidateQueries({
949
+ queryKey: airdropKeys.isAirdropAll({ chainId, address: resolvedAddress })
950
+ });
905
951
  }
906
952
  });
907
953
  }
@@ -1121,6 +1167,17 @@ function useAdminGetCurrentBalance(options) {
1121
1167
  }
1122
1168
  });
1123
1169
  }
1170
+ function useRefreshComplianceBalance(options) {
1171
+ const { client } = useMemoAirdropBaseClient(options);
1172
+ return useMutation({
1173
+ mutationFn: async (args) => {
1174
+ if (!client) {
1175
+ throw new MissingClientError("useRefreshComplianceBalance", "airdrop-base");
1176
+ }
1177
+ return client.refreshComplianceBalance(args ?? {});
1178
+ }
1179
+ });
1180
+ }
1124
1181
  function useAccessEcdsaClaimAmount(options) {
1125
1182
  const { client } = useMemoEcdsaAirdropClient(options);
1126
1183
  return useMutation({
@@ -1144,4 +1201,4 @@ function useAccessMerkleClaimAmount(options) {
1144
1201
  });
1145
1202
  }
1146
1203
 
1147
- export { useAccessEcdsaClaimAmount, useAccessMerkleClaimAmount, useAddComplianceDelegate, useAdminBatchDiscloseBalanceToParties, useAdminDiscloseBalanceToParty, useAdminGetCurrentBalance, useAirdropConfig, useAirdropDeploymentMode, useAirdropGasFee, useAirdropGrantRole, useAirdropHasRole, useAirdropPause, useAirdropPaused, useAirdropRenounceRole, useAirdropRevokeRole, useAirdropRoleAdmin, useAirdropRoleConstants, useAirdropRoleMembers, useAirdropToken, useAirdropUpgradeToAndCall, useAirdropWindow, useBatchDiscloseHandlesToParty, useBuildMerkleCampaign, useClaimedAmount, useComplianceGrantRole, useComplianceHasRole, useComplianceInfo, useComplianceManager, useComplianceManagerOf, useComplianceRenounceRole, useComplianceRevokeRole, useComplianceRoleConstants, useComplianceRoleMembers, useCreateAndFundEcdsaAirdrop, useCreateAndFundMerkleAirdrop, useCreateEcdsaAirdrop, useCreateMerkleAirdrop, useDiscloseHandleToParty, useEcdsaClaim, useEcdsaClaimAndUnwrap, useEcdsaDomain, useEffectiveDelegateToCompliance, useEffectiveUpgradeable, useEncryptCampaignAmounts, useExtendClaimWindow, useFactoryFees, useFactoryRegistry, useFundAirdrop, useGrantInstanceRoles, useIsActiveDelegate, useIsMerkleRootMutable, useIsSignatureValid, useMerkleClaim, useMerkleClaimAndUnwrap, useMerkleRoot, usePlanMerkleCampaign, usePreflightClaim, usePreflightCreateAirdrop, useRescueERC20, useRescueOtherConfidentialToken, useRevokeComplianceDelegate, useRotateMerkleRoot, useSetMerkleRoot, useSignClaimAuthorization, useWithdrawConfidential, useWithdrawGasFee };
1204
+ export { useAccessEcdsaClaimAmount, useAccessMerkleClaimAmount, useAddComplianceDelegate, useAdminBatchDiscloseBalanceToParties, useAdminDiscloseBalanceToParty, useAdminGetCurrentBalance, useAirdropConfig, useAirdropDeploymentMode, useAirdropGasFee, useAirdropGrantRole, useAirdropHasRole, useAirdropPause, useAirdropPaused, useAirdropRenounceRole, useAirdropRevokeRole, useAirdropRoleAdmin, useAirdropRoleConstants, useAirdropRoleMembers, useAirdropToken, useAirdropUpgradeToAndCall, useAirdropWindow, useBatchDiscloseHandlesToParty, useBuildMerkleCampaign, useClaimedAmount, useComplianceGrantRole, useComplianceHasRole, useComplianceInfo, useComplianceManager, useComplianceManagerOf, useComplianceRenounceRole, useComplianceRevokeRole, useComplianceRoleConstants, useComplianceRoleMembers, useCreateAndFundEcdsaAirdrop, useCreateAndFundMerkleAirdrop, useCreateEcdsaAirdrop, useCreateMerkleAirdrop, useDiscloseHandleToParty, useEcdsaClaim, useEcdsaClaimAndUnwrap, useEcdsaDomain, useEffectiveDelegateToCompliance, useEffectiveUpgradeable, useEncryptCampaignAmounts, useExtendClaimWindow, useFactoryFees, useFactoryRegistry, useFundAirdrop, useGrantInstanceRoles, useIsActiveDelegate, useIsAirdrop, useIsMerkleRootMutable, useIsSignatureValid, useMerkleClaim, useMerkleClaimAndUnwrap, useMerkleRoot, usePlanMerkleCampaign, usePreflightClaim, usePreflightCreateAirdrop, useRefreshComplianceBalance, useRescueERC20, useRescueOtherConfidentialToken, useResolveGasFee, useRevokeComplianceDelegate, useRotateMerkleRoot, useSetMerkleRoot, useSignClaimAuthorization, useWithdrawConfidential, useWithdrawGasFee };
@@ -33,6 +33,8 @@ export declare const AIRDROP_FN: {
33
33
  readonly isSignatureValid: "isSignatureValid";
34
34
  readonly fees: "fees";
35
35
  readonly registry: "registry";
36
+ readonly isAirdrop: "isAirdrop";
37
+ readonly resolvedGasFee: "resolvedGasFee";
36
38
  readonly customFee: "customFee";
37
39
  readonly implementations: "implementations";
38
40
  readonly compliancePolicy: "compliancePolicy";
@@ -66,8 +68,14 @@ export declare const airdropKeys: {
66
68
  readonly fees: (s: Scope) => unknown[];
67
69
  readonly customFee: (s: Scope, creator: Address | undefined) => unknown[];
68
70
  readonly customFeeAll: (s: Scope) => unknown[];
71
+ readonly resolvedGasFee: (s: Scope, creator: Address | undefined) => unknown[];
72
+ /** Every creator's resolved fee; the default and any override both move it. */
73
+ readonly resolvedGasFeeAll: (s: Scope) => unknown[];
69
74
  /** Every registry page, whatever offset/limit was queried. */
70
75
  readonly registryAll: (s: Scope) => unknown[];
76
+ readonly isAirdrop: (s: Scope, candidate: Address | undefined) => unknown[];
77
+ /** Every genuineness answer from this factory; a create adds one address. */
78
+ readonly isAirdropAll: (s: Scope) => unknown[];
71
79
  readonly implementations: (s: Scope) => unknown[];
72
80
  readonly compliancePolicy: (s: Scope, creator: Address | undefined) => unknown[];
73
81
  readonly compliancePolicyAll: (s: Scope) => unknown[];
@@ -11,14 +11,21 @@ export interface FactoryFees {
11
11
  feeCollector: Address;
12
12
  /** Wei charged per claim on a fee-charging campaign, absent a per-creator custom fee. */
13
13
  defaultGasFee: bigint;
14
+ /**
15
+ * The factory's own ceiling, in wei. Bounds both fee setters and the fee
16
+ * resolved at create, so it is the upper bound a `maxAcceptedGasFee` ever
17
+ * has to clear.
18
+ */
19
+ maxGasFee: bigint;
14
20
  }
15
21
  /** @alpha */
16
22
  export type UseFactoryFeesArgs = AirdropHookOptions<FactoryFees>;
17
23
  /**
18
- * Read the airdrop factory's default fee configuration — `feeCollector` and
19
- * `defaultGasFee` in one round trip. For a specific creator's override, read
20
- * `factory.getCustomFee(creator)` from the headless client directly (not
21
- * wrapped here — see the module's scope-discipline note).
24
+ * Read the airdrop factory's chain-wide fee configuration: `feeCollector`,
25
+ * `defaultGasFee` and `maxGasFee` in one round trip. For the number a specific
26
+ * creator's `maxAcceptedGasFee` is actually checked against, use
27
+ * `factory.resolveGasFee(creator)` from the headless client: it folds in that
28
+ * creator's `getCustomFee` override, which this hook does not read.
22
29
  *
23
30
  * @example
24
31
  * const { data: fees } = useFactoryFees();
@@ -0,0 +1,44 @@
1
+ import { type UseQueryResult } from "@tanstack/react-query";
2
+ import type { Address } from "viem";
3
+ import { type AirdropHookOptions } from "./_shared.js";
4
+ /** @alpha */
5
+ export interface UseIsAirdropArgs extends AirdropHookOptions<boolean> {
6
+ /** The address to check against the factory's registry. */
7
+ candidate?: Address;
8
+ }
9
+ /**
10
+ * Ask the canonical factory whether it created `candidate` - the genuineness
11
+ * check (audit-10).
12
+ *
13
+ * **Run this before trusting an address a user pasted, a link carried, or an
14
+ * indexer returned.** A look-alike instance with the same ABI, the same events
15
+ * and a pool the attacker controls is cheap to deploy, and nothing readable at
16
+ * the instance tells it apart. A claim against one succeeds and delivers
17
+ * nothing.
18
+ *
19
+ * The factory this asks is the one resolved from `src/core/addresses.ts` for
20
+ * the connected chain, which is what makes the answer worth anything: an
21
+ * instance that names its own factory names a fake one.
22
+ *
23
+ * **Only a `true` is cached.** The registry is append-only, so a `true` can
24
+ * never become `false` and is safe to hold forever. A `false` is not stable:
25
+ * the address can be created later by another tab, another service, or the
26
+ * headless client, none of which reaches this hook's invalidations - so caching
27
+ * it would serve a stale false negative indefinitely and, for a security check,
28
+ * in the direction that blocks a legitimate claim. Negative answers therefore
29
+ * stay fresh and refetch normally. Override either with `query.staleTime`.
30
+ *
31
+ * **The `address` override is the trust root.** Like every factory hook this
32
+ * accepts `address`, and `useMemoAirdropFactoryClient` prefers it over
33
+ * `src/core/addresses.ts`. That is what makes the hook usable on a local chain,
34
+ * but it also means an attacker-supplied factory address would answer `true`
35
+ * for its own look-alike. Pass `address` only from a source you trust at least
36
+ * as much as the registry; when in doubt, omit it.
37
+ *
38
+ * @example
39
+ * const { data: genuine } = useIsAirdrop({ candidate: fromUrl });
40
+ * if (genuine === false) return <Warning address={fromUrl} />;
41
+ *
42
+ * @alpha
43
+ */
44
+ export declare function useIsAirdrop(args?: UseIsAirdropArgs): UseQueryResult<boolean, Error>;
@@ -0,0 +1,36 @@
1
+ import { type UseMutationResult } from "@tanstack/react-query";
2
+ import type { EncryptedViewResult } from "../../fhe/types.js";
3
+ import type { WriteAccountOverride } from "../airdrop-base.js";
4
+ import { type AirdropInstanceClientOptions } from "./_shared.js";
5
+ /**
6
+ * **Submits a transaction.** Re-grants the compliance-manager clone on the
7
+ * instance's current pool balance and returns the handle it was granted on.
8
+ *
9
+ * **Permissionless** (audit-04), unlike every other disclosure hook here. The
10
+ * token rotates the instance's balance handle on every incoming transfer,
11
+ * including a direct one no airdrop code observes, and the clone's existing
12
+ * grant does not follow. Anyone may restore it because there is no argument to
13
+ * abuse: the only handle read is the instance's own balance and the only
14
+ * grantee is the clone wired at initialization.
15
+ *
16
+ * The handle comes from the receipt's ACL `Allowed` event naming the CLONE, not
17
+ * the caller - so unless the connected account is the clone, it cannot decrypt
18
+ * what this returns. That is also why it is a mutation: the entrypoint calls
19
+ * `FHE.allow`, so its handle can never come from a simulation (CLAUDE.md
20
+ * Pitfall #1).
21
+ *
22
+ * **A snapshot, not a subscription.** The handle stays readable forever (ACL is
23
+ * append-only), but the next incoming transfer rotates the instance onto a new
24
+ * handle the clone was never granted on. Re-run this after any transfer in.
25
+ *
26
+ * **Invalidates:** nothing, and nothing invalidates it - a mutation result is
27
+ * not a cache entry, so no write can refresh it. Re-run it yourself after
28
+ * `useFundAirdrop` or `useWithdrawConfidential`.
29
+ *
30
+ * @example
31
+ * const refresh = useRefreshComplianceBalance({ address: airdropAddress });
32
+ * const { handle } = await refresh.mutateAsync();
33
+ *
34
+ * @alpha
35
+ */
36
+ export declare function useRefreshComplianceBalance(options: AirdropInstanceClientOptions): UseMutationResult<EncryptedViewResult, Error, WriteAccountOverride | void>;
@@ -0,0 +1,30 @@
1
+ import { type UseQueryResult } from "@tanstack/react-query";
2
+ import type { Address } from "viem";
3
+ import { type AirdropHookOptions } from "./_shared.js";
4
+ /** @alpha */
5
+ export interface UseResolveGasFeeArgs extends AirdropHookOptions<bigint> {
6
+ /** The account that will send `create*`. Fee overrides are per-creator. */
7
+ creator?: Address;
8
+ }
9
+ /**
10
+ * The per-claim fee a `create*` from `creator` would freeze into the new
11
+ * instance right now: their `setCustomFee` override when enabled, else the
12
+ * factory default.
13
+ *
14
+ * **This is the number `common.maxAcceptedGasFee` is checked against**, so it is
15
+ * what a create form should show before the creator picks a bound. Composing it
16
+ * from `useFactoryFees` and `useFactoryCustomFee` by hand means re-implementing
17
+ * the override-over-default rule in every consumer, and getting it wrong reads
18
+ * as "no fee" on exactly the accounts that have one.
19
+ *
20
+ * **A snapshot, not a quote.** `FEE_MANAGER_ROLE` can move it between this read
21
+ * and the create landing, which is the case `maxAcceptedGasFee` exists to catch -
22
+ * so treat this as what to *show*, never as a reason to skip the bound.
23
+ *
24
+ * @example
25
+ * const { data: fee } = useResolveGasFee({ creator: address });
26
+ * // then: params.common.maxAcceptedGasFee = fee ?? 0n
27
+ *
28
+ * @alpha
29
+ */
30
+ export declare function useResolveGasFee(args?: UseResolveGasFeeArgs): UseQueryResult<bigint, Error>;
@@ -20,6 +20,19 @@ export interface CommonAirdropParams {
20
20
  unwrappable: boolean;
21
21
  /** Client admin AND client delegate of the compliance clone. Zero means msg.sender. */
22
22
  complianceAdmin: Address;
23
+ /**
24
+ * The highest per-claim gas fee this creator accepts being frozen into the new
25
+ * instance, in wei. The factory resolves the creator's fee at execution time
26
+ * (their custom override, else the factory default) and reverts
27
+ * `GasFeeNotAccepted` if it lands above this bound.
28
+ *
29
+ * Required, and deliberately so: the fee is immutable once frozen, and the
30
+ * value that resolves is chosen by the factory admin, not the creator. A
31
+ * default here would hand that decision back to whoever is not making it.
32
+ * Pass `0n` to accept only a zero-fee campaign, or {@link UINT96_MAX} to
33
+ * accept whatever resolves.
34
+ */
35
+ maxAcceptedGasFee: bigint;
23
36
  }
24
37
  /** @alpha */
25
38
  export interface EcdsaAirdropParams {
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var chunk3YHBO2DL_cjs = require('../chunk-3YHBO2DL.cjs');
3
+ var chunkIEKTGJ4J_cjs = require('../chunk-IEKTGJ4J.cjs');
4
4
  var chunkKFRDLKMA_cjs = require('../chunk-KFRDLKMA.cjs');
5
5
  require('../chunk-TEBM66WA.cjs');
6
6
  require('../chunk-FAXIIH5R.cjs');
7
7
  var chunkFWHYQZ5E_cjs = require('../chunk-FWHYQZ5E.cjs');
8
8
  require('../chunk-UG5RKLU2.cjs');
9
9
  require('../chunk-MVDQMV25.cjs');
10
- require('../chunk-FT5H2Q7Y.cjs');
10
+ require('../chunk-PG3WXT3K.cjs');
11
11
  require('../chunk-JK4XMMKM.cjs');
12
12
  require('../chunk-66IHPTOK.cjs');
13
13
  var chunk67OV5CX2_cjs = require('../chunk-67OV5CX2.cjs');
@@ -17,79 +17,79 @@ require('../chunk-VJKZWYYJ.cjs');
17
17
 
18
18
  Object.defineProperty(exports, "AlreadyRegisteredError", {
19
19
  enumerable: true,
20
- get: function () { return chunk3YHBO2DL_cjs.AlreadyRegisteredError; }
20
+ get: function () { return chunkIEKTGJ4J_cjs.AlreadyRegisteredError; }
21
21
  });
22
22
  Object.defineProperty(exports, "ConfidentialDisperseClient", {
23
23
  enumerable: true,
24
- get: function () { return chunk3YHBO2DL_cjs.ConfidentialDisperseClient; }
24
+ get: function () { return chunkIEKTGJ4J_cjs.ConfidentialDisperseClient; }
25
25
  });
26
26
  Object.defineProperty(exports, "DEFAULT_ADMIN_ROLE", {
27
27
  enumerable: true,
28
- get: function () { return chunk3YHBO2DL_cjs.DEFAULT_ADMIN_ROLE; }
28
+ get: function () { return chunkIEKTGJ4J_cjs.DEFAULT_ADMIN_ROLE; }
29
29
  });
30
30
  Object.defineProperty(exports, "DisperseEncryptedReserveNotGrantedError", {
31
31
  enumerable: true,
32
- get: function () { return chunk3YHBO2DL_cjs.DisperseEncryptedReserveNotGrantedError; }
32
+ get: function () { return chunkIEKTGJ4J_cjs.DisperseEncryptedReserveNotGrantedError; }
33
33
  });
34
34
  Object.defineProperty(exports, "DisperseSubwalletNotFoundError", {
35
35
  enumerable: true,
36
- get: function () { return chunk3YHBO2DL_cjs.DisperseSubwalletNotFoundError; }
36
+ get: function () { return chunkIEKTGJ4J_cjs.DisperseSubwalletNotFoundError; }
37
37
  });
38
38
  Object.defineProperty(exports, "FEE_COLLECTOR_ROLE", {
39
39
  enumerable: true,
40
- get: function () { return chunk3YHBO2DL_cjs.FEE_COLLECTOR_ROLE; }
40
+ get: function () { return chunkIEKTGJ4J_cjs.FEE_COLLECTOR_ROLE; }
41
41
  });
42
42
  Object.defineProperty(exports, "FEE_MANAGER_ROLE", {
43
43
  enumerable: true,
44
- get: function () { return chunk3YHBO2DL_cjs.FEE_MANAGER_ROLE; }
44
+ get: function () { return chunkIEKTGJ4J_cjs.FEE_MANAGER_ROLE; }
45
45
  });
46
46
  Object.defineProperty(exports, "NotRegisteredError", {
47
47
  enumerable: true,
48
- get: function () { return chunk3YHBO2DL_cjs.NotRegisteredError; }
48
+ get: function () { return chunkIEKTGJ4J_cjs.NotRegisteredError; }
49
49
  });
50
50
  Object.defineProperty(exports, "PAUSER_ROLE", {
51
51
  enumerable: true,
52
- get: function () { return chunk3YHBO2DL_cjs.PAUSER_ROLE; }
52
+ get: function () { return chunkIEKTGJ4J_cjs.PAUSER_ROLE; }
53
53
  });
54
54
  Object.defineProperty(exports, "SingletonNotApprovedError", {
55
55
  enumerable: true,
56
- get: function () { return chunk3YHBO2DL_cjs.SingletonNotApprovedError; }
56
+ get: function () { return chunkIEKTGJ4J_cjs.SingletonNotApprovedError; }
57
57
  });
58
58
  Object.defineProperty(exports, "SubwalletsNotApprovedError", {
59
59
  enumerable: true,
60
- get: function () { return chunk3YHBO2DL_cjs.SubwalletsNotApprovedError; }
60
+ get: function () { return chunkIEKTGJ4J_cjs.SubwalletsNotApprovedError; }
61
61
  });
62
62
  Object.defineProperty(exports, "WITHDRAWER_ROLE", {
63
63
  enumerable: true,
64
- get: function () { return chunk3YHBO2DL_cjs.WITHDRAWER_ROLE; }
64
+ get: function () { return chunkIEKTGJ4J_cjs.WITHDRAWER_ROLE; }
65
65
  });
66
66
  Object.defineProperty(exports, "computeSubtotals", {
67
67
  enumerable: true,
68
- get: function () { return chunk3YHBO2DL_cjs.computeSubtotals; }
68
+ get: function () { return chunkIEKTGJ4J_cjs.computeSubtotals; }
69
69
  });
70
70
  Object.defineProperty(exports, "createConfidentialDisperseClient", {
71
71
  enumerable: true,
72
- get: function () { return chunk3YHBO2DL_cjs.createConfidentialDisperseClient; }
72
+ get: function () { return chunkIEKTGJ4J_cjs.createConfidentialDisperseClient; }
73
73
  });
74
74
  Object.defineProperty(exports, "disperseConfidentialAbi", {
75
75
  enumerable: true,
76
- get: function () { return chunk3YHBO2DL_cjs.disperseConfidentialAbi; }
76
+ get: function () { return chunkIEKTGJ4J_cjs.disperseConfidentialAbi; }
77
77
  });
78
78
  Object.defineProperty(exports, "disperseWalletAbi", {
79
79
  enumerable: true,
80
- get: function () { return chunk3YHBO2DL_cjs.disperseWalletAbi; }
80
+ get: function () { return chunkIEKTGJ4J_cjs.disperseWalletAbi; }
81
81
  });
82
82
  Object.defineProperty(exports, "encryptUint64", {
83
83
  enumerable: true,
84
- get: function () { return chunk3YHBO2DL_cjs.encryptUint64; }
84
+ get: function () { return chunkIEKTGJ4J_cjs.encryptUint64; }
85
85
  });
86
86
  Object.defineProperty(exports, "encryptUint64Batch", {
87
87
  enumerable: true,
88
- get: function () { return chunk3YHBO2DL_cjs.encryptUint64Batch; }
88
+ get: function () { return chunkIEKTGJ4J_cjs.encryptUint64Batch; }
89
89
  });
90
90
  Object.defineProperty(exports, "resolveEncryptor", {
91
91
  enumerable: true,
92
- get: function () { return chunk3YHBO2DL_cjs.resolveEncryptor; }
92
+ get: function () { return chunkIEKTGJ4J_cjs.resolveEncryptor; }
93
93
  });
94
94
  Object.defineProperty(exports, "ERC7984_OPERATOR_MAX_DEADLINE", {
95
95
  enumerable: true,
@@ -1,11 +1,11 @@
1
- export { AlreadyRegisteredError, ConfidentialDisperseClient, DEFAULT_ADMIN_ROLE, DisperseEncryptedReserveNotGrantedError, DisperseSubwalletNotFoundError, FEE_COLLECTOR_ROLE, FEE_MANAGER_ROLE, NotRegisteredError, PAUSER_ROLE, SingletonNotApprovedError, SubwalletsNotApprovedError, WITHDRAWER_ROLE, computeSubtotals, createConfidentialDisperseClient, disperseConfidentialAbi, disperseWalletAbi, encryptUint64, encryptUint64Batch, resolveEncryptor } from '../chunk-44YJPMQC.js';
1
+ export { AlreadyRegisteredError, ConfidentialDisperseClient, DEFAULT_ADMIN_ROLE, DisperseEncryptedReserveNotGrantedError, DisperseSubwalletNotFoundError, FEE_COLLECTOR_ROLE, FEE_MANAGER_ROLE, NotRegisteredError, PAUSER_ROLE, SingletonNotApprovedError, SubwalletsNotApprovedError, WITHDRAWER_ROLE, computeSubtotals, createConfidentialDisperseClient, disperseConfidentialAbi, disperseWalletAbi, encryptUint64, encryptUint64Batch, resolveEncryptor } from '../chunk-PK6Q6J5F.js';
2
2
  export { ERC7984_OPERATOR_MAX_DEADLINE, revokeOperator, setOperator } from '../chunk-4TSDNZQ3.js';
3
3
  import '../chunk-WMACINXO.js';
4
4
  import '../chunk-ZWXJTBZO.js';
5
5
  export { erc7984OperatorAbi } from '../chunk-7VELUOMI.js';
6
6
  import '../chunk-NWFMBLSQ.js';
7
7
  import '../chunk-4RAAATVY.js';
8
- import '../chunk-A4DCEE33.js';
8
+ import '../chunk-6HCT4QIX.js';
9
9
  import '../chunk-ZA673I3O.js';
10
10
  import '../chunk-KWFFIJYX.js';
11
11
  export { AccessDeniedError, AlreadyInitializedError, BatchTooLargeError, ContractRevertError, DecryptionFailedError, DeploymentAddressUnavailableError, EncryptionFailedError, FeatureDisabledError, FheHandleNotAllowedError, InsufficientBalanceError, InsufficientFeeError, InsufficientGasFundsError, InvalidArgumentError, InvalidSignatureError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, NetworkError, OperatorNotApprovedError, PausedError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, ReentrancyError, RelayerUnreachableError, SigningFailedError, TokenOpsContractError, TokenOpsSdkError, TokenOpsValidationError, TransferFailedError, UnknownWriteFailureError, UnsupportedChainError, UserDecryptNotAllowedError, UserRejectedSignatureError, WalletChainMismatchError, WalletRejectedError, isTokenOpsSdkError } from '../chunk-QBJ7O2B4.js';