@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
@@ -65,16 +65,17 @@ export { useAllRecipients } from "./useAllRecipients.js";
65
65
  export { useAllRecipientsLength } from "./useAllRecipientsLength.js";
66
66
  export { useAllRecipientsSliced, type UseAllRecipientsSlicedArgs, } from "./useAllRecipientsSliced.js";
67
67
  export { useIsRecipient, type UseIsRecipientArgs } from "./useIsRecipient.js";
68
+ export { usePreflightCreateVesting, type UsePreflightCreateVestingArgs, } from "./usePreflightCreateVesting.js";
68
69
  export { useRecipientVestings, type UseRecipientVestingsArgs } from "./useRecipientVestings.js";
69
70
  export { useRecipientVestingsLength, type UseRecipientVestingsLengthArgs, } from "./useRecipientVestingsLength.js";
70
71
  export { useRecipientVestingsSliced, type UseRecipientVestingsSlicedArgs, } from "./useRecipientVestingsSliced.js";
71
72
  export { usePendingVestingTransfer, type UsePendingVestingTransferArgs, } from "./usePendingVestingTransfer.js";
72
73
  export { useHasRole, type UseHasRoleArgs } from "./useHasRole.js";
73
74
  export { useRoleConstants, type RoleConstants } from "./useRoleConstants.js";
74
- export { useGetVestedAmount, type UseGetVestedAmountArgs } from "./useGetVestedAmount.js";
75
- export { useGetClaimableAmount, type UseGetClaimableAmountArgs } from "./useGetClaimableAmount.js";
76
- export { useGetTotalAllocation, type UseGetTotalAllocationArgs } from "./useGetTotalAllocation.js";
77
- export { useGetSettledAmount, type UseGetSettledAmountArgs } from "./useGetSettledAmount.js";
75
+ export { useAccessVestedAmount, useGetVestedAmount, type UseAccessVestedAmountArgs, type UseGetVestedAmountArgs, } from "./useAccessVestedAmount.js";
76
+ export { useAccessClaimableAmount, useGetClaimableAmount, type UseAccessClaimableAmountArgs, type UseGetClaimableAmountArgs, } from "./useAccessClaimableAmount.js";
77
+ export { useAccessTotalAllocation, useGetTotalAllocation, type UseAccessTotalAllocationArgs, type UseGetTotalAllocationArgs, } from "./useAccessTotalAllocation.js";
78
+ export { useAccessSettledAmount, useGetSettledAmount, type UseAccessSettledAmountArgs, type UseGetSettledAmountArgs, } from "./useAccessSettledAmount.js";
78
79
  export { useAdminGetVestedAmount, type UseAdminGetVestedAmountArgs, } from "./useAdminGetVestedAmount.js";
79
80
  export { useAdminGetClaimableAmount, type UseAdminGetClaimableAmountArgs, } from "./useAdminGetClaimableAmount.js";
80
81
  export { useAdminGetTotalAllocation, type UseAdminGetTotalAllocationArgs, } from "./useAdminGetTotalAllocation.js";
@@ -114,10 +115,12 @@ export { useRevokeRole, type UseRevokeRoleArgs } from "./useRevokeRole.js";
114
115
  export { useRenounceRole, type UseRenounceRoleArgs } from "./useRenounceRole.js";
115
116
  export type { BaseHookOptions, ManagerHookOptions } from "./_shared.js";
116
117
  export { encryptUint64, encryptUint64Batch, resolveEncryptor, type Encryptor, type EncryptorSource, type EncryptUint64Args, type EncryptUint64BatchArgs, type FheValueInput, } from "../encryption.js";
117
- export { DisclosureType, FeeType, type CustomFee, type EncryptedInput, type EncryptedInputs, type PendingTransfer, type VestingInfo, type VestingParams, } from "../types.js";
118
+ export { DisclosureType, FeeType, type CreateVestingPreflightReport, type CustomFee, type EncryptedInput, type EncryptedInputs, type PendingTransfer, type VestingInfo, type VestingParams, } from "../types.js";
118
119
  export type { BatchCreateVestingArgs, ClaimArgs, CreateVestingArgs, DiscloseArgs, EncryptedViewResult, InitiateTransferArgs, PartialClaimArgs, SplitVestingArgs, } from "../manager.js";
119
120
  export type { CreateManagerResult, CreateManagerArgs, PredictManagerArgs } from "../factory.js";
120
121
  export { scaleRatio, type ScaleRatioArgs, type ScaledRatio } from "../../fhe/scale-ratio.js";
121
- export { TokenOpsSdkError, isTokenOpsSdkError, DeploymentAddressUnavailableError, UnsupportedChainError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, InvalidArgumentError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, ContractRevertError, PausedError, AccessDeniedError, InsufficientFeeError, InsufficientBalanceError, BatchTooLargeError, FeatureDisabledError, TransferFailedError, FheHandleNotAllowedError, AlreadyInitializedError, ReentrancyError, InvalidSignatureError, WalletRejectedError, WalletChainMismatchError, NetworkError, InsufficientGasFundsError, UnknownWriteFailureError, UserRejectedSignatureError, SigningFailedError, RelayerUnreachableError, EncryptionFailedError, DecryptionFailedError, UserDecryptNotAllowedError, type DeploymentAddressUnavailableReason, type TokenOpsSdkErrorCode, } from "../../core/errors.js";
122
+ export { TokenOpsSdkError, isTokenOpsSdkError, DeploymentAddressUnavailableError, UnsupportedChainError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, InvalidArgumentError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, ContractRevertError, PausedError, AccessDeniedError, OperatorNotApprovedError, InsufficientFeeError, InsufficientBalanceError, BatchTooLargeError, FeatureDisabledError, TransferFailedError, FheHandleNotAllowedError, AlreadyInitializedError, ReentrancyError, InvalidSignatureError, WalletRejectedError, WalletChainMismatchError, NetworkError, InsufficientGasFundsError, UnknownWriteFailureError, UserRejectedSignatureError, SigningFailedError, RelayerUnreachableError, EncryptionFailedError, DecryptionFailedError, UserDecryptNotAllowedError, type DeploymentAddressUnavailableReason, type TokenOpsSdkErrorCode, } from "../../core/errors.js";
122
123
  export { type PreflightResult } from "../../core/preflight.js";
