@tokenops/sdk 1.1.1 → 1.6.0

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 (163) hide show
  1. package/CHANGELOG.md +158 -2
  2. package/README.md +18 -8
  3. package/SECURITY.md +7 -1
  4. package/dist/{chunk-56UI7LUR.cjs → chunk-2RNW4MIJ.cjs} +37 -0
  5. package/dist/{chunk-VDXVNZCO.cjs → chunk-43RFBQ73.cjs} +85 -29
  6. package/dist/{chunk-BE2AIZ3K.js → chunk-46T67CE2.js} +1 -1
  7. package/dist/{chunk-WRCUDSUJ.js → chunk-4KJ66YRH.js} +61 -3
  8. package/dist/{chunk-ITQ7WKVC.cjs → chunk-4ZCXK4VI.cjs} +68 -8
  9. package/dist/{chunk-JFLEEXKP.js → chunk-6WSNS3UV.js} +58 -2
  10. package/dist/{chunk-W7JHOK7G.cjs → chunk-7G7UOQV4.cjs} +4 -4
  11. package/dist/{chunk-5KHIQG7Y.cjs → chunk-AYGRYDBX.cjs} +35 -36
  12. package/dist/{chunk-5SGMJADP.cjs → chunk-BD4LZBVF.cjs} +85 -9
  13. package/dist/{chunk-OYLZEEHF.cjs → chunk-BK7YIVLK.cjs} +304 -179
  14. package/dist/{chunk-SEKC7H5Y.cjs → chunk-CBRL2PJA.cjs} +12 -11
  15. package/dist/{chunk-XWDVPV42.js → chunk-CNP4L3GF.js} +4 -4
  16. package/dist/{chunk-IVE3QEGD.js → chunk-DRSPMIZ7.js} +28 -1
  17. package/dist/{chunk-SAGJIEQK.cjs → chunk-EUKPOXWR.cjs} +15 -16
  18. package/dist/chunk-FT4LNBOS.js +11 -0
  19. package/dist/{chunk-ITQBDRWX.js → chunk-HETNKZEE.js} +1 -1
  20. package/dist/{chunk-JJ4R5QXF.js → chunk-KSDSXJ34.js} +1 -1
  21. package/dist/{chunk-SYHXDHWX.cjs → chunk-LBWRFZR3.cjs} +218 -31
  22. package/dist/{chunk-ZXCOJY2Z.js → chunk-NFW7AUEX.js} +1 -1
  23. package/dist/{chunk-FPQBFIUW.cjs → chunk-OL6SHN3D.cjs} +3 -3
  24. package/dist/{chunk-XSNLAS5M.js → chunk-PD7ME2BT.js} +75 -2
  25. package/dist/{chunk-FXCW7LVB.js → chunk-QET3Q4JP.js} +94 -9
  26. package/dist/{chunk-M7V2EDPB.js → chunk-QKKBBH7I.js} +2 -2
  27. package/dist/{chunk-XXXDQSHE.js → chunk-S2XD75JM.js} +12 -3
  28. package/dist/{chunk-5SA2HF2W.cjs → chunk-SPGSO5SO.cjs} +31 -22
  29. package/dist/{chunk-Q7ARQSUH.cjs → chunk-SYHNZSZZ.cjs} +3 -3
  30. package/dist/{chunk-X56UVEXS.js → chunk-TN65XNTI.js} +248 -120
  31. package/dist/chunk-U57COLUE.js +56 -0
  32. package/dist/{chunk-OQZAZIAS.js → chunk-UE5XK2SY.js} +193 -6
  33. package/dist/{chunk-NS44KBV5.cjs → chunk-UJS4N2XM.cjs} +12 -12
  34. package/dist/{chunk-IR5AK5U5.js → chunk-V5D7BHW3.js} +4 -5
  35. package/dist/{chunk-3PQ2RFPC.js → chunk-VHSNYUYV.js} +5 -4
  36. package/dist/{chunk-CQIPRNS7.cjs → chunk-VR3FREBX.cjs} +3 -3
  37. package/dist/{chunk-G7G75C46.cjs → chunk-WO72UBQD.cjs} +11 -11
  38. package/dist/chunk-WOEETTH7.cjs +59 -0
  39. package/dist/{chunk-QE7ZONJ2.js → chunk-WTK6JDSI.js} +4 -5
  40. package/dist/{chunk-3ZRHDTEX.cjs → chunk-WUXUWTFW.cjs} +3 -3
  41. package/dist/{chunk-23F7JIK5.cjs → chunk-YFIWCYHC.cjs} +141 -54
  42. package/dist/{chunk-FYQ2UW4T.js → chunk-YPYCWLYP.js} +1 -1
  43. package/dist/chunk-ZQUE2B3Q.cjs +33 -0
  44. package/dist/core/addresses.d.ts +1 -1
  45. package/dist/core/errors.d.ts +41 -1
  46. package/dist/core/revert-mapper.d.ts +77 -0
  47. package/dist/core/wagmi-compat.d.ts +40 -0
  48. package/dist/fhe/index.cjs +134 -68
  49. package/dist/fhe/index.d.cts +2 -1
  50. package/dist/fhe/index.d.ts +2 -1
  51. package/dist/fhe/index.js +64 -10
  52. package/dist/fhe/mock-erc7984.d.ts +4 -4
  53. package/dist/fhe/operators.d.ts +142 -2
  54. package/dist/fhe/react/index.cjs +21 -8
  55. package/dist/fhe/react/index.d.cts +2 -0
  56. package/dist/fhe/react/index.d.ts +2 -0
  57. package/dist/fhe/react/index.js +8 -3
  58. package/dist/fhe/react/useEnsureOperator.d.ts +56 -0
  59. package/dist/fhe/react/useIsOperator.d.ts +54 -0
  60. package/dist/fhe/sepolia-encryptor-web.d.ts +45 -4
  61. package/dist/fhe/sepolia-encryptor.d.ts +38 -0
  62. package/dist/fhe-airdrop/advanced/index.cjs +9 -9
  63. package/dist/fhe-airdrop/advanced/index.js +7 -7
  64. package/dist/fhe-airdrop/advanced/react/index.cjs +14 -14
  65. package/dist/fhe-airdrop/advanced/react/index.js +10 -10
  66. package/dist/fhe-airdrop/airdrop.d.ts +9 -0
  67. package/dist/fhe-airdrop/encryption.d.ts +8 -0
  68. package/dist/fhe-airdrop/factory.d.ts +86 -1
  69. package/dist/fhe-airdrop/index.cjs +69 -66
  70. package/dist/fhe-airdrop/index.d.cts +3 -3
  71. package/dist/fhe-airdrop/index.d.ts +3 -3
  72. package/dist/fhe-airdrop/index.js +7 -8
  73. package/dist/fhe-airdrop/react/index.cjs +176 -135
  74. package/dist/fhe-airdrop/react/index.d.cts +7 -4
  75. package/dist/fhe-airdrop/react/index.d.ts +7 -4
  76. package/dist/fhe-airdrop/react/index.js +43 -16
  77. package/dist/fhe-airdrop/react/useAccessClaimAmount.d.ts +17 -11
  78. package/dist/fhe-airdrop/react/useAirdropIsSignatureValid.d.ts +3 -2
  79. package/dist/fhe-airdrop/react/useClaim.d.ts +10 -0
  80. package/dist/fhe-airdrop/react/useCreateAndFundConfidentialAirdrop.d.ts +8 -0
  81. package/dist/fhe-airdrop/react/useCreateAndFundConfidentialAirdropAndGetAddress.d.ts +8 -0
  82. package/dist/fhe-airdrop/react/useFundConfidentialAirdrop.d.ts +8 -0
  83. package/dist/fhe-airdrop/react/usePreflightCreateAirdrop.d.ts +51 -0
  84. package/dist/fhe-airdrop/react/useSignClaimAuthorization.d.ts +1 -1
  85. package/dist/fhe-airdrop/types.d.ts +56 -0
  86. package/dist/fhe-disperse/encryption.d.ts +8 -0
  87. package/dist/fhe-disperse/errors.d.ts +55 -0
  88. package/dist/fhe-disperse/index.cjs +77 -66
  89. package/dist/fhe-disperse/index.d.cts +2 -2
  90. package/dist/fhe-disperse/index.d.ts +2 -2
  91. package/dist/fhe-disperse/index.js +8 -9
  92. package/dist/fhe-disperse/react/index.cjs +108 -87
  93. package/dist/fhe-disperse/react/index.d.cts +4 -2
  94. package/dist/fhe-disperse/react/index.d.ts +4 -2
  95. package/dist/fhe-disperse/react/index.js +12 -11
  96. package/dist/fhe-disperse/react/useCalculateFee.d.ts +7 -0
  97. package/dist/fhe-disperse/react/useDisperse.d.ts +9 -0
  98. package/dist/fhe-disperse/react/usePreflightDisperse.d.ts +7 -0
  99. package/dist/fhe-disperse/react/useSingletonCalculateFee.d.ts +7 -0
  100. package/dist/fhe-disperse/react/useSingletonWithdrawTokenFee.d.ts +6 -0
  101. package/dist/fhe-disperse/react/useWithdrawTokenFee.d.ts +6 -0
  102. package/dist/fhe-disperse/singleton.d.ts +29 -0
  103. package/dist/fhe-disperse/subtotals.d.ts +6 -0
  104. package/dist/fhe-vesting/advanced/index.cjs +8 -9
  105. package/dist/fhe-vesting/advanced/index.js +6 -7
  106. package/dist/fhe-vesting/advanced/react/index.cjs +15 -15
  107. package/dist/fhe-vesting/advanced/react/index.js +12 -12
  108. package/dist/fhe-vesting/encryption.d.ts +8 -0
  109. package/dist/fhe-vesting/index.cjs +82 -79
  110. package/dist/fhe-vesting/index.d.cts +2 -2
  111. package/dist/fhe-vesting/index.d.ts +2 -2
  112. package/dist/fhe-vesting/index.js +9 -10
  113. package/dist/fhe-vesting/manager.d.ts +119 -1
  114. package/dist/fhe-vesting/react/index.cjs +264 -224
  115. package/dist/fhe-vesting/react/index.d.cts +9 -6
  116. package/dist/fhe-vesting/react/index.d.ts +9 -6
  117. package/dist/fhe-vesting/react/index.js +44 -21
  118. package/dist/fhe-vesting/react/useAccessClaimableAmount.d.ts +11 -3
  119. package/dist/fhe-vesting/react/useAccessSettledAmount.d.ts +11 -3
  120. package/dist/fhe-vesting/react/useAccessTotalAllocation.d.ts +11 -3
  121. package/dist/fhe-vesting/react/useAccessVestedAmount.d.ts +11 -3
  122. package/dist/fhe-vesting/react/useAdminClaim.d.ts +2 -0
  123. package/dist/fhe-vesting/react/useAdminGetClaimableAmount.d.ts +1 -1
  124. package/dist/fhe-vesting/react/useAdminGetSettledAmount.d.ts +1 -1
  125. package/dist/fhe-vesting/react/useAdminGetTotalAllocation.d.ts +1 -1
  126. package/dist/fhe-vesting/react/useAdminGetVestedAmount.d.ts +1 -1
  127. package/dist/fhe-vesting/react/useAdminPartialClaim.d.ts +10 -0
  128. package/dist/fhe-vesting/react/useBatchCreateVesting.d.ts +8 -0
  129. package/dist/fhe-vesting/react/useClaim.d.ts +3 -1
  130. package/dist/fhe-vesting/react/useCreateVesting.d.ts +8 -0
  131. package/dist/fhe-vesting/react/useDiscloseHandleToParty.d.ts +1 -1
  132. package/dist/fhe-vesting/react/useManagerDiscloseHandleToParty.d.ts +1 -1
  133. package/dist/fhe-vesting/react/useManagerWithdrawTokenFee.d.ts +6 -0
  134. package/dist/fhe-vesting/react/usePartialClaim.d.ts +9 -1
  135. package/dist/fhe-vesting/react/usePreflightCreateVesting.d.ts +37 -0
  136. package/dist/fhe-vesting/react/useVestingClaim.d.ts +2 -0
  137. package/dist/fhe-vesting/react/useVestingInfo.d.ts +1 -1
  138. package/dist/fhe-vesting/react/useWithdrawAdmin.d.ts +6 -0
  139. package/dist/fhe-vesting/react/useWithdrawTokenFee.d.ts +6 -0
  140. package/dist/fhe-vesting/types.d.ts +45 -0
  141. package/dist/index.cjs +93 -86
  142. package/dist/index.d.cts +1 -1
  143. package/dist/index.d.ts +1 -1
  144. package/dist/index.js +2 -3
  145. package/dist/testnet-faucet/index.cjs +58 -55
  146. package/dist/testnet-faucet/index.d.cts +1 -1
  147. package/dist/testnet-faucet/index.d.ts +1 -1
  148. package/dist/testnet-faucet/index.js +5 -6
  149. package/dist/testnet-faucet/react/index.cjs +60 -56
  150. package/dist/testnet-faucet/react/index.d.cts +3 -2
  151. package/dist/testnet-faucet/react/index.d.ts +3 -2
  152. package/dist/testnet-faucet/react/index.js +11 -11
  153. package/dist/testnet-faucet/react/useConfidentialBalance.d.ts +3 -2
  154. package/dist/testnet-faucet/react/useUnderlyingBalance.d.ts +2 -2
  155. package/package.json +14 -8
  156. package/dist/chunk-66IHPTOK.cjs +0 -20
  157. package/dist/chunk-KWFFIJYX.js +0 -11
  158. package/dist/fhe-airdrop/react/useAirdropClaim.d.ts +0 -25
  159. package/dist/fhe-airdrop/react/useGetClaimAmount.d.ts +0 -30
  160. package/dist/fhe-vesting/react/useGetClaimableAmount.d.ts +0 -13
  161. package/dist/fhe-vesting/react/useGetSettledAmount.d.ts +0 -14
  162. package/dist/fhe-vesting/react/useGetTotalAllocation.d.ts +0 -13
  163. package/dist/fhe-vesting/react/useGetVestedAmount.d.ts +0 -25
