@tokenops/sdk 1.0.0 → 1.5.1

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 (162) hide show
  1. package/README.md +120 -26
  2. package/dist/{chunk-5SGMJADP.cjs → chunk-2NCLOQ56.cjs} +9 -9
  3. package/dist/{chunk-QIHZVLIK.js → chunk-2PWNH3UE.js} +35 -6
  4. package/dist/{chunk-T5LVV3KY.cjs → chunk-4WPGQSNT.cjs} +3 -3
  5. package/dist/{chunk-SUOG3BQS.cjs → chunk-5X5WL5CU.cjs} +266 -103
  6. package/dist/{chunk-56UI7LUR.cjs → chunk-67OV5CX2.cjs} +19 -0
  7. package/dist/{chunk-WRCUDSUJ.js → chunk-6BMP4ICG.js} +2 -2
  8. package/dist/{chunk-XXXDQSHE.js → chunk-6R4KNAPK.js} +5 -3
  9. package/dist/{chunk-XSNLAS5M.js → chunk-AOP6HMPW.js} +1 -1
  10. package/dist/{chunk-62DF53UQ.cjs → chunk-C7BRZXJA.cjs} +19 -21
  11. package/dist/{chunk-UOG4PJL5.js → chunk-DUZIIRPF.js} +181 -14
  12. package/dist/{chunk-Q7ARQSUH.cjs → chunk-FAXIIH5R.cjs} +3 -3
  13. package/dist/chunk-FT4LNBOS.js +11 -0
  14. package/dist/chunk-IJFQ5L4I.js +2171 -0
  15. package/dist/{chunk-52TC6BF7.js → chunk-IXLO7GO5.js} +210 -47
  16. package/dist/{chunk-CQIPRNS7.cjs → chunk-JK4XMMKM.cjs} +3 -3
  17. package/dist/{chunk-ITQ7WKVC.cjs → chunk-JYOTGRSO.cjs} +8 -8
  18. package/dist/{chunk-VDXVNZCO.cjs → chunk-KLKI352M.cjs} +85 -29
  19. package/dist/{chunk-5SA2HF2W.cjs → chunk-MCRBVJGZ.cjs} +24 -22
  20. package/dist/{chunk-ECT3NL2L.js → chunk-NTZY6IB7.js} +4 -4
  21. package/dist/{chunk-ZHFLRKFY.js → chunk-ODLTEGHB.js} +1 -1
  22. package/dist/{chunk-HGXNRR25.js → chunk-ORFTDNFZ.js} +4 -4
  23. package/dist/{chunk-72YGZEQE.js → chunk-OXTLPTO3.js} +9 -11
  24. package/dist/{chunk-HTOMTEA3.cjs → chunk-PFXURMBZ.cjs} +77 -48
  25. package/dist/{chunk-OLDGMKW2.cjs → chunk-PUPKNW3R.cjs} +35 -2
  26. package/dist/{chunk-IVE3QEGD.js → chunk-QBJ7O2B4.js} +18 -1
  27. package/dist/{chunk-JFLEEXKP.js → chunk-SG65XWH7.js} +58 -2
  28. package/dist/{chunk-K6MFFDBJ.cjs → chunk-T46YXSBP.cjs} +11 -11
  29. package/dist/{chunk-NS44KBV5.cjs → chunk-TEBM66WA.cjs} +12 -12
  30. package/dist/{chunk-6ECAHP5O.cjs → chunk-TIUKIY5V.cjs} +200 -33
  31. package/dist/{chunk-QCA7O2Q5.cjs → chunk-V2PXZVBF.cjs} +4 -4
  32. package/dist/{chunk-JFR5J4FL.cjs → chunk-W7IGCOVL.cjs} +11 -11
  33. package/dist/chunk-WENHUPZC.cjs +2180 -0
  34. package/dist/{chunk-ZXCOJY2Z.js → chunk-WMACINXO.js} +1 -1
  35. package/dist/{chunk-COPFW5Z4.js → chunk-XGGTQQFH.js} +31 -2
  36. package/dist/{chunk-CMRETRZO.js → chunk-YQIBBEFJ.js} +1 -1
  37. package/dist/{chunk-BE2AIZ3K.js → chunk-ZA673I3O.js} +1 -1
  38. package/dist/chunk-ZQUE2B3Q.cjs +33 -0
  39. package/dist/{chunk-FYQ2UW4T.js → chunk-ZWXJTBZO.js} +1 -1
  40. package/dist/core/addresses.d.ts +22 -0
  41. package/dist/core/errors.d.ts +41 -1
  42. package/dist/core/revert-mapper.d.ts +77 -0
  43. package/dist/core/telemetry.d.ts +0 -3
  44. package/dist/core/wagmi-compat.d.ts +40 -0
  45. package/dist/fhe/index.cjs +112 -66
  46. package/dist/fhe/index.d.cts +1 -1
  47. package/dist/fhe/index.d.ts +1 -1
  48. package/dist/fhe/index.js +50 -8
  49. package/dist/fhe/operators.d.ts +1 -1
  50. package/dist/fhe/react/index.cjs +7 -7
  51. package/dist/fhe/react/index.js +2 -2
  52. package/dist/fhe/sepolia-encryptor-web.d.ts +27 -1
  53. package/dist/fhe/sepolia-encryptor.d.ts +38 -0
  54. package/dist/fhe-airdrop/advanced/factory-advanced.d.ts +3 -3
  55. package/dist/fhe-airdrop/advanced/index.cjs +9 -8
  56. package/dist/fhe-airdrop/advanced/index.d.cts +2 -2
  57. package/dist/fhe-airdrop/advanced/index.d.ts +2 -2
  58. package/dist/fhe-airdrop/advanced/index.js +7 -6
  59. package/dist/fhe-airdrop/advanced/react/index.cjs +14 -13
  60. package/dist/fhe-airdrop/advanced/react/index.d.cts +1 -1
  61. package/dist/fhe-airdrop/advanced/react/index.d.ts +1 -1
  62. package/dist/fhe-airdrop/advanced/react/index.js +10 -9
  63. package/dist/fhe-airdrop/airdrop.d.ts +2 -0
  64. package/dist/fhe-airdrop/encryption.d.ts +8 -0
  65. package/dist/fhe-airdrop/factory.d.ts +94 -11
  66. package/dist/fhe-airdrop/index.cjs +61 -57
  67. package/dist/fhe-airdrop/index.d.cts +3 -3
  68. package/dist/fhe-airdrop/index.d.ts +3 -3
  69. package/dist/fhe-airdrop/index.js +7 -7
  70. package/dist/fhe-airdrop/react/index.cjs +163 -133
  71. package/dist/fhe-airdrop/react/index.d.cts +4 -3
  72. package/dist/fhe-airdrop/react/index.d.ts +4 -3
  73. package/dist/fhe-airdrop/react/index.js +38 -13
  74. package/dist/fhe-airdrop/react/useAirdropClaim.d.ts +2 -0
  75. package/dist/fhe-airdrop/react/useAirdropIsSignatureValid.d.ts +3 -2
  76. package/dist/fhe-airdrop/react/useClaim.d.ts +2 -0
  77. package/dist/fhe-airdrop/react/useCreateAndFundConfidentialAirdrop.d.ts +8 -0
  78. package/dist/fhe-airdrop/react/useCreateAndFundConfidentialAirdropAndGetAddress.d.ts +8 -0
  79. package/dist/fhe-airdrop/react/useFundConfidentialAirdrop.d.ts +8 -0
  80. package/dist/fhe-airdrop/react/usePreflightCreateAirdrop.d.ts +51 -0
  81. package/dist/fhe-airdrop/types.d.ts +45 -0
  82. package/dist/fhe-disperse/encryption.d.ts +8 -0
  83. package/dist/fhe-disperse/index.cjs +69 -65
  84. package/dist/fhe-disperse/index.d.cts +1 -1
  85. package/dist/fhe-disperse/index.d.ts +1 -1
  86. package/dist/fhe-disperse/index.js +8 -8
  87. package/dist/fhe-disperse/react/index.cjs +90 -86
  88. package/dist/fhe-disperse/react/index.d.cts +1 -1
  89. package/dist/fhe-disperse/react/index.d.ts +1 -1
  90. package/dist/fhe-disperse/react/index.js +10 -10
  91. package/dist/fhe-disperse/react/useCalculateFee.d.ts +7 -0
  92. package/dist/fhe-disperse/react/useDisperse.d.ts +9 -0
  93. package/dist/fhe-disperse/react/usePreflightDisperse.d.ts +7 -0
  94. package/dist/fhe-disperse/react/useSingletonCalculateFee.d.ts +7 -0
  95. package/dist/fhe-disperse/react/useSingletonWithdrawTokenFee.d.ts +8 -2
  96. package/dist/fhe-disperse/react/useWithdrawTokenFee.d.ts +6 -0
  97. package/dist/fhe-disperse/singleton.d.ts +29 -0
  98. package/dist/fhe-disperse/subtotals.d.ts +6 -0
  99. package/dist/fhe-vesting/advanced/factory-advanced.d.ts +2 -2
  100. package/dist/fhe-vesting/advanced/index.cjs +8 -8
  101. package/dist/fhe-vesting/advanced/index.d.cts +2 -2
  102. package/dist/fhe-vesting/advanced/index.d.ts +2 -2
  103. package/dist/fhe-vesting/advanced/index.js +6 -6
  104. package/dist/fhe-vesting/advanced/react/index.cjs +15 -14
  105. package/dist/fhe-vesting/advanced/react/index.d.cts +1 -1
  106. package/dist/fhe-vesting/advanced/react/index.d.ts +1 -1
  107. package/dist/fhe-vesting/advanced/react/index.js +12 -11
  108. package/dist/fhe-vesting/encryption.d.ts +8 -0
  109. package/dist/fhe-vesting/factory.d.ts +6 -8
  110. package/dist/fhe-vesting/index.cjs +79 -75
  111. package/dist/fhe-vesting/index.d.cts +2 -2
  112. package/dist/fhe-vesting/index.d.ts +2 -2
  113. package/dist/fhe-vesting/index.js +9 -9
  114. package/dist/fhe-vesting/manager.d.ts +101 -3
  115. package/dist/fhe-vesting/react/index.cjs +241 -219
  116. package/dist/fhe-vesting/react/index.d.cts +3 -2
  117. package/dist/fhe-vesting/react/index.d.ts +3 -2
  118. package/dist/fhe-vesting/react/index.js +29 -12
  119. package/dist/fhe-vesting/react/useAdminClaim.d.ts +2 -0
  120. package/dist/fhe-vesting/react/useAdminPartialClaim.d.ts +2 -0
  121. package/dist/fhe-vesting/react/useBatchCreateVesting.d.ts +8 -0
  122. package/dist/fhe-vesting/react/useClaim.d.ts +2 -0
  123. package/dist/fhe-vesting/react/useCreateVesting.d.ts +8 -0
  124. package/dist/fhe-vesting/react/useManagerWithdrawTokenFee.d.ts +7 -1
  125. package/dist/fhe-vesting/react/usePartialClaim.d.ts +8 -0
  126. package/dist/fhe-vesting/react/usePreflightCreateVesting.d.ts +37 -0
  127. package/dist/fhe-vesting/react/useVestingClaim.d.ts +2 -0
  128. package/dist/fhe-vesting/react/useWithdrawAdmin.d.ts +6 -0
  129. package/dist/fhe-vesting/react/useWithdrawTokenFee.d.ts +6 -0
  130. package/dist/fhe-vesting/types.d.ts +34 -2
  131. package/dist/index.cjs +73 -49
  132. package/dist/index.d.cts +1 -1
  133. package/dist/index.d.ts +1 -1
  134. package/dist/index.js +2 -2
  135. package/dist/testnet-faucet/abis/confidential-test-token.d.ts +1039 -0
  136. package/dist/testnet-faucet/abis/index.d.ts +2 -0
  137. package/dist/testnet-faucet/abis/test-token.d.ts +253 -0
  138. package/dist/testnet-faucet/errors.d.ts +21 -0
  139. package/dist/testnet-faucet/faucet.d.ts +173 -0
  140. package/dist/testnet-faucet/index.cjs +212 -0
  141. package/dist/testnet-faucet/index.d.cts +8 -0
  142. package/dist/testnet-faucet/index.d.ts +8 -0
  143. package/dist/testnet-faucet/index.js +7 -0
  144. package/dist/testnet-faucet/react/_shared.d.ts +61 -0
  145. package/dist/testnet-faucet/react/index.cjs +384 -0
  146. package/dist/testnet-faucet/react/index.d.cts +39 -0
  147. package/dist/testnet-faucet/react/index.d.ts +39 -0
  148. package/dist/testnet-faucet/react/index.js +220 -0
  149. package/dist/testnet-faucet/react/useConfidentialBalance.d.ts +25 -0
  150. package/dist/testnet-faucet/react/useFaucetDecimals.d.ts +9 -0
  151. package/dist/testnet-faucet/react/useFaucetMetadata.d.ts +14 -0
  152. package/dist/testnet-faucet/react/useFaucetRate.d.ts +11 -0
  153. package/dist/testnet-faucet/react/useInferredTotalSupply.d.ts +11 -0
  154. package/dist/testnet-faucet/react/useMaxTotalSupply.d.ts +10 -0
  155. package/dist/testnet-faucet/react/useMintConfidential.d.ts +35 -0
  156. package/dist/testnet-faucet/react/useMintUnderlying.d.ts +31 -0
  157. package/dist/testnet-faucet/react/useUnderlyingBalance.d.ts +19 -0
  158. package/dist/testnet-faucet/react/useUnderlyingDecimals.d.ts +9 -0
  159. package/dist/testnet-faucet/react/useUnderlyingTokenAddress.d.ts +12 -0
  160. package/dist/testnet-faucet/types.d.ts +92 -0
  161. package/dist/testnet-faucet/validate.d.ts +44 -0
  162. package/package.json +79 -30
