@tokenops/sdk 1.0.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.
- package/CHANGELOG.md +207 -0
- package/CONTRIBUTING.md +113 -0
- package/LICENSE +32 -0
- package/README.md +677 -0
- package/SECURITY.md +59 -0
- package/dist/chunk-52TC6BF7.js +2755 -0
- package/dist/chunk-56UI7LUR.cjs +516 -0
- package/dist/chunk-5SA2HF2W.cjs +1635 -0
- package/dist/chunk-5SGMJADP.cjs +139 -0
- package/dist/chunk-62DF53UQ.cjs +749 -0
- package/dist/chunk-66IHPTOK.cjs +20 -0
- package/dist/chunk-6ECAHP5O.cjs +1496 -0
- package/dist/chunk-72YGZEQE.js +742 -0
- package/dist/chunk-7VELUOMI.js +35 -0
- package/dist/chunk-BE2AIZ3K.js +23 -0
- package/dist/chunk-CMRETRZO.js +46 -0
- package/dist/chunk-COPFW5Z4.js +82 -0
- package/dist/chunk-CQIPRNS7.cjs +25 -0
- package/dist/chunk-ECT3NL2L.js +124 -0
- package/dist/chunk-FWHYQZ5E.cjs +37 -0
- package/dist/chunk-FYQ2UW4T.js +37 -0
- package/dist/chunk-HGXNRR25.js +105 -0
- package/dist/chunk-HTOMTEA3.cjs +3406 -0
- package/dist/chunk-ITQ7WKVC.cjs +101 -0
- package/dist/chunk-IVE3QEGD.js +478 -0
- package/dist/chunk-JFLEEXKP.js +325 -0
- package/dist/chunk-JFR5J4FL.cjs +128 -0
- package/dist/chunk-K6MFFDBJ.cjs +109 -0
- package/dist/chunk-KWFFIJYX.js +11 -0
- package/dist/chunk-NS44KBV5.cjs +89 -0
- package/dist/chunk-OLDGMKW2.cjs +93 -0
- package/dist/chunk-Q2GP5UDC.js +29 -0
- package/dist/chunk-Q7ARQSUH.cjs +42 -0
- package/dist/chunk-QCA7O2Q5.cjs +49 -0
- package/dist/chunk-QIHZVLIK.js +3388 -0
- package/dist/chunk-SUOG3BQS.cjs +2772 -0
- package/dist/chunk-T5LVV3KY.cjs +44 -0
- package/dist/chunk-UOG4PJL5.js +1488 -0
- package/dist/chunk-VDXVNZCO.cjs +329 -0
- package/dist/chunk-VJKZWYYJ.cjs +32 -0
- package/dist/chunk-WRCUDSUJ.js +96 -0
- package/dist/chunk-XSNLAS5M.js +135 -0
- package/dist/chunk-XXXDQSHE.js +1628 -0
- package/dist/chunk-ZHFLRKFY.js +41 -0
- package/dist/chunk-ZXCOJY2Z.js +87 -0
- package/dist/core/addresses.d.ts +59 -0
- package/dist/core/brands.d.ts +87 -0
- package/dist/core/chains.d.ts +102 -0
- package/dist/core/errors.d.ts +687 -0
- package/dist/core/index.d.ts +7 -0
- package/dist/core/normalise.d.ts +27 -0
- package/dist/core/preflight.d.ts +25 -0
- package/dist/core/revert-mapper.d.ts +74 -0
- package/dist/core/telemetry.d.ts +50 -0
- package/dist/core/types.d.ts +10 -0
- package/dist/core/version.d.ts +15 -0
- package/dist/core/zama-error-mapper.d.ts +27 -0
- package/dist/fhe/acl.d.ts +73 -0
- package/dist/fhe/erc7984-abi.d.ts +53 -0
- package/dist/fhe/index.cjs +599 -0
- package/dist/fhe/index.d.cts +11 -0
- package/dist/fhe/index.d.ts +11 -0
- package/dist/fhe/index.js +394 -0
- package/dist/fhe/mock-encryptor.d.ts +90 -0
- package/dist/fhe/mock-erc7984.d.ts +134 -0
- package/dist/fhe/operators.d.ts +190 -0
- package/dist/fhe/react/index.cjs +102 -0
- package/dist/fhe/react/index.d.cts +10 -0
- package/dist/fhe/react/index.d.ts +10 -0
- package/dist/fhe/react/index.js +85 -0
- package/dist/fhe/react/use-decrypted-handle.d.ts +102 -0
- package/dist/fhe/scale-ratio.d.ts +168 -0
- package/dist/fhe/sepolia-encryptor-web.d.ts +101 -0
- package/dist/fhe/sepolia-encryptor.d.ts +132 -0
- package/dist/fhe/types.d.ts +62 -0
- package/dist/fhe-airdrop/abis/cloneable.d.ts +781 -0
- package/dist/fhe-airdrop/abis/factory.d.ts +714 -0
- package/dist/fhe-airdrop/abis/index.d.ts +2 -0
- package/dist/fhe-airdrop/advanced/factory-advanced.d.ts +53 -0
- package/dist/fhe-airdrop/advanced/index.cjs +21 -0
- package/dist/fhe-airdrop/advanced/index.d.cts +13 -0
- package/dist/fhe-airdrop/advanced/index.d.ts +13 -0
- package/dist/fhe-airdrop/advanced/index.js +8 -0
- package/dist/fhe-airdrop/advanced/react/index.cjs +61 -0
- package/dist/fhe-airdrop/advanced/react/index.d.cts +5 -0
- package/dist/fhe-airdrop/advanced/react/index.d.ts +5 -0
- package/dist/fhe-airdrop/advanced/react/index.js +59 -0
- package/dist/fhe-airdrop/advanced/react/usePredictAirdropAddress.d.ts +49 -0
- package/dist/fhe-airdrop/airdrop.d.ts +308 -0
- package/dist/fhe-airdrop/encryption.d.ts +109 -0
- package/dist/fhe-airdrop/errors.d.ts +60 -0
- package/dist/fhe-airdrop/factory.d.ts +281 -0
- package/dist/fhe-airdrop/index.cjs +227 -0
- package/dist/fhe-airdrop/index.d.cts +10 -0
- package/dist/fhe-airdrop/index.d.ts +10 -0
- package/dist/fhe-airdrop/index.js +10 -0
- package/dist/fhe-airdrop/react/_shared.d.ts +107 -0
- package/dist/fhe-airdrop/react/index.cjs +638 -0
- package/dist/fhe-airdrop/react/index.d.cts +90 -0
- package/dist/fhe-airdrop/react/index.d.ts +90 -0
- package/dist/fhe-airdrop/react/index.js +430 -0
- package/dist/fhe-airdrop/react/useAccessClaimAmount.d.ts +31 -0
- package/dist/fhe-airdrop/react/useAirdropCanExtendClaimWindow.d.ts +7 -0
- package/dist/fhe-airdrop/react/useAirdropClaim.d.ts +25 -0
- package/dist/fhe-airdrop/react/useAirdropClaimTypehash.d.ts +10 -0
- package/dist/fhe-airdrop/react/useAirdropClaimedSignatures.d.ts +16 -0
- package/dist/fhe-airdrop/react/useAirdropDeploymentBlockNumber.d.ts +6 -0
- package/dist/fhe-airdrop/react/useAirdropDomainSeparator.d.ts +8 -0
- package/dist/fhe-airdrop/react/useAirdropEndTime.d.ts +10 -0
- package/dist/fhe-airdrop/react/useAirdropFactoryCustomFee.d.ts +17 -0
- package/dist/fhe-airdrop/react/useAirdropFactoryDefaultGasFee.d.ts +10 -0
- package/dist/fhe-airdrop/react/useAirdropFactoryDisableCustomFee.d.ts +15 -0
- package/dist/fhe-airdrop/react/useAirdropFactoryFeeCollector.d.ts +11 -0
- package/dist/fhe-airdrop/react/useAirdropFactoryInitCodeHash.d.ts +17 -0
- package/dist/fhe-airdrop/react/useAirdropFactorySetCustomFee.d.ts +17 -0
- package/dist/fhe-airdrop/react/useAirdropFactorySetDefaultGasFee.d.ts +16 -0
- package/dist/fhe-airdrop/react/useAirdropFactorySetFeeCollector.d.ts +15 -0
- package/dist/fhe-airdrop/react/useAirdropGasFee.d.ts +11 -0
- package/dist/fhe-airdrop/react/useAirdropGrantRole.d.ts +16 -0
- package/dist/fhe-airdrop/react/useAirdropHasClaimEnded.d.ts +7 -0
- package/dist/fhe-airdrop/react/useAirdropHasClaimStarted.d.ts +7 -0
- package/dist/fhe-airdrop/react/useAirdropHasRole.d.ts +14 -0
- package/dist/fhe-airdrop/react/useAirdropIsClaimWindowActive.d.ts +9 -0
- package/dist/fhe-airdrop/react/useAirdropIsPaused.d.ts +8 -0
- package/dist/fhe-airdrop/react/useAirdropIsSignatureClaimed.d.ts +22 -0
- package/dist/fhe-airdrop/react/useAirdropIsSignatureValid.d.ts +50 -0
- package/dist/fhe-airdrop/react/useAirdropRevokeRole.d.ts +15 -0
- package/dist/fhe-airdrop/react/useAirdropStartTime.d.ts +10 -0
- package/dist/fhe-airdrop/react/useAirdropToken.d.ts +11 -0
- package/dist/fhe-airdrop/react/useAirdropWithdrawGasFee.d.ts +15 -0
- package/dist/fhe-airdrop/react/useAirdropWithdrawOtherConfidentialToken.d.ts +14 -0
- package/dist/fhe-airdrop/react/useAirdropWithdrawOtherToken.d.ts +14 -0
- package/dist/fhe-airdrop/react/useClaim.d.ts +29 -0
- package/dist/fhe-airdrop/react/useConfidentialAirdropFactoryImplementation.d.ts +11 -0
- package/dist/fhe-airdrop/react/useCreateAndFundConfidentialAirdrop.d.ts +33 -0
- package/dist/fhe-airdrop/react/useCreateAndFundConfidentialAirdropAndGetAddress.d.ts +40 -0
- package/dist/fhe-airdrop/react/useCreateConfidentialAirdrop.d.ts +29 -0
- package/dist/fhe-airdrop/react/useCreateConfidentialAirdropAndGetAddress.d.ts +31 -0
- package/dist/fhe-airdrop/react/useDisableCustomFee.d.ts +14 -0
- package/dist/fhe-airdrop/react/useExtendClaimWindow.d.ts +16 -0
- package/dist/fhe-airdrop/react/useFactoryCustomFee.d.ts +17 -0
- package/dist/fhe-airdrop/react/useFactoryDefaultGasFee.d.ts +10 -0
- package/dist/fhe-airdrop/react/useFactoryFeeCollector.d.ts +11 -0
- package/dist/fhe-airdrop/react/useFactoryInitCodeHash.d.ts +17 -0
- package/dist/fhe-airdrop/react/useFundConfidentialAirdrop.d.ts +25 -0
- package/dist/fhe-airdrop/react/useGetClaimAmount.d.ts +30 -0
- package/dist/fhe-airdrop/react/useSetCustomFee.d.ts +16 -0
- package/dist/fhe-airdrop/react/useSetDefaultGasFee.d.ts +15 -0
- package/dist/fhe-airdrop/react/useSetFeeCollector.d.ts +14 -0
- package/dist/fhe-airdrop/react/useSetPaused.d.ts +14 -0
- package/dist/fhe-airdrop/react/useSignClaimAuthorization.d.ts +31 -0
- package/dist/fhe-airdrop/react/useWithdraw.d.ts +12 -0
- package/dist/fhe-airdrop/react/useWithdrawOtherConfidentialToken.d.ts +13 -0
- package/dist/fhe-airdrop/react/useWithdrawOtherToken.d.ts +13 -0
- package/dist/fhe-airdrop/types.d.ts +21 -0
- package/dist/fhe-disperse/abis/index.d.ts +2 -0
- package/dist/fhe-disperse/abis/singleton.d.ts +1297 -0
- package/dist/fhe-disperse/abis/wallet.d.ts +111 -0
- package/dist/fhe-disperse/encryption.d.ts +77 -0
- package/dist/fhe-disperse/errors.d.ts +39 -0
- package/dist/fhe-disperse/index.cjs +248 -0
- package/dist/fhe-disperse/index.d.cts +14 -0
- package/dist/fhe-disperse/index.d.ts +14 -0
- package/dist/fhe-disperse/index.js +11 -0
- package/dist/fhe-disperse/react/_shared.d.ts +104 -0
- package/dist/fhe-disperse/react/index.cjs +752 -0
- package/dist/fhe-disperse/react/index.d.cts +82 -0
- package/dist/fhe-disperse/react/index.d.ts +82 -0
- package/dist/fhe-disperse/react/index.js +522 -0
- package/dist/fhe-disperse/react/useAccessEncryptedFeeReserve.d.ts +35 -0
- package/dist/fhe-disperse/react/useApproveTokenOnWallets.d.ts +25 -0
- package/dist/fhe-disperse/react/useBatchDiscloseHandlesToParty.d.ts +16 -0
- package/dist/fhe-disperse/react/useCalculateFee.d.ts +26 -0
- package/dist/fhe-disperse/react/useDeploymentBlockNumber.d.ts +11 -0
- package/dist/fhe-disperse/react/useDisableCustomFee.d.ts +20 -0
- package/dist/fhe-disperse/react/useDiscloseHandleToParty.d.ts +20 -0
- package/dist/fhe-disperse/react/useDisperse.d.ts +28 -0
- package/dist/fhe-disperse/react/useGetBatchLimits.d.ts +12 -0
- package/dist/fhe-disperse/react/useGetFeeConfig.d.ts +15 -0
- package/dist/fhe-disperse/react/useGetFees.d.ts +19 -0
- package/dist/fhe-disperse/react/useGetWallets.d.ts +19 -0
- package/dist/fhe-disperse/react/useGrantRole.d.ts +24 -0
- package/dist/fhe-disperse/react/useHasApprovedSubwallets.d.ts +25 -0
- package/dist/fhe-disperse/react/useHasRole.d.ts +22 -0
- package/dist/fhe-disperse/react/useIsPaused.d.ts +11 -0
- package/dist/fhe-disperse/react/useIsRegistered.d.ts +15 -0
- package/dist/fhe-disperse/react/usePause.d.ts +18 -0
- package/dist/fhe-disperse/react/usePredictWallets.d.ts +19 -0
- package/dist/fhe-disperse/react/usePreflightDisperse.d.ts +37 -0
- package/dist/fhe-disperse/react/useRecoverERC20FromWallets.d.ts +21 -0
- package/dist/fhe-disperse/react/useRecoverFromWallets.d.ts +21 -0
- package/dist/fhe-disperse/react/useRegister.d.ts +40 -0
- package/dist/fhe-disperse/react/useRescueConfidentialTokens.d.ts +21 -0
- package/dist/fhe-disperse/react/useRescueERC20.d.ts +21 -0
- package/dist/fhe-disperse/react/useRevokeRole.d.ts +24 -0
- package/dist/fhe-disperse/react/useRevokeTokenOnWallets.d.ts +24 -0
- package/dist/fhe-disperse/react/useSetCustomFee.d.ts +24 -0
- package/dist/fhe-disperse/react/useSetFeeConfig.d.ts +23 -0
- package/dist/fhe-disperse/react/useSetMaxBatchSizeDirect.d.ts +20 -0
- package/dist/fhe-disperse/react/useSetMaxBatchSizeHolding.d.ts +20 -0
- package/dist/fhe-disperse/react/useSetMaxBatchSizeTokenFee.d.ts +20 -0
- package/dist/fhe-disperse/react/useSingletonBatchDiscloseHandlesToParty.d.ts +13 -0
- package/dist/fhe-disperse/react/useSingletonBatchLimits.d.ts +12 -0
- package/dist/fhe-disperse/react/useSingletonCalculateFee.d.ts +26 -0
- package/dist/fhe-disperse/react/useSingletonDeploymentBlockNumber.d.ts +11 -0
- package/dist/fhe-disperse/react/useSingletonDisableCustomFee.d.ts +21 -0
- package/dist/fhe-disperse/react/useSingletonDiscloseHandleToParty.d.ts +17 -0
- package/dist/fhe-disperse/react/useSingletonFees.d.ts +19 -0
- package/dist/fhe-disperse/react/useSingletonGrantRole.d.ts +26 -0
- package/dist/fhe-disperse/react/useSingletonHasApprovedSubwallets.d.ts +25 -0
- package/dist/fhe-disperse/react/useSingletonHasRole.d.ts +23 -0
- package/dist/fhe-disperse/react/useSingletonIsPaused.d.ts +11 -0
- package/dist/fhe-disperse/react/useSingletonIsRegistered.d.ts +15 -0
- package/dist/fhe-disperse/react/useSingletonPause.d.ts +19 -0
- package/dist/fhe-disperse/react/useSingletonPredictWallets.d.ts +19 -0
- package/dist/fhe-disperse/react/useSingletonRevokeRole.d.ts +26 -0
- package/dist/fhe-disperse/react/useSingletonSetCustomFee.d.ts +25 -0
- package/dist/fhe-disperse/react/useSingletonUnpause.d.ts +18 -0
- package/dist/fhe-disperse/react/useSingletonWalletImplementation.d.ts +12 -0
- package/dist/fhe-disperse/react/useSingletonWallets.d.ts +19 -0
- package/dist/fhe-disperse/react/useSingletonWithdrawGasFee.d.ts +21 -0
- package/dist/fhe-disperse/react/useSingletonWithdrawTokenFee.d.ts +50 -0
- package/dist/fhe-disperse/react/useUnpause.d.ts +17 -0
- package/dist/fhe-disperse/react/useWalletImplementation.d.ts +12 -0
- package/dist/fhe-disperse/react/useWithdrawGasFee.d.ts +26 -0
- package/dist/fhe-disperse/react/useWithdrawTokenFee.d.ts +70 -0
- package/dist/fhe-disperse/singleton.d.ts +442 -0
- package/dist/fhe-disperse/subtotals.d.ts +14 -0
- package/dist/fhe-disperse/types.d.ts +332 -0
- package/dist/fhe-disperse/validate.d.ts +78 -0
- package/dist/fhe-vesting/abis/factory.d.ts +676 -0
- package/dist/fhe-vesting/abis/index.d.ts +3 -0
- package/dist/fhe-vesting/abis/manager.d.ts +1797 -0
- package/dist/fhe-vesting/advanced/factory-advanced.d.ts +52 -0
- package/dist/fhe-vesting/advanced/index.cjs +21 -0
- package/dist/fhe-vesting/advanced/index.d.cts +12 -0
- package/dist/fhe-vesting/advanced/index.d.ts +12 -0
- package/dist/fhe-vesting/advanced/index.js +8 -0
- package/dist/fhe-vesting/advanced/react/index.cjs +75 -0
- package/dist/fhe-vesting/advanced/react/index.d.cts +5 -0
- package/dist/fhe-vesting/advanced/react/index.d.ts +5 -0
- package/dist/fhe-vesting/advanced/react/index.js +73 -0
- package/dist/fhe-vesting/advanced/react/usePredictManagerAddress.d.ts +41 -0
- package/dist/fhe-vesting/encryption.d.ts +104 -0
- package/dist/fhe-vesting/errors.d.ts +183 -0
- package/dist/fhe-vesting/factory.d.ts +207 -0
- package/dist/fhe-vesting/index.cjs +269 -0
- package/dist/fhe-vesting/index.d.cts +9 -0
- package/dist/fhe-vesting/index.d.ts +9 -0
- package/dist/fhe-vesting/index.js +12 -0
- package/dist/fhe-vesting/manager.d.ts +808 -0
- package/dist/fhe-vesting/react/_shared.d.ts +122 -0
- package/dist/fhe-vesting/react/index.cjs +1054 -0
- package/dist/fhe-vesting/react/index.d.cts +123 -0
- package/dist/fhe-vesting/react/index.d.ts +123 -0
- package/dist/fhe-vesting/react/index.js +771 -0
- package/dist/fhe-vesting/react/useAcceptVestingTransfer.d.ts +12 -0
- package/dist/fhe-vesting/react/useAccessClaimableAmount.d.ts +14 -0
- package/dist/fhe-vesting/react/useAccessSettledAmount.d.ts +15 -0
- package/dist/fhe-vesting/react/useAccessTotalAllocation.d.ts +14 -0
- package/dist/fhe-vesting/react/useAccessVestedAmount.d.ts +26 -0
- package/dist/fhe-vesting/react/useAdminBatchDiscloseToParty.d.ts +16 -0
- package/dist/fhe-vesting/react/useAdminClaim.d.ts +9 -0
- package/dist/fhe-vesting/react/useAdminDiscloseToParty.d.ts +8 -0
- package/dist/fhe-vesting/react/useAdminGetClaimableAmount.d.ts +13 -0
- package/dist/fhe-vesting/react/useAdminGetSettledAmount.d.ts +13 -0
- package/dist/fhe-vesting/react/useAdminGetTokenBalance.d.ts +13 -0
- package/dist/fhe-vesting/react/useAdminGetTotalAllocation.d.ts +13 -0
- package/dist/fhe-vesting/react/useAdminGetVestedAmount.d.ts +15 -0
- package/dist/fhe-vesting/react/useAdminPartialClaim.d.ts +8 -0
- package/dist/fhe-vesting/react/useAllRecipients.d.ts +8 -0
- package/dist/fhe-vesting/react/useAllRecipientsLength.d.ts +6 -0
- package/dist/fhe-vesting/react/useAllRecipientsSliced.d.ts +13 -0
- package/dist/fhe-vesting/react/useBatchCreateVesting.d.ts +24 -0
- package/dist/fhe-vesting/react/useBatchDiscloseHandlesToParty.d.ts +13 -0
- package/dist/fhe-vesting/react/useBatchDiscloseToParty.d.ts +18 -0
- package/dist/fhe-vesting/react/useBatchRevokeVesting.d.ts +12 -0
- package/dist/fhe-vesting/react/useCancelVestingTransfer.d.ts +12 -0
- package/dist/fhe-vesting/react/useClaim.d.ts +19 -0
- package/dist/fhe-vesting/react/useConfidentialVestingFactoryImplementation.d.ts +11 -0
- package/dist/fhe-vesting/react/useCreateManager.d.ts +32 -0
- package/dist/fhe-vesting/react/useCreateManagerAndGetAddress.d.ts +31 -0
- package/dist/fhe-vesting/react/useCreateVesting.d.ts +38 -0
- package/dist/fhe-vesting/react/useDirectVestingTransfer.d.ts +13 -0
- package/dist/fhe-vesting/react/useDisableCustomFee.d.ts +14 -0
- package/dist/fhe-vesting/react/useDiscloseHandleToParty.d.ts +14 -0
- package/dist/fhe-vesting/react/useDiscloseToParty.d.ts +14 -0
- package/dist/fhe-vesting/react/useFactoryCustomFee.d.ts +17 -0
- package/dist/fhe-vesting/react/useFactoryDefaultFeeType.d.ts +11 -0
- package/dist/fhe-vesting/react/useFactoryDefaultGasFee.d.ts +10 -0
- package/dist/fhe-vesting/react/useFactoryDefaultTokenFee.d.ts +10 -0
- package/dist/fhe-vesting/react/useFactoryFeeCollector.d.ts +10 -0
- package/dist/fhe-vesting/react/useFactoryInitCodeHash.d.ts +18 -0
- package/dist/fhe-vesting/react/useGetClaimableAmount.d.ts +13 -0
- package/dist/fhe-vesting/react/useGetSettledAmount.d.ts +14 -0
- package/dist/fhe-vesting/react/useGetTotalAllocation.d.ts +13 -0
- package/dist/fhe-vesting/react/useGetVestedAmount.d.ts +25 -0
- package/dist/fhe-vesting/react/useGrantRole.d.ts +15 -0
- package/dist/fhe-vesting/react/useHasRole.d.ts +14 -0
- package/dist/fhe-vesting/react/useInitiateVestingTransfer.d.ts +12 -0
- package/dist/fhe-vesting/react/useIsRecipient.d.ts +10 -0
- package/dist/fhe-vesting/react/useManagerBatchDiscloseHandlesToParty.d.ts +15 -0
- package/dist/fhe-vesting/react/useManagerDeploymentBlockNumber.d.ts +7 -0
- package/dist/fhe-vesting/react/useManagerDiscloseHandleToParty.d.ts +16 -0
- package/dist/fhe-vesting/react/useManagerFactoryCustomFee.d.ts +17 -0
- package/dist/fhe-vesting/react/useManagerFactoryDefaultGasFee.d.ts +10 -0
- package/dist/fhe-vesting/react/useManagerFactoryDisableCustomFee.d.ts +15 -0
- package/dist/fhe-vesting/react/useManagerFactoryFeeCollector.d.ts +10 -0
- package/dist/fhe-vesting/react/useManagerFactoryInitCodeHash.d.ts +18 -0
- package/dist/fhe-vesting/react/useManagerFactorySetCustomFee.d.ts +19 -0
- package/dist/fhe-vesting/react/useManagerFactorySetDefaultGasFee.d.ts +13 -0
- package/dist/fhe-vesting/react/useManagerFactorySetFeeCollector.d.ts +14 -0
- package/dist/fhe-vesting/react/useManagerFee.d.ts +7 -0
- package/dist/fhe-vesting/react/useManagerFeeInfo.d.ts +18 -0
- package/dist/fhe-vesting/react/useManagerFeeType.d.ts +7 -0
- package/dist/fhe-vesting/react/useManagerGrantRole.d.ts +17 -0
- package/dist/fhe-vesting/react/useManagerHasRole.d.ts +15 -0
- package/dist/fhe-vesting/react/useManagerIsPausable.d.ts +6 -0
- package/dist/fhe-vesting/react/useManagerIsSplitEnabled.d.ts +6 -0
- package/dist/fhe-vesting/react/useManagerMaxBatchSize.d.ts +6 -0
- package/dist/fhe-vesting/react/useManagerMaxRevokeBatchSize.d.ts +6 -0
- package/dist/fhe-vesting/react/useManagerPause.d.ts +13 -0
- package/dist/fhe-vesting/react/useManagerPaused.d.ts +6 -0
- package/dist/fhe-vesting/react/useManagerRevokeRole.d.ts +17 -0
- package/dist/fhe-vesting/react/useManagerToken.d.ts +11 -0
- package/dist/fhe-vesting/react/useManagerUnpause.d.ts +12 -0
- package/dist/fhe-vesting/react/useManagerWithdrawGasFee.d.ts +14 -0
- package/dist/fhe-vesting/react/useManagerWithdrawOtherConfidentialToken.d.ts +14 -0
- package/dist/fhe-vesting/react/useManagerWithdrawOtherToken.d.ts +14 -0
- package/dist/fhe-vesting/react/useManagerWithdrawTokenFee.d.ts +11 -0
- package/dist/fhe-vesting/react/usePartialClaim.d.ts +15 -0
- package/dist/fhe-vesting/react/usePause.d.ts +12 -0
- package/dist/fhe-vesting/react/usePendingVestingTransfer.d.ts +20 -0
- package/dist/fhe-vesting/react/useRecipientVestings.d.ts +11 -0
- package/dist/fhe-vesting/react/useRecipientVestingsLength.d.ts +10 -0
- package/dist/fhe-vesting/react/useRecipientVestingsSliced.d.ts +12 -0
- package/dist/fhe-vesting/react/useRenounceRole.d.ts +16 -0
- package/dist/fhe-vesting/react/useResetGasFee.d.ts +10 -0
- package/dist/fhe-vesting/react/useResetTokenFee.d.ts +10 -0
- package/dist/fhe-vesting/react/useRevokeRole.d.ts +15 -0
- package/dist/fhe-vesting/react/useRevokeVesting.d.ts +15 -0
- package/dist/fhe-vesting/react/useRoleConstants.d.ts +19 -0
- package/dist/fhe-vesting/react/useSetCustomFee.d.ts +18 -0
- package/dist/fhe-vesting/react/useSetDefaultFeeType.d.ts +14 -0
- package/dist/fhe-vesting/react/useSetDefaultGasFee.d.ts +12 -0
- package/dist/fhe-vesting/react/useSetDefaultTokenFee.d.ts +13 -0
- package/dist/fhe-vesting/react/useSetFeeCollector.d.ts +13 -0
- package/dist/fhe-vesting/react/useSetMaxBatchSize.d.ts +12 -0
- package/dist/fhe-vesting/react/useSetMaxRevokeBatchSize.d.ts +12 -0
- package/dist/fhe-vesting/react/useSplitVesting.d.ts +28 -0
- package/dist/fhe-vesting/react/useTransferFeeCollectorRole.d.ts +12 -0
- package/dist/fhe-vesting/react/useUnpause.d.ts +11 -0
- package/dist/fhe-vesting/react/useVestingClaim.d.ts +19 -0
- package/dist/fhe-vesting/react/useVestingInfo.d.ts +25 -0
- package/dist/fhe-vesting/react/useWithdrawAdmin.d.ts +17 -0
- package/dist/fhe-vesting/react/useWithdrawGasFee.d.ts +13 -0
- package/dist/fhe-vesting/react/useWithdrawOtherConfidentialToken.d.ts +13 -0
- package/dist/fhe-vesting/react/useWithdrawOtherToken.d.ts +13 -0
- package/dist/fhe-vesting/react/useWithdrawTokenFee.d.ts +18 -0
- package/dist/fhe-vesting/types.d.ts +72 -0
- package/dist/index.cjs +237 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +14 -0
- package/dist/telemetry/console.d.ts +29 -0
- package/dist/telemetry/index.cjs +113 -0
- package/dist/telemetry/index.d.cts +3 -0
- package/dist/telemetry/index.d.ts +3 -0
- package/dist/telemetry/index.js +102 -0
- package/dist/telemetry/tokenops.d.ts +15 -0
- package/package.json +316 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { Account, Address, Hex } from "viem";
|
|
3
|
+
import { type BaseHookOptions } from "./_shared.js";
|
|
4
|
+
export interface UseResetGasFeeArgs {
|
|
5
|
+
account?: Account | Address;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Admin: reset the factory's default gas fee to its bytecode-encoded baseline.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useResetGasFee(options?: BaseHookOptions): UseMutationResult<Hex, Error, UseResetGasFeeArgs | undefined>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { Account, Address, Hex } from "viem";
|
|
3
|
+
import { type BaseHookOptions } from "./_shared.js";
|
|
4
|
+
export interface UseResetTokenFeeArgs {
|
|
5
|
+
account?: Account | Address;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Admin: reset the factory's default token fee to its bytecode-encoded baseline.
|
|
9
|
+
*/
|
|
10
|
+
export declare function useResetTokenFee(options?: BaseHookOptions): UseMutationResult<Hex, Error, UseResetTokenFeeArgs | undefined>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { Account, Address, Hex } from "viem";
|
|
3
|
+
import { type ManagerHookOptions } from "./_shared.js";
|
|
4
|
+
export interface UseRevokeRoleArgs {
|
|
5
|
+
role: Hex;
|
|
6
|
+
accountTarget: Address;
|
|
7
|
+
account?: Account | Address;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* AccessControl: revoke `role` from `accountTarget`. Caller must be a member
|
|
11
|
+
* of the role's admin role.
|
|
12
|
+
*
|
|
13
|
+
* After success, invalidate `useHasRole({ role, account: accountTarget })`.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useRevokeRole(options: ManagerHookOptions): UseMutationResult<Hex, Error, UseRevokeRoleArgs>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { Account, Address, Hex } from "viem";
|
|
3
|
+
import { type ManagerHookOptions } from "./_shared.js";
|
|
4
|
+
export interface UseRevokeVestingArgs {
|
|
5
|
+
vestingId: Hex;
|
|
6
|
+
account?: Account | Address;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Revoke a vesting. Caller must hold `REVOKER_ROLE` and the vesting must have
|
|
10
|
+
* been created with `isRevocable: true`.
|
|
11
|
+
*
|
|
12
|
+
* After success, invalidate `useVestingInfo({ vestingId })` and any encrypted
|
|
13
|
+
* views for that vestingId.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useRevokeVesting(options: ManagerHookOptions): UseMutationResult<Hex, Error, UseRevokeVestingArgs>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type UseQueryResult } from "@tanstack/react-query";
|
|
2
|
+
import type { Hex } from "viem";
|
|
3
|
+
import { type ManagerHookOptions } from "./_shared.js";
|
|
4
|
+
export interface RoleConstants {
|
|
5
|
+
DEFAULT_ADMIN_ROLE: Hex;
|
|
6
|
+
VESTING_CREATOR_ROLE: Hex;
|
|
7
|
+
REVOKER_ROLE: Hex;
|
|
8
|
+
WITHDRAWER_ROLE: Hex;
|
|
9
|
+
CLAIMER_ROLE: Hex;
|
|
10
|
+
FEE_COLLECTOR_ROLE: Hex;
|
|
11
|
+
PAUSER_ROLE: Hex;
|
|
12
|
+
DISCLOSURE_ADMIN_ROLE: Hex;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Read all eight AccessControl role hashes off the manager in one fan-out.
|
|
16
|
+
* Each hash is bytecode-immutable, so this is cacheable indefinitely. Pair
|
|
17
|
+
* with {@link useHasRole} for membership checks.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useRoleConstants(options: ManagerHookOptions): UseQueryResult<RoleConstants, Error>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { Account, Address, Hex } from "viem";
|
|
3
|
+
import { type FeeType } from "../types.js";
|
|
4
|
+
import { type BaseHookOptions } from "./_shared.js";
|
|
5
|
+
export interface UseSetCustomFeeArgs {
|
|
6
|
+
creator: Address;
|
|
7
|
+
feeType: FeeType;
|
|
8
|
+
gasFee: bigint;
|
|
9
|
+
tokenFee: bigint;
|
|
10
|
+
account?: Account | Address;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Admin: install a per-creator fee override on the factory. Takes precedence
|
|
14
|
+
* over factory defaults for all managers `creator` deploys after the override.
|
|
15
|
+
*
|
|
16
|
+
* After success, invalidate `useFactoryCustomFee({ creator })` to refresh.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useSetCustomFee(options?: BaseHookOptions): UseMutationResult<Hex, Error, UseSetCustomFeeArgs>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { Account, Address, Hex } from "viem";
|
|
3
|
+
import { type FeeType } from "../types.js";
|
|
4
|
+
import { type BaseHookOptions } from "./_shared.js";
|
|
5
|
+
export interface UseSetDefaultFeeTypeArgs {
|
|
6
|
+
feeType: FeeType;
|
|
7
|
+
account?: Account | Address;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Admin: set the factory's default fee model (`FeeType.Gas` or
|
|
11
|
+
* `FeeType.DistributionToken`) for new manager clones. After success, invalidate
|
|
12
|
+
* `["tokenops-sdk", "fhe-vesting", "factory:defaultFeeType"]`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useSetDefaultFeeType(options?: BaseHookOptions): UseMutationResult<Hex, Error, UseSetDefaultFeeTypeArgs>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { Account, Address, Hex } from "viem";
|
|
3
|
+
import { type BaseHookOptions } from "./_shared.js";
|
|
4
|
+
export interface UseSetDefaultGasFeeArgs {
|
|
5
|
+
fee: bigint;
|
|
6
|
+
account?: Account | Address;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Admin: set the factory-wide default gas fee (in wei). After success, invalidate
|
|
10
|
+
* `["tokenops-sdk", "fhe-vesting", "factory:defaultGasFee"]` to refresh the read hook.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useSetDefaultGasFee(options?: BaseHookOptions): UseMutationResult<Hex, Error, UseSetDefaultGasFeeArgs>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { Account, Address, Hex } from "viem";
|
|
3
|
+
import { type BaseHookOptions } from "./_shared.js";
|
|
4
|
+
export interface UseSetDefaultTokenFeeArgs {
|
|
5
|
+
/** Basis points (1 bps = 0.01 %). */
|
|
6
|
+
feeBps: bigint;
|
|
7
|
+
account?: Account | Address;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Admin: set the factory-wide default token fee (basis points). After success,
|
|
11
|
+
* invalidate `["tokenops-sdk", "fhe-vesting", "factory:defaultTokenFee"]`.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useSetDefaultTokenFee(options?: BaseHookOptions): UseMutationResult<Hex, Error, UseSetDefaultTokenFeeArgs>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { Account, Address, Hex } from "viem";
|
|
3
|
+
import { type BaseHookOptions } from "./_shared.js";
|
|
4
|
+
export interface UseSetFeeCollectorArgs {
|
|
5
|
+
newCollector: Address;
|
|
6
|
+
account?: Account | Address;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Admin: set the factory's fee collector address.
|
|
10
|
+
*
|
|
11
|
+
* After success, invalidate `useFactoryFeeCollector()`.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useSetFeeCollector(options?: BaseHookOptions): UseMutationResult<Hex, Error, UseSetFeeCollectorArgs>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { Account, Address, Hex } from "viem";
|
|
3
|
+
import { type ManagerHookOptions } from "./_shared.js";
|
|
4
|
+
export interface UseSetMaxBatchSizeArgs {
|
|
5
|
+
newMax: bigint;
|
|
6
|
+
account?: Account | Address;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Admin: bump or lower `maxBatchSize` (cap for `useBatchCreateVesting`).
|
|
10
|
+
* After success, invalidate `useManagerMaxBatchSize`.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useSetMaxBatchSize(options: ManagerHookOptions): UseMutationResult<Hex, Error, UseSetMaxBatchSizeArgs>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { Account, Address, Hex } from "viem";
|
|
3
|
+
import { type ManagerHookOptions } from "./_shared.js";
|
|
4
|
+
export interface UseSetMaxRevokeBatchSizeArgs {
|
|
5
|
+
newMax: bigint | number;
|
|
6
|
+
account?: Account | Address;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Admin: bump or lower `maxRevokeBatchSize` (cap for `useBatchRevokeVesting`).
|
|
10
|
+
* After success, invalidate `useManagerMaxRevokeBatchSize`.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useSetMaxRevokeBatchSize(options: ManagerHookOptions): UseMutationResult<Hex, Error, UseSetMaxRevokeBatchSizeArgs>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { SplitVestingArgs, SplitVestingResult } from "../manager.js";
|
|
3
|
+
import { type ManagerHookOptions } from "./_shared.js";
|
|
4
|
+
/**
|
|
5
|
+
* Split a vesting into two positions by encrypted `numerator/denominator` share.
|
|
6
|
+
*
|
|
7
|
+
* The SDK auto-scales the plaintext ratio via `scaleRatio` to the universal
|
|
8
|
+
* privacy-preserving constant `FHE_SPLIT_DENOMINATOR` (`90_090_000`
|
|
9
|
+
* = LCM(1..16, 10_000)) unless `args.preScaled` is set. The SDK encrypts
|
|
10
|
+
* `numerator` — pass plaintext.
|
|
11
|
+
*
|
|
12
|
+
* For exact-integer ratios use the {@link share} builder:
|
|
13
|
+
* `share.fraction(1, 7)` (m ≤ 16) or `share.basisPoints(250)` (bps ≤ 10_000),
|
|
14
|
+
* then pass `preScaled: true`.
|
|
15
|
+
*
|
|
16
|
+
* Returns `{ hash, newVestingId }` — the id of the split-off vesting, parsed
|
|
17
|
+
* from the receipt's `VestingSplit` event. Required for any follow-up call
|
|
18
|
+
* (claim, transfer, disclose) on the new position.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* const split = useSplitVesting({ address: managerAddress, encryptor: () => useZamaSDK() });
|
|
22
|
+
* const { newVestingId } = await split.mutateAsync({
|
|
23
|
+
* vestingId,
|
|
24
|
+
* numerator: 1n, denominator: 2n, // 50% split, SDK scales automatically
|
|
25
|
+
* newRecipient: "0xNewRecipient",
|
|
26
|
+
* });
|
|
27
|
+
*/
|
|
28
|
+
export declare function useSplitVesting(options: ManagerHookOptions): UseMutationResult<SplitVestingResult, Error, SplitVestingArgs>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { Account, Address, Hex } from "viem";
|
|
3
|
+
import { type ManagerHookOptions } from "./_shared.js";
|
|
4
|
+
export interface UseTransferFeeCollectorRoleArgs {
|
|
5
|
+
newCollector: Address;
|
|
6
|
+
account?: Account | Address;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Transfer the `FEE_COLLECTOR_ROLE` to `newCollector`. The current
|
|
10
|
+
* fee-collector calls this; the new collector gains immediate role membership.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useTransferFeeCollectorRole(options: ManagerHookOptions): UseMutationResult<Hex, Error, UseTransferFeeCollectorRoleArgs>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { Account, Address, Hex } from "viem";
|
|
3
|
+
import { type ManagerHookOptions } from "./_shared.js";
|
|
4
|
+
export interface UseUnpauseArgs {
|
|
5
|
+
account?: Account | Address;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Pauser: unpause the manager clone. After success, invalidate
|
|
9
|
+
* `useManagerPaused`.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useUnpause(options: ManagerHookOptions): UseMutationResult<Hex, Error, UseUnpauseArgs | undefined>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { TxHash } from "../../core/brands.js";
|
|
3
|
+
import type { ClaimArgs } from "../manager.js";
|
|
4
|
+
import { type ManagerHookOptions } from "./_shared.js";
|
|
5
|
+
/**
|
|
6
|
+
* Claim the currently-claimable amount on a vesting schedule.
|
|
7
|
+
*
|
|
8
|
+
* **For `FeeType.Gas` managers**, pass `args.value = fee` — use
|
|
9
|
+
* {@link useManagerFeeInfo} to read it. For `FeeType.DistributionToken`,
|
|
10
|
+
* omit `value`.
|
|
11
|
+
*
|
|
12
|
+
* After success, invalidate `useAccessClaimableAmount` (the encrypted view) and
|
|
13
|
+
* any UI counts you computed off it.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const claim = useVestingClaim({ address: managerAddress });
|
|
17
|
+
* claim.mutate({ vestingId, value: gasFee });
|
|
18
|
+
*/
|
|
19
|
+
export declare function useVestingClaim(options: ManagerHookOptions): UseMutationResult<TxHash, Error, ClaimArgs>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type UseQueryResult } from "@tanstack/react-query";
|
|
2
|
+
import type { Hex } from "viem";
|
|
3
|
+
import { type VestingInfo } from "../types.js";
|
|
4
|
+
import { type ManagerHookOptions } from "./_shared.js";
|
|
5
|
+
export interface UseVestingInfoArgs extends ManagerHookOptions {
|
|
6
|
+
vestingId?: Hex;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Read the plaintext snapshot of a vesting schedule — recipient, timestamps,
|
|
10
|
+
* unlock bps, revocability flag. **Amounts are encrypted and NOT in this
|
|
11
|
+
* payload** — use {@link useGetTotalAllocation} / {@link useGetVestedAmount}
|
|
12
|
+
* for encrypted-amount handles.
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* **Read-after-write race on load-balanced RPCs.** Calling this hook
|
|
16
|
+
* *immediately* after a write tx's receipt confirms (e.g. `createVesting`,
|
|
17
|
+
* `initiateVestingTransfer`) can return stale zero values on providers that
|
|
18
|
+
* fan out across read-replicas (Alchemy, Infura, public-RPC pools): the write
|
|
19
|
+
* has confirmed on one node but the replica serving this read hasn't caught
|
|
20
|
+
* up. For post-mutation state, prefer parsing the relevant event from the
|
|
21
|
+
* write's receipt (`VestingCreated`, `VestingTransferInitiated`, etc.) and
|
|
22
|
+
* invalidating the query on the *next* render — the replica lag is usually
|
|
23
|
+
* < 1 block by then.
|
|
24
|
+
*/
|
|
25
|
+
export declare function useVestingInfo(args: UseVestingInfoArgs): UseQueryResult<VestingInfo, Error>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { Account, Address, Hex } from "viem";
|
|
3
|
+
import type { EncryptedInput } from "../types.js";
|
|
4
|
+
import type { Encryptor } from "../encryption.js";
|
|
5
|
+
import { type ManagerHookOptions } from "./_shared.js";
|
|
6
|
+
export interface UseWithdrawAdminArgs {
|
|
7
|
+
amount: bigint;
|
|
8
|
+
encryptor?: Encryptor;
|
|
9
|
+
encryptedInput?: EncryptedInput;
|
|
10
|
+
account?: Account | Address;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Admin: withdraw an encrypted amount of the manager's distribution token to
|
|
14
|
+
* `msg.sender`. Caller must hold `WITHDRAWER_ROLE`. The SDK encrypts `amount`
|
|
15
|
+
* (or pass `encryptedInput` to bypass).
|
|
16
|
+
*/
|
|
17
|
+
export declare function useWithdrawAdmin(options: ManagerHookOptions): UseMutationResult<Hex, Error, UseWithdrawAdminArgs>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { Account, Address, Hex } from "viem";
|
|
3
|
+
import { type ManagerHookOptions } from "./_shared.js";
|
|
4
|
+
export interface UseWithdrawGasFeeArgs {
|
|
5
|
+
to: Address;
|
|
6
|
+
amount: bigint;
|
|
7
|
+
account?: Account | Address;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Fee collector: withdraw collected gas-fee ETH (`FeeType.Gas` managers).
|
|
11
|
+
* Caller must hold `FEE_COLLECTOR_ROLE`.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useWithdrawGasFee(options: ManagerHookOptions): UseMutationResult<Hex, Error, UseWithdrawGasFeeArgs>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { Account, Address, Hex } from "viem";
|
|
3
|
+
import { type ManagerHookOptions } from "./_shared.js";
|
|
4
|
+
export interface UseWithdrawOtherConfidentialTokenArgs {
|
|
5
|
+
token: Address;
|
|
6
|
+
to: Address;
|
|
7
|
+
account?: Account | Address;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Admin: rescue an ERC-7984 (confidential) token other than this manager's
|
|
11
|
+
* configured token. Caller must hold `WITHDRAWER_ROLE`.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useWithdrawOtherConfidentialToken(options: ManagerHookOptions): UseMutationResult<Hex, Error, UseWithdrawOtherConfidentialTokenArgs>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { Account, Address, Hex } from "viem";
|
|
3
|
+
import { type ManagerHookOptions } from "./_shared.js";
|
|
4
|
+
export interface UseWithdrawOtherTokenArgs {
|
|
5
|
+
token: Address;
|
|
6
|
+
to: Address;
|
|
7
|
+
account?: Account | Address;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Admin: rescue an ERC-20 (non-confidential) other than this manager's
|
|
11
|
+
* configured token. Caller must hold `WITHDRAWER_ROLE`.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useWithdrawOtherToken(options: ManagerHookOptions): UseMutationResult<Hex, Error, UseWithdrawOtherTokenArgs>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { Account, Address, Hex } from "viem";
|
|
3
|
+
import type { EncryptedInput } from "../types.js";
|
|
4
|
+
import type { Encryptor } from "../encryption.js";
|
|
5
|
+
import { type ManagerHookOptions } from "./_shared.js";
|
|
6
|
+
export interface UseWithdrawTokenFeeArgs {
|
|
7
|
+
to: Address;
|
|
8
|
+
amount: bigint;
|
|
9
|
+
encryptor?: Encryptor;
|
|
10
|
+
encryptedInput?: EncryptedInput;
|
|
11
|
+
account?: Account | Address;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Fee collector: withdraw collected distribution-token fees
|
|
15
|
+
* (`FeeType.DistributionToken` managers). SDK encrypts `amount` (or pass
|
|
16
|
+
* `encryptedInput`). Caller must hold `FEE_COLLECTOR_ROLE`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useWithdrawTokenFee(options: ManagerHookOptions): UseMutationResult<Hex, Error, UseWithdrawTokenFeeArgs>;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { Address } from "viem";
|
|
2
|
+
export type { EncryptedInput, EncryptedInputs, EncryptedViewResult } from "../fhe/types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Plaintext mirror of `IConfidentialVestingManagerTypes.VestingParams`. Field
|
|
5
|
+
* names and order match the contract struct so viem can encode it as a tuple.
|
|
6
|
+
*/
|
|
7
|
+
export interface VestingParams {
|
|
8
|
+
recipient: Address;
|
|
9
|
+
startTimestamp: number;
|
|
10
|
+
endTimestamp: number;
|
|
11
|
+
cliffSeconds: number;
|
|
12
|
+
releaseIntervalSecs: number;
|
|
13
|
+
timelockSeconds: number;
|
|
14
|
+
initialUnlockBps: number;
|
|
15
|
+
cliffAmountBps: number;
|
|
16
|
+
isRevocable: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** Read-only snapshot returned by `getVestingInfo`. */
|
|
19
|
+
export interface VestingInfo {
|
|
20
|
+
recipient: Address;
|
|
21
|
+
startTimestamp: number;
|
|
22
|
+
endTimestamp: number;
|
|
23
|
+
revokeTimestamp: number;
|
|
24
|
+
cliffReleaseTimestamp: number;
|
|
25
|
+
releaseIntervalSecs: number;
|
|
26
|
+
timelock: number;
|
|
27
|
+
initialUnlockBps: number;
|
|
28
|
+
cliffAmountBps: number;
|
|
29
|
+
isRevocable: boolean;
|
|
30
|
+
}
|
|
31
|
+
/** Factory fee model. */
|
|
32
|
+
export declare enum FeeType {
|
|
33
|
+
Gas = 0,
|
|
34
|
+
DistributionToken = 1
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Stringify a {@link FeeType} for human-readable / JSON-output contexts.
|
|
38
|
+
*
|
|
39
|
+
* `FeeType` is a numeric enum so it serialises to `0` / `1` in JSON payloads,
|
|
40
|
+
* which is ergonomic on the wire but confusing in SIEM/Slack/Datadog scrapes
|
|
41
|
+
* of a CI script's `summary.json`. This helper returns `"Gas"` /
|
|
42
|
+
* `"DistributionToken"` for inclusion in human-readable envelopes without
|
|
43
|
+
* forcing the consumer to write `FeeType[value]` reverse-lookup boilerplate
|
|
44
|
+
* (which is also less type-safe — the reverse lookup returns
|
|
45
|
+
* `string | undefined`).
|
|
46
|
+
*
|
|
47
|
+
* R22 devops-integrator MINOR-2; R25 close.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* const { feeType, fee } = await manager.getFeeInfo();
|
|
51
|
+
* const summary = { fee: fee.toString(), feeType, feeTypeName: feeTypeName(feeType) };
|
|
52
|
+
* // summary.feeType === 0, summary.feeTypeName === "Gas"
|
|
53
|
+
*/
|
|
54
|
+
export declare function feeTypeName(feeType: FeeType): "Gas" | "DistributionToken";
|
|
55
|
+
/** Selector for `discloseToParty` / `adminDiscloseToParty`. */
|
|
56
|
+
export declare enum DisclosureType {
|
|
57
|
+
TotalAllocation = 0,
|
|
58
|
+
SettledAmount = 1,
|
|
59
|
+
VestedAmount = 2,
|
|
60
|
+
ClaimableAmount = 3
|
|
61
|
+
}
|
|
62
|
+
export interface CustomFee {
|
|
63
|
+
enabled: boolean;
|
|
64
|
+
preferredFeeType: FeeType;
|
|
65
|
+
gasFee: bigint;
|
|
66
|
+
tokenFee: bigint;
|
|
67
|
+
}
|
|
68
|
+
export interface PendingTransfer {
|
|
69
|
+
newRecipient: Address;
|
|
70
|
+
initiatedAt: number;
|
|
71
|
+
expiresAt: number;
|
|
72
|
+
}
|