@@ -1,9 +1,9 @@
1
1
  export { ConfidentialVestingFactoryClient, createConfidentialVestingFactoryClient, type ConfidentialVestingFactoryClientConfig, type CreateManagerArgs, type CreateManagerResult, } from "./factory.js";
2
2
  export { ConfidentialVestingManagerClient, createConfidentialVestingManagerClient, type BatchCreateVestingArgs, type BatchDiscloseToPartyResult, type ClaimArgs, type ConfidentialVestingManagerClientConfig, type CreateVestingArgs, type DiscloseArgs, type DiscloseToPartyResult, type EncryptedViewResult, type InitiateTransferArgs, type PartialClaimArgs, type SplitVestingArgs, type SplitVestingResult, } from "./manager.js";
3
3
  export { encryptUint64, encryptUint64Batch, resolveEncryptor, type Encryptor, type EncryptorSource, type EncryptUint64Args, type EncryptUint64BatchArgs, type FheValueInput, } from "./encryption.js";
4
- export { DisclosureType, FeeType, feeTypeName, type CustomFee, type EncryptedInput, type EncryptedInputs, type PendingTransfer, type VestingInfo, type VestingParams, } from "./types.js";
4
+ export { DisclosureType, FeeType, feeTypeName, type CreateVestingPreflightReport, type CustomFee, type EncryptedInput, type EncryptedInputs, type PendingTransfer, type VestingInfo, type VestingParams, } from "./types.js";
5
5
  export { confidentialVestingFactoryAbi, confidentialVestingManagerAbi, erc7984OperatorAbi, } from "./abis/index.js";