@@ -1,16 +1,16 @@
1
1
  'use strict';
2
2
 
3
- var chunkHTOMTEA3_cjs = require('../../chunk-HTOMTEA3.cjs');
4
- require('../../chunk-ITQ7WKVC.cjs');
3
+ var chunkPFXURMBZ_cjs = require('../../chunk-PFXURMBZ.cjs');
4
+ require('../../chunk-JYOTGRSO.cjs');
5
+ require('../../chunk-TEBM66WA.cjs');
6
+ require('../../chunk-FAXIIH5R.cjs');
5
7
  require('../../chunk-FWHYQZ5E.cjs');
6
- require('../../chunk-NS44KBV5.cjs');
7
- require('../../chunk-Q7ARQSUH.cjs');
8
- require('../../chunk-VDXVNZCO.cjs');
9
- var chunkOLDGMKW2_cjs = require('../../chunk-OLDGMKW2.cjs');
10
- require('../../chunk-CQIPRNS7.cjs');
8
+ require('../../chunk-KLKI352M.cjs');
9
+ var chunkPUPKNW3R_cjs = require('../../chunk-PUPKNW3R.cjs');
10
+ require('../../chunk-JK4XMMKM.cjs');
11
11
  require('../../chunk-VJKZWYYJ.cjs');