123
124
  export { VestingNotFoundError, NotVestingRecipientError, ClaimLockedError, VestingRevokedError, VestingNotRevocableError, VestingExpiredError, TransferAlreadyPendingError, NoPendingTransferError, NotPendingRecipientError, TransferExpiredError, } from "../errors.js";
125
+ export { useIsOperator, type UseIsOperatorOptions } from "../../fhe/react/useIsOperator.js";
126
+ export { useEnsureOperator, type UseEnsureOperatorOptions, type EnsureOperatorVariables, } from "../../fhe/react/useEnsureOperator.js";
@@ -65,16 +65,17 @@ export { useAllRecipients } from "./useAllRecipients.js";
65
65
  export { useAllRecipientsLength } from "./useAllRecipientsLength.js";
66
66
  export { useAllRecipientsSliced, type UseAllRecipientsSlicedArgs, } from "./useAllRecipientsSliced.js";
67
67
  export { useIsRecipient, type UseIsRecipientArgs } from "./useIsRecipient.js";
68
+ export { usePreflightCreateVesting, type UsePreflightCreateVestingArgs, } from "./usePreflightCreateVesting.js";
68
69
  export { useRecipientVestings, type UseRecipientVestingsArgs } from "./useRecipientVestings.js";
69
70
  export { useRecipientVestingsLength, type UseRecipientVestingsLengthArgs, } from "./useRecipientVestingsLength.js";
70
71
  export { useRecipientVestingsSliced, type UseRecipientVestingsSlicedArgs, } from "./useRecipientVestingsSliced.js";
71
72
  export { usePendingVestingTransfer, type UsePendingVestingTransferArgs, } from "./usePendingVestingTransfer.js";
72
73
  export { useHasRole, type UseHasRoleArgs } from "./useHasRole.js";
73
74
  export { useRoleConstants, type RoleConstants } from "./useRoleConstants.js";
74
- export { useGetVestedAmount, type UseGetVestedAmountArgs } from "./useGetVestedAmount.js";
75
- export { useGetClaimableAmount, type UseGetClaimableAmountArgs } from "./useGetClaimableAmount.js";
76
- export { useGetTotalAllocation, type UseGetTotalAllocationArgs } from "./useGetTotalAllocation.js";
77
- export { useGetSettledAmount, type UseGetSettledAmountArgs } from "./useGetSettledAmount.js";
75
+ export { useAccessVestedAmount, useGetVestedAmount, type UseAccessVestedAmountArgs, type UseGetVestedAmountArgs, } from "./useAccessVestedAmount.js";
76
+ export { useAccessClaimableAmount, useGetClaimableAmount, type UseAccessClaimableAmountArgs, type UseGetClaimableAmountArgs, } from "./useAccessClaimableAmount.js";
77
+ export { useAccessTotalAllocation, useGetTotalAllocation, type UseAccessTotalAllocationArgs, type UseGetTotalAllocationArgs, } from "./useAccessTotalAllocation.js";
78
+ export { useAccessSettledAmount, useGetSettledAmount, type UseAccessSettledAmountArgs, type UseGetSettledAmountArgs, } from "./useAccessSettledAmount.js";
78
79
  export { useAdminGetVestedAmount, type UseAdminGetVestedAmountArgs, } from "./useAdminGetVestedAmount.js";
79
80
  export { useAdminGetClaimableAmount, type UseAdminGetClaimableAmountArgs, } from "./useAdminGetClaimableAmount.js";
80
81
  export { useAdminGetTotalAllocation, type UseAdminGetTotalAllocationArgs, } from "./useAdminGetTotalAllocation.js";
@@ -114,10 +115,12 @@ export { useRevokeRole, type UseRevokeRoleArgs } from "./useRevokeRole.js";
114
115
  export { useRenounceRole, type UseRenounceRoleArgs } from "./useRenounceRole.js";
115
116
  export type { BaseHookOptions, ManagerHookOptions } from "./_shared.js";
116
117
  export { encryptUint64, encryptUint64Batch, resolveEncryptor, type Encryptor, type EncryptorSource, type EncryptUint64Args, type EncryptUint64BatchArgs, type FheValueInput, } from "../encryption.js";
117
- export { DisclosureType, FeeType, type CustomFee, type EncryptedInput, type EncryptedInputs, type PendingTransfer, type VestingInfo, type VestingParams, } from "../types.js";
118
+ export { DisclosureType, FeeType, type CreateVestingPreflightReport, type CustomFee, type EncryptedInput, type EncryptedInputs, type PendingTransfer, type VestingInfo, type VestingParams, } from "../types.js";
118
119
  export type { BatchCreateVestingArgs, ClaimArgs, CreateVestingArgs, DiscloseArgs, EncryptedViewResult, InitiateTransferArgs, PartialClaimArgs, SplitVestingArgs, } from "../manager.js";
119
120
  export type { CreateManagerResult, CreateManagerArgs, PredictManagerArgs } from "../factory.js";
120
121
  export { scaleRatio, type ScaleRatioArgs, type ScaledRatio } from "../../fhe/scale-ratio.js";