6
- 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";
6
+ 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";
7
7
  export { type PreflightResult } from "../core/preflight.js";
8
8
  export { VestingNotFoundError, NotVestingRecipientError, ClaimLockedError, VestingRevokedError, VestingNotRevocableError, VestingExpiredError, TransferAlreadyPendingError, NoPendingTransferError, NotPendingRecipientError, TransferExpiredError, } from "./errors.js";
9
9
  export { FHE_SPLIT_DENOMINATOR, scaleRatio, share, type ScaleRatioArgs, type ScaleRatioWidth, type ScaledRatio, } from "../fhe/scale-ratio.js";
@@ -1,9 +1,9 @@
1
1
  export { ConfidentialVestingFactoryClient, createConfidentialVestingFactoryClient, type ConfidentialVestingFactoryClientConfig, type CreateManagerArgs, type CreateManagerResult, } from "./factory.js";
2
2
  export { ConfidentialVestingManagerClient, createConfidentialVestingManagerClient, type BatchCreateVestingArgs, type BatchDiscloseToPartyResult, type ClaimArgs, type ConfidentialVestingManagerClientConfig, type CreateVestingArgs, type DiscloseArgs, type DiscloseToPartyResult, type EncryptedViewResult, type InitiateTransferArgs, type PartialClaimArgs, type SplitVestingArgs, type SplitVestingResult, } from "./manager.js";
