@tokenops/sdk 1.6.0 → 2.0.0-alpha.2
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 +77 -8
- package/CONTRIBUTING.md +4 -2
- package/README.md +146 -90
- package/SUPPORT.md +47 -0
- package/dist/{chunk-BD4LZBVF.cjs → chunk-3QHNYEQD.cjs} +18 -17
- package/dist/{chunk-YFIWCYHC.cjs → chunk-3YHBO2DL.cjs} +56 -54
- package/dist/{chunk-QET3Q4JP.js → chunk-44YJPMQC.js} +8 -6
- package/dist/{chunk-6WSNS3UV.js → chunk-4RAAATVY.js} +2 -4
- package/dist/{chunk-4KJ66YRH.js → chunk-4TSDNZQ3.js} +2 -2
- package/dist/chunk-66IHPTOK.cjs +20 -0
- package/dist/{chunk-2RNW4MIJ.cjs → chunk-67OV5CX2.cjs} +0 -18
- package/dist/{chunk-PD7ME2BT.js → chunk-6GNR22OV.js} +2 -1
- package/dist/{chunk-WOEETTH7.cjs → chunk-7AFPOE7N.cjs} +6 -6
- package/dist/{chunk-QKKBBH7I.js → chunk-A4DCEE33.js} +34 -7
- package/dist/chunk-AREQJHKA.cjs +713 -0
- package/dist/{chunk-U57COLUE.js → chunk-AXIPOR3C.js} +2 -2
- package/dist/chunk-EBLBPUPI.cjs +255 -0
- package/dist/chunk-EYDA6Q6C.js +245 -0
- package/dist/{chunk-SYHNZSZZ.cjs → chunk-FAXIIH5R.cjs} +3 -3
- package/dist/{chunk-AYGRYDBX.cjs → chunk-FEDX7B6T.cjs} +37 -35
- package/dist/{chunk-CBRL2PJA.cjs → chunk-FHWSBGWE.cjs} +12 -12
- package/dist/{chunk-WUXUWTFW.cjs → chunk-FT5H2Q7Y.cjs} +37 -7
- package/dist/chunk-GADGBQJO.js +423 -0
- package/dist/{chunk-VHSNYUYV.js → chunk-IGO5XSPS.js} +5 -5
- package/dist/chunk-IUKKNJ2R.cjs +433 -0
- package/dist/{chunk-VR3FREBX.cjs → chunk-JK4XMMKM.cjs} +3 -3
- package/dist/{chunk-4ZCXK4VI.cjs → chunk-KFRDLKMA.cjs} +14 -14
- package/dist/chunk-KWFFIJYX.js +11 -0
- package/dist/{chunk-7G7UOQV4.cjs → chunk-MM5BV5CS.cjs} +4 -4
- package/dist/{chunk-43RFBQ73.cjs → chunk-MVDQMV25.cjs} +29 -32
- package/dist/chunk-NWFMBLSQ.js +4 -0
- package/dist/{chunk-HETNKZEE.js → chunk-PYYSB5ZN.js} +1 -1
- package/dist/chunk-PZZK3O3S.cjs +9843 -0
- package/dist/{chunk-DRSPMIZ7.js → chunk-QBJ7O2B4.js} +1 -11
- package/dist/{chunk-WTK6JDSI.js → chunk-SPLNGUFF.js} +6 -4
- package/dist/{chunk-UJS4N2XM.cjs → chunk-TEBM66WA.cjs} +12 -12
- package/dist/{chunk-TN65XNTI.js → chunk-TWT3STIX.js} +8 -6
- package/dist/chunk-UG5RKLU2.cjs +6 -0
- package/dist/{chunk-EUKPOXWR.cjs → chunk-UHHMVBLU.cjs} +17 -15
- package/dist/chunk-VW356KR3.js +688 -0
- package/dist/{chunk-BK7YIVLK.cjs → chunk-WJLECC22.cjs} +75 -73
- package/dist/{chunk-V5D7BHW3.js → chunk-WJMEBBU7.js} +6 -4
- package/dist/{chunk-NFW7AUEX.js → chunk-WMACINXO.js} +1 -1
- package/dist/chunk-X7WBPCEU.js +9817 -0
- package/dist/{chunk-46T67CE2.js → chunk-ZA673I3O.js} +1 -1
- package/dist/{chunk-YPYCWLYP.js → chunk-ZWXJTBZO.js} +1 -1
- package/dist/core/addresses.d.ts +14 -2
- package/dist/core/brands.d.ts +8 -2
- package/dist/core/errors.d.ts +71 -10
- package/dist/core/preflight.d.ts +1 -0
- package/dist/fhe/erc7984-abi.d.ts +1 -0
- package/dist/fhe/index.cjs +64 -63
- package/dist/fhe/index.js +7 -6
- package/dist/fhe/operators.d.ts +22 -5
- package/dist/fhe/react/index.cjs +13 -12
- package/dist/fhe/react/index.js +6 -5
- package/dist/fhe/types.d.ts +8 -2
- package/dist/fhe-airdrop/abis/{cloneable.d.ts → airdrop-base.d.ts} +254 -396
- package/dist/fhe-airdrop/abis/compliance.d.ts +422 -0
- package/dist/fhe-airdrop/abis/ecdsa.d.ts +1316 -0
- package/dist/fhe-airdrop/abis/factory.d.ts +1319 -190
- package/dist/fhe-airdrop/abis/index.d.ts +5 -2
- package/dist/fhe-airdrop/abis/merkle.d.ts +1250 -0
- package/dist/fhe-airdrop/advanced/index.cjs +11 -12
- package/dist/fhe-airdrop/advanced/index.d.cts +34 -11
- package/dist/fhe-airdrop/advanced/index.d.ts +34 -11
- package/dist/fhe-airdrop/advanced/index.js +3 -8
- package/dist/fhe-airdrop/advanced/react/index.cjs +619 -51
- package/dist/fhe-airdrop/advanced/react/index.d.cts +43 -3
- package/dist/fhe-airdrop/advanced/react/index.d.ts +43 -3
- package/dist/fhe-airdrop/advanced/react/index.js +592 -52
- package/dist/fhe-airdrop/advanced/react/useClearCompliancePolicy.d.ts +28 -0
- package/dist/fhe-airdrop/advanced/react/useClearUpgradeabilityPolicy.d.ts +26 -0
- package/dist/fhe-airdrop/advanced/react/useDisableCustomFee.d.ts +25 -0
- package/dist/fhe-airdrop/advanced/react/useEcdsaInitCodeHash.d.ts +30 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryComplianceDelegate.d.ts +25 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryCompliancePolicy.d.ts +38 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryCustomFee.d.ts +24 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryGrantRole.d.ts +32 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryHasRole.d.ts +27 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryImplementations.d.ts +33 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryRenounceRole.d.ts +36 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryRevokeRole.d.ts +35 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryRoleConstants.d.ts +46 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryRoleMembers.d.ts +47 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryUpgradeabilityPolicy.d.ts +39 -0
- package/dist/fhe-airdrop/advanced/react/useMerkleInitCodeHash.d.ts +24 -0
- package/dist/fhe-airdrop/advanced/react/usePredictEcdsaAirdropAddress.d.ts +33 -0
- package/dist/fhe-airdrop/advanced/react/usePredictMerkleAirdropAddress.d.ts +27 -0
- package/dist/fhe-airdrop/advanced/react/useSetComplianceDelegate.d.ts +33 -0
- package/dist/fhe-airdrop/advanced/react/useSetComplianceManagerImpl.d.ts +27 -0
- package/dist/fhe-airdrop/advanced/react/useSetCompliancePolicy.d.ts +28 -0
- package/dist/fhe-airdrop/advanced/react/useSetCustomFee.d.ts +28 -0
- package/dist/fhe-airdrop/advanced/react/useSetDefaultDelegateToCompliance.d.ts +31 -0
- package/dist/fhe-airdrop/advanced/react/useSetDefaultGasFee.d.ts +28 -0
- package/dist/fhe-airdrop/advanced/react/useSetDefaultUpgradeable.d.ts +27 -0
- package/dist/fhe-airdrop/advanced/react/useSetEcdsaImplementation.d.ts +34 -0
- package/dist/fhe-airdrop/advanced/react/useSetFeeCollector.d.ts +27 -0
- package/dist/fhe-airdrop/advanced/react/useSetMerkleImplementation.d.ts +30 -0
- package/dist/fhe-airdrop/advanced/react/useSetUpgradeabilityPolicy.d.ts +31 -0
- package/dist/fhe-airdrop/airdrop-base.d.ts +608 -0
- package/dist/fhe-airdrop/campaign.d.ts +338 -0
- package/dist/fhe-airdrop/compliance.d.ts +302 -0
- package/dist/fhe-airdrop/constants.d.ts +33 -0
- package/dist/fhe-airdrop/ecdsa.d.ts +263 -0
- package/dist/fhe-airdrop/encryption.d.ts +92 -14
- package/dist/fhe-airdrop/errors.d.ts +273 -15
- package/dist/fhe-airdrop/factory.d.ts +533 -274
- package/dist/fhe-airdrop/guards.d.ts +317 -0
- package/dist/fhe-airdrop/index.cjs +233 -73
- package/dist/fhe-airdrop/index.d.cts +46 -8
- package/dist/fhe-airdrop/index.d.ts +46 -8
- package/dist/fhe-airdrop/index.js +11 -7
- package/dist/fhe-airdrop/merkle-tree.d.ts +97 -0
- package/dist/fhe-airdrop/merkle.d.ts +201 -0
- package/dist/fhe-airdrop/react/_shared.d.ts +156 -70
- package/dist/fhe-airdrop/react/index.cjs +1174 -384
- package/dist/fhe-airdrop/react/index.d.cts +99 -74
- package/dist/fhe-airdrop/react/index.d.ts +99 -74
- package/dist/fhe-airdrop/react/index.js +993 -303
- package/dist/fhe-airdrop/react/keys.d.ts +90 -0
- package/dist/fhe-airdrop/react/useAccessEcdsaClaimAmount.d.ts +26 -0
- package/dist/fhe-airdrop/react/useAccessMerkleClaimAmount.d.ts +27 -0
- package/dist/fhe-airdrop/react/useAddComplianceDelegate.d.ts +37 -0
- package/dist/fhe-airdrop/react/useAdminBatchDiscloseBalanceToParties.d.ts +36 -0
- package/dist/fhe-airdrop/react/useAdminDiscloseBalanceToParty.d.ts +31 -0
- package/dist/fhe-airdrop/react/useAdminGetCurrentBalance.d.ts +27 -0
- package/dist/fhe-airdrop/react/useAirdropConfig.d.ts +49 -0
- package/dist/fhe-airdrop/react/useAirdropDeploymentMode.d.ts +28 -0
- package/dist/fhe-airdrop/react/useAirdropGasFee.d.ts +10 -5
- package/dist/fhe-airdrop/react/useAirdropGrantRole.d.ts +29 -10
- package/dist/fhe-airdrop/react/useAirdropHasRole.d.ts +15 -6
- package/dist/fhe-airdrop/react/useAirdropPause.d.ts +30 -0
- package/dist/fhe-airdrop/react/useAirdropPaused.d.ts +17 -0
- package/dist/fhe-airdrop/react/useAirdropRenounceRole.d.ts +36 -0
- package/dist/fhe-airdrop/react/useAirdropRevokeRole.d.ts +27 -9
- package/dist/fhe-airdrop/react/useAirdropRoleAdmin.d.ts +28 -0
- package/dist/fhe-airdrop/react/useAirdropRoleConstants.d.ts +67 -0
- package/dist/fhe-airdrop/react/useAirdropRoleMembers.d.ts +49 -0
- package/dist/fhe-airdrop/react/useAirdropToken.d.ts +11 -4
- package/dist/fhe-airdrop/react/useAirdropUpgradeToAndCall.d.ts +45 -0
- package/dist/fhe-airdrop/react/useAirdropWindow.d.ts +37 -0
- package/dist/fhe-airdrop/react/useBatchDiscloseHandlesToParty.d.ts +32 -0
- package/dist/fhe-airdrop/react/useBuildMerkleCampaign.d.ts +68 -0
- package/dist/fhe-airdrop/react/useClaimedAmount.d.ts +29 -0
- package/dist/fhe-airdrop/react/useComplianceGrantRole.d.ts +32 -0
- package/dist/fhe-airdrop/react/useComplianceHasRole.d.ts +37 -0
- package/dist/fhe-airdrop/react/useComplianceInfo.d.ts +50 -0
- package/dist/fhe-airdrop/react/useComplianceManager.d.ts +16 -0
- package/dist/fhe-airdrop/react/useComplianceManagerOf.d.ts +32 -0
- package/dist/fhe-airdrop/react/useComplianceRenounceRole.d.ts +38 -0
- package/dist/fhe-airdrop/react/useComplianceRevokeRole.d.ts +36 -0
- package/dist/fhe-airdrop/react/useComplianceRoleConstants.d.ts +41 -0
- package/dist/fhe-airdrop/react/useComplianceRoleMembers.d.ts +45 -0
- package/dist/fhe-airdrop/react/useCreateAndFundEcdsaAirdrop.d.ts +55 -0
- package/dist/fhe-airdrop/react/useCreateAndFundMerkleAirdrop.d.ts +52 -0
- package/dist/fhe-airdrop/react/useCreateEcdsaAirdrop.d.ts +28 -0
- package/dist/fhe-airdrop/react/useCreateMerkleAirdrop.d.ts +25 -0
- package/dist/fhe-airdrop/react/useDiscloseHandleToParty.d.ts +35 -0
- package/dist/fhe-airdrop/react/useEcdsaClaim.d.ts +24 -0
- package/dist/fhe-airdrop/react/useEcdsaClaimAndUnwrap.d.ts +27 -0
- package/dist/fhe-airdrop/react/useEcdsaDomain.d.ts +41 -0
- package/dist/fhe-airdrop/react/useEffectiveDelegateToCompliance.d.ts +26 -0
- package/dist/fhe-airdrop/react/useEffectiveUpgradeable.d.ts +20 -0
- package/dist/fhe-airdrop/react/useEncryptCampaignAmounts.d.ts +59 -0
- package/dist/fhe-airdrop/react/useExtendClaimWindow.d.ts +17 -12
- package/dist/fhe-airdrop/react/useFactoryFees.d.ts +28 -0
- package/dist/fhe-airdrop/react/useFactoryRegistry.d.ts +35 -0
- package/dist/fhe-airdrop/react/useFundAirdrop.d.ts +35 -0
- package/dist/fhe-airdrop/react/useGrantInstanceRoles.d.ts +35 -0
- package/dist/fhe-airdrop/react/useIsActiveDelegate.d.ts +29 -0
- package/dist/fhe-airdrop/react/useIsMerkleRootMutable.d.ts +21 -0
- package/dist/fhe-airdrop/react/useIsSignatureValid.d.ts +46 -0
- package/dist/fhe-airdrop/react/useMerkleClaim.d.ts +22 -0
- package/dist/fhe-airdrop/react/useMerkleClaimAndUnwrap.d.ts +29 -0
- package/dist/fhe-airdrop/react/useMerkleRoot.d.ts +15 -0
- package/dist/fhe-airdrop/react/usePlanMerkleCampaign.d.ts +53 -0
- package/dist/fhe-airdrop/react/usePreflightClaim.d.ts +46 -0
- package/dist/fhe-airdrop/react/usePreflightCreateAirdrop.d.ts +51 -35
- package/dist/fhe-airdrop/react/useRescueERC20.d.ts +30 -0
- package/dist/fhe-airdrop/react/useRescueOtherConfidentialToken.d.ts +34 -0
- package/dist/fhe-airdrop/react/useRevokeComplianceDelegate.d.ts +37 -0
- package/dist/fhe-airdrop/react/useRotateMerkleRoot.d.ts +52 -0
- package/dist/fhe-airdrop/react/useSetMerkleRoot.d.ts +22 -0
- package/dist/fhe-airdrop/react/useSignClaimAuthorization.d.ts +32 -21
- package/dist/fhe-airdrop/react/useWithdrawConfidential.d.ts +23 -0
- package/dist/fhe-airdrop/react/useWithdrawGasFee.d.ts +37 -0
- package/dist/fhe-airdrop/roles.d.ts +147 -0
- package/dist/fhe-airdrop/types.d.ts +78 -63
- package/dist/fhe-disperse/index.cjs +70 -68
- package/dist/fhe-disperse/index.js +10 -8
- package/dist/fhe-disperse/react/index.cjs +94 -92
- package/dist/fhe-disperse/react/index.js +13 -11
- package/dist/fhe-vesting/advanced/index.cjs +10 -8
- package/dist/fhe-vesting/advanced/index.js +8 -6
- package/dist/fhe-vesting/advanced/react/index.cjs +16 -14
- package/dist/fhe-vesting/advanced/react/index.js +13 -11
- package/dist/fhe-vesting/index.cjs +74 -72
- package/dist/fhe-vesting/index.js +11 -9
- package/dist/fhe-vesting/react/index.cjs +228 -226
- package/dist/fhe-vesting/react/index.js +15 -13
- package/dist/index.cjs +100 -87
- package/dist/index.js +3 -2
- package/dist/testnet-faucet/index.cjs +57 -55
- package/dist/testnet-faucet/index.js +7 -5
- package/dist/testnet-faucet/react/index.cjs +55 -53
- package/dist/testnet-faucet/react/index.js +9 -7
- package/package.json +6 -2
- package/dist/chunk-CNP4L3GF.js +0 -105
- package/dist/chunk-KSDSXJ34.js +0 -41
- package/dist/chunk-LBWRFZR3.cjs +0 -1681
- package/dist/chunk-OL6SHN3D.cjs +0 -44
- package/dist/chunk-S2XD75JM.js +0 -1637
- package/dist/chunk-SPGSO5SO.cjs +0 -1644
- package/dist/chunk-UE5XK2SY.js +0 -1673
- package/dist/chunk-WO72UBQD.cjs +0 -109
- package/dist/fhe-airdrop/advanced/factory-advanced.d.ts +0 -53
- package/dist/fhe-airdrop/advanced/react/usePredictAirdropAddress.d.ts +0 -49
- package/dist/fhe-airdrop/airdrop.d.ts +0 -317
- package/dist/fhe-airdrop/react/useAccessClaimAmount.d.ts +0 -37
- package/dist/fhe-airdrop/react/useAirdropCanExtendClaimWindow.d.ts +0 -7
- package/dist/fhe-airdrop/react/useAirdropClaimTypehash.d.ts +0 -10
- package/dist/fhe-airdrop/react/useAirdropClaimedSignatures.d.ts +0 -16
- package/dist/fhe-airdrop/react/useAirdropDeploymentBlockNumber.d.ts +0 -6
- package/dist/fhe-airdrop/react/useAirdropDomainSeparator.d.ts +0 -8
- package/dist/fhe-airdrop/react/useAirdropEndTime.d.ts +0 -10
- package/dist/fhe-airdrop/react/useAirdropFactoryCustomFee.d.ts +0 -17
- package/dist/fhe-airdrop/react/useAirdropFactoryDefaultGasFee.d.ts +0 -10
- package/dist/fhe-airdrop/react/useAirdropFactoryDisableCustomFee.d.ts +0 -15
- package/dist/fhe-airdrop/react/useAirdropFactoryFeeCollector.d.ts +0 -11
- package/dist/fhe-airdrop/react/useAirdropFactoryInitCodeHash.d.ts +0 -17
- package/dist/fhe-airdrop/react/useAirdropFactorySetCustomFee.d.ts +0 -17
- package/dist/fhe-airdrop/react/useAirdropFactorySetDefaultGasFee.d.ts +0 -16
- package/dist/fhe-airdrop/react/useAirdropFactorySetFeeCollector.d.ts +0 -15
- package/dist/fhe-airdrop/react/useAirdropHasClaimEnded.d.ts +0 -7
- package/dist/fhe-airdrop/react/useAirdropHasClaimStarted.d.ts +0 -7
- package/dist/fhe-airdrop/react/useAirdropIsClaimWindowActive.d.ts +0 -9
- package/dist/fhe-airdrop/react/useAirdropIsPaused.d.ts +0 -8
- package/dist/fhe-airdrop/react/useAirdropIsSignatureClaimed.d.ts +0 -22
- package/dist/fhe-airdrop/react/useAirdropIsSignatureValid.d.ts +0 -51
- package/dist/fhe-airdrop/react/useAirdropStartTime.d.ts +0 -10
- package/dist/fhe-airdrop/react/useAirdropWithdrawGasFee.d.ts +0 -15
- package/dist/fhe-airdrop/react/useAirdropWithdrawOtherConfidentialToken.d.ts +0 -14
- package/dist/fhe-airdrop/react/useAirdropWithdrawOtherToken.d.ts +0 -14
- package/dist/fhe-airdrop/react/useClaim.d.ts +0 -39
- package/dist/fhe-airdrop/react/useConfidentialAirdropFactoryImplementation.d.ts +0 -11
- package/dist/fhe-airdrop/react/useCreateAndFundConfidentialAirdrop.d.ts +0 -41
- package/dist/fhe-airdrop/react/useCreateAndFundConfidentialAirdropAndGetAddress.d.ts +0 -48
- package/dist/fhe-airdrop/react/useCreateConfidentialAirdrop.d.ts +0 -29
- package/dist/fhe-airdrop/react/useCreateConfidentialAirdropAndGetAddress.d.ts +0 -31
- package/dist/fhe-airdrop/react/useDisableCustomFee.d.ts +0 -14
- package/dist/fhe-airdrop/react/useFactoryCustomFee.d.ts +0 -17
- package/dist/fhe-airdrop/react/useFactoryDefaultGasFee.d.ts +0 -10
- package/dist/fhe-airdrop/react/useFactoryFeeCollector.d.ts +0 -11
- package/dist/fhe-airdrop/react/useFactoryInitCodeHash.d.ts +0 -17
- package/dist/fhe-airdrop/react/useFundConfidentialAirdrop.d.ts +0 -33
- package/dist/fhe-airdrop/react/useSetCustomFee.d.ts +0 -16
- package/dist/fhe-airdrop/react/useSetDefaultGasFee.d.ts +0 -15
- package/dist/fhe-airdrop/react/useSetFeeCollector.d.ts +0 -14
- package/dist/fhe-airdrop/react/useSetPaused.d.ts +0 -14
- package/dist/fhe-airdrop/react/useWithdraw.d.ts +0 -12
- package/dist/fhe-airdrop/react/useWithdrawOtherConfidentialToken.d.ts +0 -13
- package/dist/fhe-airdrop/react/useWithdrawOtherToken.d.ts +0 -13
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunkTEBM66WA_cjs = require('./chunk-TEBM66WA.cjs');
|
|
4
|
+
var chunk3QHNYEQD_cjs = require('./chunk-3QHNYEQD.cjs');
|
|
5
|
+
var chunkFAXIIH5R_cjs = require('./chunk-FAXIIH5R.cjs');
|
|
6
6
|
var chunkFWHYQZ5E_cjs = require('./chunk-FWHYQZ5E.cjs');
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
7
|
+
var chunkUG5RKLU2_cjs = require('./chunk-UG5RKLU2.cjs');
|
|
8
|
+
var chunkMVDQMV25_cjs = require('./chunk-MVDQMV25.cjs');
|
|
9
|
+
var chunkJK4XMMKM_cjs = require('./chunk-JK4XMMKM.cjs');
|
|
10
|
+
var chunk66IHPTOK_cjs = require('./chunk-66IHPTOK.cjs');
|
|
11
|
+
var chunk67OV5CX2_cjs = require('./chunk-67OV5CX2.cjs');
|
|
10
12
|
var chunkVJKZWYYJ_cjs = require('./chunk-VJKZWYYJ.cjs');
|
|
11
13
|
var viem = require('viem');
|
|
12
14
|
|
|
@@ -990,7 +992,7 @@ var confidentialVestingManagerAbi = [
|
|
|
990
992
|
];
|
|
991
993
|
|
|
992
994
|
// src/fhe-vesting/errors.ts
|
|
993
|
-
var VestingNotFoundError = class extends
|
|
995
|
+
var VestingNotFoundError = class extends chunk67OV5CX2_cjs.TokenOpsSdkError {
|
|
994
996
|
name = "VestingNotFoundError";
|
|
995
997
|
constructor(args) {
|
|
996
998
|
super(`${args.method}: no vesting schedule found for ${args.vestingId}.`, {
|
|
@@ -1004,7 +1006,7 @@ var VestingNotFoundError = class extends chunk2RNW4MIJ_cjs.TokenOpsSdkError {
|
|
|
1004
1006
|
});
|
|
1005
1007
|
}
|
|
1006
1008
|
};
|
|
1007
|
-
var NotVestingRecipientError = class extends
|
|
1009
|
+
var NotVestingRecipientError = class extends chunk67OV5CX2_cjs.TokenOpsSdkError {
|
|
1008
1010
|
name = "NotVestingRecipientError";
|
|
1009
1011
|
constructor(args) {
|
|
1010
1012
|
super(`${args.method}: caller is not the recipient of vesting ${args.vestingId}.`, {
|
|
@@ -1020,7 +1022,7 @@ var NotVestingRecipientError = class extends chunk2RNW4MIJ_cjs.TokenOpsSdkError
|
|
|
1020
1022
|
});
|
|
1021
1023
|
}
|
|
1022
1024
|
};
|
|
1023
|
-
var ClaimLockedError = class extends
|
|
1025
|
+
var ClaimLockedError = class extends chunk67OV5CX2_cjs.TokenOpsSdkError {
|
|
1024
1026
|
name = "ClaimLockedError";
|
|
1025
1027
|
constructor(args) {
|
|
1026
1028
|
const detail = args.unlocksAt !== void 0 ? ` Unlocks at unix timestamp ${args.unlocksAt}.` : "";
|
|
@@ -1036,7 +1038,7 @@ var ClaimLockedError = class extends chunk2RNW4MIJ_cjs.TokenOpsSdkError {
|
|
|
1036
1038
|
});
|
|
1037
1039
|
}
|
|
1038
1040
|
};
|
|
1039
|
-
var VestingRevokedError = class extends
|
|
1041
|
+
var VestingRevokedError = class extends chunk67OV5CX2_cjs.TokenOpsSdkError {
|
|
1040
1042
|
name = "VestingRevokedError";
|
|
1041
1043
|
constructor(args) {
|
|
1042
1044
|
const detail = args.revokedAt !== void 0 ? ` at unix timestamp ${args.revokedAt}` : "";
|
|
@@ -1052,7 +1054,7 @@ var VestingRevokedError = class extends chunk2RNW4MIJ_cjs.TokenOpsSdkError {
|
|
|
1052
1054
|
});
|
|
1053
1055
|
}
|
|
1054
1056
|
};
|
|
1055
|
-
var VestingNotRevocableError = class extends
|
|
1057
|
+
var VestingNotRevocableError = class extends chunk67OV5CX2_cjs.TokenOpsSdkError {
|
|
1056
1058
|
name = "VestingNotRevocableError";
|
|
1057
1059
|
constructor(args) {
|
|
1058
1060
|
super(`${args.method}: vesting ${args.vestingId} was created as non-revocable.`, {
|
|
@@ -1066,7 +1068,7 @@ var VestingNotRevocableError = class extends chunk2RNW4MIJ_cjs.TokenOpsSdkError
|
|
|
1066
1068
|
});
|
|
1067
1069
|
}
|
|
1068
1070
|
};
|
|
1069
|
-
var VestingExpiredError = class extends
|
|
1071
|
+
var VestingExpiredError = class extends chunk67OV5CX2_cjs.TokenOpsSdkError {
|
|
1070
1072
|
name = "VestingExpiredError";
|
|
1071
1073
|
constructor(args) {
|
|
1072
1074
|
super(`${args.method}: vesting ${args.vestingId} has already ended.`, {
|
|
@@ -1081,7 +1083,7 @@ var VestingExpiredError = class extends chunk2RNW4MIJ_cjs.TokenOpsSdkError {
|
|
|
1081
1083
|
});
|
|
1082
1084
|
}
|
|
1083
1085
|
};
|
|
1084
|
-
var TransferAlreadyPendingError = class extends
|
|
1086
|
+
var TransferAlreadyPendingError = class extends chunk67OV5CX2_cjs.TokenOpsSdkError {
|
|
1085
1087
|
name = "TransferAlreadyPendingError";
|
|
1086
1088
|
constructor(args) {
|
|
1087
1089
|
super(`${args.method}: a transfer is already pending for vesting ${args.vestingId}.`, {
|
|
@@ -1097,7 +1099,7 @@ var TransferAlreadyPendingError = class extends chunk2RNW4MIJ_cjs.TokenOpsSdkErr
|
|
|
1097
1099
|
});
|
|
1098
1100
|
}
|
|
1099
1101
|
};
|
|
1100
|
-
var NoPendingTransferError = class extends
|
|
1102
|
+
var NoPendingTransferError = class extends chunk67OV5CX2_cjs.TokenOpsSdkError {
|
|
1101
1103
|
name = "NoPendingTransferError";
|
|
1102
1104
|
constructor(args) {
|
|
1103
1105
|
super(`${args.method}: no pending transfer for vesting ${args.vestingId}.`, {
|
|
@@ -1111,7 +1113,7 @@ var NoPendingTransferError = class extends chunk2RNW4MIJ_cjs.TokenOpsSdkError {
|
|
|
1111
1113
|
});
|
|
1112
1114
|
}
|
|
1113
1115
|
};
|
|
1114
|
-
var NotPendingRecipientError = class extends
|
|
1116
|
+
var NotPendingRecipientError = class extends chunk67OV5CX2_cjs.TokenOpsSdkError {
|
|
1115
1117
|
name = "NotPendingRecipientError";
|
|
1116
1118
|
constructor(args) {
|
|
1117
1119
|
super(`${args.method}: caller is not the pending recipient of vesting ${args.vestingId}.`, {
|
|
@@ -1127,7 +1129,7 @@ var NotPendingRecipientError = class extends chunk2RNW4MIJ_cjs.TokenOpsSdkError
|
|
|
1127
1129
|
});
|
|
1128
1130
|
}
|
|
1129
1131
|
};
|
|
1130
|
-
var TransferExpiredError = class extends
|
|
1132
|
+
var TransferExpiredError = class extends chunk67OV5CX2_cjs.TokenOpsSdkError {
|
|
1131
1133
|
name = "TransferExpiredError";
|
|
1132
1134
|
constructor(args) {
|
|
1133
1135
|
super(`${args.method}: pending transfer for vesting ${args.vestingId} has expired.`, {
|
|
@@ -1180,7 +1182,7 @@ var ConfidentialVestingManagerClient = class {
|
|
|
1180
1182
|
constructor(config) {
|
|
1181
1183
|
this.publicClient = config.publicClient;
|
|
1182
1184
|
this.walletClient = config.walletClient;
|
|
1183
|
-
this.address =
|
|
1185
|
+
this.address = chunkJK4XMMKM_cjs.normaliseAddress(config.address);
|
|
1184
1186
|
this.encryptor = config.encryptor;
|
|
1185
1187
|
this.#telemetry = config.telemetry;
|
|
1186
1188
|
this.#aclAddressOverride = config.aclAddress;
|
|
@@ -1189,8 +1191,8 @@ var ConfidentialVestingManagerClient = class {
|
|
|
1189
1191
|
surface: "manager",
|
|
1190
1192
|
chainId: chainIdForInit ?? null,
|
|
1191
1193
|
hasWallet: !!this.walletClient,
|
|
1192
|
-
aclResolved: !!config.aclAddress || chainIdForInit !== void 0 && !!
|
|
1193
|
-
sdkVersion:
|
|
1194
|
+
aclResolved: !!config.aclAddress || chainIdForInit !== void 0 && !!chunkFAXIIH5R_cjs.getFhevmAclAddress(chainIdForInit),
|
|
1195
|
+
sdkVersion: chunkUG5RKLU2_cjs.SDK_VERSION
|
|
1194
1196
|
});
|
|
1195
1197
|
}
|
|
1196
1198
|
/**
|
|
@@ -1201,7 +1203,7 @@ var ConfidentialVestingManagerClient = class {
|
|
|
1201
1203
|
*/
|
|
1202
1204
|
get aclAddress() {
|
|
1203
1205
|
if (this.#cachedAclAddress) return this.#cachedAclAddress;
|
|
1204
|
-
this.#cachedAclAddress = this.#aclAddressOverride ??
|
|
1206
|
+
this.#cachedAclAddress = this.#aclAddressOverride ?? chunkFAXIIH5R_cjs.requireFhevmAclAddress(this.publicClient.chain?.id, "ConfidentialVestingManagerClient");
|
|
1205
1207
|
return this.#cachedAclAddress;
|
|
1206
1208
|
}
|
|
1207
1209
|
// ============================================================
|
|
@@ -1444,11 +1446,11 @@ var ConfidentialVestingManagerClient = class {
|
|
|
1444
1446
|
);
|
|
1445
1447
|
}
|
|
1446
1448
|
if (paused) {
|
|
1447
|
-
blockers.push(new
|
|
1449
|
+
blockers.push(new chunk67OV5CX2_cjs.PausedError({ method: "claim", contractAddress: this.address }));
|
|
1448
1450
|
}
|
|
1449
1451
|
if (feeInfo.feeType === 0 /* Gas */ && callerBalance < feeInfo.fee) {
|
|
1450
1452
|
blockers.push(
|
|
1451
|
-
new
|
|
1453
|
+
new chunk67OV5CX2_cjs.InsufficientFeeError({
|
|
1452
1454
|
method: "claim",
|
|
1453
1455
|
contractAddress: this.address,
|
|
1454
1456
|
feeKind: "gas",
|
|
@@ -1534,7 +1536,7 @@ var ConfidentialVestingManagerClient = class {
|
|
|
1534
1536
|
const isOperatorSet = operatorRead.ok ? operatorRead.value : false;
|
|
1535
1537
|
if (!hasCreatorRole) {
|
|
1536
1538
|
pushBlocker(
|
|
1537
|
-
new
|
|
1539
|
+
new chunk67OV5CX2_cjs.AccessDeniedError({
|
|
1538
1540
|
method: "createVesting",
|
|
1539
1541
|
contractAddress: this.address,
|
|
1540
1542
|
account: args.creator,
|
|
@@ -1544,7 +1546,7 @@ var ConfidentialVestingManagerClient = class {
|
|
|
1544
1546
|
}
|
|
1545
1547
|
if (!operatorRead.ok) {
|
|
1546
1548
|
pushBlocker(
|
|
1547
|
-
new
|
|
1549
|
+
new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
1548
1550
|
method: "createVesting",
|
|
1549
1551
|
argument: "token",
|
|
1550
1552
|
reason: "does not implement the ERC-7984 `isOperator(address,address)` view \u2014 it is not a confidential token (or the address holds no contract on this chain)",
|
|
@@ -1553,7 +1555,7 @@ var ConfidentialVestingManagerClient = class {
|
|
|
1553
1555
|
);
|
|
1554
1556
|
} else if (!isOperatorSet) {
|
|
1555
1557
|
pushBlocker(
|
|
1556
|
-
new
|
|
1558
|
+
new chunk67OV5CX2_cjs.OperatorNotApprovedError({
|
|
1557
1559
|
method: "createVesting",
|
|
1558
1560
|
contractAddress: this.address,
|
|
1559
1561
|
tokenAddress: token,
|
|
@@ -1712,7 +1714,7 @@ var ConfidentialVestingManagerClient = class {
|
|
|
1712
1714
|
async batchCreateVesting(args) {
|
|
1713
1715
|
return chunkVJKZWYYJ_cjs.withTelemetry(this.#telemetry, "fhe-vesting.manager.batchCreateVesting", async () => {
|
|
1714
1716
|
if (args.items.length === 0) {
|
|
1715
|
-
throw new
|
|
1717
|
+
throw new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
1716
1718
|
method: "batchCreateVesting",
|
|
1717
1719
|
argument: "items",
|
|
1718
1720
|
reason: "must be non-empty"
|
|
@@ -1723,21 +1725,21 @@ var ConfidentialVestingManagerClient = class {
|
|
|
1723
1725
|
);
|
|
1724
1726
|
const wallet = this.#requireWallet("batchCreateVesting");
|
|
1725
1727
|
const account = this.#resolveAccount(wallet, args.account, "batchCreateVesting");
|
|
1726
|
-
const encryptor = args.encryptor ??
|
|
1728
|
+
const encryptor = args.encryptor ?? chunk3QHNYEQD_cjs.resolveEncryptor(this.encryptor);
|
|
1727
1729
|
if (!encryptor) {
|
|
1728
|
-
throw new
|
|
1730
|
+
throw new chunk67OV5CX2_cjs.MissingEncryptorError("batchCreateVesting");
|
|
1729
1731
|
}
|
|
1730
1732
|
const userAddress = accountAddress(account);
|
|
1731
1733
|
let batch;
|
|
1732
1734
|
try {
|
|
1733
|
-
batch = await
|
|
1735
|
+
batch = await chunk3QHNYEQD_cjs.encryptUint64Batch({
|
|
1734
1736
|
encryptor,
|
|
1735
1737
|
contractAddress: this.address,
|
|
1736
1738
|
userAddress,
|
|
1737
1739
|
values: args.items.map((it) => it.amount)
|
|
1738
1740
|
});
|
|
1739
1741
|
} catch (err) {
|
|
1740
|
-
throw
|
|
1742
|
+
throw chunkTEBM66WA_cjs.mapZamaError(err, { method: "batchCreateVesting", operation: "encrypt" });
|
|
1741
1743
|
}
|
|
1742
1744
|
try {
|
|
1743
1745
|
return await wallet.writeContract({
|
|
@@ -1921,7 +1923,7 @@ var ConfidentialVestingManagerClient = class {
|
|
|
1921
1923
|
*/
|
|
1922
1924
|
async batchRevokeVesting(vestingIds, account) {
|
|
1923
1925
|
if (vestingIds.length === 0) {
|
|
1924
|
-
throw new
|
|
1926
|
+
throw new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
1925
1927
|
method: "batchRevokeVesting",
|
|
1926
1928
|
argument: "vestingIds",
|
|
1927
1929
|
reason: "must be non-empty"
|
|
@@ -1977,7 +1979,7 @@ var ConfidentialVestingManagerClient = class {
|
|
|
1977
1979
|
async splitVesting(args) {
|
|
1978
1980
|
const wallet = this.#requireWallet("splitVesting");
|
|
1979
1981
|
const account = this.#resolveAccount(wallet, args.account, "splitVesting");
|
|
1980
|
-
const { numerator, denominator } = args.preScaled ? { numerator: args.numerator, denominator: args.denominator } :
|
|
1982
|
+
const { numerator, denominator } = args.preScaled ? { numerator: args.numerator, denominator: args.denominator } : chunk3QHNYEQD_cjs.scaleRatio({
|
|
1981
1983
|
numerator: args.numerator,
|
|
1982
1984
|
denominator: args.denominator,
|
|
1983
1985
|
// The encrypted numerator is submitted via `encryptUint64`, so
|
|
@@ -1987,7 +1989,7 @@ var ConfidentialVestingManagerClient = class {
|
|
|
1987
1989
|
width: "uint64"
|
|
1988
1990
|
});
|
|
1989
1991
|
if (denominator < 10000n) {
|
|
1990
|
-
throw new
|
|
1992
|
+
throw new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
1991
1993
|
method: "splitVesting",
|
|
1992
1994
|
argument: "denominator",
|
|
1993
1995
|
reason: "must be \u2265 10000 (the contract's MIN_SPLIT_DENOMINATOR floor)",
|
|
@@ -1995,7 +1997,7 @@ var ConfidentialVestingManagerClient = class {
|
|
|
1995
1997
|
});
|
|
1996
1998
|
}
|
|
1997
1999
|
if (args.newRecipient === ZERO_ADDRESS) {
|
|
1998
|
-
throw new
|
|
2000
|
+
throw new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
1999
2001
|
method: "splitVesting",
|
|
2000
2002
|
argument: "newRecipient",
|
|
2001
2003
|
reason: "must not be the zero address"
|
|
@@ -2035,7 +2037,7 @@ var ConfidentialVestingManagerClient = class {
|
|
|
2035
2037
|
(ev) => ev.args.originalVestingId.toLowerCase() === args.vestingId.toLowerCase() && ev.args.newRecipient.toLowerCase() === args.newRecipient.toLowerCase()
|
|
2036
2038
|
);
|
|
2037
2039
|
if (matches.length === 0) {
|
|
2038
|
-
throw new
|
|
2040
|
+
throw new chunk67OV5CX2_cjs.ReceiptEventNotFoundError({
|
|
2039
2041
|
method: "splitVesting",
|
|
2040
2042
|
eventName: "VestingSplit",
|
|
2041
2043
|
contractAddress: this.address,
|
|
@@ -2044,7 +2046,7 @@ var ConfidentialVestingManagerClient = class {
|
|
|
2044
2046
|
});
|
|
2045
2047
|
}
|
|
2046
2048
|
if (matches.length > 1) {
|
|
2047
|
-
throw new
|
|
2049
|
+
throw new chunk67OV5CX2_cjs.ReceiptEventAmbiguousError({
|
|
2048
2050
|
method: "splitVesting",
|
|
2049
2051
|
eventName: "VestingSplit",
|
|
2050
2052
|
contractAddress: this.address,
|
|
@@ -2065,7 +2067,7 @@ var ConfidentialVestingManagerClient = class {
|
|
|
2065
2067
|
*/
|
|
2066
2068
|
async initiateVestingTransfer(args) {
|
|
2067
2069
|
if (!viem.isAddress(args.newRecipient, { strict: true })) {
|
|
2068
|
-
throw new
|
|
2070
|
+
throw new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
2069
2071
|
method: "initiateVestingTransfer",
|
|
2070
2072
|
argument: "newRecipient",
|
|
2071
2073
|
reason: "must be a valid EIP-55 checksummed address",
|
|
@@ -2073,14 +2075,14 @@ var ConfidentialVestingManagerClient = class {
|
|
|
2073
2075
|
});
|
|
2074
2076
|
}
|
|
2075
2077
|
if (args.newRecipient === ZERO_ADDRESS) {
|
|
2076
|
-
throw new
|
|
2078
|
+
throw new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
2077
2079
|
method: "initiateVestingTransfer",
|
|
2078
2080
|
argument: "newRecipient",
|
|
2079
2081
|
reason: "must not be the zero address"
|
|
2080
2082
|
});
|
|
2081
2083
|
}
|
|
2082
2084
|
if (args.transferDurationSeconds <= 0) {
|
|
2083
|
-
throw new
|
|
2085
|
+
throw new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
2084
2086
|
method: "initiateVestingTransfer",
|
|
2085
2087
|
argument: "transferDurationSeconds",
|
|
2086
2088
|
reason: "must be > 0",
|
|
@@ -2119,7 +2121,7 @@ var ConfidentialVestingManagerClient = class {
|
|
|
2119
2121
|
*/
|
|
2120
2122
|
async directVestingTransfer(vestingId, newOwner, account) {
|
|
2121
2123
|
if (!viem.isAddress(newOwner, { strict: true })) {
|
|
2122
|
-
throw new
|
|
2124
|
+
throw new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
2123
2125
|
method: "directVestingTransfer",
|
|
2124
2126
|
argument: "newOwner",
|
|
2125
2127
|
reason: "must be a valid EIP-55 checksummed address",
|
|
@@ -2127,7 +2129,7 @@ var ConfidentialVestingManagerClient = class {
|
|
|
2127
2129
|
});
|
|
2128
2130
|
}
|
|
2129
2131
|
if (newOwner === ZERO_ADDRESS) {
|
|
2130
|
-
throw new
|
|
2132
|
+
throw new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
2131
2133
|
method: "directVestingTransfer",
|
|
2132
2134
|
argument: "newOwner",
|
|
2133
2135
|
reason: "must not be the zero address"
|
|
@@ -2167,14 +2169,14 @@ var ConfidentialVestingManagerClient = class {
|
|
|
2167
2169
|
*/
|
|
2168
2170
|
async batchDiscloseToParty(args) {
|
|
2169
2171
|
if (args.vestingIds.length === 0) {
|
|
2170
|
-
throw new
|
|
2172
|
+
throw new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
2171
2173
|
method: "batchDiscloseToParty",
|
|
2172
2174
|
argument: "vestingIds",
|
|
2173
2175
|
reason: "must be non-empty"
|
|
2174
2176
|
});
|
|
2175
2177
|
}
|
|
2176
2178
|
if (args.vestingIds.length !== args.disclosureTypes.length) {
|
|
2177
|
-
throw new
|
|
2179
|
+
throw new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
2178
2180
|
method: "batchDiscloseToParty",
|
|
2179
2181
|
argument: "disclosureTypes",
|
|
2180
2182
|
reason: `length mismatch: vestingIds=${args.vestingIds.length}, disclosureTypes=${args.disclosureTypes.length}`
|
|
@@ -2207,14 +2209,14 @@ var ConfidentialVestingManagerClient = class {
|
|
|
2207
2209
|
*/
|
|
2208
2210
|
async adminBatchDiscloseToParty(args) {
|
|
2209
2211
|
if (args.vestingIds.length === 0) {
|
|
2210
|
-
throw new
|
|
2212
|
+
throw new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
2211
2213
|
method: "adminBatchDiscloseToParty",
|
|
2212
2214
|
argument: "vestingIds",
|
|
2213
2215
|
reason: "must be non-empty"
|
|
2214
2216
|
});
|
|
2215
2217
|
}
|
|
2216
2218
|
if (args.vestingIds.length !== args.disclosureTypes.length) {
|
|
2217
|
-
throw new
|
|
2219
|
+
throw new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
2218
2220
|
method: "adminBatchDiscloseToParty",
|
|
2219
2221
|
argument: "disclosureTypes",
|
|
2220
2222
|
reason: `length mismatch: vestingIds=${args.vestingIds.length}, disclosureTypes=${args.disclosureTypes.length}`
|
|
@@ -2246,7 +2248,7 @@ var ConfidentialVestingManagerClient = class {
|
|
|
2246
2248
|
*/
|
|
2247
2249
|
async batchDiscloseHandlesToParty(handles, party, account) {
|
|
2248
2250
|
if (handles.length === 0) {
|
|
2249
|
-
throw new
|
|
2251
|
+
throw new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
2250
2252
|
method: "batchDiscloseHandlesToParty",
|
|
2251
2253
|
argument: "handles",
|
|
2252
2254
|
reason: "must be non-empty"
|
|
@@ -2335,7 +2337,7 @@ var ConfidentialVestingManagerClient = class {
|
|
|
2335
2337
|
*/
|
|
2336
2338
|
async withdrawTokenFee(args) {
|
|
2337
2339
|
if (args.to === ZERO_ADDRESS) {
|
|
2338
|
-
throw new
|
|
2340
|
+
throw new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
2339
2341
|
method: "withdrawTokenFee",
|
|
2340
2342
|
argument: "to",
|
|
2341
2343
|
reason: "must not be the zero address"
|
|
@@ -2500,33 +2502,33 @@ var ConfidentialVestingManagerClient = class {
|
|
|
2500
2502
|
// ============================================================
|
|
2501
2503
|
#requireWallet(method) {
|
|
2502
2504
|
if (!this.walletClient) {
|
|
2503
|
-
throw new
|
|
2505
|
+
throw new chunk67OV5CX2_cjs.MissingWalletClientError(method);
|
|
2504
2506
|
}
|
|
2505
2507
|
return this.walletClient;
|
|
2506
2508
|
}
|
|
2507
2509
|
#resolveAccount(wallet, override, method) {
|
|
2508
2510
|
const acct = override ?? wallet.account;
|
|
2509
2511
|
if (!acct) {
|
|
2510
|
-
throw new
|
|
2512
|
+
throw new chunk67OV5CX2_cjs.MissingAccountError(method);
|
|
2511
2513
|
}
|
|
2512
2514
|
return acct;
|
|
2513
2515
|
}
|
|
2514
2516
|
async #encryptUint64(value, encryptor, account) {
|
|
2515
|
-
const enc = encryptor ??
|
|
2517
|
+
const enc = encryptor ?? chunk3QHNYEQD_cjs.resolveEncryptor(this.encryptor);
|
|
2516
2518
|
if (!enc) {
|
|
2517
|
-
throw new
|
|
2519
|
+
throw new chunk67OV5CX2_cjs.MissingEncryptorError("encryptUint64", {
|
|
2518
2520
|
hint: "Pass `encryptor` to the call or the client config (eager or lazy factory)."
|
|
2519
2521
|
});
|
|
2520
2522
|
}
|
|
2521
2523
|
try {
|
|
2522
|
-
return await
|
|
2524
|
+
return await chunk3QHNYEQD_cjs.encryptUint64({
|
|
2523
2525
|
encryptor: enc,
|
|
2524
2526
|
contractAddress: this.address,
|
|
2525
2527
|
userAddress: accountAddress(account),
|
|
2526
2528
|
value
|
|
2527
2529
|
});
|
|
2528
2530
|
} catch (err) {
|
|
2529
|
-
throw
|
|
2531
|
+
throw chunkTEBM66WA_cjs.mapZamaError(err, { method: "encryptUint64", operation: "encrypt" });
|
|
2530
2532
|
}
|
|
2531
2533
|
}
|
|
2532
2534
|
/**
|
|
@@ -2540,14 +2542,14 @@ var ConfidentialVestingManagerClient = class {
|
|
|
2540
2542
|
const hasAmount = args.amount !== void 0;
|
|
2541
2543
|
const hasInput = args.encryptedInput !== void 0;
|
|
2542
2544
|
if (hasAmount && hasInput) {
|
|
2543
|
-
throw new
|
|
2545
|
+
throw new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
2544
2546
|
method: args.method,
|
|
2545
2547
|
argument: "amount/encryptedInput",
|
|
2546
2548
|
reason: "exactly one of `amount` (plaintext, SDK encrypts) or `encryptedInput` (pre-encrypted) must be supplied \u2014 got both"
|
|
2547
2549
|
});
|
|
2548
2550
|
}
|
|
2549
2551
|
if (!hasAmount && !hasInput) {
|
|
2550
|
-
throw new
|
|
2552
|
+
throw new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
2551
2553
|
method: args.method,
|
|
2552
2554
|
argument: "amount/encryptedInput",
|
|
2553
2555
|
reason: "exactly one of `amount` (plaintext, SDK encrypts) or `encryptedInput` (pre-encrypted) must be supplied \u2014 got neither"
|
|
@@ -2563,7 +2565,7 @@ var ConfidentialVestingManagerClient = class {
|
|
|
2563
2565
|
* the offending schedule id in its context.
|
|
2564
2566
|
*/
|
|
2565
2567
|
#mapRevert(method, err, productContext, account) {
|
|
2566
|
-
return
|
|
2568
|
+
return chunkMVDQMV25_cjs.mapContractRevert(err, {
|
|
2567
2569
|
method,
|
|
2568
2570
|
contractAddress: this.address,
|
|
2569
2571
|
abi: confidentialVestingManagerAbi,
|
|
@@ -2609,7 +2611,7 @@ var ConfidentialVestingManagerClient = class {
|
|
|
2609
2611
|
...value !== void 0 ? { value } : {}
|
|
2610
2612
|
});
|
|
2611
2613
|
} catch (err) {
|
|
2612
|
-
if (
|
|
2614
|
+
if (chunkMVDQMV25_cjs.isContractRevert(err)) {
|
|
2613
2615
|
throw this.#mapRevert(method, err, productContext, accountAddress(account));
|
|
2614
2616
|
}
|
|
2615
2617
|
}
|
|
@@ -2622,7 +2624,7 @@ var ConfidentialVestingManagerClient = class {
|
|
|
2622
2624
|
*/
|
|
2623
2625
|
async #discloseSingleWithReceipt(input) {
|
|
2624
2626
|
if (!viem.isAddress(input.party, { strict: true })) {
|
|
2625
|
-
throw new
|
|
2627
|
+
throw new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
2626
2628
|
method: input.functionName,
|
|
2627
2629
|
argument: "party",
|
|
2628
2630
|
reason: "must be a valid EIP-55 checksummed address",
|
|
@@ -2659,7 +2661,7 @@ var ConfidentialVestingManagerClient = class {
|
|
|
2659
2661
|
(ev) => ev.args.vestingId.toLowerCase() === input.vestingId.toLowerCase() && ev.args.discloser.toLowerCase() === callerAddress && ev.args.party.toLowerCase() === input.party.toLowerCase()
|
|
2660
2662
|
);
|
|
2661
2663
|
if (matches.length === 0) {
|
|
2662
|
-
throw new
|
|
2664
|
+
throw new chunk67OV5CX2_cjs.ReceiptEventNotFoundError({
|
|
2663
2665
|
method: input.functionName,
|
|
2664
2666
|
eventName: "AmountDisclosed",
|
|
2665
2667
|
contractAddress: this.address,
|
|
@@ -2668,7 +2670,7 @@ var ConfidentialVestingManagerClient = class {
|
|
|
2668
2670
|
});
|
|
2669
2671
|
}
|
|
2670
2672
|
if (matches.length > 1) {
|
|
2671
|
-
throw new
|
|
2673
|
+
throw new chunk67OV5CX2_cjs.ReceiptEventAmbiguousError({
|
|
2672
2674
|
method: input.functionName,
|
|
2673
2675
|
eventName: "AmountDisclosed",
|
|
2674
2676
|
contractAddress: this.address,
|
|
@@ -2685,7 +2687,7 @@ var ConfidentialVestingManagerClient = class {
|
|
|
2685
2687
|
*/
|
|
2686
2688
|
async #discloseBatchWithReceipt(input) {
|
|
2687
2689
|
if (!viem.isAddress(input.party, { strict: true })) {
|
|
2688
|
-
throw new
|
|
2690
|
+
throw new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
2689
2691
|
method: input.functionName,
|
|
2690
2692
|
argument: "party",
|
|
2691
2693
|
reason: "must be a valid EIP-55 checksummed address",
|
|
@@ -2724,7 +2726,7 @@ var ConfidentialVestingManagerClient = class {
|
|
|
2724
2726
|
for (const id of input.vestingIds) {
|
|
2725
2727
|
const handle = byVestingId.get(id.toLowerCase());
|
|
2726
2728
|
if (handle === void 0) {
|
|
2727
|
-
throw new
|
|
2729
|
+
throw new chunk67OV5CX2_cjs.ReceiptEventNotFoundError({
|
|
2728
2730
|
method: input.functionName,
|
|
2729
2731
|
eventName: "AmountDisclosed",
|
|
2730
2732
|
contractAddress: this.address,
|
|
@@ -2790,12 +2792,12 @@ var ConfidentialVestingManagerClient = class {
|
|
|
2790
2792
|
const aclLogs = receipt.logs.filter(
|
|
2791
2793
|
(log) => log.address.toLowerCase() === this.aclAddress.toLowerCase()
|
|
2792
2794
|
);
|
|
2793
|
-
const events = viem.parseEventLogs({ abi: [
|
|
2795
|
+
const events = viem.parseEventLogs({ abi: [chunkFAXIIH5R_cjs.ACL_ALLOWED_EVENT], logs: aclLogs });
|
|
2794
2796
|
const granted = events.filter(
|
|
2795
2797
|
(ev) => ev.args.account.toLowerCase() === callerAddress && ev.args.caller.toLowerCase() === this.address.toLowerCase()
|
|
2796
2798
|
);
|
|
2797
2799
|
if (granted.length === 0) {
|
|
2798
|
-
throw new
|
|
2800
|
+
throw new chunk67OV5CX2_cjs.ReceiptEventNotFoundError({
|
|
2799
2801
|
method: functionName,
|
|
2800
2802
|
eventName: "Allowed",
|
|
2801
2803
|
contractAddress: this.aclAddress,
|
|
@@ -2804,7 +2806,7 @@ var ConfidentialVestingManagerClient = class {
|
|
|
2804
2806
|
});
|
|
2805
2807
|
}
|
|
2806
2808
|
if (granted.length > 1) {
|
|
2807
|
-
throw new
|
|
2809
|
+
throw new chunk67OV5CX2_cjs.ReceiptEventAmbiguousError({
|
|
2808
2810
|
method: functionName,
|
|
2809
2811
|
eventName: "Allowed",
|
|
2810
2812
|
contractAddress: this.aclAddress,
|
|
@@ -2812,15 +2814,15 @@ var ConfidentialVestingManagerClient = class {
|
|
|
2812
2814
|
count: granted.length
|
|
2813
2815
|
});
|
|
2814
2816
|
}
|
|
2815
|
-
const handle =
|
|
2816
|
-
return { handle, hash:
|
|
2817
|
+
const handle = chunk66IHPTOK_cjs.asEncryptedHandle(granted[0].args.handle);
|
|
2818
|
+
return { handle, hash: chunk66IHPTOK_cjs.asTxHash(hash) };
|
|
2817
2819
|
}
|
|
2818
2820
|
};
|
|
2819
2821
|
function createConfidentialVestingManagerClient(config) {
|
|
2820
2822
|
return new ConfidentialVestingManagerClient(config);
|
|
2821
2823
|
}
|
|
2822
2824
|
function isNotErc7984Failure(err) {
|
|
2823
|
-
if (
|
|
2825
|
+
if (chunkMVDQMV25_cjs.isContractRevert(err)) return true;
|
|
2824
2826
|
if (!(err instanceof viem.BaseError)) return false;
|
|
2825
2827
|
return err.walk((e) => e instanceof viem.ContractFunctionZeroDataError) instanceof viem.ContractFunctionZeroDataError;
|
|
2826
2828
|
}
|
|
@@ -2832,7 +2834,7 @@ function collectVestingParamsErrors(params, where) {
|
|
|
2832
2834
|
const errors = [];
|
|
2833
2835
|
if (!viem.isAddress(params.recipient, { strict: true })) {
|
|
2834
2836
|
errors.push(
|
|
2835
|
-
new
|
|
2837
|
+
new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
2836
2838
|
method: where,
|
|
2837
2839
|
argument: "recipient",
|
|
2838
2840
|
reason: "must be a valid EIP-55 checksummed address",
|
|
@@ -2841,7 +2843,7 @@ function collectVestingParamsErrors(params, where) {
|
|
|
2841
2843
|
);
|
|
2842
2844
|
} else if (params.recipient === ZERO_ADDRESS) {
|
|
2843
2845
|
errors.push(
|
|
2844
|
-
new
|
|
2846
|
+
new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
2845
2847
|
method: where,
|
|
2846
2848
|
argument: "recipient",
|
|
2847
2849
|
reason: "must not be the zero address"
|
|
@@ -2850,7 +2852,7 @@ function collectVestingParamsErrors(params, where) {
|
|
|
2850
2852
|
}
|
|
2851
2853
|
if (params.startTimestamp >= params.endTimestamp) {
|
|
2852
2854
|
errors.push(
|
|
2853
|
-
new
|
|
2855
|
+
new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
2854
2856
|
method: where,
|
|
2855
2857
|
argument: "startTimestamp/endTimestamp",
|
|
2856
2858
|
reason: "startTimestamp must be strictly less than endTimestamp",
|
|
@@ -2860,7 +2862,7 @@ function collectVestingParamsErrors(params, where) {
|
|
|
2860
2862
|
}
|
|
2861
2863
|
if (params.startTimestamp < params.endTimestamp && params.startTimestamp + params.cliffSeconds > params.endTimestamp) {
|
|
2862
2864
|
errors.push(
|
|
2863
|
-
new
|
|
2865
|
+
new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
2864
2866
|
method: where,
|
|
2865
2867
|
argument: "cliffSeconds",
|
|
2866
2868
|
reason: "cliff cannot extend past endTimestamp",
|
|
@@ -2870,7 +2872,7 @@ function collectVestingParamsErrors(params, where) {
|
|
|
2870
2872
|
}
|
|
2871
2873
|
if (params.initialUnlockBps + params.cliffAmountBps > 1e4) {
|
|
2872
2874
|
errors.push(
|
|
2873
|
-
new
|
|
2875
|
+
new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
2874
2876
|
method: where,
|
|
2875
2877
|
argument: "initialUnlockBps + cliffAmountBps",
|
|
2876
2878
|
reason: "must be \u2264 10000 (100%)",
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { SDK_VERSION
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { SDK_VERSION } from './chunk-NWFMBLSQ.js';
|
|
2
|
+
import { mapContractRevert, isContractRevert } from './chunk-4RAAATVY.js';
|
|
3
|
+
import { getFheVestingFactoryAddress } from './chunk-A4DCEE33.js';
|
|
4
|
+
import { normaliseAddress } from './chunk-ZA673I3O.js';
|
|
5
|
+
import { asTxHash } from './chunk-KWFFIJYX.js';
|
|
6
|
+
import { DeploymentAddressUnavailableError, TokenOpsSdkError, MissingWalletClientError, MissingAccountError } from './chunk-QBJ7O2B4.js';
|
|
5
7
|
import { withTelemetry } from './chunk-Q2GP5UDC.js';
|
|
6
8
|
import { parseEventLogs } from 'viem';
|
|
7
9
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TokenOpsSdkError, InvalidArgumentError, DecryptionFailedError, EncryptionFailedError, RelayerUnreachableError, SigningFailedError, UserRejectedSignatureError, UserDecryptNotAllowedError } from './chunk-
|
|
1
|
+
import { TokenOpsSdkError, InvalidArgumentError, DecryptionFailedError, EncryptionFailedError, RelayerUnreachableError, SigningFailedError, UserRejectedSignatureError, UserDecryptNotAllowedError } from './chunk-QBJ7O2B4.js';
|
|
2
2
|
|
|
3
3
|
// src/core/zama-error-mapper.ts
|
|
4
4
|
function mapZamaError(error, args) {
|