@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,749 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkVDXVNZCO_cjs = require('./chunk-VDXVNZCO.cjs');
|
|
4
|
+
var chunkOLDGMKW2_cjs = require('./chunk-OLDGMKW2.cjs');
|
|
5
|
+
var chunkCQIPRNS7_cjs = require('./chunk-CQIPRNS7.cjs');
|
|
6
|
+
var chunkVJKZWYYJ_cjs = require('./chunk-VJKZWYYJ.cjs');
|
|
7
|
+
var chunk66IHPTOK_cjs = require('./chunk-66IHPTOK.cjs');
|
|
8
|
+
var chunk56UI7LUR_cjs = require('./chunk-56UI7LUR.cjs');
|
|
9
|
+
var viem = require('viem');
|
|
10
|
+
|
|
11
|
+
// src/fhe-vesting/abis/factory.ts
|
|
12
|
+
var confidentialVestingFactoryAbi = [
|
|
13
|
+
{
|
|
14
|
+
inputs: [
|
|
15
|
+
{ internalType: "address", name: "_implementation", type: "address" },
|
|
16
|
+
{ internalType: "address", name: "admin", type: "address" },
|
|
17
|
+
{ internalType: "address", name: "initialFeeCollector", type: "address" },
|
|
18
|
+
{ internalType: "uint256", name: "initialDefaultGasFee", type: "uint256" },
|
|
19
|
+
{ internalType: "uint256", name: "initialDefaultTokenFee", type: "uint256" },
|
|
20
|
+
{
|
|
21
|
+
internalType: "enum IConfidentialVestingFactory.FeeType",
|
|
22
|
+
name: "initialDefaultFeeType",
|
|
23
|
+
type: "uint8"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
stateMutability: "nonpayable",
|
|
27
|
+
type: "constructor"
|
|
28
|
+
},
|
|
29
|
+
{ inputs: [], name: "AccessControlBadConfirmation", type: "error" },
|
|
30
|
+
{
|
|
31
|
+
inputs: [
|
|
32
|
+
{ internalType: "address", name: "account", type: "address" },
|
|
33
|
+
{ internalType: "bytes32", name: "neededRole", type: "bytes32" }
|
|
34
|
+
],
|
|
35
|
+
name: "AccessControlUnauthorizedAccount",
|
|
36
|
+
type: "error"
|
|
37
|
+
},
|
|
38
|
+
{ inputs: [], name: "InvalidAdmin", type: "error" },
|
|
39
|
+
{ inputs: [], name: "InvalidFeeBps", type: "error" },
|
|
40
|
+
{ inputs: [], name: "InvalidFeeCollector", type: "error" },
|
|
41
|
+
{ inputs: [], name: "InvalidFeeType", type: "error" },
|
|
42
|
+
{ inputs: [], name: "InvalidImplementation", type: "error" },
|
|
43
|
+
{ inputs: [], name: "InvalidToken", type: "error" },
|
|
44
|
+
{ inputs: [], name: "ZamaProtocolUnsupported", type: "error" },
|
|
45
|
+
{
|
|
46
|
+
anonymous: false,
|
|
47
|
+
inputs: [{ indexed: true, internalType: "address", name: "creator", type: "address" }],
|
|
48
|
+
name: "CustomFeeDisabled",
|
|
49
|
+
type: "event"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
anonymous: false,
|
|
53
|
+
inputs: [
|
|
54
|
+
{ indexed: true, internalType: "address", name: "creator", type: "address" },
|
|
55
|
+
{
|
|
56
|
+
indexed: false,
|
|
57
|
+
internalType: "enum IConfidentialVestingFactory.FeeType",
|
|
58
|
+
name: "feeType",
|
|
59
|
+
type: "uint8"
|
|
60
|
+
},
|
|
61
|
+
{ indexed: false, internalType: "uint256", name: "gasFee", type: "uint256" },
|
|
62
|
+
{ indexed: false, internalType: "uint256", name: "tokenFee", type: "uint256" }
|
|
63
|
+
],
|
|
64
|
+
name: "CustomFeeSet",
|
|
65
|
+
type: "event"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
anonymous: false,
|
|
69
|
+
inputs: [
|
|
70
|
+
{
|
|
71
|
+
indexed: false,
|
|
72
|
+
internalType: "enum IConfidentialVestingFactory.FeeType",
|
|
73
|
+
name: "oldType",
|
|
74
|
+
type: "uint8"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
indexed: false,
|
|
78
|
+
internalType: "enum IConfidentialVestingFactory.FeeType",
|
|
79
|
+
name: "newType",
|
|
80
|
+
type: "uint8"
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
name: "DefaultFeeTypeChanged",
|
|
84
|
+
type: "event"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
anonymous: false,
|
|
88
|
+
inputs: [
|
|
89
|
+
{ indexed: false, internalType: "uint256", name: "oldFee", type: "uint256" },
|
|
90
|
+
{ indexed: false, internalType: "uint256", name: "newFee", type: "uint256" }
|
|
91
|
+
],
|
|
92
|
+
name: "DefaultGasFeeUpdated",
|
|
93
|
+
type: "event"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
anonymous: false,
|
|
97
|
+
inputs: [
|
|
98
|
+
{ indexed: false, internalType: "uint256", name: "oldFee", type: "uint256" },
|
|
99
|
+
{ indexed: false, internalType: "uint256", name: "newFee", type: "uint256" }
|
|
100
|
+
],
|
|
101
|
+
name: "DefaultTokenFeeUpdated",
|
|
102
|
+
type: "event"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
anonymous: false,
|
|
106
|
+
inputs: [
|
|
107
|
+
{ indexed: true, internalType: "address", name: "oldCollector", type: "address" },
|
|
108
|
+
{ indexed: true, internalType: "address", name: "newCollector", type: "address" }
|
|
109
|
+
],
|
|
110
|
+
name: "FeeCollectorUpdated",
|
|
111
|
+
type: "event"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
anonymous: false,
|
|
115
|
+
inputs: [
|
|
116
|
+
{ indexed: true, internalType: "address", name: "manager", type: "address" },
|
|
117
|
+
{ indexed: true, internalType: "address", name: "creator", type: "address" },
|
|
118
|
+
{ indexed: true, internalType: "address", name: "token", type: "address" },
|
|
119
|
+
{
|
|
120
|
+
indexed: false,
|
|
121
|
+
internalType: "enum IConfidentialVestingFactory.FeeType",
|
|
122
|
+
name: "feeType",
|
|
123
|
+
type: "uint8"
|
|
124
|
+
},
|
|
125
|
+
{ indexed: false, internalType: "uint256", name: "fee", type: "uint256" },
|
|
126
|
+
{ indexed: false, internalType: "bytes32", name: "salt", type: "bytes32" }
|
|
127
|
+
],
|
|
128
|
+
name: "ManagerCreated",
|
|
129
|
+
type: "event"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
anonymous: false,
|
|
133
|
+
inputs: [
|
|
134
|
+
{ indexed: true, internalType: "bytes32", name: "role", type: "bytes32" },
|
|
135
|
+
{ indexed: true, internalType: "bytes32", name: "previousAdminRole", type: "bytes32" },
|
|
136
|
+
{ indexed: true, internalType: "bytes32", name: "newAdminRole", type: "bytes32" }
|
|
137
|
+
],
|
|
138
|
+
name: "RoleAdminChanged",
|
|
139
|
+
type: "event"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
anonymous: false,
|
|
143
|
+
inputs: [
|
|
144
|
+
{ indexed: true, internalType: "bytes32", name: "role", type: "bytes32" },
|
|
145
|
+
{ indexed: true, internalType: "address", name: "account", type: "address" },
|
|
146
|
+
{ indexed: true, internalType: "address", name: "sender", type: "address" }
|
|
147
|
+
],
|
|
148
|
+
name: "RoleGranted",
|
|
149
|
+
type: "event"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
anonymous: false,
|
|
153
|
+
inputs: [
|
|
154
|
+
{ indexed: true, internalType: "bytes32", name: "role", type: "bytes32" },
|
|
155
|
+
{ indexed: true, internalType: "address", name: "account", type: "address" },
|
|
156
|
+
{ indexed: true, internalType: "address", name: "sender", type: "address" }
|
|
157
|
+
],
|
|
158
|
+
name: "RoleRevoked",
|
|
159
|
+
type: "event"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
inputs: [],
|
|
163
|
+
name: "DEFAULT_ADMIN_ROLE",
|
|
164
|
+
outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
|
|
165
|
+
stateMutability: "view",
|
|
166
|
+
type: "function"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
inputs: [],
|
|
170
|
+
name: "FEE_MANAGER_ROLE",
|
|
171
|
+
outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
|
|
172
|
+
stateMutability: "view",
|
|
173
|
+
type: "function"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
inputs: [
|
|
177
|
+
{ internalType: "address", name: "token", type: "address" },
|
|
178
|
+
{ internalType: "bytes32", name: "userSalt", type: "bytes32" }
|
|
179
|
+
],
|
|
180
|
+
name: "createManager",
|
|
181
|
+
outputs: [{ internalType: "address", name: "manager", type: "address" }],
|
|
182
|
+
stateMutability: "nonpayable",
|
|
183
|
+
type: "function"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
inputs: [
|
|
187
|
+
{ internalType: "address", name: "token", type: "address" },
|
|
188
|
+
{ internalType: "bytes32", name: "userSalt", type: "bytes32" },
|
|
189
|
+
{ internalType: "bool", name: "splitEnabled", type: "bool" },
|
|
190
|
+
{ internalType: "bool", name: "pausableEnabled", type: "bool" }
|
|
191
|
+
],
|
|
192
|
+
name: "createManagerWithOptions",
|
|
193
|
+
outputs: [{ internalType: "address", name: "manager", type: "address" }],
|
|
194
|
+
stateMutability: "nonpayable",
|
|
195
|
+
type: "function"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
inputs: [],
|
|
199
|
+
name: "defaultFeeType",
|
|
200
|
+
outputs: [
|
|
201
|
+
{ internalType: "enum IConfidentialVestingFactory.FeeType", name: "", type: "uint8" }
|
|
202
|
+
],
|
|
203
|
+
stateMutability: "view",
|
|
204
|
+
type: "function"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
inputs: [],
|
|
208
|
+
name: "defaultGasFee",
|
|
209
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
210
|
+
stateMutability: "view",
|
|
211
|
+
type: "function"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
inputs: [],
|
|
215
|
+
name: "defaultTokenFee",
|
|
216
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
217
|
+
stateMutability: "view",
|
|
218
|
+
type: "function"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
inputs: [{ internalType: "address", name: "creator", type: "address" }],
|
|
222
|
+
name: "disableCustomFee",
|
|
223
|
+
outputs: [],
|
|
224
|
+
stateMutability: "nonpayable",
|
|
225
|
+
type: "function"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
inputs: [],
|
|
229
|
+
name: "feeCollector",
|
|
230
|
+
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
231
|
+
stateMutability: "view",
|
|
232
|
+
type: "function"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
inputs: [{ internalType: "address", name: "creator", type: "address" }],
|
|
236
|
+
name: "getCustomFee",
|
|
237
|
+
outputs: [
|
|
238
|
+
{
|
|
239
|
+
components: [
|
|
240
|
+
{ internalType: "bool", name: "enabled", type: "bool" },
|
|
241
|
+
{
|
|
242
|
+
internalType: "enum IConfidentialVestingFactory.FeeType",
|
|
243
|
+
name: "preferredFeeType",
|
|
244
|
+
type: "uint8"
|
|
245
|
+
},
|
|
246
|
+
{ internalType: "uint256", name: "gasFee", type: "uint256" },
|
|
247
|
+
{ internalType: "uint256", name: "tokenFee", type: "uint256" }
|
|
248
|
+
],
|
|
249
|
+
internalType: "struct IConfidentialVestingFactory.CustomFee",
|
|
250
|
+
name: "",
|
|
251
|
+
type: "tuple"
|
|
252
|
+
}
|
|
253
|
+
],
|
|
254
|
+
stateMutability: "view",
|
|
255
|
+
type: "function"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
inputs: [
|
|
259
|
+
{ internalType: "address", name: "token", type: "address" },
|
|
260
|
+
{ internalType: "address", name: "deployer", type: "address" }
|
|
261
|
+
],
|
|
262
|
+
name: "getInitCodeHash",
|
|
263
|
+
outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
|
|
264
|
+
stateMutability: "view",
|
|
265
|
+
type: "function"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
inputs: [
|
|
269
|
+
{ internalType: "address", name: "token", type: "address" },
|
|
270
|
+
{ internalType: "address", name: "deployer", type: "address" },
|
|
271
|
+
{ internalType: "bool", name: "splitEnabled", type: "bool" },
|
|
272
|
+
{ internalType: "bool", name: "pausableEnabled", type: "bool" }
|
|
273
|
+
],
|
|
274
|
+
name: "getInitCodeHashWithOptions",
|
|
275
|
+
outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
|
|
276
|
+
stateMutability: "view",
|
|
277
|
+
type: "function"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
inputs: [{ internalType: "bytes32", name: "role", type: "bytes32" }],
|
|
281
|
+
name: "getRoleAdmin",
|
|
282
|
+
outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
|
|
283
|
+
stateMutability: "view",
|
|
284
|
+
type: "function"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
inputs: [
|
|
288
|
+
{ internalType: "bytes32", name: "role", type: "bytes32" },
|
|
289
|
+
{ internalType: "address", name: "account", type: "address" }
|
|
290
|
+
],
|
|
291
|
+
name: "grantRole",
|
|
292
|
+
outputs: [],
|
|
293
|
+
stateMutability: "nonpayable",
|
|
294
|
+
type: "function"
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
inputs: [
|
|
298
|
+
{ internalType: "bytes32", name: "role", type: "bytes32" },
|
|
299
|
+
{ internalType: "address", name: "account", type: "address" }
|
|
300
|
+
],
|
|
301
|
+
name: "hasRole",
|
|
302
|
+
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
|
303
|
+
stateMutability: "view",
|
|
304
|
+
type: "function"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
inputs: [],
|
|
308
|
+
name: "implementation",
|
|
309
|
+
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
310
|
+
stateMutability: "view",
|
|
311
|
+
type: "function"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
inputs: [
|
|
315
|
+
{ internalType: "address", name: "token", type: "address" },
|
|
316
|
+
{ internalType: "bytes32", name: "userSalt", type: "bytes32" },
|
|
317
|
+
{ internalType: "address", name: "deployer", type: "address" }
|
|
318
|
+
],
|
|
319
|
+
name: "predictManagerAddress",
|
|
320
|
+
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
321
|
+
stateMutability: "view",
|
|
322
|
+
type: "function"
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
inputs: [
|
|
326
|
+
{ internalType: "address", name: "token", type: "address" },
|
|
327
|
+
{ internalType: "bytes32", name: "userSalt", type: "bytes32" },
|
|
328
|
+
{ internalType: "address", name: "deployer", type: "address" },
|
|
329
|
+
{ internalType: "bool", name: "splitEnabled", type: "bool" },
|
|
330
|
+
{ internalType: "bool", name: "pausableEnabled", type: "bool" }
|
|
331
|
+
],
|
|
332
|
+
name: "predictManagerAddressWithOptions",
|
|
333
|
+
outputs: [{ internalType: "address", name: "", type: "address" }],
|
|
334
|
+
stateMutability: "view",
|
|
335
|
+
type: "function"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
inputs: [
|
|
339
|
+
{ internalType: "bytes32", name: "role", type: "bytes32" },
|
|
340
|
+
{ internalType: "address", name: "callerConfirmation", type: "address" }
|
|
341
|
+
],
|
|
342
|
+
name: "renounceRole",
|
|
343
|
+
outputs: [],
|
|
344
|
+
stateMutability: "nonpayable",
|
|
345
|
+
type: "function"
|
|
346
|
+
},
|
|
347
|
+
{ inputs: [], name: "resetGasFee", outputs: [], stateMutability: "nonpayable", type: "function" },
|
|
348
|
+
{
|
|
349
|
+
inputs: [],
|
|
350
|
+
name: "resetTokenFee",
|
|
351
|
+
outputs: [],
|
|
352
|
+
stateMutability: "nonpayable",
|
|
353
|
+
type: "function"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
inputs: [
|
|
357
|
+
{ internalType: "bytes32", name: "role", type: "bytes32" },
|
|
358
|
+
{ internalType: "address", name: "account", type: "address" }
|
|
359
|
+
],
|
|
360
|
+
name: "revokeRole",
|
|
361
|
+
outputs: [],
|
|
362
|
+
stateMutability: "nonpayable",
|
|
363
|
+
type: "function"
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
inputs: [
|
|
367
|
+
{ internalType: "address", name: "creator", type: "address" },
|
|
368
|
+
{ internalType: "enum IConfidentialVestingFactory.FeeType", name: "feeType", type: "uint8" },
|
|
369
|
+
{ internalType: "uint256", name: "gasFee", type: "uint256" },
|
|
370
|
+
{ internalType: "uint256", name: "tokenFee", type: "uint256" }
|
|
371
|
+
],
|
|
372
|
+
name: "setCustomFee",
|
|
373
|
+
outputs: [],
|
|
374
|
+
stateMutability: "nonpayable",
|
|
375
|
+
type: "function"
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
inputs: [
|
|
379
|
+
{ internalType: "enum IConfidentialVestingFactory.FeeType", name: "feeType", type: "uint8" }
|
|
380
|
+
],
|
|
381
|
+
name: "setDefaultFeeType",
|
|
382
|
+
outputs: [],
|
|
383
|
+
stateMutability: "nonpayable",
|
|
384
|
+
type: "function"
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
inputs: [{ internalType: "uint256", name: "fee", type: "uint256" }],
|
|
388
|
+
name: "setDefaultGasFee",
|
|
389
|
+
outputs: [],
|
|
390
|
+
stateMutability: "nonpayable",
|
|
391
|
+
type: "function"
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
inputs: [{ internalType: "uint256", name: "fee", type: "uint256" }],
|
|
395
|
+
name: "setDefaultTokenFee",
|
|
396
|
+
outputs: [],
|
|
397
|
+
stateMutability: "nonpayable",
|
|
398
|
+
type: "function"
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
inputs: [{ internalType: "address", name: "newCollector", type: "address" }],
|
|
402
|
+
name: "setFeeCollector",
|
|
403
|
+
outputs: [],
|
|
404
|
+
stateMutability: "nonpayable",
|
|
405
|
+
type: "function"
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
inputs: [{ internalType: "bytes4", name: "interfaceId", type: "bytes4" }],
|
|
409
|
+
name: "supportsInterface",
|
|
410
|
+
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
|
411
|
+
stateMutability: "view",
|
|
412
|
+
type: "function"
|
|
413
|
+
}
|
|
414
|
+
];
|
|
415
|
+
|
|
416
|
+
// src/fhe-vesting/types.ts
|
|
417
|
+
var FeeType = /* @__PURE__ */ ((FeeType2) => {
|
|
418
|
+
FeeType2[FeeType2["Gas"] = 0] = "Gas";
|
|
419
|
+
FeeType2[FeeType2["DistributionToken"] = 1] = "DistributionToken";
|
|
420
|
+
return FeeType2;
|
|
421
|
+
})(FeeType || {});
|
|
422
|
+
function feeTypeName(feeType) {
|
|
423
|
+
switch (feeType) {
|
|
424
|
+
case 0 /* Gas */:
|
|
425
|
+
return "Gas";
|
|
426
|
+
case 1 /* DistributionToken */:
|
|
427
|
+
return "DistributionToken";
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
var DisclosureType = /* @__PURE__ */ ((DisclosureType2) => {
|
|
431
|
+
DisclosureType2[DisclosureType2["TotalAllocation"] = 0] = "TotalAllocation";
|
|
432
|
+
DisclosureType2[DisclosureType2["SettledAmount"] = 1] = "SettledAmount";
|
|
433
|
+
DisclosureType2[DisclosureType2["VestedAmount"] = 2] = "VestedAmount";
|
|
434
|
+
DisclosureType2[DisclosureType2["ClaimableAmount"] = 3] = "ClaimableAmount";
|
|
435
|
+
return DisclosureType2;
|
|
436
|
+
})(DisclosureType || {});
|
|
437
|
+
var vestingFactoryProductMapper = () => void 0;
|
|
438
|
+
var ConfidentialVestingFactoryClient = class {
|
|
439
|
+
publicClient;
|
|
440
|
+
walletClient;
|
|
441
|
+
address;
|
|
442
|
+
#telemetry;
|
|
443
|
+
constructor(config) {
|
|
444
|
+
this.publicClient = config.publicClient;
|
|
445
|
+
this.walletClient = config.walletClient;
|
|
446
|
+
const chainId = config.chainId ?? config.publicClient.chain?.id;
|
|
447
|
+
const addressOverride = config.address ? chunkCQIPRNS7_cjs.normaliseAddress(config.address) : void 0;
|
|
448
|
+
const resolved = addressOverride ?? (chainId === void 0 ? void 0 : chunkOLDGMKW2_cjs.getFheVestingFactoryAddress(chainId));
|
|
449
|
+
if (!resolved) {
|
|
450
|
+
throw new chunk56UI7LUR_cjs.DeploymentAddressUnavailableError({
|
|
451
|
+
reason: chainId === void 0 ? "chain-id-missing" : "registry-not-deployed",
|
|
452
|
+
product: "fheVesting",
|
|
453
|
+
contract: "confidentialVestingFactory",
|
|
454
|
+
chainId,
|
|
455
|
+
clientLabel: "ConfidentialVestingFactoryClient"
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
this.address = resolved;
|
|
459
|
+
this.#telemetry = config.telemetry;
|
|
460
|
+
this.#telemetry?.event("fhe-vesting.client.init", {
|
|
461
|
+
surface: "factory",
|
|
462
|
+
chainId: chainId ?? null,
|
|
463
|
+
hasWallet: !!this.walletClient,
|
|
464
|
+
aclResolved: true,
|
|
465
|
+
// factory has no ACL dependency; constant for funnel-shape parity with manager.
|
|
466
|
+
sdkVersion: chunkVDXVNZCO_cjs.SDK_VERSION
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
// ----------------------- writes -----------------------
|
|
470
|
+
/**
|
|
471
|
+
* Deploy a new `ConfidentialVestingManager` clone via the factory and return
|
|
472
|
+
* its address, parsed from the `ManagerCreated` event in the tx receipt.
|
|
473
|
+
*
|
|
474
|
+
* **This is the headline factory entry point.** R02 ADR P-1 collapses the
|
|
475
|
+
* old hash-only + `…AndGetAddress` pair down to one rich-return method —
|
|
476
|
+
* the address is only knowable after the tx mines (the factory packs
|
|
477
|
+
* `block.number` into the clone's immutable args), so a hash-only variant
|
|
478
|
+
* forced consumers to re-derive what the SDK already had to compute.
|
|
479
|
+
*
|
|
480
|
+
* Calls `createManagerWithOptions` when `splitEnabled` or `pausableEnabled`
|
|
481
|
+
* is provided; otherwise calls the simpler `createManager` entry point.
|
|
482
|
+
*
|
|
483
|
+
* Internally: `writeContract` → {@link PublicClient.waitForTransactionReceipt} →
|
|
484
|
+
* `parseEventLogs({ eventName: "ManagerCreated" })`.
|
|
485
|
+
*
|
|
486
|
+
* Pre-mine prediction is exposed only on
|
|
487
|
+
* `ConfidentialVestingFactoryAdvancedClient` from
|
|
488
|
+
* `@tokenops/sdk/fhe-vesting/advanced` — predict at block N, mine at N+1,
|
|
489
|
+
* the addresses differ.
|
|
490
|
+
*
|
|
491
|
+
* @example
|
|
492
|
+
* const { hash, manager } = await factory.createManager({
|
|
493
|
+
* token: "0xYourToken",
|
|
494
|
+
* userSalt: "0x0000000000000000000000000000000000000000000000000000000000000001",
|
|
495
|
+
* });
|
|
496
|
+
*/
|
|
497
|
+
async createManager(args) {
|
|
498
|
+
return chunkVJKZWYYJ_cjs.withTelemetry(this.#telemetry, "fhe-vesting.factory.createManager", async () => {
|
|
499
|
+
const hasOptions = args.splitEnabled !== void 0 || args.pausableEnabled !== void 0;
|
|
500
|
+
const hash = hasOptions ? await this.#write(
|
|
501
|
+
"createManagerWithOptions",
|
|
502
|
+
[args.token, args.userSalt, args.splitEnabled ?? true, args.pausableEnabled ?? true],
|
|
503
|
+
args.account
|
|
504
|
+
) : await this.#write("createManager", [args.token, args.userSalt], args.account);
|
|
505
|
+
return this.#resolveManagerFromReceipt(hash, "createManager");
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
/**
|
|
509
|
+
* Deploy a new manager clone and return its address, parsed from the
|
|
510
|
+
* `ManagerCreated` event in the tx receipt.
|
|
511
|
+
*
|
|
512
|
+
* This is the recommended entry point for the common "deploy a clone and use
|
|
513
|
+
* its address" flow. {@link ConfidentialVestingFactoryClient.predictManagerAddress}
|
|
514
|
+
* is unreliable on a live chain because the factory packs the deployment
|
|
515
|
+
* block number into the clone's immutable args — predict at block N, mine at
|
|
516
|
+
* N+1, and the addresses differ.
|
|
517
|
+
*
|
|
518
|
+
* Internally: {@link ConfidentialVestingFactoryClient.createManager} →
|
|
519
|
+
* {@link PublicClient.waitForTransactionReceipt} →
|
|
520
|
+
* `parseEventLogs({ eventName: "ManagerCreated" })`.
|
|
521
|
+
*
|
|
522
|
+
* @example
|
|
523
|
+
* const { hash, manager } = await factory.createManagerAndGetAddress({
|
|
524
|
+
* token, userSalt,
|
|
525
|
+
* });
|
|
526
|
+
*/
|
|
527
|
+
async createManagerAndGetAddress(args) {
|
|
528
|
+
return this.createManager(args);
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Set the factory-wide default gas fee (in wei). Factory admin only.
|
|
532
|
+
*
|
|
533
|
+
* @param fee Fee in wei charged per `claim` on `FeeType.Gas` managers.
|
|
534
|
+
*/
|
|
535
|
+
async setDefaultGasFee(fee, account) {
|
|
536
|
+
return chunkVJKZWYYJ_cjs.withTelemetry(this.#telemetry, "fhe-vesting.factory.setDefaultGasFee", async () => {
|
|
537
|
+
return this.#write("setDefaultGasFee", [fee], account);
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Set the factory-wide default token fee in basis points. Factory admin only.
|
|
542
|
+
*
|
|
543
|
+
* @param feeBps Basis points (1 bps = 0.01 %). Deducted from the claimed token
|
|
544
|
+
* amount on `FeeType.DistributionToken` managers.
|
|
545
|
+
*/
|
|
546
|
+
async setDefaultTokenFee(feeBps, account) {
|
|
547
|
+
return chunkVJKZWYYJ_cjs.withTelemetry(this.#telemetry, "fhe-vesting.factory.setDefaultTokenFee", async () => {
|
|
548
|
+
return this.#write("setDefaultTokenFee", [feeBps], account);
|
|
549
|
+
});
|
|
550
|
+
}
|
|
551
|
+
/** Set the default fee model (`FeeType.Gas` or `FeeType.DistributionToken`) for new clones. Factory admin only. */
|
|
552
|
+
async setDefaultFeeType(feeType, account) {
|
|
553
|
+
return chunkVJKZWYYJ_cjs.withTelemetry(this.#telemetry, "fhe-vesting.factory.setDefaultFeeType", async () => {
|
|
554
|
+
return this.#write("setDefaultFeeType", [feeType], account);
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
async resetGasFee(account) {
|
|
558
|
+
return chunkVJKZWYYJ_cjs.withTelemetry(this.#telemetry, "fhe-vesting.factory.resetGasFee", async () => {
|
|
559
|
+
return this.#write("resetGasFee", [], account);
|
|
560
|
+
});
|
|
561
|
+
}
|
|
562
|
+
async resetTokenFee(account) {
|
|
563
|
+
return chunkVJKZWYYJ_cjs.withTelemetry(this.#telemetry, "fhe-vesting.factory.resetTokenFee", async () => {
|
|
564
|
+
return this.#write("resetTokenFee", [], account);
|
|
565
|
+
});
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* Set a per-creator fee override. The override takes precedence over the factory
|
|
569
|
+
* defaults for all managers created by `args.creator`.
|
|
570
|
+
*/
|
|
571
|
+
async setCustomFee(args, account) {
|
|
572
|
+
return chunkVJKZWYYJ_cjs.withTelemetry(this.#telemetry, "fhe-vesting.factory.setCustomFee", async () => {
|
|
573
|
+
return this.#write(
|
|
574
|
+
"setCustomFee",
|
|
575
|
+
[args.creator, args.feeType, args.gasFee, args.tokenFee],
|
|
576
|
+
account
|
|
577
|
+
);
|
|
578
|
+
});
|
|
579
|
+
}
|
|
580
|
+
async disableCustomFee(creator, account) {
|
|
581
|
+
return chunkVJKZWYYJ_cjs.withTelemetry(this.#telemetry, "fhe-vesting.factory.disableCustomFee", async () => {
|
|
582
|
+
return this.#write("disableCustomFee", [creator], account);
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
async setFeeCollector(newCollector, account) {
|
|
586
|
+
return chunkVJKZWYYJ_cjs.withTelemetry(this.#telemetry, "fhe-vesting.factory.setFeeCollector", async () => {
|
|
587
|
+
return this.#write("setFeeCollector", [newCollector], account);
|
|
588
|
+
});
|
|
589
|
+
}
|
|
590
|
+
// ----------------------- reads -----------------------
|
|
591
|
+
/** Current LibClone implementation address. */
|
|
592
|
+
async implementation() {
|
|
593
|
+
return this.#read("implementation");
|
|
594
|
+
}
|
|
595
|
+
/**
|
|
596
|
+
* Alias for {@link ConfidentialVestingFactoryClient.implementation} that matches
|
|
597
|
+
* the contract's storage field name (`_managerImplementation`).
|
|
598
|
+
*
|
|
599
|
+
* Renamed for clarity per backend-integrator-r14 friction
|
|
600
|
+
* (`docs/feedback/inbox/2026-05-24-backend-integrator-r14-minor-implementation-vs-manager-implementation-naming.md`):
|
|
601
|
+
* server devs reading the Solidity reach for `factory.managerImplementation()`
|
|
602
|
+
* via autocomplete (the contract storage slot name) and hit a TS2551. The
|
|
603
|
+
* canonical `implementation()` method is retained for backwards-compat and
|
|
604
|
+
* cross-factory uniformity (fhe-airdrop exposes the same shape).
|
|
605
|
+
*/
|
|
606
|
+
async managerImplementation() {
|
|
607
|
+
return this.implementation();
|
|
608
|
+
}
|
|
609
|
+
async defaultGasFee() {
|
|
610
|
+
return this.#read("defaultGasFee");
|
|
611
|
+
}
|
|
612
|
+
async defaultTokenFee() {
|
|
613
|
+
return this.#read("defaultTokenFee");
|
|
614
|
+
}
|
|
615
|
+
async defaultFeeType() {
|
|
616
|
+
const raw = await this.#read("defaultFeeType");
|
|
617
|
+
return raw;
|
|
618
|
+
}
|
|
619
|
+
async feeCollector() {
|
|
620
|
+
return this.#read("feeCollector");
|
|
621
|
+
}
|
|
622
|
+
async getCustomFee(creator) {
|
|
623
|
+
const raw = await this.#read("getCustomFee", [creator]);
|
|
624
|
+
return {
|
|
625
|
+
enabled: raw.enabled,
|
|
626
|
+
preferredFeeType: raw.preferredFeeType,
|
|
627
|
+
gasFee: raw.gasFee,
|
|
628
|
+
tokenFee: raw.tokenFee
|
|
629
|
+
};
|
|
630
|
+
}
|
|
631
|
+
async getInitCodeHash(args) {
|
|
632
|
+
const hasOptions = args.splitEnabled !== void 0 || args.pausableEnabled !== void 0;
|
|
633
|
+
if (hasOptions) {
|
|
634
|
+
return this.#read("getInitCodeHashWithOptions", [
|
|
635
|
+
args.token,
|
|
636
|
+
args.deployer,
|
|
637
|
+
args.splitEnabled ?? true,
|
|
638
|
+
args.pausableEnabled ?? true
|
|
639
|
+
]);
|
|
640
|
+
}
|
|
641
|
+
return this.#read("getInitCodeHash", [args.token, args.deployer]);
|
|
642
|
+
}
|
|
643
|
+
// ----------------------- internals -----------------------
|
|
644
|
+
/**
|
|
645
|
+
* Wait for the receipt of a clone-deploy tx and parse the `ManagerCreated`
|
|
646
|
+
* event to extract the deployed manager address. Branded result; throws
|
|
647
|
+
* `TokenOpsSdkError` if zero or >1 events match this factory address.
|
|
648
|
+
*/
|
|
649
|
+
async #resolveManagerFromReceipt(hash, method) {
|
|
650
|
+
const receipt = await this.publicClient.waitForTransactionReceipt({ hash });
|
|
651
|
+
const events = viem.parseEventLogs({
|
|
652
|
+
abi: confidentialVestingFactoryAbi,
|
|
653
|
+
eventName: "ManagerCreated",
|
|
654
|
+
logs: receipt.logs
|
|
655
|
+
});
|
|
656
|
+
const ours = events.filter((ev) => ev.address.toLowerCase() === this.address.toLowerCase());
|
|
657
|
+
if (ours.length === 0) {
|
|
658
|
+
throw new chunk56UI7LUR_cjs.TokenOpsSdkError(
|
|
659
|
+
`${method}: no ManagerCreated event from factory ${this.address} in tx ${hash}`
|
|
660
|
+
);
|
|
661
|
+
}
|
|
662
|
+
if (ours.length > 1) {
|
|
663
|
+
throw new chunk56UI7LUR_cjs.TokenOpsSdkError(
|
|
664
|
+
`${method}: ${ours.length} ManagerCreated events from factory ${this.address} in tx ${hash}; ambiguous result`
|
|
665
|
+
);
|
|
666
|
+
}
|
|
667
|
+
return { hash: chunk66IHPTOK_cjs.asTxHash(hash), manager: ours[0].args.manager };
|
|
668
|
+
}
|
|
669
|
+
#requireWallet(method) {
|
|
670
|
+
if (!this.walletClient) {
|
|
671
|
+
throw new chunk56UI7LUR_cjs.MissingWalletClientError(method);
|
|
672
|
+
}
|
|
673
|
+
return this.walletClient;
|
|
674
|
+
}
|
|
675
|
+
async #write(functionName, args, account) {
|
|
676
|
+
const wallet = this.#requireWallet(functionName);
|
|
677
|
+
const acct = account ?? wallet.account;
|
|
678
|
+
if (!acct) {
|
|
679
|
+
throw new chunk56UI7LUR_cjs.MissingAccountError(String(functionName));
|
|
680
|
+
}
|
|
681
|
+
await this.#preflightWrite(String(functionName), functionName, args, acct);
|
|
682
|
+
try {
|
|
683
|
+
return await wallet.writeContract({
|
|
684
|
+
address: this.address,
|
|
685
|
+
abi: confidentialVestingFactoryAbi,
|
|
686
|
+
functionName,
|
|
687
|
+
args,
|
|
688
|
+
account: acct,
|
|
689
|
+
chain: wallet.chain
|
|
690
|
+
});
|
|
691
|
+
} catch (err) {
|
|
692
|
+
throw this.#mapRevert(String(functionName), err, accountAddress(acct));
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
#mapRevert(method, err, account) {
|
|
696
|
+
return chunkVDXVNZCO_cjs.mapContractRevert(err, {
|
|
697
|
+
method,
|
|
698
|
+
contractAddress: this.address,
|
|
699
|
+
abi: confidentialVestingFactoryAbi,
|
|
700
|
+
productMapper: vestingFactoryProductMapper,
|
|
701
|
+
account
|
|
702
|
+
});
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* Pre-flight a write via `simulateContract` purely to surface typed reverts.
|
|
706
|
+
* The simulate's *return value* is discarded — only revert metadata matters,
|
|
707
|
+
* since wallet transports drop revert data during gas estimation
|
|
708
|
+
* (CLAUDE.md Pitfall #1).
|
|
709
|
+
*/
|
|
710
|
+
async #preflightWrite(method, functionName, args, account, value) {
|
|
711
|
+
try {
|
|
712
|
+
await this.publicClient.simulateContract({
|
|
713
|
+
address: this.address,
|
|
714
|
+
abi: confidentialVestingFactoryAbi,
|
|
715
|
+
functionName,
|
|
716
|
+
args,
|
|
717
|
+
account,
|
|
718
|
+
...value !== void 0 ? { value } : {}
|
|
719
|
+
});
|
|
720
|
+
} catch (err) {
|
|
721
|
+
if (chunkVDXVNZCO_cjs.isContractRevert(err)) {
|
|
722
|
+
throw this.#mapRevert(method, err, accountAddress(account));
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
async #read(functionName, args = [], blockNumber) {
|
|
727
|
+
const result = await this.publicClient.readContract({
|
|
728
|
+
address: this.address,
|
|
729
|
+
abi: confidentialVestingFactoryAbi,
|
|
730
|
+
functionName,
|
|
731
|
+
args,
|
|
732
|
+
...blockNumber !== void 0 && { blockNumber }
|
|
733
|
+
});
|
|
734
|
+
return result;
|
|
735
|
+
}
|
|
736
|
+
};
|
|
737
|
+
function createConfidentialVestingFactoryClient(config) {
|
|
738
|
+
return new ConfidentialVestingFactoryClient(config);
|
|
739
|
+
}
|
|
740
|
+
function accountAddress(account) {
|
|
741
|
+
return typeof account === "string" ? account : account.address;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
exports.ConfidentialVestingFactoryClient = ConfidentialVestingFactoryClient;
|
|
745
|
+
exports.DisclosureType = DisclosureType;
|
|
746
|
+
exports.FeeType = FeeType;
|
|
747
|
+
exports.confidentialVestingFactoryAbi = confidentialVestingFactoryAbi;
|
|
748
|
+
exports.createConfidentialVestingFactoryClient = createConfidentialVestingFactoryClient;
|
|
749
|
+
exports.feeTypeName = feeTypeName;
|