3
3
  export { encryptUint64, encryptUint64Batch, resolveEncryptor, type Encryptor, type EncryptorSource, type EncryptUint64Args, type EncryptUint64BatchArgs, type FheValueInput, } from "./encryption.js";
4
- export { DisclosureType, FeeType, feeTypeName, type CustomFee, type EncryptedInput, type EncryptedInputs, type PendingTransfer, type VestingInfo, type VestingParams, } from "./types.js";
4
+ export { DisclosureType, FeeType, feeTypeName, type CreateVestingPreflightReport, type CustomFee, type EncryptedInput, type EncryptedInputs, type PendingTransfer, type VestingInfo, type VestingParams, } from "./types.js";
5
5
  export { confidentialVestingFactoryAbi, confidentialVestingManagerAbi, erc7984OperatorAbi, } from "./abis/index.js";
6
- 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";
6
+ 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";
7
7
  export { type PreflightResult } from "../core/preflight.js";
8
8
  export { VestingNotFoundError, NotVestingRecipientError, ClaimLockedError, VestingRevokedError, VestingNotRevocableError, VestingExpiredError, TransferAlreadyPendingError, NoPendingTransferError, NotPendingRecipientError, TransferExpiredError, } from "./errors.js";
9
9
  export { FHE_SPLIT_DENOMINATOR, scaleRatio, share, type ScaleRatioArgs, type ScaleRatioWidth, type ScaledRatio, } from "../fhe/scale-ratio.js";
