@tokenops/sdk 1.1.1 → 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 (131) hide show
  1. package/README.md +18 -8
  2. package/dist/{chunk-5SGMJADP.cjs → chunk-2NCLOQ56.cjs} +9 -9
  3. package/dist/{chunk-FXCW7LVB.js → chunk-2PWNH3UE.js} +35 -6
  4. package/dist/{chunk-FPQBFIUW.cjs → chunk-4WPGQSNT.cjs} +3 -3
  5. package/dist/{chunk-OYLZEEHF.cjs → chunk-5X5WL5CU.cjs} +265 -101
  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-SAGJIEQK.cjs → chunk-C7BRZXJA.cjs} +14 -14
  11. package/dist/{chunk-OQZAZIAS.js → chunk-DUZIIRPF.js} +174 -5
  12. package/dist/{chunk-Q7ARQSUH.cjs → chunk-FAXIIH5R.cjs} +3 -3
  13. package/dist/chunk-FT4LNBOS.js +11 -0
  14. package/dist/{chunk-QE7ZONJ2.js → chunk-IJFQ5L4I.js} +4 -4
  15. package/dist/{chunk-X56UVEXS.js → chunk-IXLO7GO5.js} +209 -45
  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-3PQ2RFPC.js → chunk-NTZY6IB7.js} +4 -4
  21. package/dist/{chunk-JJ4R5QXF.js → chunk-ODLTEGHB.js} +1 -1
  22. package/dist/{chunk-XWDVPV42.js → chunk-ORFTDNFZ.js} +4 -4
  23. package/dist/{chunk-IR5AK5U5.js → chunk-OXTLPTO3.js} +4 -4
  24. package/dist/{chunk-23F7JIK5.cjs → chunk-PFXURMBZ.cjs} +77 -48
  25. package/dist/{chunk-3ZRHDTEX.cjs → chunk-PUPKNW3R.cjs} +2 -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-G7G75C46.cjs → chunk-T46YXSBP.cjs} +11 -11
  29. package/dist/{chunk-NS44KBV5.cjs → chunk-TEBM66WA.cjs} +12 -12
  30. package/dist/{chunk-SYHXDHWX.cjs → chunk-TIUKIY5V.cjs} +193 -24
  31. package/dist/{chunk-W7JHOK7G.cjs → chunk-V2PXZVBF.cjs} +4 -4
  32. package/dist/{chunk-SEKC7H5Y.cjs → chunk-W7IGCOVL.cjs} +11 -11
  33. package/dist/{chunk-5KHIQG7Y.cjs → chunk-WENHUPZC.cjs} +31 -31
  34. package/dist/{chunk-ZXCOJY2Z.js → chunk-WMACINXO.js} +1 -1
  35. package/dist/{chunk-M7V2EDPB.js → chunk-XGGTQQFH.js} +1 -1
  36. package/dist/{chunk-ITQBDRWX.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/errors.d.ts +41 -1
  41. package/dist/core/revert-mapper.d.ts +77 -0
  42. package/dist/core/wagmi-compat.d.ts +40 -0
  43. package/dist/fhe/index.cjs +112 -66
  44. package/dist/fhe/index.d.cts +1 -1
  45. package/dist/fhe/index.d.ts +1 -1
  46. package/dist/fhe/index.js +50 -8
  47. package/dist/fhe/react/index.cjs +7 -7
  48. package/dist/fhe/react/index.js +2 -2
  49. package/dist/fhe/sepolia-encryptor-web.d.ts +27 -1
  50. package/dist/fhe/sepolia-encryptor.d.ts +38 -0
  51. package/dist/fhe-airdrop/advanced/index.cjs +9 -8
  52. package/dist/fhe-airdrop/advanced/index.js +7 -6
  53. package/dist/fhe-airdrop/advanced/react/index.cjs +14 -13
  54. package/dist/fhe-airdrop/advanced/react/index.js +10 -9
  55. package/dist/fhe-airdrop/airdrop.d.ts +2 -0
  56. package/dist/fhe-airdrop/encryption.d.ts +8 -0
  57. package/dist/fhe-airdrop/factory.d.ts +86 -1
  58. package/dist/fhe-airdrop/index.cjs +61 -57
  59. package/dist/fhe-airdrop/index.d.cts +3 -3
  60. package/dist/fhe-airdrop/index.d.ts +3 -3
  61. package/dist/fhe-airdrop/index.js +7 -7
  62. package/dist/fhe-airdrop/react/index.cjs +163 -133
  63. package/dist/fhe-airdrop/react/index.d.cts +4 -3
  64. package/dist/fhe-airdrop/react/index.d.ts +4 -3
  65. package/dist/fhe-airdrop/react/index.js +38 -13
  66. package/dist/fhe-airdrop/react/useAirdropClaim.d.ts +2 -0
  67. package/dist/fhe-airdrop/react/useAirdropIsSignatureValid.d.ts +3 -2
  68. package/dist/fhe-airdrop/react/useClaim.d.ts +2 -0
  69. package/dist/fhe-airdrop/react/useCreateAndFundConfidentialAirdrop.d.ts +8 -0
  70. package/dist/fhe-airdrop/react/useCreateAndFundConfidentialAirdropAndGetAddress.d.ts +8 -0
  71. package/dist/fhe-airdrop/react/useFundConfidentialAirdrop.d.ts +8 -0
  72. package/dist/fhe-airdrop/react/usePreflightCreateAirdrop.d.ts +51 -0
  73. package/dist/fhe-airdrop/types.d.ts +45 -0
  74. package/dist/fhe-disperse/encryption.d.ts +8 -0
  75. package/dist/fhe-disperse/index.cjs +69 -65
  76. package/dist/fhe-disperse/index.d.cts +1 -1
  77. package/dist/fhe-disperse/index.d.ts +1 -1
  78. package/dist/fhe-disperse/index.js +8 -8
  79. package/dist/fhe-disperse/react/index.cjs +90 -86
  80. package/dist/fhe-disperse/react/index.d.cts +1 -1
  81. package/dist/fhe-disperse/react/index.d.ts +1 -1
  82. package/dist/fhe-disperse/react/index.js +10 -10
  83. package/dist/fhe-disperse/react/useCalculateFee.d.ts +7 -0
  84. package/dist/fhe-disperse/react/useDisperse.d.ts +9 -0
  85. package/dist/fhe-disperse/react/usePreflightDisperse.d.ts +7 -0
  86. package/dist/fhe-disperse/react/useSingletonCalculateFee.d.ts +7 -0
  87. package/dist/fhe-disperse/react/useSingletonWithdrawTokenFee.d.ts +6 -0
  88. package/dist/fhe-disperse/react/useWithdrawTokenFee.d.ts +6 -0
  89. package/dist/fhe-disperse/singleton.d.ts +29 -0
  90. package/dist/fhe-disperse/subtotals.d.ts +6 -0
  91. package/dist/fhe-vesting/advanced/index.cjs +8 -8
  92. package/dist/fhe-vesting/advanced/index.js +6 -6
  93. package/dist/fhe-vesting/advanced/react/index.cjs +15 -14
  94. package/dist/fhe-vesting/advanced/react/index.js +12 -11
  95. package/dist/fhe-vesting/encryption.d.ts +8 -0
  96. package/dist/fhe-vesting/index.cjs +79 -75
  97. package/dist/fhe-vesting/index.d.cts +2 -2
  98. package/dist/fhe-vesting/index.d.ts +2 -2
  99. package/dist/fhe-vesting/index.js +9 -9
  100. package/dist/fhe-vesting/manager.d.ts +100 -1
  101. package/dist/fhe-vesting/react/index.cjs +241 -219
  102. package/dist/fhe-vesting/react/index.d.cts +3 -2
  103. package/dist/fhe-vesting/react/index.d.ts +3 -2
  104. package/dist/fhe-vesting/react/index.js +29 -12
  105. package/dist/fhe-vesting/react/useAdminClaim.d.ts +2 -0
  106. package/dist/fhe-vesting/react/useAdminPartialClaim.d.ts +2 -0
  107. package/dist/fhe-vesting/react/useBatchCreateVesting.d.ts +8 -0
  108. package/dist/fhe-vesting/react/useClaim.d.ts +2 -0
  109. package/dist/fhe-vesting/react/useCreateVesting.d.ts +8 -0
  110. package/dist/fhe-vesting/react/useManagerWithdrawTokenFee.d.ts +6 -0
  111. package/dist/fhe-vesting/react/usePartialClaim.d.ts +8 -0
  112. package/dist/fhe-vesting/react/usePreflightCreateVesting.d.ts +37 -0
  113. package/dist/fhe-vesting/react/useVestingClaim.d.ts +2 -0
  114. package/dist/fhe-vesting/react/useWithdrawAdmin.d.ts +6 -0
  115. package/dist/fhe-vesting/react/useWithdrawTokenFee.d.ts +6 -0
  116. package/dist/fhe-vesting/types.d.ts +34 -0
  117. package/dist/index.cjs +61 -53
  118. package/dist/index.d.cts +1 -1
  119. package/dist/index.d.ts +1 -1
  120. package/dist/index.js +2 -2
  121. package/dist/testnet-faucet/index.cjs +58 -54
  122. package/dist/testnet-faucet/index.d.cts +1 -1
  123. package/dist/testnet-faucet/index.d.ts +1 -1
  124. package/dist/testnet-faucet/index.js +5 -5
  125. package/dist/testnet-faucet/react/index.cjs +60 -55
  126. package/dist/testnet-faucet/react/index.d.cts +3 -2
  127. package/dist/testnet-faucet/react/index.d.ts +3 -2
  128. package/dist/testnet-faucet/react/index.js +11 -10
  129. package/dist/testnet-faucet/react/useConfidentialBalance.d.ts +3 -2
  130. package/dist/testnet-faucet/react/useUnderlyingBalance.d.ts +2 -2
  131. package/package.json +3 -2
@@ -5,6 +5,24 @@ import type { Encryptor } from "../fhe-vesting/encryption.js";
5
5
  export declare const SEPOLIA_CHAIN_ID: 11155111;
6
6
  /** Mainnet chain id (`1`). Same use as {@link SEPOLIA_CHAIN_ID}. */
7
7
  export declare const MAINNET_CHAIN_ID: 1;
8
+ /**
9
+ * Lifecycle phase reported by the `onPhase` callback of
10
+ * {@link createSepoliaEncryptor} / `createSepoliaEncryptorWeb`.
11
+ *
12
+ * - `"initializing"` — the helper started constructing the underlying Zama
13
+ * relayer instance (module resolution + constructor; cheap and local).
14
+ * - `"downloading-params"` — the relayer's real lazy initialization began:
15
+ * worker bring-up plus fetching the FHE public key and public params
16
+ * (several MB on a cold cache; near-instant when served from cache).
17
+ * - `"ready"` — initialization completed; subsequent encrypts skip the
18
+ * download entirely.
19
+ *
20
+ * Phases carry **no** percentages, byte counts, or time estimates — neither
21
+ * `@zama-fhe/sdk@3` nor the underlying relayer SDK exposes any
22
+ * download-progress API, so anything finer-grained would be fabricated.
23
+ * If upstream later exposes real progress this union will widen.
24
+ */
25
+ export type EncryptorInitPhase = "initializing" | "downloading-params" | "ready";
8
26
  /** Subset of `@zama-fhe/sdk/node`'s `GenericLogger` we accept. Mirrored
9
27
  * structurally so consumers don't need to import the optional peer dep just
10
28
  * to type-narrow a logger arg. */
@@ -69,6 +87,26 @@ export interface CreateSepoliaEncryptorOptions {
69
87
  * that want to exercise the fetch path).
70
88
  */
71
89
  fheArtifactCacheTTL?: number;
90
+ /**
91
+ * Observe the encryptor's initialization lifecycle (see
92
+ * {@link EncryptorInitPhase}). `RelayerNode` initializes its worker pool
93
+ * lazily and exposes no status events, so the phases bracket the first
94
+ * operation that triggers the real init:
95
+ *
96
+ * - `"initializing"` fires when this helper starts (module load +
97
+ * `RelayerNode` construction).
98
+ * - `"downloading-params"` fires immediately before the first `encrypt`
99
+ * call, which is what actually spawns the worker pool and fetches the
100
+ * FHE public key + params.
101
+ * - `"ready"` fires once that first `encrypt` resolves. If it rejects,
102
+ * `"ready"` is not fired and the next attempt re-fires
103
+ * `"downloading-params"` (the underlying SDK retries init from scratch).
104
+ *
105
+ * No fake progress: no percentages, byte counts, or timers — upstream
106
+ * exposes no download-progress API. Callback exceptions are swallowed so
107
+ * a UI observer can never break encryption.
108
+ */
109
+ onPhase?: (phase: EncryptorInitPhase) => void;
72
110
  }