121
- export { TokenOpsSdkError, isTokenOpsSdkError, DeploymentAddressUnavailableError, UnsupportedChainError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, InvalidArgumentError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, ContractRevertError, PausedError, AccessDeniedError, InsufficientFeeError, InsufficientBalanceError, BatchTooLargeError, FeatureDisabledError, TransferFailedError, FheHandleNotAllowedError, AlreadyInitializedError, ReentrancyError, InvalidSignatureError, WalletRejectedError, WalletChainMismatchError, NetworkError, InsufficientGasFundsError, UnknownWriteFailureError, UserRejectedSignatureError, SigningFailedError, RelayerUnreachableError, EncryptionFailedError, DecryptionFailedError, UserDecryptNotAllowedError, type DeploymentAddressUnavailableReason, type TokenOpsSdkErrorCode, } from "../../core/errors.js";
122
+ export { TokenOpsSdkError, isTokenOpsSdkError, DeploymentAddressUnavailableError, UnsupportedChainError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, InvalidArgumentError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, ContractRevertError, PausedError, AccessDeniedError, OperatorNotApprovedError, InsufficientFeeError, InsufficientBalanceError, BatchTooLargeError, FeatureDisabledError, TransferFailedError, FheHandleNotAllowedError, AlreadyInitializedError, ReentrancyError, InvalidSignatureError, WalletRejectedError, WalletChainMismatchError, NetworkError, InsufficientGasFundsError, UnknownWriteFailureError, UserRejectedSignatureError, SigningFailedError, RelayerUnreachableError, EncryptionFailedError, DecryptionFailedError, UserDecryptNotAllowedError, type DeploymentAddressUnavailableReason, type TokenOpsSdkErrorCode, } from "../../core/errors.js";
122
123
  export { type PreflightResult } from "../../core/preflight.js";
123
124
  export { VestingNotFoundError, NotVestingRecipientError, ClaimLockedError, VestingRevokedError, VestingNotRevocableError, VestingExpiredError, TransferAlreadyPendingError, NoPendingTransferError, NotPendingRecipientError, TransferExpiredError, } from "../errors.js";
125
+ export { useIsOperator, type UseIsOperatorOptions } from "../../fhe/react/useIsOperator.js";
126
+ export { useEnsureOperator, type UseEnsureOperatorOptions, type EnsureOperatorVariables, } from "../../fhe/react/useEnsureOperator.js";
@@ -1,16 +1,19 @@
1
- import { useMemoFactoryClient, buildQueryKey, useMemoManagerClient } from '../../chunk-3PQ2RFPC.js';
2
- export { ClaimLockedError, NoPendingTransferError, NotPendingRecipientError, NotVestingRecipientError, TransferAlreadyPendingError, TransferExpiredError, VestingExpiredError, VestingNotFoundError, VestingNotRevocableError, VestingRevokedError, encryptUint64, encryptUint64Batch, resolveEncryptor } from '../../chunk-X56UVEXS.js';
3
- import '../../chunk-ZXCOJY2Z.js';
4
- export { scaleRatio } from '../../chunk-XSNLAS5M.js';
5
- import '../../chunk-FYQ2UW4T.js';
6
- export { DisclosureType, FeeType } from '../../chunk-IR5AK5U5.js';
7
- import '../../chunk-JFLEEXKP.js';
8
- import '../../chunk-M7V2EDPB.js';
9
- import '../../chunk-BE2AIZ3K.js';
1
+ export { useEnsureOperator, useIsOperator } from '../../chunk-U57COLUE.js';
2
+ import '../../chunk-FT4LNBOS.js';
3
+ import '../../chunk-4KJ66YRH.js';
4
+ import { useMemoFactoryClient, buildQueryKey, useMemoManagerClient } from '../../chunk-VHSNYUYV.js';
5
+ export { ClaimLockedError, NoPendingTransferError, NotPendingRecipientError, NotVestingRecipientError, TransferAlreadyPendingError, TransferExpiredError, VestingExpiredError, VestingNotFoundError, VestingNotRevocableError, VestingRevokedError } from '../../chunk-TN65XNTI.js';
6
+ import '../../chunk-NFW7AUEX.js';
7
+ export { encryptUint64, encryptUint64Batch, resolveEncryptor, scaleRatio } from '../../chunk-PD7ME2BT.js';
8
+ import '../../chunk-YPYCWLYP.js';
9
+ import '../../chunk-7VELUOMI.js';
10
+ export { DisclosureType, FeeType } from '../../chunk-V5D7BHW3.js';
11
+ import '../../chunk-6WSNS3UV.js';
12
+ import '../../chunk-QKKBBH7I.js';
13
+ import '../../chunk-46T67CE2.js';
14
+ import { MissingClientError } from '../../chunk-DRSPMIZ7.js';
15
+ export { AccessDeniedError, AlreadyInitializedError, BatchTooLargeError, ContractRevertError, DecryptionFailedError, DeploymentAddressUnavailableError, EncryptionFailedError, FeatureDisabledError, FheHandleNotAllowedError, InsufficientBalanceError, InsufficientFeeError, InsufficientGasFundsError, InvalidArgumentError, InvalidSignatureError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, NetworkError, OperatorNotApprovedError, PausedError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, ReentrancyError, RelayerUnreachableError, SigningFailedError, TokenOpsSdkError, TransferFailedError, UnknownWriteFailureError, UnsupportedChainError, UserDecryptNotAllowedError, UserRejectedSignatureError, WalletChainMismatchError, WalletRejectedError, isTokenOpsSdkError } from '../../chunk-DRSPMIZ7.js';
10
16
  import '../../chunk-Q2GP5UDC.js';
11
- import '../../chunk-KWFFIJYX.js';
12
- import { MissingClientError } from '../../chunk-IVE3QEGD.js';
13
- export { AccessDeniedError, AlreadyInitializedError, BatchTooLargeError, ContractRevertError, DecryptionFailedError, DeploymentAddressUnavailableError, EncryptionFailedError, FeatureDisabledError, FheHandleNotAllowedError, InsufficientBalanceError, InsufficientFeeError, InsufficientGasFundsError, InvalidArgumentError, InvalidSignatureError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, NetworkError, PausedError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, ReentrancyError, RelayerUnreachableError, SigningFailedError, TokenOpsSdkError, TransferFailedError, UnknownWriteFailureError, UnsupportedChainError, UserDecryptNotAllowedError, UserRejectedSignatureError, WalletChainMismatchError, WalletRejectedError, isTokenOpsSdkError } from '../../chunk-IVE3QEGD.js';
14
17
  import { useQuery, useMutation } from '@tanstack/react-query';