@@ -1,12 +1,11 @@
1
+ export { ClaimLockedError, ConfidentialVestingManagerClient, NoPendingTransferError, NotPendingRecipientError, NotVestingRecipientError, TransferAlreadyPendingError, TransferExpiredError, VestingExpiredError, VestingNotFoundError, VestingNotRevocableError, VestingRevokedError, confidentialVestingManagerAbi, createConfidentialVestingManagerClient } from '../chunk-TN65XNTI.js';
2
+ import '../chunk-NFW7AUEX.js';
3
+ export { FHE_SPLIT_DENOMINATOR, encryptUint64, encryptUint64Batch, resolveEncryptor, scaleRatio, share } from '../chunk-PD7ME2BT.js';
4
+ import '../chunk-YPYCWLYP.js';
1
5
  export { erc7984OperatorAbi } from '../chunk-7VELUOMI.js';
2
- export { ClaimLockedError, ConfidentialVestingManagerClient, NoPendingTransferError, NotPendingRecipientError, NotVestingRecipientError, TransferAlreadyPendingError, TransferExpiredError, VestingExpiredError, VestingNotFoundError, VestingNotRevocableError, VestingRevokedError, confidentialVestingManagerAbi, createConfidentialVestingManagerClient, encryptUint64, encryptUint64Batch, resolveEncryptor } from '../chunk-X56UVEXS.js';
3
- import '../chunk-ZXCOJY2Z.js';
4
- export { FHE_SPLIT_DENOMINATOR, scaleRatio, share } from '../chunk-XSNLAS5M.js';
5
- import '../chunk-FYQ2UW4T.js';
6
- export { ConfidentialVestingFactoryClient, DisclosureType, FeeType, confidentialVestingFactoryAbi, createConfidentialVestingFactoryClient, feeTypeName } from '../chunk-IR5AK5U5.js';
7
- import '../chunk-JFLEEXKP.js';
8
- import '../chunk-M7V2EDPB.js';
9
- import '../chunk-BE2AIZ3K.js';
6
+ export { ConfidentialVestingFactoryClient, DisclosureType, FeeType, confidentialVestingFactoryAbi, createConfidentialVestingFactoryClient, feeTypeName } from '../chunk-V5D7BHW3.js';
7
+ import '../chunk-6WSNS3UV.js';
8
+ import '../chunk-QKKBBH7I.js';
9
+ import '../chunk-46T67CE2.js';
10
+ export { AccessDeniedError, AlreadyInitializedError, BatchTooLargeError, ContractRevertError, DecryptionFailedError, DeploymentAddressUnavailableError, EncryptionFailedError, FeatureDisabledError, FheHandleNotAllowedError, InsufficientBalanceError, InsufficientFeeError, InsufficientGasFundsError, InvalidArgumentError, InvalidSignatureError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, NetworkError, OperatorNotApprovedError, PausedError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, ReentrancyError, RelayerUnreachableError, SigningFailedError, TokenOpsContractError, TokenOpsSdkError, TokenOpsValidationError, TransferFailedError, UnknownWriteFailureError, UnsupportedChainError, UserDecryptNotAllowedError, UserRejectedSignatureError, WalletChainMismatchError, WalletRejectedError, isTokenOpsSdkError } from '../chunk-DRSPMIZ7.js';
10
11
  import '../chunk-Q2GP5UDC.js';
