@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,27 @@
|
|
|
1
|
+
import type { Address } from "viem";
|
|
2
|
+
/**
|
|
3
|
+
* Normalise a hex-string address to its EIP-55 checksum form.
|
|
4
|
+
*
|
|
5
|
+
* Closes nextjs-integrator MAJOR `2026-05-24-nextjs-integrator-isaddress-strict-trap.md`:
|
|
6
|
+
* viem's `isAddress(value, { strict: true })` (the default since v2) rejects
|
|
7
|
+
* any non-checksum input — but consumers routinely paste raw lowercase
|
|
8
|
+
* addresses from etherscan, env files, or wallet UIs. The footgun is silent:
|
|
9
|
+
* `isAddress` returns `false`, the SDK rejects the input, the consumer gets
|
|
10
|
+
* "invalid address" with no hint that EIP-55 checksum is the problem.
|
|
11
|
+
*
|
|
12
|
+
* This helper:
|
|
13
|
+
* 1. Accepts any address shape (lowercase, uppercase, mixed, checksummed).
|
|
14
|
+
* 2. Validates structural correctness via `isAddress(..., { strict: false })`.
|
|
15
|
+
* 3. Normalises to checksum via `getAddress` — the canonical form every
|
|
16
|
+
* downstream contract call expects.
|
|
17
|
+
*
|
|
18
|
+
* Throws {@link TokenOpsValidationError} (not viem's `InvalidAddressError`)
|
|
19
|
+
* so consumers' \`instanceof TokenOpsSdkError\` blocks catch it consistently.
|
|
20
|
+
*
|
|
21
|
+
* ```ts
|
|
22
|
+
* import { normaliseAddress } from "@tokenops/sdk";
|
|
23
|
+
* const recipient = normaliseAddress(req.body.recipient);
|
|
24
|
+
* await factory.createManager({ recipient, ... });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare function normaliseAddress(input: string): Address;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { TokenOpsSdkError } from "./errors.js";
|
|
2
|
+
/**
|
|
3
|
+
* Result of a read-only preflight on a write operation.
|
|
4
|
+
*
|
|
5
|
+
* The SDK exposes opt-in preflight helpers (`preflightClaim`, `preflightDisperse`,
|
|
6
|
+
* etc.) that run the deterministic-from-off-chain checks in parallel — array
|
|
7
|
+
* length / fee balance / claim window / batch limit / role membership — and
|
|
8
|
+
* return whether the write is safe to submit. `blockers` carries the typed
|
|
9
|
+
* errors that *would* have been thrown at write time: same `code`, same
|
|
10
|
+
* `context`, just collected instead of thrown. UIs can render them with the
|
|
11
|
+
* same branching they use in `onError`.
|
|
12
|
+
*
|
|
13
|
+
* Preflight is opt-in. Consumers who have already validated state can skip the
|
|
14
|
+
* preflight and call the write directly.
|
|
15
|
+
*/
|
|
16
|
+
export interface PreflightResult {
|
|
17
|
+
/** `true` when no blockers were detected — green light to submit the write. */
|
|
18
|
+
ready: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Typed errors that would otherwise be thrown at write time. Empty when
|
|
21
|
+
* `ready === true`. Branch on `error.code` to render UI; the same `code`
|
|
22
|
+
* values appear here that the write path would throw.
|
|
23
|
+
*/
|
|
24
|
+
blockers: TokenOpsSdkError[];
|
|
25
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { Abi, Address } from "viem";
|
|
2
|
+
import { TokenOpsSdkError } from "./errors.js";
|
|
3
|
+
/** Per-product mapping: contract error name → typed SDK error constructor. */
|
|
4
|
+
export type RevertNameMapper = (name: string, args: readonly unknown[] | undefined, ctx: RevertMapperContext) => TokenOpsSdkError | undefined;
|
|
5
|
+
/** Context passed into product mappers. `productContext` lets the call site forward args (vestingId, user, etc.) for the mapper to embed in the typed error. */
|
|
6
|
+
export interface RevertMapperContext {
|
|
7
|
+
method: string;
|
|
8
|
+
contractAddress: Address;
|
|
9
|
+
/**
|
|
10
|
+
* Optional bag of arguments from the call site that the product mapper can
|
|
11
|
+
* pick up — e.g. `{ vestingId }` for vesting writes, `{ user }` for disperse
|
|
12
|
+
* writes. The mapper does NOT trust this for security decisions; it's only
|
|
13
|
+
* used to populate UI-facing context fields.
|
|
14
|
+
*/
|
|
15
|
+
productContext?: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
export interface MapContractRevertArgs {
|
|
18
|
+
/** Method label that appears in `error.context.method`. */
|
|
19
|
+
method: string;
|
|
20
|
+
/** Contract whose ABI is used to decode the revert; also surfaced in `context`. */
|
|
21
|
+
contractAddress: Address;
|
|
22
|
+
/** ABI used for `decodeErrorResult`. Pass the product-specific ABI (manager / airdrop / disperse). */
|
|
23
|
+
abi: Abi;
|
|
24
|
+
/**
|
|
25
|
+
* Optional product-specific mapper run BEFORE the cross-product default
|
|
26
|
+
* mapper. Return a typed error to short-circuit, or `undefined` to fall
|
|
27
|
+
* through to {@link defaultRevertNameMapper}.
|
|
28
|
+
*
|
|
29
|
+
* Use this to wire product-specific revert names (e.g. `"VestingNotFound"`
|
|
30
|
+
* → `VestingNotFoundError`).
|
|
31
|
+
*/
|
|
32
|
+
productMapper?: RevertNameMapper;
|
|
33
|
+
/** Forwarded into `RevertMapperContext.productContext` for product mappers. */
|
|
34
|
+
productContext?: Record<string, unknown>;
|
|
35
|
+
/** Wallet account, surfaced into `AccessDeniedError.context.account` when present. */
|
|
36
|
+
account?: Address;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Translate any error thrown by a `writeContract` / `readContract` / `simulateContract`
|
|
40
|
+
* call into a {@link TokenOpsSdkError}. Always succeeds — falls back to
|
|
41
|
+
* {@link ContractRevertError} when no typed mapping applies.
|
|
42
|
+
*
|
|
43
|
+
* The mapper walks the viem `BaseError` chain to find a
|
|
44
|
+
* {@link ContractFunctionRevertedError}, decodes the revert data against the
|
|
45
|
+
* supplied ABI, and runs the per-product mapper before the default
|
|
46
|
+
* cross-product mapper ({@link defaultRevertNameMapper}). Errors that already
|
|
47
|
+
* brand as `TokenOpsSdkError` pass through unchanged so SDK-thrown errors
|
|
48
|
+
* (`InvalidArgumentError`, `MissingEncryptorError`, etc.) aren't re-wrapped.
|
|
49
|
+
*/
|
|
50
|
+
export declare function mapContractRevert(error: unknown, args: MapContractRevertArgs): TokenOpsSdkError;
|
|
51
|
+
/**
|
|
52
|
+
* Convenience wrapper: run a write builder and translate any thrown error
|
|
53
|
+
* through {@link mapContractRevert}.
|
|
54
|
+
*/
|
|
55
|
+
export declare function withMappedRevert<T>(args: MapContractRevertArgs, builder: () => Promise<T>): Promise<T>;
|
|
56
|
+
/**
|
|
57
|
+
* Cross-product mapping for revert names that mean the same thing everywhere.
|
|
58
|
+
* Product-specific revert names should be handled by a `productMapper` passed
|
|
59
|
+
* to {@link mapContractRevert} and only fall through to this when not matched.
|
|
60
|
+
*/
|
|
61
|
+
export declare function defaultRevertNameMapper(name: string, errArgs: readonly unknown[] | undefined, ctx: RevertMapperContext, account?: Address): TokenOpsSdkError | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* Heuristic: does an error from `simulateContract` / `writeContract` represent
|
|
64
|
+
* an on-chain contract revert (vs. a transport, decoder, or stub-mock
|
|
65
|
+
* failure)?
|
|
66
|
+
*
|
|
67
|
+
* Used by per-product `#preflightWrite` helpers to decide whether to surface
|
|
68
|
+
* the simulate failure through the typed mapper or swallow it and let the
|
|
69
|
+
* subsequent `writeContract` call report the issue with full fidelity. The
|
|
70
|
+
* preflight exists exclusively to recover revert metadata that wallet
|
|
71
|
+
* transports drop during gas estimation — anything that isn't a revert isn't
|
|
72
|
+
* the preflight's signal to report.
|
|
73
|
+
*/
|
|
74
|
+
export declare function isContractRevert(error: unknown): boolean;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tag values accepted by {@link SdkTelemetry.scope}. Mirrors `Record<string, unknown>`
|
|
3
|
+
* but pinned to the primitives a structured logger can serialise without surprise.
|
|
4
|
+
*
|
|
5
|
+
* `string | number | boolean` only — no nested objects, no `Date`, no arrays.
|
|
6
|
+
* Adapters that need richer tags can widen at the consumer boundary.
|
|
7
|
+
*/
|
|
8
|
+
export type SdkTelemetryTags = Record<string, string | number | boolean>;
|
|
9
|
+
export interface SdkTelemetry {
|
|
10
|
+
/** Fire-and-forget event. Implementations must not throw. */
|
|
11
|
+
event(name: string, props?: Record<string, unknown>): void;
|
|
12
|
+
/** Wrap an async operation; implementations decide what to time/log. */
|
|
13
|
+
span<T>(name: string, fn: () => Promise<T>): Promise<T>;
|
|
14
|
+
/** Report an error. Implementations must not re-throw. */
|
|
15
|
+
error(err: Error, context?: Record<string, unknown>): void;
|
|
16
|
+
/**
|
|
17
|
+
* Return a child telemetry that automatically prepends `tags` to every
|
|
18
|
+
* subsequent `event` / `span` / `error` call.
|
|
19
|
+
*
|
|
20
|
+
* Pattern parity with pino's `logger.child(bindings)` and winston's
|
|
21
|
+
* `logger.child(meta)`. Lets a server build a per-request telemetry
|
|
22
|
+
* (`telemetry.scope({ requestId, userId })`) without monkey-patching.
|
|
23
|
+
*
|
|
24
|
+
* **Optional on the interface** — adapters that don't carry scope context
|
|
25
|
+
* (NoopTelemetry, third-party adapters where child-loggers aren't a fit)
|
|
26
|
+
* can omit. The SDK never calls `.scope` internally; it's a consumer-side
|
|
27
|
+
* affordance for downstream correlation.
|
|
28
|
+
*
|
|
29
|
+
* Adapters that DO implement it should return a NEW telemetry instance —
|
|
30
|
+
* mutating `this` would leak tags across unrelated consumers sharing the
|
|
31
|
+
* same SDK client.
|
|
32
|
+
*
|
|
33
|
+
* Added per backend-integrator-r14 nit-positive friction
|
|
34
|
+
* (`docs/feedback/resolved/2026-05-24-backend-integrator-r14-minor-sdktelemetry-shape-matches-node-logger-pattern-cleanly.md`).
|
|
35
|
+
*/
|
|
36
|
+
scope?(tags: SdkTelemetryTags): SdkTelemetry;
|
|
37
|
+
}
|
|
38
|
+
export declare class NoopTelemetry implements SdkTelemetry {
|
|
39
|
+
event(): void;
|
|
40
|
+
span<T>(_name: string, fn: () => Promise<T>): Promise<T>;
|
|
41
|
+
error(): void;
|
|
42
|
+
/**
|
|
43
|
+
* No-op telemetry has no state to carry — returning `this` is correct and
|
|
44
|
+
* avoids a per-request allocation. Consumers that swap to a real adapter
|
|
45
|
+
* will get a fresh child instance per call.
|
|
46
|
+
*/
|
|
47
|
+
scope(_tags: SdkTelemetryTags): SdkTelemetry;
|
|
48
|
+
}
|
|
49
|
+
/** Helper used inside SDK clients: span + error forwarding. */
|
|
50
|
+
export declare function withTelemetry<T>(telemetry: SdkTelemetry | undefined, name: string, fn: () => Promise<T>): Promise<T>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Address, Hex, PublicClient, WalletClient } from "viem";
|
|
2
|
+
export type { Address, Hex };
|
|
3
|
+
export interface ClientPair {
|
|
4
|
+
publicClient: PublicClient;
|
|
5
|
+
walletClient?: WalletClient;
|
|
6
|
+
}
|
|
7
|
+
export type ContractRef = {
|
|
8
|
+
address: Address;
|
|
9
|
+
chainId: number;
|
|
10
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SDK version baked at build time. Mirrors `package.json#version`.
|
|
3
|
+
*
|
|
4
|
+
* Hard-coded rather than read at runtime because:
|
|
5
|
+
* (a) consumers ship the SDK as ESM/CJS in serverless/browser environments
|
|
6
|
+
* where `node:fs` is not available and `import.meta.url`-based lookups
|
|
7
|
+
* are flaky across bundlers;
|
|
8
|
+
* (b) the value participates in `fhe-vesting.client.init` telemetry, which
|
|
9
|
+
* must work the moment the constructor runs — there's no time for an
|
|
10
|
+
* async read.
|
|
11
|
+
*
|
|
12
|
+
* Keep in sync with `package.json` via the `prepublishOnly` gate. If the two
|
|
13
|
+
* drift, telemetry funnels will report a stale version.
|
|
14
|
+
*/
|
|
15
|
+
export declare const SDK_VERSION = "1.0.0";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { TokenOpsSdkError } from "./errors.js";
|
|
2
|
+
/**
|
|
3
|
+
* Wrap any error produced by `@zama-fhe/sdk` (`RelayerWeb`, `RelayerNode`,
|
|
4
|
+
* `MockFhevmInstance`) or `@fhevm/mock-utils` into a {@link TokenOpsSdkError}.
|
|
5
|
+
* Always succeeds — falls back to {@link EncryptionFailedError} or
|
|
6
|
+
* {@link DecryptionFailedError} depending on the caller's `operation`.
|
|
7
|
+
*
|
|
8
|
+
* Errors already branded as `TokenOpsSdkError` pass through unchanged so
|
|
9
|
+
* SDK-thrown errors (`InvalidArgumentError` from `assertUint64`, etc.) aren't
|
|
10
|
+
* re-wrapped.
|
|
11
|
+
*
|
|
12
|
+
* @param error Error caught from a Zama-SDK call.
|
|
13
|
+
* @param args.method Method label that appears in `error.context.method`.
|
|
14
|
+
* @param args.operation Logical operation: `"encrypt"`, `"user-decrypt"`,
|
|
15
|
+
* `"public-decrypt"`, etc. Drives the fallback when the Zama error code is
|
|
16
|
+
* missing or unknown.
|
|
17
|
+
*/
|
|
18
|
+
export declare function mapZamaError(error: unknown, args: {
|
|
19
|
+
method: string;
|
|
20
|
+
operation: ZamaOperation;
|
|
21
|
+
}): TokenOpsSdkError;
|
|
22
|
+
/** Convenience: run a Zama-SDK call and translate any thrown error. */
|
|
23
|
+
export declare function withMappedZamaError<T>(args: {
|
|
24
|
+
method: string;
|
|
25
|
+
operation: ZamaOperation;
|
|
26
|
+
}, call: () => Promise<T>): Promise<T>;
|
|
27
|
+
export type ZamaOperation = "encrypt" | "user-decrypt" | "public-decrypt" | "delegated-user-decrypt" | "request-zk-proof";
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { Address } from "viem";
|
|
2
|
+
/**
|
|
3
|
+
* FHEVM ACL contract addresses indexed by chain id. Encrypted-view helpers in
|
|
4
|
+
* product modules (`fhe-vesting`, `fhe-airdrop`, `fhe-disperse`) filter
|
|
5
|
+
* receipt logs by this address to identify ACL grants emitted during the tx —
|
|
6
|
+
* picking the wrong address means the strict-singleton check spuriously fails
|
|
7
|
+
* or, worse, returns the wrong handle.
|
|
8
|
+
*
|
|
9
|
+
* Keep this map as the single source of truth across products. Update all
|
|
10
|
+
* three entries together when Zama publishes new host contracts.
|
|
11
|
+
*
|
|
12
|
+
* - Hardhat / Anvil (forge-fhevm) — see `@zama-fhe/sdk` `HardhatConfig`.
|
|
13
|
+
* - Sepolia — `SepoliaConfig.aclContractAddress`.
|
|
14
|
+
* - Mainnet — `MainnetConfig.aclContractAddress`.
|
|
15
|
+
*
|
|
16
|
+
* Prefer the accessors {@link getFhevmAclAddress} / {@link requireFhevmAclAddress}
|
|
17
|
+
* over reaching into this object directly — they centralise chain-id
|
|
18
|
+
* resolution and the typed-error policy. Indexing the map directly is still
|
|
19
|
+
* supported for advanced consumers who need raw registry access.
|
|
20
|
+
*/
|
|
21
|
+
export declare const FHEVM_ACL_ADDRESS_BY_CHAIN: {
|
|
22
|
+
readonly 31337: "0x50157CFfD6bBFA2DECe204a89ec419c23ef5755D";
|
|
23
|
+
readonly 11155111: "0xf0Ffdc93b7E186bC2f8CB3dAA75D86d1930A433D";
|
|
24
|
+
readonly 1: "0xcA2E8f1F656CD25C01F05d0b243Ab1ecd4a8ffb6";
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* `Allowed(address indexed caller, address indexed account, bytes32 handle)`
|
|
28
|
+
* — emitted by the FHEVM ACL contract whenever a handle is granted to an
|
|
29
|
+
* address. Encrypted-view helpers parse this from the tx receipt to extract
|
|
30
|
+
* the handle the contract granted to the caller; using `simulateContract` for
|
|
31
|
+
* the same purpose returns a divergent handle that has no ACL grant.
|
|
32
|
+
*/
|
|
33
|
+
export declare const ACL_ALLOWED_EVENT: {
|
|
34
|
+
readonly name: "Allowed";
|
|
35
|
+
readonly type: "event";
|
|
36
|
+
readonly inputs: readonly [{
|
|
37
|
+
readonly type: "address";
|
|
38
|
+
readonly name: "caller";
|
|
39
|
+
readonly indexed: true;
|
|
40
|
+
}, {
|
|
41
|
+
readonly type: "address";
|
|
42
|
+
readonly name: "account";
|
|
43
|
+
readonly indexed: true;
|
|
44
|
+
}, {
|
|
45
|
+
readonly type: "bytes32";
|
|
46
|
+
readonly name: "handle";
|
|
47
|
+
}];
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Resolve the FHEVM ACL contract address for `chainId`, returning `undefined`
|
|
51
|
+
* when the chain isn't recognised. Mirrors the `get*Address` shape in
|
|
52
|
+
* `core/addresses.ts`.
|
|
53
|
+
*
|
|
54
|
+
* Use this when the caller wants to handle "no ACL on this chain" without
|
|
55
|
+
* a throw — e.g. constructing a product client lazily and deferring the
|
|
56
|
+
* error to first encrypted-view use.
|
|
57
|
+
*/
|
|
58
|
+
export declare function getFhevmAclAddress(chainId: number): Address | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Resolve the FHEVM ACL contract address for `chainId`, throwing
|
|
61
|
+
* {@link DeploymentAddressUnavailableError} when it can't be determined.
|
|
62
|
+
* Mirrors the `require*Address` shape in `core/addresses.ts`.
|
|
63
|
+
*
|
|
64
|
+
* Accepts `chainId: undefined` so callers can pass `publicClient.chain?.id`
|
|
65
|
+
* directly without a pre-check; the helper handles the `chain-id-missing`
|
|
66
|
+
* branch itself.
|
|
67
|
+
*
|
|
68
|
+
* `clientLabel` is embedded in the thrown error so consumers can tell which
|
|
69
|
+
* client misconfigured ACL (e.g. `"ConfidentialVestingManagerClient"`).
|
|
70
|
+
* The error's `context.overrideName` is set to `"aclAddress"` so the
|
|
71
|
+
* message points users at the right config knob.
|
|
72
|
+
*/
|
|
73
|
+
export declare function requireFhevmAclAddress(chainId: number | undefined, clientLabel: string): Address;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export declare const erc7984OperatorAbi: readonly [{
|
|
2
|
+
readonly inputs: readonly [{
|
|
3
|
+
readonly internalType: "address";
|
|
4
|
+
readonly name: "holder";
|
|
5
|
+
readonly type: "address";
|
|
6
|
+
}, {
|
|
7
|
+
readonly internalType: "address";
|
|
8
|
+
readonly name: "spender";
|
|
9
|
+
readonly type: "address";
|
|
10
|
+
}];
|
|
11
|
+
readonly name: "isOperator";
|
|
12
|
+
readonly outputs: readonly [{
|
|
13
|
+
readonly internalType: "bool";
|
|
14
|
+
readonly name: "";
|
|
15
|
+
readonly type: "bool";
|
|
16
|
+
}];
|
|
17
|
+
readonly stateMutability: "view";
|
|
18
|
+
readonly type: "function";
|
|
19
|
+
}, {
|
|
20
|
+
readonly inputs: readonly [{
|
|
21
|
+
readonly internalType: "address";
|
|
22
|
+
readonly name: "operator";
|
|
23
|
+
readonly type: "address";
|
|
24
|
+
}, {
|
|
25
|
+
readonly internalType: "uint48";
|
|
26
|
+
readonly name: "until";
|
|
27
|
+
readonly type: "uint48";
|
|
28
|
+
}];
|
|
29
|
+
readonly name: "setOperator";
|
|
30
|
+
readonly outputs: readonly [];
|
|
31
|
+
readonly stateMutability: "nonpayable";
|
|
32
|
+
readonly type: "function";
|
|
33
|
+
}, {
|
|
34
|
+
readonly anonymous: false;
|
|
35
|
+
readonly inputs: readonly [{
|
|
36
|
+
readonly indexed: true;
|
|
37
|
+
readonly internalType: "address";
|
|
38
|
+
readonly name: "holder";
|
|
39
|
+
readonly type: "address";
|
|
40
|
+
}, {
|
|
41
|
+
readonly indexed: true;
|
|
42
|
+
readonly internalType: "address";
|
|
43
|
+
readonly name: "operator";
|
|
44
|
+
readonly type: "address";
|
|
45
|
+
}, {
|
|
46
|
+
readonly indexed: false;
|
|
47
|
+
readonly internalType: "uint48";
|
|
48
|
+
readonly name: "until";
|
|
49
|
+
readonly type: "uint48";
|
|
50
|
+
}];
|
|
51
|
+
readonly name: "OperatorSet";
|
|
52
|
+
readonly type: "event";
|
|
53
|
+
}];
|