15
18
 
16
19
  function useConfidentialVestingFactoryImplementation(options = {}) {
@@ -327,6 +330,22 @@ function useIsRecipient(args) {
327
330
  staleTime: 0
328
331
  });
329
332
  }
333
+ function usePreflightCreateVesting(args) {
334
+ const { params, creator, ...base } = args;
335
+ const { client, chainId } = useMemoManagerClient(base);
336
+ return useQuery({
337
+ queryKey: buildQueryKey(
338
+ "manager:preflightCreateVesting",
339
+ chainId,
340
+ base.address,
341
+ creator,
342
+ params
343
+ ),
344
+ queryFn: () => client.preflightCreateVesting({ params, creator }),
345
+ enabled: !!client && !!params && !!creator,
346
+ staleTime: 0
347
+ });
348
+ }
330
349
  function useRecipientVestings(args) {
331
350
  const { recipient, ...base } = args;
332
351
  const { client, chainId } = useMemoManagerClient(base);
@@ -398,42 +417,46 @@ function useRoleConstants(options) {
398
417
  staleTime: 0
399
418
  });
400
419
  }
401
- function useGetVestedAmount(options) {
420
+ function useAccessVestedAmount(options) {
402
421
  const { client } = useMemoManagerClient(options);
403
422
  return useMutation({
404
423
  mutationFn: async (args) => {
405
- if (!client) throw new MissingClientError("useGetVestedAmount", "manager");
424
+ if (!client) throw new MissingClientError("useAccessVestedAmount", "manager");
406
425
  return client.getVestedAmount(args);
407
426
  }
408
427
  });
409
428
  }
410
- function useGetClaimableAmount(options) {
429
+ var useGetVestedAmount = useAccessVestedAmount;
430
+ function useAccessClaimableAmount(options) {
411
431
  const { client } = useMemoManagerClient(options);
412
432
  return useMutation({
413
433
  mutationFn: async (args) => {
414
- if (!client) throw new MissingClientError("useGetClaimableAmount", "manager");
434
+ if (!client) throw new MissingClientError("useAccessClaimableAmount", "manager");
415
435
  return client.getClaimableAmount(args);
416
436
  }
417
437
  });
418
438
  }
419
- function useGetTotalAllocation(options) {
439
+ var useGetClaimableAmount = useAccessClaimableAmount;
440
+ function useAccessTotalAllocation(options) {
420
441
  const { client } = useMemoManagerClient(options);
421
442
  return useMutation({
422
443
  mutationFn: async (args) => {
423
- if (!client) throw new MissingClientError("useGetTotalAllocation", "manager");
444
+ if (!client) throw new MissingClientError("useAccessTotalAllocation", "manager");
424
445
  return client.getTotalAllocation(args);
425
446
  }
426
447
  });
427
448
  }
428
- function useGetSettledAmount(options) {
449
+ var useGetTotalAllocation = useAccessTotalAllocation;
450
+ function useAccessSettledAmount(options) {
429
451
  const { client } = useMemoManagerClient(options);
430
452
  return useMutation({
431
453
  mutationFn: async (args) => {
432
- if (!client) throw new MissingClientError("useGetSettledAmount", "manager");
454
+ if (!client) throw new MissingClientError("useAccessSettledAmount", "manager");
433
455
  return client.getSettledAmount(args);
434
456
  }
435
457
  });
436
458
  }
459
+ var useGetSettledAmount = useAccessSettledAmount;
437
460
  function useAdminGetVestedAmount(options) {
438
461
  const { client } = useMemoManagerClient(options);
439
462
  return useMutation({
@@ -768,4 +791,4 @@ function useRenounceRole(options) {
768
791
  });
769
792
  }
770
793
 
771
- export { useAcceptVestingTransfer, useAdminBatchDiscloseToParty, useAdminClaim, useAdminDiscloseToParty, useAdminGetClaimableAmount, useAdminGetSettledAmount, useAdminGetTokenBalance, useAdminGetTotalAllocation, useAdminGetVestedAmount, useAdminPartialClaim, useAllRecipients, useAllRecipientsLength, useAllRecipientsSliced, useBatchCreateVesting, useBatchDiscloseHandlesToParty, useBatchDiscloseToParty, useBatchRevokeVesting, useCancelVestingTransfer, useClaim, useConfidentialVestingFactoryImplementation, useCreateManager, useCreateManagerAndGetAddress, useCreateVesting, useDirectVestingTransfer, useDisableCustomFee, useDiscloseHandleToParty, useDiscloseToParty, useFactoryCustomFee, useFactoryDefaultFeeType, useFactoryDefaultGasFee, useFactoryDefaultTokenFee, useFactoryFeeCollector, useFactoryInitCodeHash, useGetClaimableAmount, useGetSettledAmount, useGetTotalAllocation, useGetVestedAmount, useGrantRole, useHasRole, useInitiateVestingTransfer, useIsRecipient, useManagerDeploymentBlockNumber, useManagerFee, useManagerFeeInfo, useManagerFeeType, useManagerIsPausable, useManagerIsSplitEnabled, useManagerMaxBatchSize, useManagerMaxRevokeBatchSize, useManagerPaused, useManagerToken, usePartialClaim, usePause, usePendingVestingTransfer, useRecipientVestings, useRecipientVestingsLength, useRecipientVestingsSliced, useRenounceRole, useResetGasFee, useResetTokenFee, useRevokeRole, useRevokeVesting, useRoleConstants, useSetCustomFee, useSetDefaultFeeType, useSetDefaultGasFee, useSetDefaultTokenFee, useSetFeeCollector, useSetMaxBatchSize, useSetMaxRevokeBatchSize, useSplitVesting, useTransferFeeCollectorRole, useUnpause, useVestingInfo, useWithdrawAdmin, useWithdrawGasFee, useWithdrawOtherConfidentialToken, useWithdrawOtherToken, useWithdrawTokenFee };
794
+ export { useAcceptVestingTransfer, useAccessClaimableAmount, useAccessSettledAmount, useAccessTotalAllocation, useAccessVestedAmount, useAdminBatchDiscloseToParty, useAdminClaim, useAdminDiscloseToParty, useAdminGetClaimableAmount, useAdminGetSettledAmount, useAdminGetTokenBalance, useAdminGetTotalAllocation, useAdminGetVestedAmount, useAdminPartialClaim, useAllRecipients, useAllRecipientsLength, useAllRecipientsSliced, useBatchCreateVesting, useBatchDiscloseHandlesToParty, useBatchDiscloseToParty, useBatchRevokeVesting, useCancelVestingTransfer, useClaim, useConfidentialVestingFactoryImplementation, useCreateManager, useCreateManagerAndGetAddress, useCreateVesting, useDirectVestingTransfer, useDisableCustomFee, useDiscloseHandleToParty, useDiscloseToParty, useFactoryCustomFee, useFactoryDefaultFeeType, useFactoryDefaultGasFee, useFactoryDefaultTokenFee, useFactoryFeeCollector, useFactoryInitCodeHash, useGetClaimableAmount, useGetSettledAmount, useGetTotalAllocation, useGetVestedAmount, useGrantRole, useHasRole, useInitiateVestingTransfer, useIsRecipient, useManagerDeploymentBlockNumber, useManagerFee, useManagerFeeInfo, useManagerFeeType, useManagerIsPausable, useManagerIsSplitEnabled, useManagerMaxBatchSize, useManagerMaxRevokeBatchSize, useManagerPaused, useManagerToken, usePartialClaim, usePause, usePendingVestingTransfer, usePreflightCreateVesting, useRecipientVestings, useRecipientVestingsLength, useRecipientVestingsSliced, useRenounceRole, useResetGasFee, useResetTokenFee, useRevokeRole, useRevokeVesting, useRoleConstants, useSetCustomFee, useSetDefaultFeeType, useSetDefaultGasFee, useSetDefaultTokenFee, useSetFeeCollector, useSetMaxBatchSize, useSetMaxRevokeBatchSize, useSplitVesting, useTransferFeeCollectorRole, useUnpause, useVestingInfo, useWithdrawAdmin, useWithdrawGasFee, useWithdrawOtherConfidentialToken, useWithdrawOtherToken, useWithdrawTokenFee };
@@ -1,10 +1,9 @@
1
1
  import { type UseMutationResult } from "@tanstack/react-query";
2
- import type { Account, Address } from "viem";
3
- import type { VestingId } from "../../core/brands.js";
2
+ import type { Account, Address, Hex } from "viem";
4
3
  import type { EncryptedViewResult } from "../manager.js";
5
4
  import { type ManagerHookOptions } from "./_shared.js";
6
5
  export interface UseAccessClaimableAmountArgs {
7
- vestingId: VestingId;
6
+ vestingId: Hex;
8
7
  account?: Account | Address;
9
8
  }
10
9
  /**
@@ -12,3 +11,12 @@ export interface UseAccessClaimableAmountArgs {
12
11
  * `euint128` handle. Pass `data.handle` to the Zama relayer's `userDecrypt`.
13
12
  */
14
13
  export declare function useAccessClaimableAmount(options: ManagerHookOptions): UseMutationResult<EncryptedViewResult, Error, UseAccessClaimableAmountArgs>;
14
+ /**
15
+ * @deprecated Renamed to {@link useAccessClaimableAmount}. Both submit a transaction, and the
16
+ * `useGet*` name reads as a free query — which misled bounty builders. This
17
+ * is the same function object, not a wrapper: behavior, argument types and
18
+ * thrown errors are identical. Removed in the next major.
19
+ */
20
+ export declare const useGetClaimableAmount: typeof useAccessClaimableAmount;
21
+ /** @deprecated Renamed to {@link UseAccessClaimableAmountArgs}. Identical shape. */
22
+ export type UseGetClaimableAmountArgs = UseAccessClaimableAmountArgs;
@@ -1,10 +1,9 @@
1
1
  import { type UseMutationResult } from "@tanstack/react-query";
2
- import type { Account, Address } from "viem";
3
- import type { VestingId } from "../../core/brands.js";
2
+ import type { Account, Address, Hex } from "viem";
4
3
  import type { EncryptedViewResult } from "../manager.js";
5
4
  import { type ManagerHookOptions } from "./_shared.js";
6
5
  export interface UseAccessSettledAmountArgs {
7
- vestingId: VestingId;
6
+ vestingId: Hex;
8
7
  account?: Account | Address;
9
8
  }
10
9
  /**
@@ -13,3 +12,12 @@ export interface UseAccessSettledAmountArgs {
13
12
  * `userDecrypt`.
14
13
  */
15
14
  export declare function useAccessSettledAmount(options: ManagerHookOptions): UseMutationResult<EncryptedViewResult, Error, UseAccessSettledAmountArgs>;
15
+ /**
16
+ * @deprecated Renamed to {@link useAccessSettledAmount}. Both submit a transaction, and the
17
+ * `useGet*` name reads as a free query — which misled bounty builders. This
18
+ * is the same function object, not a wrapper: behavior, argument types and
19
+ * thrown errors are identical. Removed in the next major.
20
+ */
21
+ export declare const useGetSettledAmount: typeof useAccessSettledAmount;
22
+ /** @deprecated Renamed to {@link UseAccessSettledAmountArgs}. Identical shape. */
23
+ export type UseGetSettledAmountArgs = UseAccessSettledAmountArgs;
@@ -1,10 +1,9 @@
1
1
  import { type UseMutationResult } from "@tanstack/react-query";
2
- import type { Account, Address } from "viem";
3
- import type { VestingId } from "../../core/brands.js";
2
+ import type { Account, Address, Hex } from "viem";
4
3
  import type { EncryptedViewResult } from "../manager.js";
5
4
  import { type ManagerHookOptions } from "./_shared.js";
6
5
  export interface UseAccessTotalAllocationArgs {
7
- vestingId: VestingId;
6
+ vestingId: Hex;
8
7
  account?: Account | Address;
9
8
  }
10
9
  /**
@@ -12,3 +11,12 @@ export interface UseAccessTotalAllocationArgs {
12
11
  * `euint128` handle. Pass `data.handle` to the Zama relayer's `userDecrypt`.
13
12
  */
14
13
  export declare function useAccessTotalAllocation(options: ManagerHookOptions): UseMutationResult<EncryptedViewResult, Error, UseAccessTotalAllocationArgs>;
14
+ /**
15
+ * @deprecated Renamed to {@link useAccessTotalAllocation}. Both submit a transaction, and the
16
+ * `useGet*` name reads as a free query — which misled bounty builders. This
17
+ * is the same function object, not a wrapper: behavior, argument types and
18
+ * thrown errors are identical. Removed in the next major.
19
+ */
20
+ export declare const useGetTotalAllocation: typeof useAccessTotalAllocation;
21
+ /** @deprecated Renamed to {@link UseAccessTotalAllocationArgs}. Identical shape. */
22
+ export type UseGetTotalAllocationArgs = UseAccessTotalAllocationArgs;
@@ -1,10 +1,9 @@
1
1
  import { type UseMutationResult } from "@tanstack/react-query";
2
- import type { Account, Address } from "viem";
3
- import type { VestingId } from "../../core/brands.js";
2
+ import type { Account, Address, Hex } from "viem";
4
3
  import type { EncryptedViewResult } from "../manager.js";
5
4
  import { type ManagerHookOptions } from "./_shared.js";
6
5
  export interface UseAccessVestedAmountArgs {
7
- vestingId: VestingId;
6
+ vestingId: Hex;
8
7
  /** Unix timestamp (seconds) — `Math.floor(Date.now() / 1000)` for "now". */
9
8
  timestamp: number;
10
9
  account?: Account | Address;
@@ -24,3 +23,12 @@ export interface UseAccessVestedAmountArgs {
24
23
  * // getVested.data → { handle: "0x...", hash: "0x..." }
25
24
  */
26
25
  export declare function useAccessVestedAmount(options: ManagerHookOptions): UseMutationResult<EncryptedViewResult, Error, UseAccessVestedAmountArgs>;
26
+ /**
27
+ * @deprecated Renamed to {@link useAccessVestedAmount}. Both submit a transaction, and the
28
+ * `useGet*` name reads as a free query — which misled bounty builders. This
29
+ * is the same function object, not a wrapper: behavior, argument types and
30
+ * thrown errors are identical. Removed in the next major.
31
+ */
32
+ export declare const useGetVestedAmount: typeof useAccessVestedAmount;
33
+ /** @deprecated Renamed to {@link UseAccessVestedAmountArgs}. Identical shape. */
34
+ export type UseGetVestedAmountArgs = UseAccessVestedAmountArgs;
@@ -5,5 +5,7 @@ import { type ManagerHookOptions } from "./_shared.js";
5
5
  /**
6
6
  * Admin variant of {@link useClaim} — caller must hold `CLAIMER_ROLE`. Useful
7
7
  * for sweep / forced-claim flows initiated by a treasury.
8
+ *
9
+ * **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.
8
10
  */
9
11
  export declare function useAdminClaim(options: ManagerHookOptions): UseMutationResult<Hex, Error, ClaimArgs>;
@@ -7,7 +7,7 @@ export interface UseAdminGetClaimableAmountArgs {
7
7
  account?: Account | Address;
8
8
  }
9
9
  /**
10
- * Admin variant of {@link useGetClaimableAmount} — caller must hold
10
+ * Admin variant of {@link useAccessClaimableAmount} — caller must hold
11
11
  * `DISCLOSURE_ADMIN_ROLE`. Submits a tx; returns an `euint128` handle.
12
12
  */
13
13
  export declare function useAdminGetClaimableAmount(options: ManagerHookOptions): UseMutationResult<EncryptedViewResult, Error, UseAdminGetClaimableAmountArgs>;
@@ -7,7 +7,7 @@ export interface UseAdminGetSettledAmountArgs {
7
7
  account?: Account | Address;
8
8
  }
9
9
  /**
10
- * Admin variant of {@link useGetSettledAmount} — caller must hold
10
+ * Admin variant of {@link useAccessSettledAmount} — caller must hold
11
11
  * `DISCLOSURE_ADMIN_ROLE`. Submits a tx; returns an `euint128` handle.
12
12
  */
13
13
  export declare function useAdminGetSettledAmount(options: ManagerHookOptions): UseMutationResult<EncryptedViewResult, Error, UseAdminGetSettledAmountArgs>;
@@ -7,7 +7,7 @@ export interface UseAdminGetTotalAllocationArgs {
7
7
  account?: Account | Address;
8
8
  }
9
9
  /**
10
- * Admin variant of {@link useGetTotalAllocation} — caller must hold
10
+ * Admin variant of {@link useAccessTotalAllocation} — caller must hold
11
11
  * `DISCLOSURE_ADMIN_ROLE`. Submits a tx; returns an `euint128` handle.
12
12
  */
13
13
  export declare function useAdminGetTotalAllocation(options: ManagerHookOptions): UseMutationResult<EncryptedViewResult, Error, UseAdminGetTotalAllocationArgs>;
@@ -8,7 +8,7 @@ export interface UseAdminGetVestedAmountArgs {
8
8
  account?: Account | Address;
9
9
  }
10
10
  /**
11
- * Admin variant of {@link useGetVestedAmount} — caller must hold
11
+ * Admin variant of {@link useAccessVestedAmount} — caller must hold
12
12
  * `DISCLOSURE_ADMIN_ROLE`. Submits a tx; returns an `euint128` handle granted
13
13
  * to the admin caller. Pass `data.handle` to the Zama relayer's `userDecrypt`.
14
14
  */
@@ -4,5 +4,15 @@ import type { PartialClaimArgs } from "../manager.js";
4
4
  import { type ManagerHookOptions } from "./_shared.js";
5
5
  /**
6
6
  * Admin variant of {@link usePartialClaim} — caller must hold `CLAIMER_ROLE`.
7
+ *
8
+ * **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
9
+ * convention (1 token = 1_000_000 base units), not the 18 decimals typical of
10
+ * ERC-20. Amount parameters are base units of the token's actual decimals:
11
+ * for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
12
+ * transparent TTT test token uses 18 decimals. This hook shares
13
+ * {@link PartialClaimArgs} with {@link usePartialClaim}, so an 18-decimals
14
+ * assumption over-claims by 10^12.
15
+ *
16
+ * **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.
7
17
  */
8
18
  export declare function useAdminPartialClaim(options: ManagerHookOptions): UseMutationResult<Hex, Error, PartialClaimArgs>;
@@ -9,6 +9,14 @@ import { type ManagerHookOptions } from "./_shared.js";
9
9
  *
10
10
  * Respect `useManagerMaxBatchSize` before submitting large lists.
11
11
  *
12
+ * **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.
13
+ *
14
+ * **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
15
+ * convention (1 token = 1_000_000 base units), not the 18 decimals typical of
16
+ * ERC-20. Amount parameters are base units of the token's actual decimals:
17
+ * for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
18
+ * transparent TTT test token uses 18 decimals.
19
+ *
12
20
  * After success, invalidate `["tokenops-sdk", "fhe-vesting"]` (broad) or the
13
21
  * narrower recipient/vesting query keys.
14
22
  *
@@ -9,9 +9,11 @@ import { type ManagerHookOptions } from "./_shared.js";
9
9
  * {@link useManagerFeeInfo} to read it. For `FeeType.DistributionToken`,
10
10
  * omit `value`.
11
11
  *
12
- * After success, invalidate `useGetClaimableAmount` (the encrypted view) and
12
+ * After success, invalidate `useAccessClaimableAmount` (the encrypted view) and
13
13
  * any UI counts you computed off it.
14
14
  *
15
+ * **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.
16
+ *
15
17
  * @example
16
18
  * const claim = useClaim({ address: managerAddress });
17
19
  * claim.mutate({ vestingId, value: gasFee });
@@ -7,12 +7,20 @@ import { type ManagerHookOptions } from "./_shared.js";
7
7
  * plaintext `amount` into an `externalEuint64` and submits it with an input
8
8
  * proof — callers never handle ciphertext.
9
9
  *
10
+ * **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
11
+ * convention (1 token = 1_000_000 base units), not the 18 decimals typical of
12
+ * ERC-20. Amount parameters are base units of the token's actual decimals:
13
+ * for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
14
+ * transparent TTT test token uses 18 decimals.
15
+ *
10
16
  * **Encryptor resolution.** The hook-level `encryptor` (from
11
17
  * `ManagerHookOptions`) is forwarded lazily to the SDK client. You can also
12
18
  * pass `encryptor` per-mutation via `args.encryptor` to override it. If
13
19
  * neither is present, the SDK throws `Missing encryptor — pass encryptor…`
14
20
  * verbatim.
15
21
  *
22
+ * **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.
23
+ *
16
24
  * After a successful create, invalidate read queries that depend on
17
25
  * recipient/vesting state:
18
26
  *
@@ -8,7 +8,7 @@ export interface UseDiscloseHandleToPartyArgs {
8
8
  }
9
9
  /**
10
10
  * Grant `party` decrypt access to an arbitrary already-allowed `handle` you
11
- * own. Typical use: forward a handle returned by `useGetClaimableAmount` to
11
+ * own. Typical use: forward a handle returned by `useAccessClaimableAmount` to
12
12
  * an auditor without leaking plaintext.
13
13
  */
14
14
  export declare function useDiscloseHandleToParty(options: ManagerHookOptions): UseMutationResult<Hex, Error, UseDiscloseHandleToPartyArgs>;
@@ -10,7 +10,7 @@ export interface UseManagerDiscloseHandleToPartyArgs {
10
10
  }
11
11
  /**
12
12
  * Grant `party` decrypt access to an arbitrary already-allowed `handle` you
13
- * own. Typical use: forward a handle returned by `useGetClaimableAmount` to
13
+ * own. Typical use: forward a handle returned by `useAccessClaimableAmount` to
14
14
  * an auditor without leaking plaintext.
15
15
  */
16
16
  export declare function useManagerDiscloseHandleToParty(options: ManagerHookOptions): UseMutationResult<TxHash, Error, UseManagerDiscloseHandleToPartyArgs>;
@@ -7,5 +7,11 @@ import { type ManagerHookOptions } from "./_shared.js";
7
7
  * (`FeeType.DistributionToken` managers). Pass `encryptor` (SDK encrypts
8
8
  * `amount`) XOR `encryptedInput` (pre-built) — discriminated union enforced
9
9
  * by TS. Caller must hold `FEE_COLLECTOR_ROLE`.
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 useManagerWithdrawTokenFee(options: ManagerHookOptions): UseMutationResult<TxHash, Error, WithdrawTokenFeeArgs>;
@@ -6,7 +6,15 @@ import { type ManagerHookOptions } from "./_shared.js";
6
6
  * Partial-claim a specific encrypted amount from a vesting. The SDK encrypts
7
7
  * the plaintext `amount` (or use `args.encryptedInput` to bypass).
8
8
  *
9
- * After success, invalidate `useGetClaimableAmount` and `useGetSettledAmount`.
9
+ * **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
10
+ * convention (1 token = 1_000_000 base units), not the 18 decimals typical of
11
+ * ERC-20. Amount parameters are base units of the token's actual decimals:
12
+ * for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
13
+ * transparent TTT test token uses 18 decimals.
14
+ *
15
+ * After success, invalidate `useAccessClaimableAmount` and `useAccessSettledAmount`.
16
+ *
17
+ * **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.
10
18
  *
11
19
  * @example
12
20
  * const partial = usePartialClaim({ address: managerAddress, encryptor: () => useZamaSDK() });
@@ -0,0 +1,37 @@
1
+ import { type UseQueryResult } from "@tanstack/react-query";
2
+ import type { Address } from "viem";
3
+ import type { CreateVestingPreflightReport, VestingParams } from "../types.js";
4
+ import { type ManagerHookOptions } from "./_shared.js";
5
+ export interface UsePreflightCreateVestingArgs extends ManagerHookOptions {
6
+ /** The vesting schedule parameters to validate. */
7
+ params?: VestingParams;
8
+ /** The address that will send the create transaction. */
9
+ creator?: Address;
10
+ }
11
+ /**
12
+ * Read-only preflight for `useCreateVesting` / `useBatchCreateVesting` —
13
+ * wraps {@link ConfidentialVestingManagerClient.preflightCreateVesting} as a
14
+ * TanStack query.
15
+ *
16
+ * The report carries `token`, `hasCreatorRole`, `isOperatorSet`, `ready`,
17
+ * `blockers` (human-readable strings) and `blockerErrors` (typed
18
+ * `TokenOpsSdkError`s, index-aligned with `blockers` — branch on
19
+ * `error.code`).
20
+ *
21
+ * Checks: structural `params` validation, `VESTING_CREATOR_ROLE` membership,
22
+ * and ERC-7984 operator approval of the manager on the distribution token.
23
+ * The creator's confidential token balance is NOT checked (encrypted; an
24
+ * underfunded create silently zeroes amounts instead of reverting) — see the
25
+ * headless method's TSDoc.
26
+ *
27
+ * Hook is disabled until `params` and `creator` are both set. Refetch after
28
+ * the user grants the role or calls `setOperator` (e.g. via
29
+ * `queryClient.invalidateQueries` or a `refetchInterval`).
30
+ *
31
+ * @example
32
+ * const { data: report } = usePreflightCreateVesting({
33
+ * address: managerAddress, params, creator,
34
+ * });
35
+ * if (report?.ready) { /* enable submit *\/ }
36
+ */
37
+ export declare function usePreflightCreateVesting(args: UsePreflightCreateVestingArgs): UseQueryResult<CreateVestingPreflightReport, Error>;
@@ -12,6 +12,8 @@ import { type ManagerHookOptions } from "./_shared.js";
12
12
  * After success, invalidate `useAccessClaimableAmount` (the encrypted view) and
13
13
  * any UI counts you computed off it.
14
14
  *
15
+ * **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.
16
+ *
15
17
  * @example
16
18
  * const claim = useVestingClaim({ address: managerAddress });
17
19
  * claim.mutate({ vestingId, value: gasFee });
@@ -8,7 +8,7 @@ export interface UseVestingInfoArgs extends ManagerHookOptions {
8
8
  /**
9
9
  * Read the plaintext snapshot of a vesting schedule — recipient, timestamps,
10
10
  * unlock bps, revocability flag. **Amounts are encrypted and NOT in this
11
- * payload** — use {@link useGetTotalAllocation} / {@link useGetVestedAmount}
11
+ * payload** — use {@link useAccessTotalAllocation} / {@link useAccessVestedAmount}
12
12
  * for encrypted-amount handles.
13
13
  *
14
14
  * @remarks
@@ -13,5 +13,11 @@ export interface UseWithdrawAdminArgs {
13
13
  * Admin: withdraw an encrypted amount of the manager's distribution token to
14
14
  * `msg.sender`. Caller must hold `WITHDRAWER_ROLE`. The SDK encrypts `amount`
15
15
  * (or pass `encryptedInput` to bypass).
16
+ *
17
+ * **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
18
+ * convention (1 token = 1_000_000 base units), not the 18 decimals typical of
19
+ * ERC-20. Amount parameters are base units of the token's actual decimals:
20
+ * for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
21
+ * transparent TTT test token uses 18 decimals.
16
22
  */
17
23
  export declare function useWithdrawAdmin(options: ManagerHookOptions): UseMutationResult<Hex, Error, UseWithdrawAdminArgs>;
@@ -14,5 +14,11 @@ export interface UseWithdrawTokenFeeArgs {
14
14
  * Fee collector: withdraw collected distribution-token fees
15
15
  * (`FeeType.DistributionToken` managers). SDK encrypts `amount` (or pass
16
16
  * `encryptedInput`). Caller must hold `FEE_COLLECTOR_ROLE`.
17
+ *
18
+ * **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
19
+ * convention (1 token = 1_000_000 base units), not the 18 decimals typical of
20
+ * ERC-20. Amount parameters are base units of the token's actual decimals:
21
+ * for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
22
+ * transparent TTT test token uses 18 decimals.
17
23
  */
18
24
  export declare function useWithdrawTokenFee(options: ManagerHookOptions): UseMutationResult<Hex, Error, UseWithdrawTokenFeeArgs>;