11
- import '../chunk-KWFFIJYX.js';
12
- 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, TokenOpsContractError, TokenOpsSdkError, TokenOpsValidationError, TransferFailedError, UnknownWriteFailureError, UnsupportedChainError, UserDecryptNotAllowedError, UserRejectedSignatureError, WalletChainMismatchError, WalletRejectedError, isTokenOpsSdkError } from '../chunk-IVE3QEGD.js';
@@ -3,7 +3,7 @@ import { type PreflightResult } from "../core/preflight.js";
3
3
  import { type EncryptedHandle, type Role, type TxHash, type VestingId } from "../core/brands.js";
4
4
  import { type SdkTelemetry } from "../core/telemetry.js";
5
5
  import { type Encryptor, type EncryptorSource } from "./encryption.js";
6
- import { FeeType, type DisclosureType, type EncryptedInput, type EncryptedViewResult, type PendingTransfer, type VestingInfo, type VestingParams } from "./types.js";
6
+ import { FeeType, type CreateVestingPreflightReport, type DisclosureType, type EncryptedInput, type EncryptedViewResult, type PendingTransfer, type VestingInfo, type VestingParams } from "./types.js";
7
7
  export type { EncryptedViewResult } from "./types.js";
8
8
  export interface ConfidentialVestingManagerClientConfig {
9
9
  publicClient: PublicClient;
@@ -419,6 +419,56 @@ export declare class ConfidentialVestingManagerClient {
419
419
  vestingId: Hex;
420
420
  caller: Address;
421
421
  }): Promise<PreflightResult>;