12
12
  require('../../chunk-66IHPTOK.cjs');
13
- var chunk56UI7LUR_cjs = require('../../chunk-56UI7LUR.cjs');
13
+ var chunk67OV5CX2_cjs = require('../../chunk-67OV5CX2.cjs');
14
14
  var reactQuery = require('@tanstack/react-query');
15
15
  var react = require('react');
16
16
  var wagmi = require('wagmi');
@@ -20,7 +20,7 @@ var FHE_DISPERSE_NAMESPACE = "fhe-disperse";
20
20
  function tryResolveSingletonAddress(override, chainId) {
21
21
  if (override) return override;
22
22
  if (chainId === void 0) return void 0;
23
- return chunkOLDGMKW2_cjs.getFheDisperseSingletonAddress(chainId);
23
+ return chunkPUPKNW3R_cjs.getFheDisperseSingletonAddress(chainId);
24
24
  }
25
25
  function useMemoDisperseClient(opts = {}) {
26
26
  const publicClient = wagmi.usePublicClient({ chainId: opts.chainId });
@@ -33,14 +33,14 @@ function useMemoDisperseClient(opts = {}) {
33
33
  const client = react.useMemo(() => {
34
34
  if (!publicClient) return void 0;
35
35
  if (!resolvedAddress) return void 0;
36
- return chunkHTOMTEA3_cjs.createConfidentialDisperseClient({
36
+ return chunkPFXURMBZ_cjs.createConfidentialDisperseClient({
37
37
  publicClient,
38
38
  ...walletClient ? { walletClient } : {},
39
39
  address: resolvedAddress,
40
40
  ...chainId !== void 0 ? { chainId } : {},
41
41
  // Lazy — invoked per-encryption inside the headless client. Picks up
42
42
  // whichever EncryptorSource the consumer last passed in.
43
- encryptor: () => chunkHTOMTEA3_cjs.resolveEncryptor(encryptorSourceRef.current),
43
+ encryptor: () => chunkPFXURMBZ_cjs.resolveEncryptor(encryptorSourceRef.current),
44
44
  ...opts.aclAddress ? { aclAddress: opts.aclAddress } : {}
45
45
  });
46
46
  }, [publicClient, walletClient, resolvedAddress, chainId, opts.aclAddress]);
@@ -56,16 +56,16 @@ function useMemoDisperseClient(opts = {}) {
56
56
  function computeSingletonResolutionError(override, chainId) {
57
57
  if (override) return void 0;
58
58
  if (chainId === void 0) {
59
- return new chunk56UI7LUR_cjs.DeploymentAddressUnavailableError({
59
+ return new chunk67OV5CX2_cjs.DeploymentAddressUnavailableError({
60
60
  reason: "chain-id-missing",
61
61
  product: "fheDisperse",
62
62
  contract: "disperseConfidentialSingleton",
63
63
  clientLabel: "ConfidentialDisperseClient"
64
64
  });
65
65
  }
66
- const resolved = chunkOLDGMKW2_cjs.getFheDisperseSingletonAddress(chainId);
66
+ const resolved = chunkPUPKNW3R_cjs.getFheDisperseSingletonAddress(chainId);
67
67
  if (!resolved) {
68
- return new chunk56UI7LUR_cjs.DeploymentAddressUnavailableError({
68
+ return new chunk67OV5CX2_cjs.DeploymentAddressUnavailableError({
69
69
  reason: "registry-not-deployed",
70
70
  product: "fheDisperse",
71
71
  contract: "disperseConfidentialSingleton",
@@ -268,7 +268,7 @@ function useRegister(options = {}) {
268
268
  return reactQuery.useMutation({
269
269
  mutationFn: async (args) => {
270
270
  if (!client) {
271
- throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useRegister", "disperse");
271
+ throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useRegister", "disperse");
272
272
  }
273
273
  return client.register(args);
274
274
  }
@@ -279,7 +279,7 @@ function useApproveTokenOnWallets(options = {}) {
279
279
  return reactQuery.useMutation({
280
280
  mutationFn: async (args) => {
281
281
  if (!client) {
282
- throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useApproveTokenOnWallets", "disperse");
282
+ throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useApproveTokenOnWallets", "disperse");
283
283
  }
284
284
  return client.approveTokenOnWallets(args);
285
285
  }
@@ -290,7 +290,7 @@ function useRevokeTokenOnWallets(options = {}) {
290
290
  return reactQuery.useMutation({
291
291
  mutationFn: async (args) => {
292
292
  if (!client) {
293
- throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useRevokeTokenOnWallets", "disperse");
293
+ throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useRevokeTokenOnWallets", "disperse");
294
294
  }
295
295
  return client.revokeTokenOnWallets(args);
296
296
  }
@@ -301,7 +301,7 @@ function useRecoverFromWallets(options = {}) {
301
301
  return reactQuery.useMutation({
302
302
  mutationFn: async (args) => {
303
303
  if (!client) {
304
- throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useRecoverFromWallets", "disperse");
304
+ throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useRecoverFromWallets", "disperse");
305
305
  }
306
306
  return client.recoverFromWallets(args);
307
307
  }
@@ -312,7 +312,7 @@ function useRecoverERC20FromWallets(options = {}) {
312
312
  return reactQuery.useMutation({
313
313
  mutationFn: async (args) => {
314
314
  if (!client) {
315
- throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useRecoverERC20FromWallets", "disperse");
315
+ throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useRecoverERC20FromWallets", "disperse");
316
316
  }
317
317
  return client.recoverERC20FromWallets(args);
318
318
  }
@@ -323,7 +323,7 @@ function useDisperse(options = {}) {
323
323
  return reactQuery.useMutation({
324
324
  mutationFn: async (args) => {
325
325
  if (!client) {
326
- throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useDisperse", "disperse");
326
+ throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useDisperse", "disperse");
327
327
  }
328
328
  return client.disperse(args);
329
329
  }
@@ -334,7 +334,7 @@ function useAccessEncryptedFeeReserve(options = {}) {
334
334
  return reactQuery.useMutation({
335
335
  mutationFn: async (args) => {
336
336
  if (!client) {
337
- throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useAccessEncryptedFeeReserve", "disperse");
337
+ throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useAccessEncryptedFeeReserve", "disperse");
338
338
  }
339
339
  return client.getEncryptedFeeReserve(args);
340
340
  }
@@ -346,7 +346,7 @@ function useDiscloseHandleToParty(options = {}) {
346
346
  return reactQuery.useMutation({
347
347
  mutationFn: async (args) => {
348
348
  if (!client) {
349
- throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useDiscloseHandleToParty", "disperse");
349
+ throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useDiscloseHandleToParty", "disperse");
350
350
  }
351
351
  return client.discloseHandleToParty(args);
352
352
  }
@@ -357,7 +357,7 @@ function useBatchDiscloseHandlesToParty(options = {}) {
357
357
  return reactQuery.useMutation({
358
358
  mutationFn: async (args) => {
359
359
  if (!client) {
360
- throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useBatchDiscloseHandlesToParty", "disperse");
360
+ throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useBatchDiscloseHandlesToParty", "disperse");
361
361
  }
362
362
  return client.batchDiscloseHandlesToParty(args);
363
363
  }
@@ -367,7 +367,7 @@ function usePause(options = {}) {
367
367
  const { client, resolutionError } = useMemoDisperseClient(options);
368
368
  return reactQuery.useMutation({
369
369
  mutationFn: async ({ account }) => {
370
- if (!client) throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("usePause", "disperse");
370
+ if (!client) throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("usePause", "disperse");
371
371
  return client.pause(account);
372
372
  }
373
373
  });
@@ -376,7 +376,7 @@ function useUnpause(options = {}) {
376
376
  const { client, resolutionError } = useMemoDisperseClient(options);
377
377
  return reactQuery.useMutation({
378
378
  mutationFn: async ({ account }) => {
379
- if (!client) throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useUnpause", "disperse");
379
+ if (!client) throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useUnpause", "disperse");
380
380
  return client.unpause(account);
381
381
  }
382
382
  });
@@ -385,7 +385,7 @@ function useSetFeeConfig(options = {}) {
385
385
  const { client, resolutionError } = useMemoDisperseClient(options);
386
386
  return reactQuery.useMutation({
387
387
  mutationFn: async ({ config, account }) => {
388
- if (!client) throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useSetFeeConfig", "disperse");
388
+ if (!client) throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useSetFeeConfig", "disperse");
389
389
  return client.setFeeConfig(config, account);
390
390
  }
391
391
  });
@@ -394,7 +394,7 @@ function useSetCustomFee(options = {}) {
394
394
  const { client, resolutionError } = useMemoDisperseClient(options);
395
395
  return reactQuery.useMutation({
396
396
  mutationFn: async ({ user, gasFee, tokenFee, account }) => {
397
- if (!client) throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useSetCustomFee", "disperse");
397
+ if (!client) throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useSetCustomFee", "disperse");
398
398
  return client.setCustomFee(user, gasFee, tokenFee, account);
399
399
  }
400
400
  });
@@ -404,7 +404,7 @@ function useDisableCustomFee(options = {}) {
404
404
  return reactQuery.useMutation({
405
405
  mutationFn: async ({ user, account }) => {
406
406
  if (!client) {
407
- throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useDisableCustomFee", "disperse");
407
+ throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useDisableCustomFee", "disperse");
408
408
  }
409
409
  return client.disableCustomFee(user, account);
410
410
  }
@@ -415,7 +415,7 @@ function useSetMaxBatchSizeHolding(options = {}) {
415
415
  return reactQuery.useMutation({
416
416
  mutationFn: async ({ size, account }) => {
417
417
  if (!client) {
418
- throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useSetMaxBatchSizeHolding", "disperse");
418
+ throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useSetMaxBatchSizeHolding", "disperse");
419
419
  }
420
420
  return client.setMaxBatchSizeHolding(size, account);
421
421
  }
@@ -426,7 +426,7 @@ function useSetMaxBatchSizeDirect(options = {}) {
426
426
  return reactQuery.useMutation({
427
427
  mutationFn: async ({ size, account }) => {
428
428
  if (!client) {
429
- throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useSetMaxBatchSizeDirect", "disperse");
429
+ throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useSetMaxBatchSizeDirect", "disperse");
430
430
  }
431
431
  return client.setMaxBatchSizeDirect(size, account);
432
432
  }
@@ -437,7 +437,7 @@ function useSetMaxBatchSizeTokenFee(options = {}) {
437
437
  return reactQuery.useMutation({
438
438
  mutationFn: async ({ size, account }) => {
439
439
  if (!client) {
440
- throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useSetMaxBatchSizeTokenFee", "disperse");
440
+ throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useSetMaxBatchSizeTokenFee", "disperse");
441
441
  }
442
442
  return client.setMaxBatchSizeTokenFee(size, account);
443
443
  }
@@ -447,7 +447,7 @@ function useWithdrawGasFee(options = {}) {
447
447
  const { client, resolutionError } = useMemoDisperseClient(options);
448
448
  return reactQuery.useMutation({
449
449
  mutationFn: async ({ to, amount, account }) => {
450
- if (!client) throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useWithdrawGasFee", "disperse");
450
+ if (!client) throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useWithdrawGasFee", "disperse");
451
451
  return client.withdrawGasFee(to, amount, account);
452
452
  }
453
453
  });
@@ -457,7 +457,7 @@ function useWithdrawTokenFee(options = {}) {
457
457
  return reactQuery.useMutation({
458
458
  mutationFn: async (args) => {
459
459
  if (!client) {
460
- throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useWithdrawTokenFee", "disperse");
460
+ throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useWithdrawTokenFee", "disperse");
461
461
  }
462
462
  if (args.encryptedInput !== void 0) {
463
463
  const { token: token2, to: to2, encryptedInput, account: account2 } = args;
@@ -469,7 +469,7 @@ function useWithdrawTokenFee(options = {}) {
469
469
  });
470
470
  }
471
471
  const { token, to, amount, encryptor: encryptorSource, account } = args;
472
- const eager = encryptorSource ? chunkHTOMTEA3_cjs.resolveEncryptor(encryptorSource) : void 0;
472
+ const eager = encryptorSource ? chunkPFXURMBZ_cjs.resolveEncryptor(encryptorSource) : void 0;
473
473
  return client.withdrawTokenFee({
474
474
  token,
475
475
  to,
@@ -485,7 +485,7 @@ function useRescueConfidentialTokens(options = {}) {
485
485
  return reactQuery.useMutation({
486
486
  mutationFn: async ({ token, to, account }) => {
487
487
  if (!client) {
488
- throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useRescueConfidentialTokens", "disperse");
488
+ throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useRescueConfidentialTokens", "disperse");
489
489
  }
490
490
  return client.rescueConfidentialTokens(token, to, account);
491
491
  }
@@ -495,7 +495,7 @@ function useRescueERC20(options = {}) {
495
495
  const { client, resolutionError } = useMemoDisperseClient(options);
496
496
  return reactQuery.useMutation({
497
497
  mutationFn: async ({ token, to, account }) => {
498
- if (!client) throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useRescueERC20", "disperse");
498
+ if (!client) throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useRescueERC20", "disperse");
499
499
  return client.rescueERC20(token, to, account);
500
500
  }
501
501
  });
@@ -504,7 +504,7 @@ function useGrantRole(options = {}) {
504
504
  const { client, resolutionError } = useMemoDisperseClient(options);
505
505
  return reactQuery.useMutation({
506
506
  mutationFn: async ({ role, accountTarget, account }) => {
507
- if (!client) throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useGrantRole", "disperse");
507
+ if (!client) throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useGrantRole", "disperse");
508
508
  return client.grantRole(role, accountTarget, account);
509
509
  }
510
510
  });
@@ -513,7 +513,7 @@ function useRevokeRole(options = {}) {
513
513
  const { client, resolutionError } = useMemoDisperseClient(options);
514
514
  return reactQuery.useMutation({
515
515
  mutationFn: async ({ role, accountTarget, account }) => {
516
- if (!client) throw resolutionError ?? new chunk56UI7LUR_cjs.MissingClientError("useRevokeRole", "disperse");
516
+ if (!client) throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useRevokeRole", "disperse");
517
517
  return client.revokeRole(role, accountTarget, account);
518
518
  }
519
519
  });
@@ -521,195 +521,199 @@ function useRevokeRole(options = {}) {
521
521
 
522
522
  Object.defineProperty(exports, "AlreadyRegisteredError", {
523
523
  enumerable: true,
524
- get: function () { return chunkHTOMTEA3_cjs.AlreadyRegisteredError; }
524
+ get: function () { return chunkPFXURMBZ_cjs.AlreadyRegisteredError; }
525
525
  });
526
526
  Object.defineProperty(exports, "DEFAULT_ADMIN_ROLE", {
527
527
  enumerable: true,
528
- get: function () { return chunkHTOMTEA3_cjs.DEFAULT_ADMIN_ROLE; }
528
+ get: function () { return chunkPFXURMBZ_cjs.DEFAULT_ADMIN_ROLE; }
529
529
  });
530
530
  Object.defineProperty(exports, "DisperseEncryptedReserveNotGrantedError", {
531
531
  enumerable: true,
532
- get: function () { return chunkHTOMTEA3_cjs.DisperseEncryptedReserveNotGrantedError; }
532
+ get: function () { return chunkPFXURMBZ_cjs.DisperseEncryptedReserveNotGrantedError; }
533
533
  });
534
534
  Object.defineProperty(exports, "DisperseSubwalletNotFoundError", {
535
535
  enumerable: true,
536
- get: function () { return chunkHTOMTEA3_cjs.DisperseSubwalletNotFoundError; }
536
+ get: function () { return chunkPFXURMBZ_cjs.DisperseSubwalletNotFoundError; }
537
537
  });
538
538
  Object.defineProperty(exports, "FEE_COLLECTOR_ROLE", {
539
539
  enumerable: true,
540
- get: function () { return chunkHTOMTEA3_cjs.FEE_COLLECTOR_ROLE; }
540
+ get: function () { return chunkPFXURMBZ_cjs.FEE_COLLECTOR_ROLE; }
541
541
  });
542
542
  Object.defineProperty(exports, "FEE_MANAGER_ROLE", {
543
543
  enumerable: true,
544
- get: function () { return chunkHTOMTEA3_cjs.FEE_MANAGER_ROLE; }
544
+ get: function () { return chunkPFXURMBZ_cjs.FEE_MANAGER_ROLE; }
545
545
  });
546
546
  Object.defineProperty(exports, "NotRegisteredError", {
547
547
  enumerable: true,
548
- get: function () { return chunkHTOMTEA3_cjs.NotRegisteredError; }
548
+ get: function () { return chunkPFXURMBZ_cjs.NotRegisteredError; }
549
549
  });
550
550
  Object.defineProperty(exports, "PAUSER_ROLE", {
551
551
  enumerable: true,
552
- get: function () { return chunkHTOMTEA3_cjs.PAUSER_ROLE; }
552
+ get: function () { return chunkPFXURMBZ_cjs.PAUSER_ROLE; }
553
553
  });
554
554
  Object.defineProperty(exports, "WITHDRAWER_ROLE", {
555
555
  enumerable: true,
556
- get: function () { return chunkHTOMTEA3_cjs.WITHDRAWER_ROLE; }
556
+ get: function () { return chunkPFXURMBZ_cjs.WITHDRAWER_ROLE; }
557
557
  });
558
558
  Object.defineProperty(exports, "computeSubtotals", {
559
559
  enumerable: true,
560
- get: function () { return chunkHTOMTEA3_cjs.computeSubtotals; }
560
+ get: function () { return chunkPFXURMBZ_cjs.computeSubtotals; }
561
561
  });
562
562
  Object.defineProperty(exports, "encryptUint64", {
563
563
  enumerable: true,
564
- get: function () { return chunkHTOMTEA3_cjs.encryptUint64; }
564
+ get: function () { return chunkPFXURMBZ_cjs.encryptUint64; }
565
565
  });
566
566
  Object.defineProperty(exports, "encryptUint64Batch", {
567
567
  enumerable: true,
568
- get: function () { return chunkHTOMTEA3_cjs.encryptUint64Batch; }
568
+ get: function () { return chunkPFXURMBZ_cjs.encryptUint64Batch; }
569
569
  });
570
570
  Object.defineProperty(exports, "resolveEncryptor", {
571
571
  enumerable: true,
572
- get: function () { return chunkHTOMTEA3_cjs.resolveEncryptor; }
572
+ get: function () { return chunkPFXURMBZ_cjs.resolveEncryptor; }
573
573
  });
574
574
  Object.defineProperty(exports, "AccessDeniedError", {
575
575
  enumerable: true,
576
- get: function () { return chunk56UI7LUR_cjs.AccessDeniedError; }
576
+ get: function () { return chunk67OV5CX2_cjs.AccessDeniedError; }
577
577
  });
578
578
  Object.defineProperty(exports, "AlreadyInitializedError", {
579
579
  enumerable: true,
580
- get: function () { return chunk56UI7LUR_cjs.AlreadyInitializedError; }
580
+ get: function () { return chunk67OV5CX2_cjs.AlreadyInitializedError; }
581
581
  });
582
582
  Object.defineProperty(exports, "BatchTooLargeError", {
583
583
  enumerable: true,
584
- get: function () { return chunk56UI7LUR_cjs.BatchTooLargeError; }
584
+ get: function () { return chunk67OV5CX2_cjs.BatchTooLargeError; }
585
585
  });
586
586
  Object.defineProperty(exports, "ContractRevertError", {
587
587
  enumerable: true,
588
- get: function () { return chunk56UI7LUR_cjs.ContractRevertError; }
588
+ get: function () { return chunk67OV5CX2_cjs.ContractRevertError; }
589
589
  });
590
590
  Object.defineProperty(exports, "DecryptionFailedError", {
591
591
  enumerable: true,
592
- get: function () { return chunk56UI7LUR_cjs.DecryptionFailedError; }
592
+ get: function () { return chunk67OV5CX2_cjs.DecryptionFailedError; }
593
593
  });
594
594
  Object.defineProperty(exports, "DeploymentAddressUnavailableError", {
595
595
  enumerable: true,
596
- get: function () { return chunk56UI7LUR_cjs.DeploymentAddressUnavailableError; }
596
+ get: function () { return chunk67OV5CX2_cjs.DeploymentAddressUnavailableError; }
597
597
  });
598
598
  Object.defineProperty(exports, "EncryptionFailedError", {
599
599
  enumerable: true,
600
- get: function () { return chunk56UI7LUR_cjs.EncryptionFailedError; }
600
+ get: function () { return chunk67OV5CX2_cjs.EncryptionFailedError; }
601
601
  });
602
602
  Object.defineProperty(exports, "FeatureDisabledError", {
603
603
  enumerable: true,
604
- get: function () { return chunk56UI7LUR_cjs.FeatureDisabledError; }
604
+ get: function () { return chunk67OV5CX2_cjs.FeatureDisabledError; }
605
605
  });
606
606
  Object.defineProperty(exports, "FheHandleNotAllowedError", {
607
607
  enumerable: true,
608
- get: function () { return chunk56UI7LUR_cjs.FheHandleNotAllowedError; }
608
+ get: function () { return chunk67OV5CX2_cjs.FheHandleNotAllowedError; }
609
609
  });
610
610
  Object.defineProperty(exports, "InsufficientBalanceError", {
611
611
  enumerable: true,
612
- get: function () { return chunk56UI7LUR_cjs.InsufficientBalanceError; }
612
+ get: function () { return chunk67OV5CX2_cjs.InsufficientBalanceError; }
613
613
  });
614
614
  Object.defineProperty(exports, "InsufficientFeeError", {
615
615
  enumerable: true,
616
- get: function () { return chunk56UI7LUR_cjs.InsufficientFeeError; }
616
+ get: function () { return chunk67OV5CX2_cjs.InsufficientFeeError; }
617
617
  });
618
618
  Object.defineProperty(exports, "InsufficientGasFundsError", {
619
619
  enumerable: true,
620
- get: function () { return chunk56UI7LUR_cjs.InsufficientGasFundsError; }
620
+ get: function () { return chunk67OV5CX2_cjs.InsufficientGasFundsError; }
621
621
  });
622
622
  Object.defineProperty(exports, "InvalidArgumentError", {
623
623
  enumerable: true,
624
- get: function () { return chunk56UI7LUR_cjs.InvalidArgumentError; }
624
+ get: function () { return chunk67OV5CX2_cjs.InvalidArgumentError; }
625
625
  });
626
626
  Object.defineProperty(exports, "InvalidSignatureError", {
627
627
  enumerable: true,
628
- get: function () { return chunk56UI7LUR_cjs.InvalidSignatureError; }
628
+ get: function () { return chunk67OV5CX2_cjs.InvalidSignatureError; }
629
629
  });
630
630
  Object.defineProperty(exports, "MissingAccountError", {
631
631
  enumerable: true,
632
- get: function () { return chunk56UI7LUR_cjs.MissingAccountError; }
632
+ get: function () { return chunk67OV5CX2_cjs.MissingAccountError; }
633
633
  });
634
634
  Object.defineProperty(exports, "MissingClientError", {
635
635
  enumerable: true,
636
- get: function () { return chunk56UI7LUR_cjs.MissingClientError; }
636
+ get: function () { return chunk67OV5CX2_cjs.MissingClientError; }
637
637
  });
638
638
  Object.defineProperty(exports, "MissingEncryptorError", {
639
639
  enumerable: true,
640
- get: function () { return chunk56UI7LUR_cjs.MissingEncryptorError; }
640
+ get: function () { return chunk67OV5CX2_cjs.MissingEncryptorError; }
641
641
  });
642
642
  Object.defineProperty(exports, "MissingPublicClientError", {
643
643
  enumerable: true,
644
- get: function () { return chunk56UI7LUR_cjs.MissingPublicClientError; }
644
+ get: function () { return chunk67OV5CX2_cjs.MissingPublicClientError; }
645
645
  });
646
646
  Object.defineProperty(exports, "MissingWalletClientError", {
647
647
  enumerable: true,
648
- get: function () { return chunk56UI7LUR_cjs.MissingWalletClientError; }
648
+ get: function () { return chunk67OV5CX2_cjs.MissingWalletClientError; }
649
649
  });
650
650
  Object.defineProperty(exports, "NetworkError", {
651
651
  enumerable: true,
652
- get: function () { return chunk56UI7LUR_cjs.NetworkError; }
652
+ get: function () { return chunk67OV5CX2_cjs.NetworkError; }
653
+ });
654
+ Object.defineProperty(exports, "OperatorNotApprovedError", {
655
+ enumerable: true,
656
+ get: function () { return chunk67OV5CX2_cjs.OperatorNotApprovedError; }
653
657
  });
654
658
  Object.defineProperty(exports, "PausedError", {
655
659
  enumerable: true,
656
- get: function () { return chunk56UI7LUR_cjs.PausedError; }
660
+ get: function () { return chunk67OV5CX2_cjs.PausedError; }
657
661
  });
658
662
  Object.defineProperty(exports, "ReceiptEventAmbiguousError", {
659
663
  enumerable: true,
660
- get: function () { return chunk56UI7LUR_cjs.ReceiptEventAmbiguousError; }
664
+ get: function () { return chunk67OV5CX2_cjs.ReceiptEventAmbiguousError; }
661
665
  });
662
666
  Object.defineProperty(exports, "ReceiptEventNotFoundError", {
663
667
  enumerable: true,
664
- get: function () { return chunk56UI7LUR_cjs.ReceiptEventNotFoundError; }
668
+ get: function () { return chunk67OV5CX2_cjs.ReceiptEventNotFoundError; }
665
669
  });
666
670
  Object.defineProperty(exports, "ReentrancyError", {
667
671
  enumerable: true,
668
- get: function () { return chunk56UI7LUR_cjs.ReentrancyError; }
672
+ get: function () { return chunk67OV5CX2_cjs.ReentrancyError; }
669
673
  });
670
674
  Object.defineProperty(exports, "RelayerUnreachableError", {
671
675
  enumerable: true,
672
- get: function () { return chunk56UI7LUR_cjs.RelayerUnreachableError; }
676
+ get: function () { return chunk67OV5CX2_cjs.RelayerUnreachableError; }
673
677
  });
674
678
  Object.defineProperty(exports, "SigningFailedError", {
675
679
  enumerable: true,
676
- get: function () { return chunk56UI7LUR_cjs.SigningFailedError; }
680
+ get: function () { return chunk67OV5CX2_cjs.SigningFailedError; }
677
681
  });
678
682
  Object.defineProperty(exports, "TokenOpsSdkError", {
679
683
  enumerable: true,
680
- get: function () { return chunk56UI7LUR_cjs.TokenOpsSdkError; }
684
+ get: function () { return chunk67OV5CX2_cjs.TokenOpsSdkError; }
681
685
  });
682
686
  Object.defineProperty(exports, "TransferFailedError", {
683
687
  enumerable: true,
684
- get: function () { return chunk56UI7LUR_cjs.TransferFailedError; }
688
+ get: function () { return chunk67OV5CX2_cjs.TransferFailedError; }
685
689
  });
686
690
  Object.defineProperty(exports, "UnknownWriteFailureError", {
687
691
  enumerable: true,
688
- get: function () { return chunk56UI7LUR_cjs.UnknownWriteFailureError; }
692
+ get: function () { return chunk67OV5CX2_cjs.UnknownWriteFailureError; }
689
693
  });
690
694
  Object.defineProperty(exports, "UnsupportedChainError", {
691
695
  enumerable: true,
692
- get: function () { return chunk56UI7LUR_cjs.UnsupportedChainError; }
696
+ get: function () { return chunk67OV5CX2_cjs.UnsupportedChainError; }
693
697
  });
694
698
  Object.defineProperty(exports, "UserDecryptNotAllowedError", {
695
699
  enumerable: true,
696
- get: function () { return chunk56UI7LUR_cjs.UserDecryptNotAllowedError; }
700
+ get: function () { return chunk67OV5CX2_cjs.UserDecryptNotAllowedError; }
697
701
  });
698
702
  Object.defineProperty(exports, "UserRejectedSignatureError", {
699
703
  enumerable: true,
700
- get: function () { return chunk56UI7LUR_cjs.UserRejectedSignatureError; }
704
+ get: function () { return chunk67OV5CX2_cjs.UserRejectedSignatureError; }
701
705
  });
702
706
  Object.defineProperty(exports, "WalletChainMismatchError", {
703
707
  enumerable: true,
704
- get: function () { return chunk56UI7LUR_cjs.WalletChainMismatchError; }
708
+ get: function () { return chunk67OV5CX2_cjs.WalletChainMismatchError; }
705
709
  });
706
710
  Object.defineProperty(exports, "WalletRejectedError", {
707
711
  enumerable: true,
708
- get: function () { return chunk56UI7LUR_cjs.WalletRejectedError; }
712
+ get: function () { return chunk67OV5CX2_cjs.WalletRejectedError; }
709
713
  });
710
714
  Object.defineProperty(exports, "isTokenOpsSdkError", {
711
715
  enumerable: true,
712
- get: function () { return chunk56UI7LUR_cjs.isTokenOpsSdkError; }
716
+ get: function () { return chunk67OV5CX2_cjs.isTokenOpsSdkError; }
713
717
  });
714
718
  exports.FHE_DISPERSE_KEY = FHE_DISPERSE_KEY;
715
719
  exports.FHE_DISPERSE_NAMESPACE = FHE_DISPERSE_NAMESPACE;
@@ -77,6 +77,6 @@ export { FEE_COLLECTOR_ROLE, FEE_MANAGER_ROLE, PAUSER_ROLE, WITHDRAWER_ROLE, DEF
77
77
  export { computeSubtotals, } from "../singleton.js";
78
78
  export { encryptUint64, encryptUint64Batch, resolveEncryptor, type Encryptor, type EncryptorSource, type EncryptUint64Args, type EncryptUint64BatchArgs, type FheValueInput, } from "../encryption.js";
79
79
  export { DisperseSubwalletNotFoundError, DisperseEncryptedReserveNotGrantedError, type BatchDiscloseHandlesArgs, type BatchLimits, type CalculateFeeArgs, type CalculatedFee, type DiscloseHandleArgs, type DisperseArgs, type DisperseMode, type DisperseResult, type EncryptedInput, type EncryptedInputs, type EncryptedViewResult, type FeeConfig, type GetEncryptedFeeReserveArgs, type PreflightDisperseArgs, type PreflightReport, type RecipientCheck, type RegisterResult, type SubwalletApprovalState, type UserFees, } from "../types.js";
80
- export { TokenOpsSdkError, isTokenOpsSdkError, DeploymentAddressUnavailableError, UnsupportedChainError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, InvalidArgumentError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, ContractRevertError, PausedError, AccessDeniedError, InsufficientFeeError, InsufficientBalanceError, BatchTooLargeError, FeatureDisabledError, TransferFailedError, FheHandleNotAllowedError, AlreadyInitializedError, ReentrancyError, InvalidSignatureError, WalletRejectedError, WalletChainMismatchError, NetworkError, InsufficientGasFundsError, UnknownWriteFailureError, UserRejectedSignatureError, SigningFailedError, RelayerUnreachableError, EncryptionFailedError, DecryptionFailedError, UserDecryptNotAllowedError, type DeploymentAddressUnavailableReason, type TokenOpsSdkErrorCode, } from "../../core/errors.js";
80
+ export { TokenOpsSdkError, isTokenOpsSdkError, DeploymentAddressUnavailableError, UnsupportedChainError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, InvalidArgumentError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, ContractRevertError, PausedError, AccessDeniedError, OperatorNotApprovedError, InsufficientFeeError, InsufficientBalanceError, BatchTooLargeError, FeatureDisabledError, TransferFailedError, FheHandleNotAllowedError, AlreadyInitializedError, ReentrancyError, InvalidSignatureError, WalletRejectedError, WalletChainMismatchError, NetworkError, InsufficientGasFundsError, UnknownWriteFailureError, UserRejectedSignatureError, SigningFailedError, RelayerUnreachableError, EncryptionFailedError, DecryptionFailedError, UserDecryptNotAllowedError, type DeploymentAddressUnavailableReason, type TokenOpsSdkErrorCode, } from "../../core/errors.js";
81
81
  export { type PreflightResult } from "../../core/preflight.js";
82
82
  export { NotRegisteredError, AlreadyRegisteredError } from "../errors.js";
@@ -77,6 +77,6 @@ export { FEE_COLLECTOR_ROLE, FEE_MANAGER_ROLE, PAUSER_ROLE, WITHDRAWER_ROLE, DEF
77
77
  export { computeSubtotals, } from "../singleton.js";
78
78
  export { encryptUint64, encryptUint64Batch, resolveEncryptor, type Encryptor, type EncryptorSource, type EncryptUint64Args, type EncryptUint64BatchArgs, type FheValueInput, } from "../encryption.js";
79
79
  export { DisperseSubwalletNotFoundError, DisperseEncryptedReserveNotGrantedError, type BatchDiscloseHandlesArgs, type BatchLimits, type CalculateFeeArgs, type CalculatedFee, type DiscloseHandleArgs, type DisperseArgs, type DisperseMode, type DisperseResult, type EncryptedInput, type EncryptedInputs, type EncryptedViewResult, type FeeConfig, type GetEncryptedFeeReserveArgs, type PreflightDisperseArgs, type PreflightReport, type RecipientCheck, type RegisterResult, type SubwalletApprovalState, type UserFees, } from "../types.js";
80
- export { TokenOpsSdkError, isTokenOpsSdkError, DeploymentAddressUnavailableError, UnsupportedChainError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, InvalidArgumentError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, ContractRevertError, PausedError, AccessDeniedError, InsufficientFeeError, InsufficientBalanceError, BatchTooLargeError, FeatureDisabledError, TransferFailedError, FheHandleNotAllowedError, AlreadyInitializedError, ReentrancyError, InvalidSignatureError, WalletRejectedError, WalletChainMismatchError, NetworkError, InsufficientGasFundsError, UnknownWriteFailureError, UserRejectedSignatureError, SigningFailedError, RelayerUnreachableError, EncryptionFailedError, DecryptionFailedError, UserDecryptNotAllowedError, type DeploymentAddressUnavailableReason, type TokenOpsSdkErrorCode, } from "../../core/errors.js";
80
+ export { TokenOpsSdkError, isTokenOpsSdkError, DeploymentAddressUnavailableError, UnsupportedChainError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, InvalidArgumentError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, ContractRevertError, PausedError, AccessDeniedError, OperatorNotApprovedError, InsufficientFeeError, InsufficientBalanceError, BatchTooLargeError, FeatureDisabledError, TransferFailedError, FheHandleNotAllowedError, AlreadyInitializedError, ReentrancyError, InvalidSignatureError, WalletRejectedError, WalletChainMismatchError, NetworkError, InsufficientGasFundsError, UnknownWriteFailureError, UserRejectedSignatureError, SigningFailedError, RelayerUnreachableError, EncryptionFailedError, DecryptionFailedError, UserDecryptNotAllowedError, type DeploymentAddressUnavailableReason, type TokenOpsSdkErrorCode, } from "../../core/errors.js";
81
81
  export { type PreflightResult } from "../../core/preflight.js";
82
82
  export { NotRegisteredError, AlreadyRegisteredError } from "../errors.js";
@@ -1,16 +1,16 @@
1
- import { resolveEncryptor, createConfidentialDisperseClient } from '../../chunk-QIHZVLIK.js';
2
- export { AlreadyRegisteredError, DEFAULT_ADMIN_ROLE, DisperseEncryptedReserveNotGrantedError, DisperseSubwalletNotFoundError, FEE_COLLECTOR_ROLE, FEE_MANAGER_ROLE, NotRegisteredError, PAUSER_ROLE, WITHDRAWER_ROLE, computeSubtotals, encryptUint64, encryptUint64Batch, resolveEncryptor } from '../../chunk-QIHZVLIK.js';
3
- import '../../chunk-WRCUDSUJ.js';
1
+ import { resolveEncryptor, createConfidentialDisperseClient } from '../../chunk-2PWNH3UE.js';
2
+ export { AlreadyRegisteredError, DEFAULT_ADMIN_ROLE, DisperseEncryptedReserveNotGrantedError, DisperseSubwalletNotFoundError, FEE_COLLECTOR_ROLE, FEE_MANAGER_ROLE, NotRegisteredError, PAUSER_ROLE, WITHDRAWER_ROLE, computeSubtotals, encryptUint64, encryptUint64Batch, resolveEncryptor } from '../../chunk-2PWNH3UE.js';
3
+ import '../../chunk-6BMP4ICG.js';
4
+ import '../../chunk-WMACINXO.js';
5
+ import '../../chunk-ZWXJTBZO.js';
4
6
  import '../../chunk-7VELUOMI.js';
5
- import '../../chunk-ZXCOJY2Z.js';
6
- import '../../chunk-FYQ2UW4T.js';
7
- import '../../chunk-JFLEEXKP.js';
8
- import { getFheDisperseSingletonAddress } from '../../chunk-COPFW5Z4.js';
9
- import '../../chunk-BE2AIZ3K.js';
7
+ import '../../chunk-SG65XWH7.js';
8
+ import { getFheDisperseSingletonAddress } from '../../chunk-XGGTQQFH.js';
9
+ import '../../chunk-ZA673I3O.js';
10
10
  import '../../chunk-Q2GP5UDC.js';
11
11
  import '../../chunk-KWFFIJYX.js';
12
- import { MissingClientError, DeploymentAddressUnavailableError } from '../../chunk-IVE3QEGD.js';
13
- export { AccessDeniedError, AlreadyInitializedError, BatchTooLargeError, ContractRevertError, DecryptionFailedError, DeploymentAddressUnavailableError, EncryptionFailedError, FeatureDisabledError, FheHandleNotAllowedError, InsufficientBalanceError, InsufficientFeeError, InsufficientGasFundsError, InvalidArgumentError, InvalidSignatureError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, NetworkError, PausedError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, ReentrancyError, RelayerUnreachableError, SigningFailedError, TokenOpsSdkError, TransferFailedError, UnknownWriteFailureError, UnsupportedChainError, UserDecryptNotAllowedError, UserRejectedSignatureError, WalletChainMismatchError, WalletRejectedError, isTokenOpsSdkError } from '../../chunk-IVE3QEGD.js';
12
+ import { MissingClientError, DeploymentAddressUnavailableError } from '../../chunk-QBJ7O2B4.js';
13
+ 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, TokenOpsSdkError, TransferFailedError, UnknownWriteFailureError, UnsupportedChainError, UserDecryptNotAllowedError, UserRejectedSignatureError, WalletChainMismatchError, WalletRejectedError, isTokenOpsSdkError } from '../../chunk-QBJ7O2B4.js';
14
14
  import { useQuery, useMutation } from '@tanstack/react-query';
15
15
  import { useRef, useMemo } from 'react';
16
16
  import { usePublicClient, useWalletClient } from 'wagmi';
@@ -18,6 +18,13 @@ export interface UseCalculateFeeArgs extends BaseHookOptions {
18
18
  *
19
19
  * Hook is disabled until `user`, `mode`, and `recipients` are set.
20
20
  *
21
+ * **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
22
+ * convention (1 token = 1_000_000 base units), not the 18 decimals typical of
23
+ * ERC-20. Amount parameters are base units of the token's actual decimals:
24
+ * for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
25
+ * transparent TTT test token uses 18 decimals. `totalTokens` follows this
26
+ * convention.
27
+ *
21
28
  * @example
22
29
  * const { data: fee } = useCalculateFee({
23
30
  * user, mode: "direct", recipients: 100,
@@ -7,6 +7,13 @@ import { type DisperseHookOptions } from "./_shared.js";
7
7
  * subtotals in a single proof batch, computes `msg.value` for gas-fee modes,
8
8
  * and dispatches to the correct contract entry point based on `mode`.
9
9
  *
10
+ * **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
11
+ * convention (1 token = 1_000_000 base units), not the 18 decimals typical of
12
+ * ERC-20. Amount parameters are base units of the token's actual decimals:
13
+ * for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
14
+ * transparent TTT test token uses 18 decimals. Every entry of `amounts[]`
15
+ * follows this convention.
16
+ *
10
17
  * **Encryptor resolution.** The hook-level `encryptor` (from
11
18
  * {@link DisperseHookOptions}) is forwarded lazily to the SDK client. If
12
19
  * missing when the mutation runs, the SDK throws
@@ -18,6 +25,8 @@ import { type DisperseHookOptions } from "./_shared.js";
18
25
  * After success, invalidate `useGetFees`, `useHasApprovedSubwallets`, and any
19
26
  * downstream token-balance queries owned by the consumer.
20
27
  *
28
+ * **Silent-zero transfers.** ERC-7984 transfers do not revert when the sender's encrypted balance is insufficient — the transfer succeeds and moves an encrypted zero instead. This is by design: reverting would leak balance information. The transaction receipt alone cannot tell you whether value actually moved.
29
+ *
21
30
  * @example
22
31
  * function Component() {
23
32
  * const zamaSDK = useZamaSDK();
@@ -19,6 +19,13 @@ export interface UsePreflightDisperseArgs extends BaseHookOptions {
19
19
  * Hook is disabled until `user`, `token`, `recipients`, `amounts`, and `mode`
20
20
  * are all set.
21
21
  *
22
+ * **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
23
+ * convention (1 token = 1_000_000 base units), not the 18 decimals typical of
24
+ * ERC-20. Amount parameters are base units of the token's actual decimals:
25
+ * for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
26
+ * transparent TTT test token uses 18 decimals. Pass `amounts[]` in the same
27
+ * units you will pass to `useDisperse` so the report reflects the real call.
28
+ *
22
29
  * For live dashboards, set `refetchInterval` so the report stays current as
23
30
  * the user toggles approvals in a wallet UI:
24
31
  *