73
111
  /**
74
112
  * Returned by {@link createSepoliaEncryptor}. Carries the underlying
@@ -1,21 +1,22 @@
1
1
  'use strict';
2
2
 
3
- var chunkFPQBFIUW_cjs = require('../../chunk-FPQBFIUW.cjs');
4
- require('../../chunk-SYHXDHWX.cjs');
5
- require('../../chunk-VDXVNZCO.cjs');
6
- require('../../chunk-3ZRHDTEX.cjs');
7
- require('../../chunk-CQIPRNS7.cjs');
3
+ var chunk4WPGQSNT_cjs = require('../../chunk-4WPGQSNT.cjs');
4
+ require('../../chunk-TIUKIY5V.cjs');
5
+ require('../../chunk-FWHYQZ5E.cjs');
6
+ require('../../chunk-KLKI352M.cjs');
7
+ require('../../chunk-PUPKNW3R.cjs');
8
+ require('../../chunk-JK4XMMKM.cjs');
8
9
  require('../../chunk-VJKZWYYJ.cjs');
9
10
  require('../../chunk-66IHPTOK.cjs');
10
- require('../../chunk-56UI7LUR.cjs');
11
+ require('../../chunk-67OV5CX2.cjs');
11
12
 
12
13
 
13
14
 
14
15
  Object.defineProperty(exports, "ConfidentialAirdropFactoryAdvancedClient", {
15
16
  enumerable: true,
16
- get: function () { return chunkFPQBFIUW_cjs.ConfidentialAirdropFactoryAdvancedClient; }
17
+ get: function () { return chunk4WPGQSNT_cjs.ConfidentialAirdropFactoryAdvancedClient; }
17
18
  });
18
19
  Object.defineProperty(exports, "createConfidentialAirdropFactoryAdvancedClient", {
19
20
  enumerable: true,
20
- get: function () { return chunkFPQBFIUW_cjs.createConfidentialAirdropFactoryAdvancedClient; }
21
+ get: function () { return chunk4WPGQSNT_cjs.createConfidentialAirdropFactoryAdvancedClient; }
21
22
  });
@@ -1,8 +1,9 @@
1
- export { ConfidentialAirdropFactoryAdvancedClient, createConfidentialAirdropFactoryAdvancedClient } from '../../chunk-JJ4R5QXF.js';
2
- import '../../chunk-OQZAZIAS.js';
3
- import '../../chunk-JFLEEXKP.js';
4
- import '../../chunk-M7V2EDPB.js';
5
- import '../../chunk-BE2AIZ3K.js';
1
+ export { ConfidentialAirdropFactoryAdvancedClient, createConfidentialAirdropFactoryAdvancedClient } from '../../chunk-ODLTEGHB.js';
2
+ import '../../chunk-DUZIIRPF.js';
3
+ import '../../chunk-7VELUOMI.js';
4
+ import '../../chunk-SG65XWH7.js';
5
+ import '../../chunk-XGGTQQFH.js';
6
+ import '../../chunk-ZA673I3O.js';
6
7
  import '../../chunk-Q2GP5UDC.js';
7
8
  import '../../chunk-KWFFIJYX.js';
8
- import '../../chunk-IVE3QEGD.js';
9
+ import '../../chunk-QBJ7O2B4.js';
@@ -1,16 +1,17 @@
1
1
  'use strict';
2
2
 
3
- var chunkG7G75C46_cjs = require('../../../chunk-G7G75C46.cjs');
4
- require('../../../chunk-5SA2HF2W.cjs');
5
- var chunkFPQBFIUW_cjs = require('../../../chunk-FPQBFIUW.cjs');
6
- var chunkSYHXDHWX_cjs = require('../../../chunk-SYHXDHWX.cjs');
7
- require('../../../chunk-Q7ARQSUH.cjs');
8
- require('../../../chunk-VDXVNZCO.cjs');
9
- var chunk3ZRHDTEX_cjs = require('../../../chunk-3ZRHDTEX.cjs');
10
- require('../../../chunk-CQIPRNS7.cjs');
3
+ var chunkT46YXSBP_cjs = require('../../../chunk-T46YXSBP.cjs');
4
+ require('../../../chunk-MCRBVJGZ.cjs');
5
+ var chunk4WPGQSNT_cjs = require('../../../chunk-4WPGQSNT.cjs');
6
+ var chunkTIUKIY5V_cjs = require('../../../chunk-TIUKIY5V.cjs');
7
+ require('../../../chunk-FAXIIH5R.cjs');
8
+ require('../../../chunk-FWHYQZ5E.cjs');
9
+ require('../../../chunk-KLKI352M.cjs');
10
+ var chunkPUPKNW3R_cjs = require('../../../chunk-PUPKNW3R.cjs');
11
+ require('../../../chunk-JK4XMMKM.cjs');
11
12
  require('../../../chunk-VJKZWYYJ.cjs');
12
13
  require('../../../chunk-66IHPTOK.cjs');
13
- require('../../../chunk-56UI7LUR.cjs');
14
+ require('../../../chunk-67OV5CX2.cjs');
14
15
  var react = require('react');
15
16
  var reactQuery = require('@tanstack/react-query');
16
17
  var wagmi = require('wagmi');
@@ -23,22 +24,22 @@ function usePredictAirdropAddress(args = {}) {
23
24
  ...chainId !== void 0 ? { chainId } : {}
24
25
  });
25
26
  const resolvedChainId = chainId ?? resolvedPublicClient?.chain?.id;
26
- const resolvedAddress = address ?? (resolvedChainId === void 0 ? void 0 : chunk3ZRHDTEX_cjs.DEPLOYED_ADDRESSES.fheAirdrop?.confidentialAirdropFactory?.[resolvedChainId] ?? void 0);
27
+ const resolvedAddress = address ?? (resolvedChainId === void 0 ? void 0 : chunkPUPKNW3R_cjs.DEPLOYED_ADDRESSES.fheAirdrop?.confidentialAirdropFactory?.[resolvedChainId] ?? void 0);
27
28
  const encryptorSourceRef = react.useRef(encryptor);
28
29
  encryptorSourceRef.current = encryptor;
29
30
  const client = react.useMemo(() => {
30
31
  if (!resolvedPublicClient) return void 0;
31
32
  if (!resolvedAddress) return void 0;
32
- return chunkFPQBFIUW_cjs.createConfidentialAirdropFactoryAdvancedClient({
33
+ return chunk4WPGQSNT_cjs.createConfidentialAirdropFactoryAdvancedClient({
33
34
  publicClient: resolvedPublicClient,
34
35
  ...walletClient ? { walletClient } : {},
35
36
  address: resolvedAddress,
36
37
  ...resolvedChainId !== void 0 ? { chainId: resolvedChainId } : {},
37
- encryptor: () => chunkSYHXDHWX_cjs.resolveEncryptor(encryptorSourceRef.current)
38
+ encryptor: () => chunkTIUKIY5V_cjs.resolveEncryptor(encryptorSourceRef.current)
38
39
  });
39
40
  }, [resolvedPublicClient, walletClient, resolvedAddress, resolvedChainId]);
40
41
  return reactQuery.useQuery({
41
- queryKey: chunkG7G75C46_cjs.buildQueryKey(
42
+ queryKey: chunkT46YXSBP_cjs.buildQueryKey(
42
43
  "factory:predictAirdropAddress",
43
44
  resolvedChainId,
44
45
  resolvedAddress,
@@ -1,14 +1,15 @@
1
- import { buildQueryKey } from '../../../chunk-XWDVPV42.js';
2
- import '../../../chunk-XXXDQSHE.js';
3
- import { createConfidentialAirdropFactoryAdvancedClient } from '../../../chunk-JJ4R5QXF.js';
4
- import { resolveEncryptor } from '../../../chunk-OQZAZIAS.js';
5
- import '../../../chunk-FYQ2UW4T.js';
6
- import '../../../chunk-JFLEEXKP.js';
7
- import { DEPLOYED_ADDRESSES } from '../../../chunk-M7V2EDPB.js';
8
- import '../../../chunk-BE2AIZ3K.js';
1
+ import { buildQueryKey } from '../../../chunk-ORFTDNFZ.js';
2
+ import '../../../chunk-6R4KNAPK.js';
3
+ import { createConfidentialAirdropFactoryAdvancedClient } from '../../../chunk-ODLTEGHB.js';
4
+ import { resolveEncryptor } from '../../../chunk-DUZIIRPF.js';
5
+ import '../../../chunk-ZWXJTBZO.js';
6
+ import '../../../chunk-7VELUOMI.js';
7
+ import '../../../chunk-SG65XWH7.js';
8
+ import { DEPLOYED_ADDRESSES } from '../../../chunk-XGGTQQFH.js';
9
+ import '../../../chunk-ZA673I3O.js';
9
10
  import '../../../chunk-Q2GP5UDC.js';
10
11
  import '../../../chunk-KWFFIJYX.js';
11
- import '../../../chunk-IVE3QEGD.js';
12
+ import '../../../chunk-QBJ7O2B4.js';
12
13
  import { useRef, useMemo } from 'react';
13
14
  import { useQuery } from '@tanstack/react-query';
14
15
  import { usePublicClient, useWalletClient } from 'wagmi';
@@ -239,6 +239,8 @@ export declare class ConfidentialAirdropClient {
239
239
  * {@link signClaimAuthorization}. The signature commits to that handle, so the SDK
240
240
  * does NOT re-encrypt — submit the admin-issued payload as-is.
241
241
  *
242
+ * **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.
243
+ *
242
244
  * @returns Transaction hash.
243
245
  * @example
244
246
  * const fee = await airdrop.gasFee();
@@ -71,6 +71,14 @@ export interface EncryptUint64BatchArgs {
71
71
  * `userAddress` MUST be the **recipient** (not the admin), because the contract's
72
72
  * `FHE.fromExternal` rejects proofs bound to any other address.
73
73
  *
74
+ * **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
75
+ * convention (1 token = 1_000_000 base units), not the 18 decimals typical of
76
+ * ERC-20. Amount parameters are base units of the token's actual decimals:
77
+ * for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
78
+ * transparent TTT test token uses 18 decimals. `value` (and each entry of
79
+ * `values` in {@link encryptUint64Batch}) follows this convention when it
80
+ * encodes a token amount.
81
+ *
74
82
  * @param args Encryption request; `value` must fit in `uint64` (0 to 2^64-1).
75
83
  * @returns `{ handle: Hex, inputProof: Hex }` — pass both to the contract.
76
84
  * @example
@@ -2,7 +2,7 @@ import type { Account, Address, Hex, PublicClient, WalletClient } from "viem";
2
2
  import { type TxHash } from "../core/brands.js";
3
3
  import { type SdkTelemetry } from "../core/telemetry.js";
4
4
  import { type Encryptor, type EncryptorSource } from "./encryption.js";
5
- import type { AirdropParams, CustomFee, EncryptedInput } from "./types.js";
5
+ import type { AirdropParams, CreateAirdropPreflightReport, CustomFee, EncryptedInput } from "./types.js";
6
6
  export interface ConfidentialAirdropFactoryClientConfig {
7
7
  publicClient: PublicClient;
8
8
  walletClient?: WalletClient;
@@ -114,6 +114,27 @@ export interface CreateAirdropResult {
114
114
  /** Address of the deployed clone, parsed from the `ConfidentialAirdropCreated` event. */
