@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
@@ -18,6 +18,13 @@ export interface UseSingletonCalculateFeeArgs 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 } = useSingletonCalculateFee({
23
30
  * user, mode: "direct", recipients: 100,
@@ -10,8 +10,8 @@ import { type DisperseHookOptions } from "./_shared.js";
10
10
  * the discriminated SDK shape.
11
11
  *
12
12
  * `amount` and `encryptedInput` are XOR enforced by the underlying SDK call;
13
- * the hook surface mirrors the relaxed pre-S-4 shape (callers had been writing
14
- * it that way for two rounds) and the mutate body routes to the right branch.
13
+ * the hook surface accepts the relaxed shape and the mutate body routes to the
14
+ * right branch.
15
15
  */
16
16
  export interface UseSingletonWithdrawTokenFeeArgs {
17
17
  /** ERC-7984 token whose accumulated fee reserve to withdraw from. */
@@ -36,6 +36,12 @@ export interface UseSingletonWithdrawTokenFeeArgs {
36
36
  * `amount` is encrypted by the SDK before submission; the contract caps the
37
37
  * withdrawal at the available reserve via `FHE.min`.
38
38
  *
39
+ * **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
40
+ * convention (1 token = 1_000_000 base units), not the 18 decimals typical of
41
+ * ERC-20. Amount parameters are base units of the token's actual decimals:
42
+ * for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
43
+ * transparent TTT test token uses 18 decimals.
44
+ *
39
45
  * **Encryptor resolution.** Pass `encryptor` per-call, or supply it at hook
40
46
  * construction via {@link DisperseHookOptions}.`encryptor`. If neither is
41
47
  * present, the SDK throws `Missing encryptor — pass encryptor…` verbatim.
@@ -43,6 +43,12 @@ export type UseWithdrawTokenFeeArgs = UseWithdrawTokenFeePlaintextArgs | UseWith
43
43
  * never both. The contract caps the withdrawal at the available reserve via
44
44
  * `FHE.min`.
45
45
  *
46
+ * **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
47
+ * convention (1 token = 1_000_000 base units), not the 18 decimals typical of
48
+ * ERC-20. Amount parameters are base units of the token's actual decimals:
49
+ * for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
50
+ * transparent TTT test token uses 18 decimals.
51
+ *
46
52
  * Returns `{ hash, transferredHandle }` parsed from the `TokenFeeWithdrawn`
47
53
  * event. The handle is decryptable by the caller via Zama's `userDecrypt`
48
54
  * and reveals the actual transferred amount, which may be less than the
@@ -153,6 +153,13 @@ export declare class ConfidentialDisperseClient {
153
153
  * subtotal1` for the result to match the on-chain computation. Both this
154
154
  * SDK and the contract round the BPS multiplication down (floor division).
155
155
  *
156
+ * **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
157
+ * convention (1 token = 1_000_000 base units), not the 18 decimals typical of
158
+ * ERC-20. Amount parameters are base units of the token's actual decimals:
159
+ * for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
160
+ * transparent TTT test token uses 18 decimals. `totalTokens` follows this
161
+ * convention.
162
+ *
156
163
  * @throws {TokenOpsSdkError} if mode is `"wallet-token-fee"` and `totalTokens` is not provided.
157
164
  */
158
165
  calculateFee(args: CalculateFeeArgs): Promise<CalculatedFee>;
@@ -179,6 +186,13 @@ export declare class ConfidentialDisperseClient {
179
186
  * - `hasApprovedSubwallets` (wallet modes) or `isOperator(sender, singleton)` (direct mode)
180
187
  * - `calculateFee` / `getBatchLimits`
181
188
  * - Structural recipient + amount validation
189
+ *
190
+ * **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
191
+ * convention (1 token = 1_000_000 base units), not the 18 decimals typical of
192
+ * ERC-20. Amount parameters are base units of the token's actual decimals:
193
+ * for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
194
+ * transparent TTT test token uses 18 decimals. Pass `amounts[]` in the same
195
+ * units you will pass to `disperse` so the report reflects the real call.
182
196
  */
183
197
  preflightDisperse(args: PreflightDisperseArgs): Promise<PreflightReport>;
184
198
  /**
@@ -249,6 +263,15 @@ export declare class ConfidentialDisperseClient {
249
263
  * 4. Computes `msg.value` for gas-fee modes; `0` for token-fee mode.
250
264
  * 5. Dispatches to the correct contract function based on `mode`.
251
265
  *
266
+ * **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.
267
+ *
268
+ * **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
269
+ * convention (1 token = 1_000_000 base units), not the 18 decimals typical of
270
+ * ERC-20. Amount parameters are base units of the token's actual decimals:
271
+ * for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
272
+ * transparent TTT test token uses 18 decimals. Every entry of `amounts[]`
273
+ * follows this convention.
274
+ *
252
275
  * @throws {TokenOpsSdkError} on input validation failure (first deterministic error).
253
276
  * @throws {TokenOpsSdkError} if no encryptor is available at call time.
254
277
  */
@@ -352,6 +375,12 @@ export declare class ConfidentialDisperseClient {
352
375
  * encryptor, or pass `encryptedInput` directly. The contract caps the
353
376
  * withdrawal at the available reserve via `FHE.min`.
354
377
  *
378
+ * **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
379
+ * convention (1 token = 1_000_000 base units), not the 18 decimals typical of
380
+ * ERC-20. Amount parameters are base units of the token's actual decimals:
381
+ * for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
382
+ * transparent TTT test token uses 18 decimals.
383
+ *
355
384
  * Returns the tx hash plus the **transferred** handle parsed from the
356
385
  * `TokenFeeWithdrawn` event. Decrypt the handle via Zama's `userDecrypt`
357
386
  * to view the actual amount moved (which can be less than requested when
@@ -7,6 +7,12 @@
7
7
  * group1 = remaining baseSize recipients → wallet1
8
8
  *
9
9
  * This matches `_distributeFromWallets` in `DisperseConfidential.sol`.
10
+ *
11
+ * **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
12
+ * convention (1 token = 1_000_000 base units), not the 18 decimals typical of
13
+ * ERC-20. Amount parameters are base units of the token's actual decimals:
14
+ * for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
15
+ * transparent TTT test token uses 18 decimals.
10
16
  */
11
17
  export declare function computeSubtotals(amounts: bigint[]): {
12
18
  group0: bigint;
@@ -4,8 +4,8 @@ import { ConfidentialVestingFactoryClient, type ConfidentialVestingFactoryClient
4
4
  * Advanced extension of {@link ConfidentialVestingFactoryClient} that re-exposes
5
5
  * the CREATE2 address prediction read.
6
6
  *
7
- * **Why this is "advanced" surface.** R02 ADR P-1 + P-2 (alignment-auditor R04
8
- * top-1): `predictManagerAddress` is block-dependent on a live chain — the
7
+ * **Why this is "advanced" surface.** `predictManagerAddress` is
8
+ * block-dependent on a live chain — the
9
9
  * factory packs the deployment block number into the clone's immutable args,
10
10
  * which feed into the CREATE2 init-code hash. Predict at block N, mine at
11
11
  * N+1, and the addresses differ. The vast majority of consumers want
@@ -1,21 +1,21 @@
1
1
  'use strict';
2
2
 
3
- var chunkQCA7O2Q5_cjs = require('../../chunk-QCA7O2Q5.cjs');
4
- require('../../chunk-62DF53UQ.cjs');
5
- require('../../chunk-VDXVNZCO.cjs');
6
- require('../../chunk-OLDGMKW2.cjs');
7
- require('../../chunk-CQIPRNS7.cjs');
3
+ var chunkV2PXZVBF_cjs = require('../../chunk-V2PXZVBF.cjs');
4
+ require('../../chunk-C7BRZXJA.cjs');
5
+ require('../../chunk-KLKI352M.cjs');
6
+ require('../../chunk-PUPKNW3R.cjs');
7
+ require('../../chunk-JK4XMMKM.cjs');
8
8
  require('../../chunk-VJKZWYYJ.cjs');
9
9
  require('../../chunk-66IHPTOK.cjs');
10
- require('../../chunk-56UI7LUR.cjs');
10
+ require('../../chunk-67OV5CX2.cjs');
11
11
 
12
12
 
13
13
 
14
14
  Object.defineProperty(exports, "ConfidentialVestingFactoryAdvancedClient", {
15
15
  enumerable: true,
16
- get: function () { return chunkQCA7O2Q5_cjs.ConfidentialVestingFactoryAdvancedClient; }
16
+ get: function () { return chunkV2PXZVBF_cjs.ConfidentialVestingFactoryAdvancedClient; }
17
17
  });
18
18
  Object.defineProperty(exports, "createConfidentialVestingFactoryAdvancedClient", {
19
19
  enumerable: true,
20
- get: function () { return chunkQCA7O2Q5_cjs.createConfidentialVestingFactoryAdvancedClient; }
20
+ get: function () { return chunkV2PXZVBF_cjs.createConfidentialVestingFactoryAdvancedClient; }
21
21
  });
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * Advanced FHE-vesting primitives — power-user surface kept off the headline
3
- * client to keep the 90 % path lean (R02 ADR P-2; alignment-auditor R04 top-1).
3
+ * client to keep the common path lean.
4
4
  *
5
5
  * Re-exports the {@link ConfidentialVestingFactoryAdvancedClient} subclass,
6
6
  * which extends the headline factory client with `predictManagerAddress`. The
7
7
  * predict read is block-dependent — see the subclass TSDoc. For the common
8
8
  * "deploy and learn the address" case, the headline factory's
9
- * `createManager` returns `{ hash, manager }` directly (R02 ADR P-1).
9
+ * `createManager` returns `{ hash, manager }` directly.
10
10
  */
11
11
  export { ConfidentialVestingFactoryAdvancedClient, createConfidentialVestingFactoryAdvancedClient, } from "./factory-advanced.js";
12
12
  export type { PredictManagerArgs } from "../factory.js";
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * Advanced FHE-vesting primitives — power-user surface kept off the headline
3
- * client to keep the 90 % path lean (R02 ADR P-2; alignment-auditor R04 top-1).
3
+ * client to keep the common path lean.
4
4
  *
5
5
  * Re-exports the {@link ConfidentialVestingFactoryAdvancedClient} subclass,
6
6
  * which extends the headline factory client with `predictManagerAddress`. The
7
7
  * predict read is block-dependent — see the subclass TSDoc. For the common
8
8
  * "deploy and learn the address" case, the headline factory's
9
- * `createManager` returns `{ hash, manager }` directly (R02 ADR P-1).
9
+ * `createManager` returns `{ hash, manager }` directly.
10
10
  */
11
11
  export { ConfidentialVestingFactoryAdvancedClient, createConfidentialVestingFactoryAdvancedClient, } from "./factory-advanced.js";
12
12
  export type { PredictManagerArgs } from "../factory.js";
@@ -1,8 +1,8 @@
1
- export { ConfidentialVestingFactoryAdvancedClient, createConfidentialVestingFactoryAdvancedClient } from '../../chunk-CMRETRZO.js';
2
- import '../../chunk-72YGZEQE.js';
3
- import '../../chunk-JFLEEXKP.js';
4
- import '../../chunk-COPFW5Z4.js';
5
- import '../../chunk-BE2AIZ3K.js';
1
+ export { ConfidentialVestingFactoryAdvancedClient, createConfidentialVestingFactoryAdvancedClient } from '../../chunk-YQIBBEFJ.js';
2
+ import '../../chunk-OXTLPTO3.js';
3
+ import '../../chunk-SG65XWH7.js';
4
+ import '../../chunk-XGGTQQFH.js';
5
+ import '../../chunk-ZA673I3O.js';
6
6
  import '../../chunk-Q2GP5UDC.js';
7
7
  import '../../chunk-KWFFIJYX.js';
8
- import '../../chunk-IVE3QEGD.js';
8
+ import '../../chunk-QBJ7O2B4.js';
@@ -1,18 +1,19 @@
1
1
  'use strict';
2
2
 
3
- var chunkJFR5J4FL_cjs = require('../../../chunk-JFR5J4FL.cjs');
4
- require('../../../chunk-SUOG3BQS.cjs');
5
- require('../../../chunk-NS44KBV5.cjs');
6
- require('../../../chunk-5SGMJADP.cjs');
7
- require('../../../chunk-Q7ARQSUH.cjs');
8
- var chunkQCA7O2Q5_cjs = require('../../../chunk-QCA7O2Q5.cjs');
9
- require('../../../chunk-62DF53UQ.cjs');
10
- require('../../../chunk-VDXVNZCO.cjs');
11
- var chunkOLDGMKW2_cjs = require('../../../chunk-OLDGMKW2.cjs');
12
- require('../../../chunk-CQIPRNS7.cjs');
3
+ var chunkW7IGCOVL_cjs = require('../../../chunk-W7IGCOVL.cjs');
4
+ require('../../../chunk-5X5WL5CU.cjs');
5
+ require('../../../chunk-TEBM66WA.cjs');
6
+ require('../../../chunk-2NCLOQ56.cjs');
7
+ require('../../../chunk-FAXIIH5R.cjs');
8
+ require('../../../chunk-FWHYQZ5E.cjs');
9
+ var chunkV2PXZVBF_cjs = require('../../../chunk-V2PXZVBF.cjs');
10
+ require('../../../chunk-C7BRZXJA.cjs');
11
+ require('../../../chunk-KLKI352M.cjs');
12
+ var chunkPUPKNW3R_cjs = require('../../../chunk-PUPKNW3R.cjs');
13
+ require('../../../chunk-JK4XMMKM.cjs');
13
14
  require('../../../chunk-VJKZWYYJ.cjs');
14
15
  require('../../../chunk-66IHPTOK.cjs');
15
- require('../../../chunk-56UI7LUR.cjs');
16
+ require('../../../chunk-67OV5CX2.cjs');
16
17
  var react = require('react');
17
18
  var reactQuery = require('@tanstack/react-query');
18
19
  var wagmi = require('wagmi');
@@ -35,12 +36,12 @@ function usePredictManagerAddress(args = {}) {
35
36
  ...chainId !== void 0 ? { chainId } : {}
36
37
  });
37
38
  const resolvedChainId = chainId ?? resolvedPublicClient?.chain?.id;
38
- const resolvedAddress = address ?? (resolvedChainId === void 0 ? void 0 : chunkOLDGMKW2_cjs.DEPLOYED_ADDRESSES.fheVesting?.confidentialVestingFactory?.[resolvedChainId] ?? void 0);
39
+ const resolvedAddress = address ?? (resolvedChainId === void 0 ? void 0 : chunkPUPKNW3R_cjs.DEPLOYED_ADDRESSES.fheVesting?.confidentialVestingFactory?.[resolvedChainId] ?? void 0);
39
40
  react.useRef(void 0);
40
41
  const client = react.useMemo(() => {
41
42
  if (!resolvedPublicClient) return void 0;
42
43
  if (!resolvedAddress) return void 0;
43
- return chunkQCA7O2Q5_cjs.createConfidentialVestingFactoryAdvancedClient({
44
+ return chunkV2PXZVBF_cjs.createConfidentialVestingFactoryAdvancedClient({
44
45
  publicClient: resolvedPublicClient,
45
46
  ...walletClient ? { walletClient } : {},
46
47
  address: resolvedAddress,
@@ -48,7 +49,7 @@ function usePredictManagerAddress(args = {}) {
48
49
  });
49
50
  }, [resolvedPublicClient, walletClient, resolvedAddress, resolvedChainId]);
50
51
  return reactQuery.useQuery({
51
- queryKey: chunkJFR5J4FL_cjs.buildQueryKey(
52
+ queryKey: chunkW7IGCOVL_cjs.buildQueryKey(
52
53
  "factory:predictManagerAddress",
53
54
  resolvedChainId,
54
55
  resolvedAddress,
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * React hooks for `@tokenops/sdk/fhe-vesting/advanced`. The headline React
3
- * subpath stays lean; pre-mine address prediction lives here per R02 ADR P-2.
3
+ * subpath stays lean; pre-mine address prediction lives here.
4
4
  */
5
5
  export { usePredictManagerAddress, type UsePredictManagerAddressArgs, } from "./usePredictManagerAddress.js";
@@ -1,5 +1,5 @@
1
1
  /**
2
2
  * React hooks for `@tokenops/sdk/fhe-vesting/advanced`. The headline React
3
- * subpath stays lean; pre-mine address prediction lives here per R02 ADR P-2.
3
+ * subpath stays lean; pre-mine address prediction lives here.
4
4
  */
5
5
  export { usePredictManagerAddress, type UsePredictManagerAddressArgs, } from "./usePredictManagerAddress.js";
@@ -1,16 +1,17 @@
1
- import { buildQueryKey } from '../../../chunk-ECT3NL2L.js';
2
- import '../../../chunk-52TC6BF7.js';
3
- import '../../../chunk-ZXCOJY2Z.js';
4
- import '../../../chunk-XSNLAS5M.js';
5
- import '../../../chunk-FYQ2UW4T.js';
6
- import { createConfidentialVestingFactoryAdvancedClient } from '../../../chunk-CMRETRZO.js';
7
- import '../../../chunk-72YGZEQE.js';
8
- import '../../../chunk-JFLEEXKP.js';
9
- import { DEPLOYED_ADDRESSES } from '../../../chunk-COPFW5Z4.js';
10
- import '../../../chunk-BE2AIZ3K.js';
1
+ import { buildQueryKey } from '../../../chunk-NTZY6IB7.js';
2
+ import '../../../chunk-IXLO7GO5.js';
3
+ import '../../../chunk-WMACINXO.js';
4
+ import '../../../chunk-AOP6HMPW.js';
5
+ import '../../../chunk-ZWXJTBZO.js';
6
+ import '../../../chunk-7VELUOMI.js';
7
+ import { createConfidentialVestingFactoryAdvancedClient } from '../../../chunk-YQIBBEFJ.js';
8
+ import '../../../chunk-OXTLPTO3.js';
9
+ import '../../../chunk-SG65XWH7.js';
10
+ import { DEPLOYED_ADDRESSES } from '../../../chunk-XGGTQQFH.js';
11
+ import '../../../chunk-ZA673I3O.js';
11
12
  import '../../../chunk-Q2GP5UDC.js';
12
13
  import '../../../chunk-KWFFIJYX.js';
13
- import '../../../chunk-IVE3QEGD.js';
14
+ import '../../../chunk-QBJ7O2B4.js';
14
15
  import { useRef, useMemo } from 'react';
15
16
  import { useQuery } from '@tanstack/react-query';
16
17
  import { usePublicClient, useWalletClient } from 'wagmi';
@@ -79,6 +79,14 @@ export interface EncryptUint64BatchArgs {
79
79
  * The handle and proof are bound to `contractAddress` and `userAddress` — they
80
80
  * cannot be replayed against a different contract or sender.
81
81
  *
82
+ * **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
83
+ * convention (1 token = 1_000_000 base units), not the 18 decimals typical of
84
+ * ERC-20. Amount parameters are base units of the token's actual decimals:
85
+ * for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
86
+ * transparent TTT test token uses 18 decimals. `value` (and each entry of
87
+ * `values` in {@link encryptUint64Batch}) follows this convention when it
88
+ * encodes a token amount.
89
+ *
82
90
  * @param args Encryption request; `value` must fit in `uint64` (0 to 2^64-1).
83
91
  * @returns `{ handle: Hex, inputProof: Hex }` — pass both to the contract.
84
92
  * @example
@@ -72,7 +72,7 @@ export interface PredictManagerArgs {
72
72
  * Rich-return shape from {@link ConfidentialVestingFactoryClient.createManager}.
73
73
  *
74
74
  * Branded `hash: TxHash` and `manager: Address` so consumers can't accidentally
75
- * swap them at the destructure site (R03 S-1 anti-footgun).
75
+ * swap them at the destructure site.
76
76
  */
77
77
  export interface CreateManagerResult {
78
78
  /** Transaction hash of the deploy. */
@@ -99,11 +99,10 @@ export declare class ConfidentialVestingFactoryClient {
99
99
  * Deploy a new `ConfidentialVestingManager` clone via the factory and return
100
100
  * its address, parsed from the `ManagerCreated` event in the tx receipt.
101
101
  *
102
- * **This is the headline factory entry point.** R02 ADR P-1 collapses the
103
- * old hash-only + `…AndGetAddress` pair down to one rich-return method —
104
- * the address is only knowable after the tx mines (the factory packs
102
+ * **This is the headline factory entry point.** It returns one rich-return
103
+ * shape: the address is only knowable after the tx mines (the factory packs
105
104
  * `block.number` into the clone's immutable args), so a hash-only variant
106
- * forced consumers to re-derive what the SDK already had to compute.
105
+ * would force consumers to re-derive what the SDK already had to compute.
107
106
  *
108
107
  * Calls `createManagerWithOptions` when `splitEnabled` or `pausableEnabled`
109
108
  * is provided; otherwise calls the simpler `createManager` entry point.
@@ -178,9 +177,8 @@ export declare class ConfidentialVestingFactoryClient {
178
177
  * Alias for {@link ConfidentialVestingFactoryClient.implementation} that matches
179
178
  * the contract's storage field name (`_managerImplementation`).
180
179
  *
181
- * Renamed for clarity per backend-integrator-r14 friction
182
- * (`docs/feedback/inbox/2026-05-24-backend-integrator-r14-minor-implementation-vs-manager-implementation-naming.md`):
183
- * server devs reading the Solidity reach for `factory.managerImplementation()`
180
+ * Named for clarity: server devs reading the Solidity reach for
181
+ * `factory.managerImplementation()`
184
182
  * via autocomplete (the contract storage slot name) and hit a TS2551. The
185
183
  * canonical `implementation()` method is retained for backwards-compat and
186
184
  * cross-factory uniformity (fhe-airdrop exposes the same shape).