422
+ /**
423
+ * Read-only preflight for {@link createVesting} / {@link batchCreateVesting}.
424
+ * Runs the deterministic-from-off-chain checks and reports blockers both as
425
+ * human-readable strings (`blockers`) and as typed {@link TokenOpsSdkError}s
426
+ * (`blockerErrors`), index-aligned.
427
+ *
428
+ * Preflight is **opt-in**. Consumers who have already validated state can
429
+ * skip this call and invoke the write directly — they'll receive the same
430
+ * typed errors at write time via the revert mapper.
431
+ *
432
+ * Report fields: `token`, `hasCreatorRole`, `isOperatorSet`, `ready`,
433
+ * `blockers`, `blockerErrors` — see {@link CreateVestingPreflightReport} for
434
+ * the meaning of each.
435
+ *
436
+ * Checks performed (all read-only, no gas):
437
+ * - Structural `params` validation mirroring the contract's
438
+ * `_validateVestingParams` (`InvalidArgumentError` blockers): recipient is
439
+ * a checksummed non-zero address, `startTimestamp < endTimestamp`, cliff
440
+ * within the window, `initialUnlockBps + cliffAmountBps ≤ 10000`.
441
+ * - Role: creator holds `VESTING_CREATOR_ROLE`
442
+ * ({@link AccessDeniedError} blocker).
443
+ * - Operator: creator has approved this manager as an ERC-7984 operator on
444
+ * the distribution token, required for the manager's
445
+ * `confidentialTransferFrom` pull ({@link OperatorNotApprovedError} blocker).
446
+ * If the bound `token` does not implement the ERC-7984 `isOperator`
447
+ * view — a revert, or a zero-data response for an EOA / undeployed
448
+ * address — operator status is undetermined rather than the call
449
+ * throwing: `isOperatorSet` reports `false` and the read failure becomes
450
+ * an {@link InvalidArgumentError} blocker on `token` instead (TOK-436).
451
+ *
452
+ * **Not preflight-detectable — read before trusting `ready: true`:**
453
+ * - The creator's confidential token balance is an encrypted `euint64` the
454
+ * SDK cannot read in plaintext. An underfunded create does **not** revert:
455
+ * the contract's all-or-nothing `FHE.select` pattern silently zeroes the
456
+ * vesting amounts instead. Confirm the creator's balance covers the total
457
+ * before submitting.
458
+ * - `batchCreateVesting` additionally enforces `items.length ≤ maxBatchSize()`
459
+ * on-chain; check {@link maxBatchSize} for batches.
460
+ *
461
+ * Pausing the manager does NOT block vesting creation (only claims), so
462
+ * paused state is intentionally not a blocker here.
463
+ *
464
+ * @param args.params The vesting schedule parameters to validate.
465
+ * @param args.creator The address that will send the create transaction.
466
+ * @returns A {@link CreateVestingPreflightReport}.
467
+ */
468
+ preflightCreateVesting(args: {
469
+ params: VestingParams;
470
+ creator: Address;
471
+ }): Promise<CreateVestingPreflightReport>;
422
472
  /**
423
473
  * Get the vested amount at a given timestamp as an encrypted handle.
424
474
  *
@@ -480,6 +530,21 @@ export declare class ConfidentialVestingManagerClient {
480
530
  *
481
531
  * Pass `encryptedInput` to bypass the encryptor when you manage encryption yourself.
482
532
  *
533
+ * **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.
534
+ *
535
+ * **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
536
+ * convention (1 token = 1_000_000 base units), not the 18 decimals typical of
537
+ * ERC-20. Amount parameters are base units of the token's actual decimals:
538
+ * for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
539
+ * transparent TTT test token uses 18 decimals.
540
+ *
541
+ * Prerequisites: caller must have set this manager as an operator on the
542
+ * token: `token.setOperator(managerAddress, deadline)` — or use
543
+ * `ensureOperator()` from `@tokenops/sdk/fhe`. Skipping it fails with
544
+ * {@link OperatorNotApprovedError} (the SDK's mapping of the on-chain
545
+ * `ERC7984UnauthorizedSpender` revert, whose message is the canonical
546
+ * `OPERATOR_NOT_APPROVED_REMEDIATION` copy).
547
+ *
483
548
  * @returns Transaction hash. Parse the `VestingCreated` event to extract the `vestingId`.
484
549
  * @example
485
550
  * const hash = await manager.createVesting({
@@ -496,12 +561,30 @@ export declare class ConfidentialVestingManagerClient {
496
561
  *
497
562
  * Respects `maxBatchSize` — check before calling on large lists.
498
563
  *
564
+ * **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.
565
+ *
566
+ * **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
567
+ * convention (1 token = 1_000_000 base units), not the 18 decimals typical of
568
+ * ERC-20. Amount parameters are base units of the token's actual decimals:
569
+ * for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
570
+ * transparent TTT test token uses 18 decimals.
571
+ *
572
+ * Prerequisites: caller must have set this manager as an operator on the
573
+ * token: `token.setOperator(managerAddress, deadline)` — or use
574
+ * `ensureOperator()` from `@tokenops/sdk/fhe`. Skipping it fails with
575
+ * {@link OperatorNotApprovedError} (the SDK's mapping of the on-chain
576
+ * `ERC7984UnauthorizedSpender` revert, whose message is the canonical
577
+ * `OPERATOR_NOT_APPROVED_REMEDIATION` copy).
578
+ *
499
579
  * @returns Transaction hash.
500
580
  */