115
115
  airdrop: Address;
116
116
  }
117
+ /** Arguments for {@link ConfidentialAirdropFactoryClient.preflightCreateAirdrop}. */
118
+ export interface PreflightCreateAirdropArgs {
119
+ /** The airdrop parameters that will be passed to the create call. */
120
+ params: AirdropParams;
121
+ /** The address that will send the create transaction (`msg.sender`). */
122
+ creator: Address;
123
+ /**
124
+ * The `userSalt` planned for the create call. Optional — when supplied, the
125
+ * preflight also predicts the CREATE2 clone address and reports whether a
126
+ * clone already exists there (a repeat create with the same salt reverts).
127
+ */
128
+ userSalt?: Hex;
129
+ /**
130
+ * Set `true` when the plan is `createAndFundConfidentialAirdrop` (or a
131
+ * follow-up `fundConfidentialAirdrop`). Funding pulls tokens from the
132
+ * creator via `confidentialTransferFrom`, so a missing factory-operator
133
+ * approval becomes a blocker. When `false`/omitted, the operator state is
134
+ * still reported (`isFactoryOperator`) but does not block a create-only tx.
135
+ */
136
+ funding?: boolean;
137
+ }
117
138
  export interface PredictAirdropArgs {
118
139
  params: AirdropParams;
119
140
  userSalt: Hex;
@@ -172,6 +193,14 @@ export declare class ConfidentialAirdropFactoryClient {
172
193
  * Prerequisites: caller must have set this factory as an operator on the
173
194
  * token: `token.setOperator(factoryAddress, deadline)`.
174
195
  *
196
+ * **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.
197
+ *
198
+ * **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
199
+ * convention (1 token = 1_000_000 base units), not the 18 decimals typical of
200
+ * ERC-20. Amount parameters are base units of the token's actual decimals:
201
+ * for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
202
+ * transparent TTT test token uses 18 decimals.
203
+ *
175
204
  * Symmetric with {@link ConfidentialAirdropFactoryClient.createConfidentialAirdrop}
176
205
  * — both return `{ hash, airdrop }` parsed from the
177
206
  * `ConfidentialAirdropCreated` event.
@@ -188,6 +217,14 @@ export declare class ConfidentialAirdropFactoryClient {
188
217
  * Prerequisites: caller must have set this factory as an operator on the token:
189
218
  * `token.setOperator(factoryAddress, deadline)`
190
219
  *
220
+ * **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.
221
+ *
222
+ * **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
223
+ * convention (1 token = 1_000_000 base units), not the 18 decimals typical of
224
+ * ERC-20. Amount parameters are base units of the token's actual decimals:
225
+ * for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
226
+ * transparent TTT test token uses 18 decimals.
227
+ *
191
228
  * @returns Transaction hash.
192
229
  */
193
230
  fundConfidentialAirdrop(args: FundAirdropArgs): Promise<Hex>;
@@ -218,6 +255,14 @@ export declare class ConfidentialAirdropFactoryClient {
218
255
  * Symmetry with {@link ConfidentialAirdropFactoryClient.createConfidentialAirdropAndGetAddress}
219
256
  * — use this when you also need to seed the pool in the same transaction.
220
257
  *
258
+ * **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.
259
+ *
260
+ * **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
261
+ * convention (1 token = 1_000_000 base units), not the 18 decimals typical of
262
+ * ERC-20. Amount parameters are base units of the token's actual decimals:
263
+ * for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
264
+ * transparent TTT test token uses 18 decimals.
265
+ *
221
266
  * Internally: {@link ConfidentialAirdropFactoryClient.createAndFundConfidentialAirdrop} →
222
267
  * {@link PublicClient.waitForTransactionReceipt} →
223
268
  * `parseEventLogs({ eventName: "ConfidentialAirdropCreated" })`.
@@ -268,6 +313,46 @@ export declare class ConfidentialAirdropFactoryClient {
268
313
  params: AirdropParams;
269
314
  gasFee: bigint;
270
315
  }): Promise<Hex>;
316
+ /**
317
+ * Read-only preflight for {@link createConfidentialAirdrop} /
318
+ * {@link createAndFundConfidentialAirdrop}. Runs the
319
+ * deterministic-from-off-chain checks and reports blockers both as
320
+ * human-readable strings (`blockers`) and as typed {@link TokenOpsSdkError}s
321
+ * (`blockerErrors`), index-aligned.
322
+ *
323
+ * Preflight is **opt-in**. Consumers who have already validated state can
324
+ * skip this call and invoke the write directly — they'll receive the same
325
+ * typed errors at write time via the revert mapper.
326
+ *
327
+ * Report fields: `isFactoryOperator`, `gasFee`, `predictedAirdrop`,
328
+ * `alreadyDeployed`, `ready`, `blockers`, `blockerErrors` — see
329
+ * {@link CreateAirdropPreflightReport} for the meaning of each.
330
+ *
331
+ * Checks performed (all read-only, no gas):
332
+ * - Structural `params` validation mirroring the factory + clone
333
+ * `initialize` requirements (`InvalidArgumentError` blockers): `token` and
334
+ * `admin` are checksummed non-zero addresses,
335
+ * `startTimestamp < endTimestamp`, and `endTimestamp` is in the future
336
+ * (the clone's `initialize` reverts with `EndTimeInPast`).
337
+ * - Operator: creator has approved this factory as an ERC-7984 operator on
338
+ * `params.token` — a blocker only when `funding: true`
339
+ * ({@link OperatorNotApprovedError}); otherwise informational via
340
+ * `isFactoryOperator`.
341
+ * - Collision (only when `userSalt` is supplied): bytecode already at the
342
+ * predicted CREATE2 address means a repeat create with the same
343
+ * `(params, userSalt, gasFee)` would revert
344
+ * ({@link AlreadyInitializedError} blocker).
345
+ *
346
+ * **Not preflight-detectable — read before trusting `ready: true`:** the
347
+ * creator's confidential token balance is an encrypted `euint64` the SDK
348
+ * cannot read in plaintext, and an underfunded `createAndFund` does **not**
349
+ * revert — the ERC-7984 transfer silently moves an encrypted zero. Confirm
350
+ * the creator's balance covers the pool before submitting.
351
+ *
352
+ * @param args See {@link PreflightCreateAirdropArgs}.
353
+ * @returns A {@link CreateAirdropPreflightReport}.
354
+ */
355
+ preflightCreateAirdrop(args: PreflightCreateAirdropArgs): Promise<CreateAirdropPreflightReport>;
271
356
  }
272
357
  /**
273
358
  * Create a {@link ConfidentialAirdropFactoryClient}. Mirrors viem's `create*` convention.
@@ -1,69 +1,69 @@
1
1
  'use strict';
2
2
 
3
- var chunk5SA2HF2W_cjs = require('../chunk-5SA2HF2W.cjs');
4
- var chunkSYHXDHWX_cjs = require('../chunk-SYHXDHWX.cjs');
3
+ var chunkMCRBVJGZ_cjs = require('../chunk-MCRBVJGZ.cjs');
4
+ var chunkTIUKIY5V_cjs = require('../chunk-TIUKIY5V.cjs');
5
+ require('../chunk-FAXIIH5R.cjs');
5
6
  var chunkFWHYQZ5E_cjs = require('../chunk-FWHYQZ5E.cjs');
6
- require('../chunk-Q7ARQSUH.cjs');
7
- require('../chunk-VDXVNZCO.cjs');
8
- require('../chunk-3ZRHDTEX.cjs');
9
- require('../chunk-CQIPRNS7.cjs');
7
+ require('../chunk-KLKI352M.cjs');
8
+ require('../chunk-PUPKNW3R.cjs');
9
+ require('../chunk-JK4XMMKM.cjs');
10
10
  require('../chunk-VJKZWYYJ.cjs');
11
11
  var chunk66IHPTOK_cjs = require('../chunk-66IHPTOK.cjs');
12
- var chunk56UI7LUR_cjs = require('../chunk-56UI7LUR.cjs');
12
+ var chunk67OV5CX2_cjs = require('../chunk-67OV5CX2.cjs');
13
13
 
14
14
 
15
15
 
16
16
  Object.defineProperty(exports, "AlreadyClaimedError", {
17
17
  enumerable: true,
18
- get: function () { return chunk5SA2HF2W_cjs.AlreadyClaimedError; }
18
+ get: function () { return chunkMCRBVJGZ_cjs.AlreadyClaimedError; }
19
19
  });
20
20
  Object.defineProperty(exports, "ClaimNotStartedError", {
21
21
  enumerable: true,
22
- get: function () { return chunk5SA2HF2W_cjs.ClaimNotStartedError; }
22
+ get: function () { return chunkMCRBVJGZ_cjs.ClaimNotStartedError; }
23
23
  });
24
24
  Object.defineProperty(exports, "ClaimWindowClosedError", {
25
25
  enumerable: true,
26
- get: function () { return chunk5SA2HF2W_cjs.ClaimWindowClosedError; }
26
+ get: function () { return chunkMCRBVJGZ_cjs.ClaimWindowClosedError; }
27
27
  });
28
28
  Object.defineProperty(exports, "ConfidentialAirdropClient", {
29
29
  enumerable: true,
30
- get: function () { return chunk5SA2HF2W_cjs.ConfidentialAirdropClient; }
30
+ get: function () { return chunkMCRBVJGZ_cjs.ConfidentialAirdropClient; }
31
31
  });
32
32
  Object.defineProperty(exports, "confidentialAirdropCloneableAbi", {
33
33
  enumerable: true,
34
- get: function () { return chunk5SA2HF2W_cjs.confidentialAirdropCloneableAbi; }
34
+ get: function () { return chunkMCRBVJGZ_cjs.confidentialAirdropCloneableAbi; }
35
35
  });
36
36
  Object.defineProperty(exports, "createConfidentialAirdropClient", {
37
37
  enumerable: true,
38
- get: function () { return chunk5SA2HF2W_cjs.createConfidentialAirdropClient; }
38
+ get: function () { return chunkMCRBVJGZ_cjs.createConfidentialAirdropClient; }
39
39
  });
40
40
  Object.defineProperty(exports, "ConfidentialAirdropFactoryClient", {
41
41
  enumerable: true,
42
- get: function () { return chunkSYHXDHWX_cjs.ConfidentialAirdropFactoryClient; }
42
+ get: function () { return chunkTIUKIY5V_cjs.ConfidentialAirdropFactoryClient; }
43
43
  });
44
44
  Object.defineProperty(exports, "confidentialAirdropFactoryAbi", {
45
45
  enumerable: true,
46
- get: function () { return chunkSYHXDHWX_cjs.confidentialAirdropFactoryAbi; }
46
+ get: function () { return chunkTIUKIY5V_cjs.confidentialAirdropFactoryAbi; }
47
47
  });
48
48
  Object.defineProperty(exports, "createConfidentialAirdropFactoryClient", {
49
49
  enumerable: true,
50
- get: function () { return chunkSYHXDHWX_cjs.createConfidentialAirdropFactoryClient; }
50
+ get: function () { return chunkTIUKIY5V_cjs.createConfidentialAirdropFactoryClient; }
51
51
  });
52
52
  Object.defineProperty(exports, "encryptUint64", {
53
53
  enumerable: true,
54
- get: function () { return chunkSYHXDHWX_cjs.encryptUint64; }
54
+ get: function () { return chunkTIUKIY5V_cjs.encryptUint64; }
55
55
  });
56
56
  Object.defineProperty(exports, "encryptUint64Batch", {
57
57
  enumerable: true,
58
- get: function () { return chunkSYHXDHWX_cjs.encryptUint64Batch; }
58
+ get: function () { return chunkTIUKIY5V_cjs.encryptUint64Batch; }
59
59
  });
60
60
  Object.defineProperty(exports, "resolveEncryptor", {
61
61
  enumerable: true,
62
- get: function () { return chunkSYHXDHWX_cjs.resolveEncryptor; }
62
+ get: function () { return chunkTIUKIY5V_cjs.resolveEncryptor; }
63
63
  });
64
64
  Object.defineProperty(exports, "signClaimAuthorization", {
65
65
  enumerable: true,
66
- get: function () { return chunkSYHXDHWX_cjs.signClaimAuthorization; }
66
+ get: function () { return chunkTIUKIY5V_cjs.signClaimAuthorization; }
67
67
  });
68
68
  Object.defineProperty(exports, "erc7984OperatorAbi", {
69
69
  enumerable: true,
@@ -79,149 +79,153 @@ Object.defineProperty(exports, "asEncryptedHandle", {
79
79
  });
80
80
  Object.defineProperty(exports, "AccessDeniedError", {
81
81
  enumerable: true,
82
- get: function () { return chunk56UI7LUR_cjs.AccessDeniedError; }
82
+ get: function () { return chunk67OV5CX2_cjs.AccessDeniedError; }
83
83
  });
84
84
  Object.defineProperty(exports, "AlreadyInitializedError", {
85
85
  enumerable: true,
86
- get: function () { return chunk56UI7LUR_cjs.AlreadyInitializedError; }
86
+ get: function () { return chunk67OV5CX2_cjs.AlreadyInitializedError; }
87
87
  });
88
88
  Object.defineProperty(exports, "BatchTooLargeError", {
89
89
  enumerable: true,
90
- get: function () { return chunk56UI7LUR_cjs.BatchTooLargeError; }
90
+ get: function () { return chunk67OV5CX2_cjs.BatchTooLargeError; }
91
91
  });
92
92
  Object.defineProperty(exports, "ContractRevertError", {
93
93
  enumerable: true,
94
- get: function () { return chunk56UI7LUR_cjs.ContractRevertError; }
94
+ get: function () { return chunk67OV5CX2_cjs.ContractRevertError; }
95
95
  });
96
96
  Object.defineProperty(exports, "DecryptionFailedError", {
97
97
  enumerable: true,
98
- get: function () { return chunk56UI7LUR_cjs.DecryptionFailedError; }
98
+ get: function () { return chunk67OV5CX2_cjs.DecryptionFailedError; }
99
99
  });
100
100
  Object.defineProperty(exports, "DeploymentAddressUnavailableError", {
101
101
  enumerable: true,
102
- get: function () { return chunk56UI7LUR_cjs.DeploymentAddressUnavailableError; }
102
+ get: function () { return chunk67OV5CX2_cjs.DeploymentAddressUnavailableError; }
103
103
  });
104
104
  Object.defineProperty(exports, "EncryptionFailedError", {
105
105
  enumerable: true,
106
- get: function () { return chunk56UI7LUR_cjs.EncryptionFailedError; }
106
+ get: function () { return chunk67OV5CX2_cjs.EncryptionFailedError; }
107
107
  });
108
108
  Object.defineProperty(exports, "FeatureDisabledError", {
109
109
  enumerable: true,
110
- get: function () { return chunk56UI7LUR_cjs.FeatureDisabledError; }
110
+ get: function () { return chunk67OV5CX2_cjs.FeatureDisabledError; }
111
111
  });
112
112
  Object.defineProperty(exports, "FheHandleNotAllowedError", {
113
113
  enumerable: true,
114
- get: function () { return chunk56UI7LUR_cjs.FheHandleNotAllowedError; }
114
+ get: function () { return chunk67OV5CX2_cjs.FheHandleNotAllowedError; }
115
115
  });
116
116
  Object.defineProperty(exports, "InsufficientBalanceError", {
117
117
  enumerable: true,
118
- get: function () { return chunk56UI7LUR_cjs.InsufficientBalanceError; }
118
+ get: function () { return chunk67OV5CX2_cjs.InsufficientBalanceError; }
119
119
  });
120
120
  Object.defineProperty(exports, "InsufficientFeeError", {
121
121
  enumerable: true,
122
- get: function () { return chunk56UI7LUR_cjs.InsufficientFeeError; }
122
+ get: function () { return chunk67OV5CX2_cjs.InsufficientFeeError; }
123
123
  });
124
124
  Object.defineProperty(exports, "InsufficientGasFundsError", {
125
125
  enumerable: true,
126
- get: function () { return chunk56UI7LUR_cjs.InsufficientGasFundsError; }
126
+ get: function () { return chunk67OV5CX2_cjs.InsufficientGasFundsError; }
127
127
  });
128
128
  Object.defineProperty(exports, "InvalidArgumentError", {
129
129
  enumerable: true,
130
- get: function () { return chunk56UI7LUR_cjs.InvalidArgumentError; }
130
+ get: function () { return chunk67OV5CX2_cjs.InvalidArgumentError; }
131
131
  });
132
132
  Object.defineProperty(exports, "InvalidSignatureError", {
133
133
  enumerable: true,
134
- get: function () { return chunk56UI7LUR_cjs.InvalidSignatureError; }
134
+ get: function () { return chunk67OV5CX2_cjs.InvalidSignatureError; }
135
135
  });
136
136
  Object.defineProperty(exports, "MissingAccountError", {
137
137
  enumerable: true,
138
- get: function () { return chunk56UI7LUR_cjs.MissingAccountError; }
138
+ get: function () { return chunk67OV5CX2_cjs.MissingAccountError; }
139
139
  });
140
140
  Object.defineProperty(exports, "MissingClientError", {
141
141
  enumerable: true,
142
- get: function () { return chunk56UI7LUR_cjs.MissingClientError; }
142
+ get: function () { return chunk67OV5CX2_cjs.MissingClientError; }
143
143
  });
144
144
  Object.defineProperty(exports, "MissingEncryptorError", {
145
145
  enumerable: true,
146
- get: function () { return chunk56UI7LUR_cjs.MissingEncryptorError; }
146
+ get: function () { return chunk67OV5CX2_cjs.MissingEncryptorError; }
147
147
  });
148
148
  Object.defineProperty(exports, "MissingPublicClientError", {
149
149
  enumerable: true,
150
- get: function () { return chunk56UI7LUR_cjs.MissingPublicClientError; }
150
+ get: function () { return chunk67OV5CX2_cjs.MissingPublicClientError; }
151
151
  });
152
152
  Object.defineProperty(exports, "MissingWalletClientError", {
153
153
  enumerable: true,
154
- get: function () { return chunk56UI7LUR_cjs.MissingWalletClientError; }
154
+ get: function () { return chunk67OV5CX2_cjs.MissingWalletClientError; }
155
155
  });
156
156
  Object.defineProperty(exports, "NetworkError", {
157
157
  enumerable: true,
158
- get: function () { return chunk56UI7LUR_cjs.NetworkError; }
158
+ get: function () { return chunk67OV5CX2_cjs.NetworkError; }
159
+ });
160
+ Object.defineProperty(exports, "OperatorNotApprovedError", {
161
+ enumerable: true,
162
+ get: function () { return chunk67OV5CX2_cjs.OperatorNotApprovedError; }
159
163
  });
160
164
  Object.defineProperty(exports, "PausedError", {
161
165
  enumerable: true,
162
- get: function () { return chunk56UI7LUR_cjs.PausedError; }
166
+ get: function () { return chunk67OV5CX2_cjs.PausedError; }
163
167
  });
164
168
  Object.defineProperty(exports, "ReceiptEventAmbiguousError", {
165
169
  enumerable: true,
166
- get: function () { return chunk56UI7LUR_cjs.ReceiptEventAmbiguousError; }
170
+ get: function () { return chunk67OV5CX2_cjs.ReceiptEventAmbiguousError; }
167
171
  });
168
172
  Object.defineProperty(exports, "ReceiptEventNotFoundError", {
169
173
  enumerable: true,
170
- get: function () { return chunk56UI7LUR_cjs.ReceiptEventNotFoundError; }
174
+ get: function () { return chunk67OV5CX2_cjs.ReceiptEventNotFoundError; }
171
175
  });
172
176
  Object.defineProperty(exports, "ReentrancyError", {
173
177
  enumerable: true,
174
- get: function () { return chunk56UI7LUR_cjs.ReentrancyError; }
178
+ get: function () { return chunk67OV5CX2_cjs.ReentrancyError; }
175
179
  });
176
180
  Object.defineProperty(exports, "RelayerUnreachableError", {
177
181
  enumerable: true,
178
- get: function () { return chunk56UI7LUR_cjs.RelayerUnreachableError; }
182
+ get: function () { return chunk67OV5CX2_cjs.RelayerUnreachableError; }
179
183
  });
180
184
  Object.defineProperty(exports, "SigningFailedError", {
181
185
  enumerable: true,
182
- get: function () { return chunk56UI7LUR_cjs.SigningFailedError; }
186
+ get: function () { return chunk67OV5CX2_cjs.SigningFailedError; }
183
187
  });
184
188
  Object.defineProperty(exports, "TokenOpsContractError", {
185
189
  enumerable: true,
186
- get: function () { return chunk56UI7LUR_cjs.TokenOpsContractError; }
190
+ get: function () { return chunk67OV5CX2_cjs.TokenOpsContractError; }
187
191
  });
188
192
  Object.defineProperty(exports, "TokenOpsSdkError", {
189
193
  enumerable: true,
190
- get: function () { return chunk56UI7LUR_cjs.TokenOpsSdkError; }
194
+ get: function () { return chunk67OV5CX2_cjs.TokenOpsSdkError; }
191
195
  });
192
196
  Object.defineProperty(exports, "TokenOpsValidationError", {
193
197
  enumerable: true,
194
- get: function () { return chunk56UI7LUR_cjs.TokenOpsValidationError; }
198
+ get: function () { return chunk67OV5CX2_cjs.TokenOpsValidationError; }
195
199
  });
196
200
  Object.defineProperty(exports, "TransferFailedError", {
197
201
  enumerable: true,
198
- get: function () { return chunk56UI7LUR_cjs.TransferFailedError; }
202
+ get: function () { return chunk67OV5CX2_cjs.TransferFailedError; }
199
203
  });
200
204
  Object.defineProperty(exports, "UnknownWriteFailureError", {
201
205
  enumerable: true,
202
- get: function () { return chunk56UI7LUR_cjs.UnknownWriteFailureError; }
206
+ get: function () { return chunk67OV5CX2_cjs.UnknownWriteFailureError; }
203
207
  });
204
208
  Object.defineProperty(exports, "UnsupportedChainError", {
205
209
  enumerable: true,
206
- get: function () { return chunk56UI7LUR_cjs.UnsupportedChainError; }
210
+ get: function () { return chunk67OV5CX2_cjs.UnsupportedChainError; }
207
211
  });
208
212
  Object.defineProperty(exports, "UserDecryptNotAllowedError", {
209
213
  enumerable: true,
210
- get: function () { return chunk56UI7LUR_cjs.UserDecryptNotAllowedError; }
214
+ get: function () { return chunk67OV5CX2_cjs.UserDecryptNotAllowedError; }
211
215
  });
212
216
  Object.defineProperty(exports, "UserRejectedSignatureError", {
213
217
  enumerable: true,
214
- get: function () { return chunk56UI7LUR_cjs.UserRejectedSignatureError; }
218
+ get: function () { return chunk67OV5CX2_cjs.UserRejectedSignatureError; }
215
219
  });
216
220
  Object.defineProperty(exports, "WalletChainMismatchError", {
217
221
  enumerable: true,
218
- get: function () { return chunk56UI7LUR_cjs.WalletChainMismatchError; }
222
+ get: function () { return chunk67OV5CX2_cjs.WalletChainMismatchError; }
219
223
  });
220
224
  Object.defineProperty(exports, "WalletRejectedError", {
221
225
  enumerable: true,
222
- get: function () { return chunk56UI7LUR_cjs.WalletRejectedError; }
226
+ get: function () { return chunk67OV5CX2_cjs.WalletRejectedError; }
223
227
  });
224
228
  Object.defineProperty(exports, "isTokenOpsSdkError", {
225
229
  enumerable: true,
226
- get: function () { return chunk56UI7LUR_cjs.isTokenOpsSdkError; }
230
+ get: function () { return chunk67OV5CX2_cjs.isTokenOpsSdkError; }
227
231
  });
@@ -1,10 +1,10 @@
1
- export { ConfidentialAirdropFactoryClient, createConfidentialAirdropFactoryClient, type ConfidentialAirdropFactoryClientConfig, type CreateAirdropArgs, type CreateAirdropResult, type CreateAndFundAirdropArgs, type FundAirdropArgs, } from "./factory.js";
1
+ export { ConfidentialAirdropFactoryClient, createConfidentialAirdropFactoryClient, type ConfidentialAirdropFactoryClientConfig, type CreateAirdropArgs, type CreateAirdropResult, type CreateAndFundAirdropArgs, type FundAirdropArgs, type PreflightCreateAirdropArgs, } from "./factory.js";
2
2
  export { ConfidentialAirdropClient, createConfidentialAirdropClient, type ClaimArgs, type ConfidentialAirdropClientConfig, type EncryptedViewResult, type GetClaimAmountArgs, type IsSignatureValidArgs, } from "./airdrop.js";
3
3
  export { encryptUint64, encryptUint64Batch, resolveEncryptor, signClaimAuthorization, type Encryptor, type EncryptorSource, type EncryptUint64Args, type EncryptUint64BatchArgs, type FheValueInput, } from "./encryption.js";
4
- export { type AirdropParams, type CustomFee, type EncryptedInput, type EncryptedInputs, } from "./types.js";
4
+ export { type AirdropParams, type CreateAirdropPreflightReport, type CustomFee, type EncryptedInput, type EncryptedInputs, } from "./types.js";
5
5
  export { asAirdropId, type AirdropId, asEncryptedHandle, type EncryptedHandle, } from "../core/brands.js";
6
6
  export { confidentialAirdropFactoryAbi, confidentialAirdropCloneableAbi } from "./abis/index.js";
7
7
  export { erc7984OperatorAbi } from "../fhe/erc7984-abi.js";
8
- export { TokenOpsSdkError, isTokenOpsSdkError, DeploymentAddressUnavailableError, UnsupportedChainError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, InvalidArgumentError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, TokenOpsValidationError, ContractRevertError, TokenOpsContractError, 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";
8
+ export { TokenOpsSdkError, isTokenOpsSdkError, DeploymentAddressUnavailableError, UnsupportedChainError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, InvalidArgumentError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, TokenOpsValidationError, ContractRevertError, TokenOpsContractError, 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";
9
9
  export { type PreflightResult } from "../core/preflight.js";
10
10
  export { AlreadyClaimedError, ClaimNotStartedError, ClaimWindowClosedError } from "./errors.js";