@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
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkOLDGMKW2_cjs = require('./chunk-OLDGMKW2.cjs');
|
|
4
|
+
var chunk66IHPTOK_cjs = require('./chunk-66IHPTOK.cjs');
|
|
5
|
+
var chunk56UI7LUR_cjs = require('./chunk-56UI7LUR.cjs');
|
|
6
|
+
var chains = require('viem/chains');
|
|
7
|
+
|
|
8
|
+
var SUPPORTED_CHAINS = {
|
|
9
|
+
[chains.mainnet.id]: chains.mainnet,
|
|
10
|
+
[chains.sepolia.id]: chains.sepolia
|
|
11
|
+
};
|
|
12
|
+
function isSupportedChainId(chainId) {
|
|
13
|
+
return chainId in SUPPORTED_CHAINS;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
Object.defineProperty(exports, "DEPLOYED_ADDRESSES", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunkOLDGMKW2_cjs.DEPLOYED_ADDRESSES; }
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "chainsWithDeployment", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return chunkOLDGMKW2_cjs.chainsWithDeployment; }
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "chainsWithKnownRegistryEntry", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () { return chunkOLDGMKW2_cjs.chainsWithKnownRegistryEntry; }
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports, "getDeployedAddress", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function () { return chunkOLDGMKW2_cjs.getDeployedAddress; }
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "getFheAirdropFactoryAddress", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () { return chunkOLDGMKW2_cjs.getFheAirdropFactoryAddress; }
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "getFheDisperseSingletonAddress", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () { return chunkOLDGMKW2_cjs.getFheDisperseSingletonAddress; }
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(exports, "getFheVestingFactoryAddress", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
get: function () { return chunkOLDGMKW2_cjs.getFheVestingFactoryAddress; }
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(exports, "requireFheAirdropFactoryAddress", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function () { return chunkOLDGMKW2_cjs.requireFheAirdropFactoryAddress; }
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "requireFheDisperseSingletonAddress", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () { return chunkOLDGMKW2_cjs.requireFheDisperseSingletonAddress; }
|
|
51
|
+
});
|
|
52
|
+
Object.defineProperty(exports, "requireFheVestingFactoryAddress", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
get: function () { return chunkOLDGMKW2_cjs.requireFheVestingFactoryAddress; }
|
|
55
|
+
});
|
|
56
|
+
Object.defineProperty(exports, "asAirdropId", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
get: function () { return chunk66IHPTOK_cjs.asAirdropId; }
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "asDisperseId", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () { return chunk66IHPTOK_cjs.asDisperseId; }
|
|
63
|
+
});
|
|
64
|
+
Object.defineProperty(exports, "asEncryptedHandle", {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function () { return chunk66IHPTOK_cjs.asEncryptedHandle; }
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(exports, "asExternalInputProof", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: function () { return chunk66IHPTOK_cjs.asExternalInputProof; }
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "asRole", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () { return chunk66IHPTOK_cjs.asRole; }
|
|
75
|
+
});
|
|
76
|
+
Object.defineProperty(exports, "asSignature", {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
get: function () { return chunk66IHPTOK_cjs.asSignature; }
|
|
79
|
+
});
|
|
80
|
+
Object.defineProperty(exports, "asTxHash", {
|
|
81
|
+
enumerable: true,
|
|
82
|
+
get: function () { return chunk66IHPTOK_cjs.asTxHash; }
|
|
83
|
+
});
|
|
84
|
+
Object.defineProperty(exports, "asVestingId", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function () { return chunk66IHPTOK_cjs.asVestingId; }
|
|
87
|
+
});
|
|
88
|
+
Object.defineProperty(exports, "AccessDeniedError", {
|
|
89
|
+
enumerable: true,
|
|
90
|
+
get: function () { return chunk56UI7LUR_cjs.AccessDeniedError; }
|
|
91
|
+
});
|
|
92
|
+
Object.defineProperty(exports, "AlreadyInitializedError", {
|
|
93
|
+
enumerable: true,
|
|
94
|
+
get: function () { return chunk56UI7LUR_cjs.AlreadyInitializedError; }
|
|
95
|
+
});
|
|
96
|
+
Object.defineProperty(exports, "BatchTooLargeError", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
get: function () { return chunk56UI7LUR_cjs.BatchTooLargeError; }
|
|
99
|
+
});
|
|
100
|
+
Object.defineProperty(exports, "ContractRevertError", {
|
|
101
|
+
enumerable: true,
|
|
102
|
+
get: function () { return chunk56UI7LUR_cjs.ContractRevertError; }
|
|
103
|
+
});
|
|
104
|
+
Object.defineProperty(exports, "DecryptionFailedError", {
|
|
105
|
+
enumerable: true,
|
|
106
|
+
get: function () { return chunk56UI7LUR_cjs.DecryptionFailedError; }
|
|
107
|
+
});
|
|
108
|
+
Object.defineProperty(exports, "DeploymentAddressUnavailableError", {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
get: function () { return chunk56UI7LUR_cjs.DeploymentAddressUnavailableError; }
|
|
111
|
+
});
|
|
112
|
+
Object.defineProperty(exports, "EncryptionFailedError", {
|
|
113
|
+
enumerable: true,
|
|
114
|
+
get: function () { return chunk56UI7LUR_cjs.EncryptionFailedError; }
|
|
115
|
+
});
|
|
116
|
+
Object.defineProperty(exports, "FeatureDisabledError", {
|
|
117
|
+
enumerable: true,
|
|
118
|
+
get: function () { return chunk56UI7LUR_cjs.FeatureDisabledError; }
|
|
119
|
+
});
|
|
120
|
+
Object.defineProperty(exports, "FheHandleNotAllowedError", {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function () { return chunk56UI7LUR_cjs.FheHandleNotAllowedError; }
|
|
123
|
+
});
|
|
124
|
+
Object.defineProperty(exports, "InsufficientBalanceError", {
|
|
125
|
+
enumerable: true,
|
|
126
|
+
get: function () { return chunk56UI7LUR_cjs.InsufficientBalanceError; }
|
|
127
|
+
});
|
|
128
|
+
Object.defineProperty(exports, "InsufficientFeeError", {
|
|
129
|
+
enumerable: true,
|
|
130
|
+
get: function () { return chunk56UI7LUR_cjs.InsufficientFeeError; }
|
|
131
|
+
});
|
|
132
|
+
Object.defineProperty(exports, "InsufficientGasFundsError", {
|
|
133
|
+
enumerable: true,
|
|
134
|
+
get: function () { return chunk56UI7LUR_cjs.InsufficientGasFundsError; }
|
|
135
|
+
});
|
|
136
|
+
Object.defineProperty(exports, "InvalidArgumentError", {
|
|
137
|
+
enumerable: true,
|
|
138
|
+
get: function () { return chunk56UI7LUR_cjs.InvalidArgumentError; }
|
|
139
|
+
});
|
|
140
|
+
Object.defineProperty(exports, "InvalidSignatureError", {
|
|
141
|
+
enumerable: true,
|
|
142
|
+
get: function () { return chunk56UI7LUR_cjs.InvalidSignatureError; }
|
|
143
|
+
});
|
|
144
|
+
Object.defineProperty(exports, "MissingAccountError", {
|
|
145
|
+
enumerable: true,
|
|
146
|
+
get: function () { return chunk56UI7LUR_cjs.MissingAccountError; }
|
|
147
|
+
});
|
|
148
|
+
Object.defineProperty(exports, "MissingClientError", {
|
|
149
|
+
enumerable: true,
|
|
150
|
+
get: function () { return chunk56UI7LUR_cjs.MissingClientError; }
|
|
151
|
+
});
|
|
152
|
+
Object.defineProperty(exports, "MissingEncryptorError", {
|
|
153
|
+
enumerable: true,
|
|
154
|
+
get: function () { return chunk56UI7LUR_cjs.MissingEncryptorError; }
|
|
155
|
+
});
|
|
156
|
+
Object.defineProperty(exports, "MissingPublicClientError", {
|
|
157
|
+
enumerable: true,
|
|
158
|
+
get: function () { return chunk56UI7LUR_cjs.MissingPublicClientError; }
|
|
159
|
+
});
|
|
160
|
+
Object.defineProperty(exports, "MissingWalletClientError", {
|
|
161
|
+
enumerable: true,
|
|
162
|
+
get: function () { return chunk56UI7LUR_cjs.MissingWalletClientError; }
|
|
163
|
+
});
|
|
164
|
+
Object.defineProperty(exports, "NetworkError", {
|
|
165
|
+
enumerable: true,
|
|
166
|
+
get: function () { return chunk56UI7LUR_cjs.NetworkError; }
|
|
167
|
+
});
|
|
168
|
+
Object.defineProperty(exports, "PausedError", {
|
|
169
|
+
enumerable: true,
|
|
170
|
+
get: function () { return chunk56UI7LUR_cjs.PausedError; }
|
|
171
|
+
});
|
|
172
|
+
Object.defineProperty(exports, "ReceiptEventAmbiguousError", {
|
|
173
|
+
enumerable: true,
|
|
174
|
+
get: function () { return chunk56UI7LUR_cjs.ReceiptEventAmbiguousError; }
|
|
175
|
+
});
|
|
176
|
+
Object.defineProperty(exports, "ReceiptEventNotFoundError", {
|
|
177
|
+
enumerable: true,
|
|
178
|
+
get: function () { return chunk56UI7LUR_cjs.ReceiptEventNotFoundError; }
|
|
179
|
+
});
|
|
180
|
+
Object.defineProperty(exports, "ReentrancyError", {
|
|
181
|
+
enumerable: true,
|
|
182
|
+
get: function () { return chunk56UI7LUR_cjs.ReentrancyError; }
|
|
183
|
+
});
|
|
184
|
+
Object.defineProperty(exports, "RelayerUnreachableError", {
|
|
185
|
+
enumerable: true,
|
|
186
|
+
get: function () { return chunk56UI7LUR_cjs.RelayerUnreachableError; }
|
|
187
|
+
});
|
|
188
|
+
Object.defineProperty(exports, "SigningFailedError", {
|
|
189
|
+
enumerable: true,
|
|
190
|
+
get: function () { return chunk56UI7LUR_cjs.SigningFailedError; }
|
|
191
|
+
});
|
|
192
|
+
Object.defineProperty(exports, "TokenOpsContractError", {
|
|
193
|
+
enumerable: true,
|
|
194
|
+
get: function () { return chunk56UI7LUR_cjs.TokenOpsContractError; }
|
|
195
|
+
});
|
|
196
|
+
Object.defineProperty(exports, "TokenOpsSdkError", {
|
|
197
|
+
enumerable: true,
|
|
198
|
+
get: function () { return chunk56UI7LUR_cjs.TokenOpsSdkError; }
|
|
199
|
+
});
|
|
200
|
+
Object.defineProperty(exports, "TokenOpsValidationError", {
|
|
201
|
+
enumerable: true,
|
|
202
|
+
get: function () { return chunk56UI7LUR_cjs.TokenOpsValidationError; }
|
|
203
|
+
});
|
|
204
|
+
Object.defineProperty(exports, "TransferFailedError", {
|
|
205
|
+
enumerable: true,
|
|
206
|
+
get: function () { return chunk56UI7LUR_cjs.TransferFailedError; }
|
|
207
|
+
});
|
|
208
|
+
Object.defineProperty(exports, "UnknownWriteFailureError", {
|
|
209
|
+
enumerable: true,
|
|
210
|
+
get: function () { return chunk56UI7LUR_cjs.UnknownWriteFailureError; }
|
|
211
|
+
});
|
|
212
|
+
Object.defineProperty(exports, "UnsupportedChainError", {
|
|
213
|
+
enumerable: true,
|
|
214
|
+
get: function () { return chunk56UI7LUR_cjs.UnsupportedChainError; }
|
|
215
|
+
});
|
|
216
|
+
Object.defineProperty(exports, "UserDecryptNotAllowedError", {
|
|
217
|
+
enumerable: true,
|
|
218
|
+
get: function () { return chunk56UI7LUR_cjs.UserDecryptNotAllowedError; }
|
|
219
|
+
});
|
|
220
|
+
Object.defineProperty(exports, "UserRejectedSignatureError", {
|
|
221
|
+
enumerable: true,
|
|
222
|
+
get: function () { return chunk56UI7LUR_cjs.UserRejectedSignatureError; }
|
|
223
|
+
});
|
|
224
|
+
Object.defineProperty(exports, "WalletChainMismatchError", {
|
|
225
|
+
enumerable: true,
|
|
226
|
+
get: function () { return chunk56UI7LUR_cjs.WalletChainMismatchError; }
|
|
227
|
+
});
|
|
228
|
+
Object.defineProperty(exports, "WalletRejectedError", {
|
|
229
|
+
enumerable: true,
|
|
230
|
+
get: function () { return chunk56UI7LUR_cjs.WalletRejectedError; }
|
|
231
|
+
});
|
|
232
|
+
Object.defineProperty(exports, "isTokenOpsSdkError", {
|
|
233
|
+
enumerable: true,
|
|
234
|
+
get: function () { return chunk56UI7LUR_cjs.isTokenOpsSdkError; }
|
|
235
|
+
});
|
|
236
|
+
exports.SUPPORTED_CHAINS = SUPPORTED_CHAINS;
|
|
237
|
+
exports.isSupportedChainId = isSupportedChainId;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export * from "./core/index.js";
|
|
2
|
+
export { TokenOpsSdkError, isTokenOpsSdkError, DeploymentAddressUnavailableError, UnsupportedChainError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, InvalidArgumentError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, ContractRevertError, PausedError, AccessDeniedError, InsufficientFeeError, InsufficientBalanceError, BatchTooLargeError, FeatureDisabledError, TransferFailedError, FheHandleNotAllowedError, AlreadyInitializedError, ReentrancyError, InvalidSignatureError, WalletRejectedError, WalletChainMismatchError, NetworkError, InsufficientGasFundsError, UnknownWriteFailureError, UserRejectedSignatureError, SigningFailedError, RelayerUnreachableError, EncryptionFailedError, DecryptionFailedError, UserDecryptNotAllowedError, type DeploymentAddressUnavailableReason, type TokenOpsSdkErrorCode, } from "./core/errors.js";
|
|
3
|
+
export { type PreflightResult } from "./core/preflight.js";
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export * from "./core/index.js";
|
|
2
|
+
export { TokenOpsSdkError, isTokenOpsSdkError, DeploymentAddressUnavailableError, UnsupportedChainError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, InvalidArgumentError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, ContractRevertError, PausedError, AccessDeniedError, InsufficientFeeError, InsufficientBalanceError, BatchTooLargeError, FeatureDisabledError, TransferFailedError, FheHandleNotAllowedError, AlreadyInitializedError, ReentrancyError, InvalidSignatureError, WalletRejectedError, WalletChainMismatchError, NetworkError, InsufficientGasFundsError, UnknownWriteFailureError, UserRejectedSignatureError, SigningFailedError, RelayerUnreachableError, EncryptionFailedError, DecryptionFailedError, UserDecryptNotAllowedError, type DeploymentAddressUnavailableReason, type TokenOpsSdkErrorCode, } from "./core/errors.js";
|
|
3
|
+
export { type PreflightResult } from "./core/preflight.js";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { DEPLOYED_ADDRESSES, chainsWithDeployment, chainsWithKnownRegistryEntry, getDeployedAddress, getFheAirdropFactoryAddress, getFheDisperseSingletonAddress, getFheVestingFactoryAddress, requireFheAirdropFactoryAddress, requireFheDisperseSingletonAddress, requireFheVestingFactoryAddress } from './chunk-COPFW5Z4.js';
|
|
2
|
+
export { asAirdropId, asDisperseId, asEncryptedHandle, asExternalInputProof, asRole, asSignature, asTxHash, asVestingId } from './chunk-KWFFIJYX.js';
|
|
3
|
+
export { AccessDeniedError, AlreadyInitializedError, BatchTooLargeError, ContractRevertError, DecryptionFailedError, DeploymentAddressUnavailableError, EncryptionFailedError, FeatureDisabledError, FheHandleNotAllowedError, InsufficientBalanceError, InsufficientFeeError, InsufficientGasFundsError, InvalidArgumentError, InvalidSignatureError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, NetworkError, PausedError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, ReentrancyError, RelayerUnreachableError, SigningFailedError, TokenOpsContractError, TokenOpsSdkError, TokenOpsValidationError, TransferFailedError, UnknownWriteFailureError, UnsupportedChainError, UserDecryptNotAllowedError, UserRejectedSignatureError, WalletChainMismatchError, WalletRejectedError, isTokenOpsSdkError } from './chunk-IVE3QEGD.js';
|
|
4
|
+
import { sepolia, mainnet } from 'viem/chains';
|
|
5
|
+
|
|
6
|
+
var SUPPORTED_CHAINS = {
|
|
7
|
+
[mainnet.id]: mainnet,
|
|
8
|
+
[sepolia.id]: sepolia
|
|
9
|
+
};
|
|
10
|
+
function isSupportedChainId(chainId) {
|
|
11
|
+
return chainId in SUPPORTED_CHAINS;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { SUPPORTED_CHAINS, isSupportedChainId };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { SdkTelemetry, SdkTelemetryTags } from "../core/telemetry.js";
|
|
2
|
+
/**
|
|
3
|
+
* Console-backed `SdkTelemetry` adapter. Prefixes every line with `[tokenops-sdk]`
|
|
4
|
+
* and emits start / end markers around every span. Pair with {@link ConsoleTelemetry.scope}
|
|
5
|
+
* to attach per-request correlation tags — the child instance prepends the tags
|
|
6
|
+
* to every event / span / error line.
|
|
7
|
+
*/
|
|
8
|
+
export declare class ConsoleTelemetry implements SdkTelemetry {
|
|
9
|
+
#private;
|
|
10
|
+
constructor(tags?: SdkTelemetryTags);
|
|
11
|
+
event(name: string, props?: Record<string, unknown>): void;
|
|
12
|
+
span<T>(name: string, fn: () => Promise<T>): Promise<T>;
|
|
13
|
+
error(err: Error, context?: Record<string, unknown>): void;
|
|
14
|
+
/**
|
|
15
|
+
* Return a child `ConsoleTelemetry` bound to the merged tags. Per-request
|
|
16
|
+
* correlation pattern:
|
|
17
|
+
*
|
|
18
|
+
* ```ts
|
|
19
|
+
* const requestTelemetry = telemetry.scope({ requestId, userId });
|
|
20
|
+
* const factory = createConfidentialVestingFactoryClient({
|
|
21
|
+
* publicClient, walletClient, telemetry: requestTelemetry,
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* Tags from the parent are preserved; collisions on the same key resolve
|
|
26
|
+
* to the child's value (last-write-wins, pino-compatible behaviour).
|
|
27
|
+
*/
|
|
28
|
+
scope(tags: SdkTelemetryTags): ConsoleTelemetry;
|
|
29
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkVJKZWYYJ_cjs = require('../chunk-VJKZWYYJ.cjs');
|
|
4
|
+
|
|
5
|
+
// src/telemetry/console.ts
|
|
6
|
+
var ConsoleTelemetry = class _ConsoleTelemetry {
|
|
7
|
+
/** Optional bound tags carried by a child created via {@link scope}. */
|
|
8
|
+
#tags;
|
|
9
|
+
constructor(tags) {
|
|
10
|
+
this.#tags = tags;
|
|
11
|
+
}
|
|
12
|
+
/** Inline-stringify the bound tags as `[key=value key=value]`. Empty when no tags. */
|
|
13
|
+
#tagPrefix() {
|
|
14
|
+
if (!this.#tags) return "";
|
|
15
|
+
const entries = Object.entries(this.#tags);
|
|
16
|
+
if (entries.length === 0) return "";
|
|
17
|
+
return ` [${entries.map(([k, v]) => `${k}=${String(v)}`).join(" ")}]`;
|
|
18
|
+
}
|
|
19
|
+
event(name, props) {
|
|
20
|
+
const prefix = `[tokenops-sdk]${this.#tagPrefix()} ${name}`;
|
|
21
|
+
if (props === void 0) console.log(prefix);
|
|
22
|
+
else console.log(prefix, props);
|
|
23
|
+
}
|
|
24
|
+
async span(name, fn) {
|
|
25
|
+
const tag = this.#tagPrefix();
|
|
26
|
+
console.log(`[tokenops-sdk]${tag} ${name}.start`);
|
|
27
|
+
const start = performance.now();
|
|
28
|
+
try {
|
|
29
|
+
const result = await fn();
|
|
30
|
+
const ms = Math.round(performance.now() - start);
|
|
31
|
+
console.log(`[tokenops-sdk]${tag} ${name}.end ${ms}ms`);
|
|
32
|
+
return result;
|
|
33
|
+
} catch (err) {
|
|
34
|
+
const ms = Math.round(performance.now() - start);
|
|
35
|
+
console.log(`[tokenops-sdk]${tag} ${name}.error ${ms}ms`);
|
|
36
|
+
throw err;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
error(err, context) {
|
|
40
|
+
const tag = this.#tagPrefix();
|
|
41
|
+
console.error(`[tokenops-sdk]${tag} error:`, err.message, context ?? {});
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Return a child `ConsoleTelemetry` bound to the merged tags. Per-request
|
|
45
|
+
* correlation pattern:
|
|
46
|
+
*
|
|
47
|
+
* ```ts
|
|
48
|
+
* const requestTelemetry = telemetry.scope({ requestId, userId });
|
|
49
|
+
* const factory = createConfidentialVestingFactoryClient({
|
|
50
|
+
* publicClient, walletClient, telemetry: requestTelemetry,
|
|
51
|
+
* });
|
|
52
|
+
* ```
|
|
53
|
+
*
|
|
54
|
+
* Tags from the parent are preserved; collisions on the same key resolve
|
|
55
|
+
* to the child's value (last-write-wins, pino-compatible behaviour).
|
|
56
|
+
*/
|
|
57
|
+
scope(tags) {
|
|
58
|
+
const merged = { ...this.#tags ?? {}, ...tags };
|
|
59
|
+
return new _ConsoleTelemetry(merged);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
// src/telemetry/tokenops.ts
|
|
64
|
+
var TokenOpsTelemetry = class {
|
|
65
|
+
constructor(opts) {
|
|
66
|
+
this.opts = opts;
|
|
67
|
+
}
|
|
68
|
+
opts;
|
|
69
|
+
event(name, props) {
|
|
70
|
+
void this.#send({ kind: "event", name, props });
|
|
71
|
+
}
|
|
72
|
+
async span(name, fn) {
|
|
73
|
+
const start = Date.now();
|
|
74
|
+
try {
|
|
75
|
+
const result = await fn();
|
|
76
|
+
void this.#send({ kind: "span", name, durationMs: Date.now() - start, ok: true });
|
|
77
|
+
return result;
|
|
78
|
+
} catch (err) {
|
|
79
|
+
void this.#send({ kind: "span", name, durationMs: Date.now() - start, ok: false });
|
|
80
|
+
throw err;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
error(err, context) {
|
|
84
|
+
void this.#send({ kind: "error", message: err.message, context });
|
|
85
|
+
}
|
|
86
|
+
async #send(payload) {
|
|
87
|
+
try {
|
|
88
|
+
await fetch(this.opts.endpoint, {
|
|
89
|
+
method: "POST",
|
|
90
|
+
headers: { "content-type": "application/json" },
|
|
91
|
+
body: JSON.stringify({
|
|
92
|
+
...payload,
|
|
93
|
+
sdkVersion: this.opts.sdkVersion,
|
|
94
|
+
installationId: this.opts.installationId,
|
|
95
|
+
ts: Date.now()
|
|
96
|
+
})
|
|
97
|
+
// Don't keepalive on Node; rely on caller event loop.
|
|
98
|
+
});
|
|
99
|
+
} catch {
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
Object.defineProperty(exports, "NoopTelemetry", {
|
|
105
|
+
enumerable: true,
|
|
106
|
+
get: function () { return chunkVJKZWYYJ_cjs.NoopTelemetry; }
|
|
107
|
+
});
|
|
108
|
+
Object.defineProperty(exports, "withTelemetry", {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
get: function () { return chunkVJKZWYYJ_cjs.withTelemetry; }
|
|
111
|
+
});
|
|
112
|
+
exports.ConsoleTelemetry = ConsoleTelemetry;
|
|
113
|
+
exports.TokenOpsTelemetry = TokenOpsTelemetry;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
export { NoopTelemetry, withTelemetry } from '../chunk-Q2GP5UDC.js';
|
|
2
|
+
|
|
3
|
+
// src/telemetry/console.ts
|
|
4
|
+
var ConsoleTelemetry = class _ConsoleTelemetry {
|
|
5
|
+
/** Optional bound tags carried by a child created via {@link scope}. */
|
|
6
|
+
#tags;
|
|
7
|
+
constructor(tags) {
|
|
8
|
+
this.#tags = tags;
|
|
9
|
+
}
|
|
10
|
+
/** Inline-stringify the bound tags as `[key=value key=value]`. Empty when no tags. */
|
|
11
|
+
#tagPrefix() {
|
|
12
|
+
if (!this.#tags) return "";
|
|
13
|
+
const entries = Object.entries(this.#tags);
|
|
14
|
+
if (entries.length === 0) return "";
|
|
15
|
+
return ` [${entries.map(([k, v]) => `${k}=${String(v)}`).join(" ")}]`;
|
|
16
|
+
}
|
|
17
|
+
event(name, props) {
|
|
18
|
+
const prefix = `[tokenops-sdk]${this.#tagPrefix()} ${name}`;
|
|
19
|
+
if (props === void 0) console.log(prefix);
|
|
20
|
+
else console.log(prefix, props);
|
|
21
|
+
}
|
|
22
|
+
async span(name, fn) {
|
|
23
|
+
const tag = this.#tagPrefix();
|
|
24
|
+
console.log(`[tokenops-sdk]${tag} ${name}.start`);
|
|
25
|
+
const start = performance.now();
|
|
26
|
+
try {
|
|
27
|
+
const result = await fn();
|
|
28
|
+
const ms = Math.round(performance.now() - start);
|
|
29
|
+
console.log(`[tokenops-sdk]${tag} ${name}.end ${ms}ms`);
|
|
30
|
+
return result;
|
|
31
|
+
} catch (err) {
|
|
32
|
+
const ms = Math.round(performance.now() - start);
|
|
33
|
+
console.log(`[tokenops-sdk]${tag} ${name}.error ${ms}ms`);
|
|
34
|
+
throw err;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
error(err, context) {
|
|
38
|
+
const tag = this.#tagPrefix();
|
|
39
|
+
console.error(`[tokenops-sdk]${tag} error:`, err.message, context ?? {});
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Return a child `ConsoleTelemetry` bound to the merged tags. Per-request
|
|
43
|
+
* correlation pattern:
|
|
44
|
+
*
|
|
45
|
+
* ```ts
|
|
46
|
+
* const requestTelemetry = telemetry.scope({ requestId, userId });
|
|
47
|
+
* const factory = createConfidentialVestingFactoryClient({
|
|
48
|
+
* publicClient, walletClient, telemetry: requestTelemetry,
|
|
49
|
+
* });
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* Tags from the parent are preserved; collisions on the same key resolve
|
|
53
|
+
* to the child's value (last-write-wins, pino-compatible behaviour).
|
|
54
|
+
*/
|
|
55
|
+
scope(tags) {
|
|
56
|
+
const merged = { ...this.#tags ?? {}, ...tags };
|
|
57
|
+
return new _ConsoleTelemetry(merged);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
// src/telemetry/tokenops.ts
|
|
62
|
+
var TokenOpsTelemetry = class {
|
|
63
|
+
constructor(opts) {
|
|
64
|
+
this.opts = opts;
|
|
65
|
+
}
|
|
66
|
+
opts;
|
|
67
|
+
event(name, props) {
|
|
68
|
+
void this.#send({ kind: "event", name, props });
|
|
69
|
+
}
|
|
70
|
+
async span(name, fn) {
|
|
71
|
+
const start = Date.now();
|
|
72
|
+
try {
|
|
73
|
+
const result = await fn();
|
|
74
|
+
void this.#send({ kind: "span", name, durationMs: Date.now() - start, ok: true });
|
|
75
|
+
return result;
|
|
76
|
+
} catch (err) {
|
|
77
|
+
void this.#send({ kind: "span", name, durationMs: Date.now() - start, ok: false });
|
|
78
|
+
throw err;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
error(err, context) {
|
|
82
|
+
void this.#send({ kind: "error", message: err.message, context });
|
|
83
|
+
}
|
|
84
|
+
async #send(payload) {
|
|
85
|
+
try {
|
|
86
|
+
await fetch(this.opts.endpoint, {
|
|
87
|
+
method: "POST",
|
|
88
|
+
headers: { "content-type": "application/json" },
|
|
89
|
+
body: JSON.stringify({
|
|
90
|
+
...payload,
|
|
91
|
+
sdkVersion: this.opts.sdkVersion,
|
|
92
|
+
installationId: this.opts.installationId,
|
|
93
|
+
ts: Date.now()
|
|
94
|
+
})
|
|
95
|
+
// Don't keepalive on Node; rely on caller event loop.
|
|
96
|
+
});
|
|
97
|
+
} catch {
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export { ConsoleTelemetry, TokenOpsTelemetry };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { SdkTelemetry } from "../core/telemetry.js";
|
|
2
|
+
export interface TokenOpsTelemetryOptions {
|
|
3
|
+
endpoint: string;
|
|
4
|
+
sdkVersion: string;
|
|
5
|
+
/** Optional anonymous installation id (caller-managed, persistent across runs). */
|
|
6
|
+
installationId?: string | undefined;
|
|
7
|
+
}
|
|
8
|
+
export declare class TokenOpsTelemetry implements SdkTelemetry {
|
|
9
|
+
#private;
|
|
10
|
+
private readonly opts;
|
|
11
|
+
constructor(opts: TokenOpsTelemetryOptions);
|
|
12
|
+
event(name: string, props?: Record<string, unknown>): void;
|
|
13
|
+
span<T>(name: string, fn: () => Promise<T>): Promise<T>;
|
|
14
|
+
error(err: Error, context?: Record<string, unknown>): void;
|
|
15
|
+
}
|