501
581
  batchCreateVesting(args: BatchCreateVestingArgs): Promise<Hex>;
502
582
  /**
503
583
  * Claim all currently vested tokens for `vestingId`.
504
584
  * For `FeeType.Gas` managers, pass `value` (gas fee in wei from `getFeeInfo()`).
585
+ *
586
+ * **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.
587
+ *
505
588
  * @param args Discriminated by `feeType`: pass `{ feeType, vestingId, value }` for Gas, `{ feeType, vestingId }` for DistributionToken.
506
589
  * @returns Transaction hash.
507
590
  * @example
@@ -514,6 +597,9 @@ export declare class ConfidentialVestingManagerClient {
514
597
  /**
515
598
  * Admin variant of `claim` — callable by the manager admin on behalf of any recipient.
516
599
  * Useful for gas-sponsored claim flows. Same fee rules as `claim`.
600
+ *
601
+ * **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.
602
+ *
517
603
  * @param args Same discriminated union as `claim`.
518
604
  * @returns Transaction hash.
519
605
  */
@@ -521,12 +607,30 @@ export declare class ConfidentialVestingManagerClient {
521
607
  /**
522
608
  * Claim a specific encrypted amount from a vesting schedule rather than the full claimable balance.
523
609
  * The SDK encrypts `amount` — pass plaintext. Alternatively pass `encryptedInput` to bypass encryption.
610
+ *
611
+ * **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.
612
+ *
613
+ * **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
614
+ * convention (1 token = 1_000_000 base units), not the 18 decimals typical of
615
+ * ERC-20. Amount parameters are base units of the token's actual decimals:
616
+ * for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
617
+ * transparent TTT test token uses 18 decimals.
618
+ *
524
619
  * @param args Includes `vestingId`, `amount` or `encryptedInput`, and optional `value` for Gas-fee managers.
525
620
  * @returns Transaction hash.
526
621
  */
527
622
  partialClaim(args: PartialClaimArgs): Promise<Hex>;
528
623
  /**
529
624
  * Admin variant of `partialClaim` — callable by the manager admin on behalf of any recipient.
625
+ *
626
+ * **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.
627
+ *
628
+ * **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
629
+ * convention (1 token = 1_000_000 base units), not the 18 decimals typical of
630
+ * ERC-20. Amount parameters are base units of the token's actual decimals:
631
+ * for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
632
+ * transparent TTT test token uses 18 decimals.
633
+ *
530
634
  * @param args Same as `partialClaim`.
531
635
  * @returns Transaction hash.
532
636
  */
@@ -673,6 +777,13 @@ export declare class ConfidentialVestingManagerClient {
673
777
  /**
674
778
  * Withdraw a confidential token amount from the manager's balance back to the admin.
675
779
  * The SDK encrypts `amount` — pass plaintext. Alternatively pass `encryptedInput`.
780
+ *
781
+ * **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
782
+ * convention (1 token = 1_000_000 base units), not the 18 decimals typical of
783
+ * ERC-20. Amount parameters are base units of the token's actual decimals:
784
+ * for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
785
+ * transparent TTT test token uses 18 decimals.
786
+ *
676
787
  * @param args `{ amount }` (plaintext, SDK encrypts) or `{ encryptedInput }` (pre-encrypted).
677
788
  * @returns Transaction hash.
678
789
  */
@@ -708,6 +819,13 @@ export declare class ConfidentialVestingManagerClient {
708
819
  /**
709
820
  * Withdraw accumulated token fees from a `FeeType.DistributionToken` manager. Admin only.
710
821
  * The SDK encrypts `amount` — pass plaintext. Alternatively pass `encryptedInput`.
822
+ *
823
+ * **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
824
+ * convention (1 token = 1_000_000 base units), not the 18 decimals typical of
825
+ * ERC-20. Amount parameters are base units of the token's actual decimals:
826
+ * for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
827
+ * transparent TTT test token uses 18 decimals.
828
+ *
711
829
  * @param args `{ to, amount }` (plaintext, SDK encrypts) or `{ to, encryptedInput }` (pre-encrypted).
712
830
  * @returns Transaction hash.
713
831
  */