@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,61 +1,629 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../../chunk-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
require('../../../chunk-
|
|
8
|
-
require('../../../chunk-
|
|
9
|
-
require('../../../chunk-
|
|
10
|
-
|
|
11
|
-
require('../../../chunk-
|
|
12
|
-
require('../../../chunk-
|
|
3
|
+
var chunkEBLBPUPI_cjs = require('../../../chunk-EBLBPUPI.cjs');
|
|
4
|
+
require('../../../chunk-PZZK3O3S.cjs');
|
|
5
|
+
require('../../../chunk-AREQJHKA.cjs');
|
|
6
|
+
require('../../../chunk-FAXIIH5R.cjs');
|
|
7
|
+
require('../../../chunk-UG5RKLU2.cjs');
|
|
8
|
+
require('../../../chunk-MVDQMV25.cjs');
|
|
9
|
+
require('../../../chunk-FT5H2Q7Y.cjs');
|
|
10
|
+
require('../../../chunk-JK4XMMKM.cjs');
|
|
11
|
+
require('../../../chunk-66IHPTOK.cjs');
|
|
12
|
+
var chunk67OV5CX2_cjs = require('../../../chunk-67OV5CX2.cjs');
|
|
13
13
|
require('../../../chunk-VJKZWYYJ.cjs');
|
|
14
|
-
var react = require('react');
|
|
15
14
|
var reactQuery = require('@tanstack/react-query');
|
|
16
|
-
var wagmi = require('wagmi');
|
|
17
15
|
|
|
18
|
-
function
|
|
19
|
-
const { params,
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
16
|
+
function usePredictEcdsaAirdropAddress(args) {
|
|
17
|
+
const { params, mode, deployer, userSalt, ...base } = args;
|
|
18
|
+
const { client, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(base);
|
|
19
|
+
return reactQuery.useQuery({
|
|
20
|
+
...args.query,
|
|
21
|
+
queryKey: chunkEBLBPUPI_cjs.airdropQueryKey({
|
|
22
|
+
chainId,
|
|
23
|
+
address: resolvedAddress,
|
|
24
|
+
fn: "predictEcdsaAirdropAddress",
|
|
25
|
+
args: [mode, deployer, userSalt]
|
|
26
|
+
}),
|
|
27
|
+
queryFn: () => client.predictEcdsaAirdropAddress({ params, mode, deployer, userSalt }),
|
|
28
|
+
enabled: Boolean(client && (args.query?.enabled ?? true))
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function usePredictMerkleAirdropAddress(args) {
|
|
32
|
+
const { params, mode, deployer, userSalt, ...base } = args;
|
|
33
|
+
const { client, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(base);
|
|
34
|
+
return reactQuery.useQuery({
|
|
35
|
+
...args.query,
|
|
36
|
+
queryKey: chunkEBLBPUPI_cjs.airdropQueryKey({
|
|
37
|
+
chainId,
|
|
38
|
+
address: resolvedAddress,
|
|
39
|
+
fn: "predictMerkleAirdropAddress",
|
|
40
|
+
args: [mode, deployer, userSalt]
|
|
41
|
+
}),
|
|
42
|
+
queryFn: () => client.predictMerkleAirdropAddress({ params, mode, deployer, userSalt }),
|
|
43
|
+
enabled: Boolean(client && (args.query?.enabled ?? true))
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function useClearCompliancePolicy(options = {}) {
|
|
47
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(options);
|
|
48
|
+
const queryClient = reactQuery.useQueryClient();
|
|
49
|
+
return reactQuery.useMutation({
|
|
50
|
+
mutationFn: async (args) => {
|
|
51
|
+
if (!client) {
|
|
52
|
+
throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useClearCompliancePolicy", "factory");
|
|
53
|
+
}
|
|
54
|
+
return client.clearCompliancePolicy(args.creator, args.account);
|
|
55
|
+
},
|
|
56
|
+
onSuccess: (_hash, variables) => {
|
|
57
|
+
const scope = { chainId, address: resolvedAddress };
|
|
58
|
+
void queryClient.invalidateQueries({
|
|
59
|
+
queryKey: chunkEBLBPUPI_cjs.airdropKeys.compliancePolicy(scope, variables.creator)
|
|
60
|
+
});
|
|
61
|
+
void queryClient.invalidateQueries({
|
|
62
|
+
queryKey: chunkEBLBPUPI_cjs.airdropQueryKey({
|
|
63
|
+
...scope,
|
|
64
|
+
fn: "effectiveDelegateToCompliance",
|
|
65
|
+
args: [variables.creator]
|
|
66
|
+
})
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function useClearUpgradeabilityPolicy(options = {}) {
|
|
72
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(options);
|
|
73
|
+
const queryClient = reactQuery.useQueryClient();
|
|
74
|
+
return reactQuery.useMutation({
|
|
75
|
+
mutationFn: async (args) => {
|
|
76
|
+
if (!client) {
|
|
77
|
+
throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useClearUpgradeabilityPolicy", "factory");
|
|
78
|
+
}
|
|
79
|
+
return client.clearUpgradeabilityPolicy(args.creator, args.account);
|
|
80
|
+
},
|
|
81
|
+
onSuccess: (_hash, variables) => {
|
|
82
|
+
const scope = { chainId, address: resolvedAddress };
|
|
83
|
+
void queryClient.invalidateQueries({
|
|
84
|
+
queryKey: chunkEBLBPUPI_cjs.airdropQueryKey({
|
|
85
|
+
...scope,
|
|
86
|
+
fn: "effectiveUpgradeable",
|
|
87
|
+
args: [variables.creator]
|
|
88
|
+
})
|
|
89
|
+
});
|
|
90
|
+
void queryClient.invalidateQueries({
|
|
91
|
+
queryKey: chunkEBLBPUPI_cjs.airdropKeys.upgradeabilityPolicy(scope, variables.creator)
|
|
92
|
+
});
|
|
93
|
+
void queryClient.invalidateQueries({
|
|
94
|
+
queryKey: chunkEBLBPUPI_cjs.airdropKeys.preflightCreateAll(scope)
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
function useDisableCustomFee(options = {}) {
|
|
100
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(options);
|
|
101
|
+
const queryClient = reactQuery.useQueryClient();
|
|
102
|
+
return reactQuery.useMutation({
|
|
103
|
+
mutationFn: async ({ creator, account }) => {
|
|
104
|
+
if (!client) {
|
|
105
|
+
throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useDisableCustomFee", "factory");
|
|
106
|
+
}
|
|
107
|
+
return client.disableCustomFee(creator, account);
|
|
108
|
+
},
|
|
109
|
+
onSuccess: (_hash, variables) => {
|
|
110
|
+
void queryClient.invalidateQueries({
|
|
111
|
+
queryKey: chunkEBLBPUPI_cjs.airdropKeys.customFee({ chainId, address: resolvedAddress }, variables.creator)
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
function useEcdsaInitCodeHash(args) {
|
|
117
|
+
const { params, mode, ...base } = args;
|
|
118
|
+
const { client, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(base);
|
|
119
|
+
return reactQuery.useQuery({
|
|
120
|
+
...args.query,
|
|
121
|
+
// `params` is omitted for the same reason the predict hooks omit it: the
|
|
122
|
+
// ABI demands it but the factory ignores it, so only `mode` (plus the
|
|
123
|
+
// implementation pointer, which is what this read reports) moves the
|
|
124
|
+
// result. If a future factory version makes params hash-affecting, this
|
|
125
|
+
// key has to grow with it.
|
|
126
|
+
queryKey: chunkEBLBPUPI_cjs.airdropQueryKey({
|
|
127
|
+
chainId,
|
|
128
|
+
address: resolvedAddress,
|
|
129
|
+
fn: "getEcdsaInitCodeHash",
|
|
130
|
+
args: [mode]
|
|
131
|
+
}),
|
|
132
|
+
queryFn: () => client.getEcdsaInitCodeHash({ params, mode }),
|
|
133
|
+
enabled: Boolean(client && (args.query?.enabled ?? true))
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
function useFactoryComplianceDelegate(args = {}) {
|
|
137
|
+
const { client, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(args);
|
|
138
|
+
return reactQuery.useQuery({
|
|
139
|
+
...args.query,
|
|
140
|
+
queryKey: chunkEBLBPUPI_cjs.airdropQueryKey({
|
|
141
|
+
chainId,
|
|
142
|
+
address: resolvedAddress,
|
|
143
|
+
fn: "complianceDelegate",
|
|
144
|
+
args: []
|
|
145
|
+
}),
|
|
146
|
+
queryFn: () => client.complianceDelegate(),
|
|
147
|
+
enabled: Boolean(client && (args.query?.enabled ?? true))
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
function useFactoryCompliancePolicy(args = {}) {
|
|
151
|
+
const { creator, ...base } = args;
|
|
152
|
+
const { client, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(base);
|
|
153
|
+
return reactQuery.useQuery({
|
|
154
|
+
...args.query,
|
|
155
|
+
queryKey: chunkEBLBPUPI_cjs.airdropKeys.compliancePolicy({ chainId, address: resolvedAddress }, creator),
|
|
156
|
+
queryFn: async () => {
|
|
157
|
+
const [policy, effective] = await Promise.all([
|
|
158
|
+
client.getCompliancePolicy(creator),
|
|
159
|
+
client.effectiveDelegateToCompliance(creator)
|
|
160
|
+
]);
|
|
161
|
+
return {
|
|
162
|
+
overridden: policy.overridden,
|
|
163
|
+
delegateToCompliance: policy.delegateToCompliance,
|
|
164
|
+
effective
|
|
165
|
+
};
|
|
166
|
+
},
|
|
167
|
+
enabled: Boolean(client && creator && (args.query?.enabled ?? true))
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
function useFactoryCustomFee(args = {}) {
|
|
171
|
+
const { creator, ...base } = args;
|
|
172
|
+
const { client, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(base);
|
|
173
|
+
return reactQuery.useQuery({
|
|
174
|
+
...args.query,
|
|
175
|
+
queryKey: chunkEBLBPUPI_cjs.airdropKeys.customFee({ chainId, address: resolvedAddress }, creator),
|
|
176
|
+
queryFn: () => client.getCustomFee(creator),
|
|
177
|
+
enabled: Boolean(client && creator && (args.query?.enabled ?? true))
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
function useFactoryGrantRole(options = {}) {
|
|
181
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(options);
|
|
182
|
+
const queryClient = reactQuery.useQueryClient();
|
|
183
|
+
return reactQuery.useMutation({
|
|
184
|
+
mutationFn: async (args) => {
|
|
185
|
+
if (!client) {
|
|
186
|
+
throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useFactoryGrantRole", "factory");
|
|
187
|
+
}
|
|
188
|
+
return client.grantRole(args);
|
|
189
|
+
},
|
|
190
|
+
onSuccess: (_hash, variables) => {
|
|
191
|
+
const scope = { chainId, address: resolvedAddress };
|
|
192
|
+
void queryClient.invalidateQueries({
|
|
193
|
+
queryKey: chunkEBLBPUPI_cjs.airdropKeys.factoryHasRole(scope, variables.role, variables.holder)
|
|
194
|
+
});
|
|
195
|
+
void queryClient.invalidateQueries({
|
|
196
|
+
queryKey: chunkEBLBPUPI_cjs.airdropKeys.factoryRoleMembers(scope, variables.role)
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
function useFactoryHasRole(args = {}) {
|
|
202
|
+
const { role, holder, ...base } = args;
|
|
203
|
+
const { client, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(base);
|
|
204
|
+
return reactQuery.useQuery({
|
|
205
|
+
...args.query,
|
|
206
|
+
queryKey: chunkEBLBPUPI_cjs.airdropKeys.factoryHasRole({ chainId, address: resolvedAddress }, role, holder),
|
|
207
|
+
queryFn: () => client.hasRole({ role, holder }),
|
|
208
|
+
enabled: Boolean(client && role && holder && (args.query?.enabled ?? true))
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
function useFactoryImplementations(args = {}) {
|
|
212
|
+
const { client, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(args);
|
|
213
|
+
return reactQuery.useQuery({
|
|
214
|
+
...args.query,
|
|
215
|
+
queryKey: chunkEBLBPUPI_cjs.airdropKeys.implementations({ chainId, address: resolvedAddress }),
|
|
216
|
+
queryFn: async () => {
|
|
217
|
+
const [ecdsa, merkle, complianceManager] = await Promise.all([
|
|
218
|
+
client.ecdsaImplementation(),
|
|
219
|
+
client.merkleImplementation(),
|
|
220
|
+
client.complianceManagerImpl()
|
|
221
|
+
]);
|
|
222
|
+
return { ecdsa, merkle, complianceManager };
|
|
223
|
+
},
|
|
224
|
+
enabled: Boolean(client && (args.query?.enabled ?? true))
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
function useFactoryRenounceRole(options = {}) {
|
|
228
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(options);
|
|
229
|
+
const queryClient = reactQuery.useQueryClient();
|
|
230
|
+
return reactQuery.useMutation({
|
|
231
|
+
mutationFn: async (args) => {
|
|
232
|
+
if (!client) {
|
|
233
|
+
throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useFactoryRenounceRole", "factory");
|
|
234
|
+
}
|
|
235
|
+
return client.renounceRole(args);
|
|
236
|
+
},
|
|
237
|
+
onSuccess: (_hash, variables) => {
|
|
238
|
+
const scope = { chainId, address: resolvedAddress };
|
|
239
|
+
void queryClient.invalidateQueries({ queryKey: chunkEBLBPUPI_cjs.airdropKeys.factoryHasRoleAll(scope) });
|
|
240
|
+
void queryClient.invalidateQueries({
|
|
241
|
+
queryKey: chunkEBLBPUPI_cjs.airdropKeys.factoryRoleMembers(scope, variables.role)
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
function useFactoryRevokeRole(options = {}) {
|
|
247
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(options);
|
|
248
|
+
const queryClient = reactQuery.useQueryClient();
|
|
249
|
+
return reactQuery.useMutation({
|
|
250
|
+
mutationFn: async (args) => {
|
|
251
|
+
if (!client) {
|
|
252
|
+
throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useFactoryRevokeRole", "factory");
|
|
253
|
+
}
|
|
254
|
+
return client.revokeRole(args);
|
|
255
|
+
},
|
|
256
|
+
onSuccess: (_hash, variables) => {
|
|
257
|
+
const scope = { chainId, address: resolvedAddress };
|
|
258
|
+
void queryClient.invalidateQueries({
|
|
259
|
+
queryKey: chunkEBLBPUPI_cjs.airdropKeys.factoryHasRole(scope, variables.role, variables.holder)
|
|
260
|
+
});
|
|
261
|
+
void queryClient.invalidateQueries({
|
|
262
|
+
queryKey: chunkEBLBPUPI_cjs.airdropKeys.factoryRoleMembers(scope, variables.role)
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
function useFactoryRoleConstants(args = {}) {
|
|
268
|
+
const { client, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(args);
|
|
269
|
+
return reactQuery.useQuery({
|
|
270
|
+
// A default, not a lock: `query.staleTime` still wins if a consumer wants refetching.
|
|
271
|
+
staleTime: Infinity,
|
|
272
|
+
...args.query,
|
|
273
|
+
// `fn` label is unique to this hook, so it stays inline rather than in keys.ts.
|
|
274
|
+
queryKey: chunkEBLBPUPI_cjs.airdropQueryKey({
|
|
275
|
+
chainId,
|
|
276
|
+
address: resolvedAddress,
|
|
277
|
+
fn: "factoryRoleConstants",
|
|
278
|
+
args: []
|
|
279
|
+
}),
|
|
280
|
+
queryFn: async () => {
|
|
281
|
+
const [
|
|
282
|
+
FEE_MANAGER_ROLE,
|
|
283
|
+
IMPL_MANAGER_ROLE,
|
|
284
|
+
COMPLIANCE_WIRING_ROLE,
|
|
285
|
+
UPGRADE_MANAGER_ROLE,
|
|
286
|
+
DEFAULT_ADMIN_ROLE
|
|
287
|
+
] = await Promise.all([
|
|
288
|
+
client.FEE_MANAGER_ROLE(),
|
|
289
|
+
client.IMPL_MANAGER_ROLE(),
|
|
290
|
+
client.COMPLIANCE_WIRING_ROLE(),
|
|
291
|
+
client.UPGRADE_MANAGER_ROLE(),
|
|
292
|
+
client.DEFAULT_ADMIN_ROLE()
|
|
293
|
+
]);
|
|
294
|
+
return {
|
|
295
|
+
FEE_MANAGER_ROLE,
|
|
296
|
+
IMPL_MANAGER_ROLE,
|
|
297
|
+
COMPLIANCE_WIRING_ROLE,
|
|
298
|
+
UPGRADE_MANAGER_ROLE,
|
|
299
|
+
DEFAULT_ADMIN_ROLE
|
|
300
|
+
};
|
|
301
|
+
},
|
|
302
|
+
enabled: Boolean(client && (args.query?.enabled ?? true))
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
function useFactoryRoleMembers(args = {}) {
|
|
306
|
+
const { role, ...base } = args;
|
|
307
|
+
const { client, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(base);
|
|
308
|
+
return reactQuery.useQuery({
|
|
309
|
+
...args.query,
|
|
310
|
+
queryKey: chunkEBLBPUPI_cjs.airdropKeys.factoryRoleMembers({ chainId, address: resolvedAddress }, role),
|
|
311
|
+
queryFn: async () => {
|
|
312
|
+
const [members, count] = await Promise.all([
|
|
313
|
+
client.getRoleMembers(role),
|
|
314
|
+
client.getRoleMemberCount(role)
|
|
315
|
+
]);
|
|
316
|
+
return { members, count };
|
|
317
|
+
},
|
|
318
|
+
enabled: Boolean(client && role && (args.query?.enabled ?? true))
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
function useFactoryUpgradeabilityPolicy(args = {}) {
|
|
322
|
+
const { creator, ...base } = args;
|
|
323
|
+
const { client, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(base);
|
|
324
|
+
return reactQuery.useQuery({
|
|
325
|
+
...args.query,
|
|
326
|
+
queryKey: chunkEBLBPUPI_cjs.airdropKeys.upgradeabilityPolicy({ chainId, address: resolvedAddress }, creator),
|
|
327
|
+
queryFn: async () => {
|
|
328
|
+
const [defaultUpgradeable, policy, effective] = await Promise.all([
|
|
329
|
+
client.defaultUpgradeable(),
|
|
330
|
+
client.getUpgradeabilityPolicy(creator),
|
|
331
|
+
client.effectiveUpgradeable(creator)
|
|
332
|
+
]);
|
|
333
|
+
return {
|
|
334
|
+
defaultUpgradeable,
|
|
335
|
+
overridden: policy.overridden,
|
|
336
|
+
allowed: policy.allowed,
|
|
337
|
+
effective
|
|
338
|
+
};
|
|
339
|
+
},
|
|
340
|
+
enabled: Boolean(client && creator && (args.query?.enabled ?? true))
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
function useMerkleInitCodeHash(args) {
|
|
344
|
+
const { params, mode, ...base } = args;
|
|
345
|
+
const { client, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(base);
|
|
346
|
+
return reactQuery.useQuery({
|
|
347
|
+
...args.query,
|
|
348
|
+
// `params` omitted deliberately — see useEcdsaInitCodeHash for why.
|
|
349
|
+
queryKey: chunkEBLBPUPI_cjs.airdropQueryKey({
|
|
350
|
+
chainId,
|
|
35
351
|
address: resolvedAddress,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
});
|
|
39
|
-
}, [resolvedPublicClient, walletClient, resolvedAddress, resolvedChainId]);
|
|
40
|
-
return reactQuery.useQuery({
|
|
41
|
-
queryKey: chunkWO72UBQD_cjs.buildQueryKey(
|
|
42
|
-
"factory:predictAirdropAddress",
|
|
43
|
-
resolvedChainId,
|
|
44
|
-
resolvedAddress,
|
|
45
|
-
params,
|
|
46
|
-
userSalt,
|
|
47
|
-
deployer,
|
|
48
|
-
gasFee
|
|
49
|
-
),
|
|
50
|
-
queryFn: () => client.predictAirdropAddress({
|
|
51
|
-
params,
|
|
52
|
-
userSalt,
|
|
53
|
-
deployer,
|
|
54
|
-
gasFee
|
|
352
|
+
fn: "getMerkleInitCodeHash",
|
|
353
|
+
args: [mode]
|
|
55
354
|
}),
|
|
56
|
-
|
|
57
|
-
|
|
355
|
+
queryFn: () => client.getMerkleInitCodeHash({ params, mode }),
|
|
356
|
+
enabled: Boolean(client && (args.query?.enabled ?? true))
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
function useSetComplianceDelegate(options = {}) {
|
|
360
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(options);
|
|
361
|
+
const queryClient = reactQuery.useQueryClient();
|
|
362
|
+
return reactQuery.useMutation({
|
|
363
|
+
mutationFn: async (args) => {
|
|
364
|
+
if (!client) {
|
|
365
|
+
throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useSetComplianceDelegate", "factory");
|
|
366
|
+
}
|
|
367
|
+
return client.setComplianceDelegate(args.delegate, args.account);
|
|
368
|
+
},
|
|
369
|
+
onSuccess: () => {
|
|
370
|
+
void queryClient.invalidateQueries({
|
|
371
|
+
queryKey: chunkEBLBPUPI_cjs.airdropQueryKey({
|
|
372
|
+
chainId,
|
|
373
|
+
address: resolvedAddress,
|
|
374
|
+
fn: "complianceDelegate",
|
|
375
|
+
args: []
|
|
376
|
+
})
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
function useSetComplianceManagerImpl(options = {}) {
|
|
382
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(options);
|
|
383
|
+
const queryClient = reactQuery.useQueryClient();
|
|
384
|
+
return reactQuery.useMutation({
|
|
385
|
+
mutationFn: async (args) => {
|
|
386
|
+
if (!client) {
|
|
387
|
+
throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useSetComplianceManagerImpl", "factory");
|
|
388
|
+
}
|
|
389
|
+
return client.setComplianceManagerImpl(args.implementation, args.account);
|
|
390
|
+
},
|
|
391
|
+
onSuccess: () => {
|
|
392
|
+
void queryClient.invalidateQueries({
|
|
393
|
+
queryKey: chunkEBLBPUPI_cjs.airdropKeys.implementations({ chainId, address: resolvedAddress })
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
function useSetCompliancePolicy(options = {}) {
|
|
399
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(options);
|
|
400
|
+
const queryClient = reactQuery.useQueryClient();
|
|
401
|
+
return reactQuery.useMutation({
|
|
402
|
+
mutationFn: async (args) => {
|
|
403
|
+
if (!client) {
|
|
404
|
+
throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useSetCompliancePolicy", "factory");
|
|
405
|
+
}
|
|
406
|
+
return client.setCompliancePolicy(args.creator, args.delegateToCompliance, args.account);
|
|
407
|
+
},
|
|
408
|
+
onSuccess: (_hash, variables) => {
|
|
409
|
+
const scope = { chainId, address: resolvedAddress };
|
|
410
|
+
void queryClient.invalidateQueries({
|
|
411
|
+
queryKey: chunkEBLBPUPI_cjs.airdropKeys.compliancePolicy(scope, variables.creator)
|
|
412
|
+
});
|
|
413
|
+
void queryClient.invalidateQueries({
|
|
414
|
+
queryKey: chunkEBLBPUPI_cjs.airdropQueryKey({
|
|
415
|
+
...scope,
|
|
416
|
+
fn: "effectiveDelegateToCompliance",
|
|
417
|
+
args: [variables.creator]
|
|
418
|
+
})
|
|
419
|
+
});
|
|
420
|
+
}
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
function useSetCustomFee(options = {}) {
|
|
424
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(options);
|
|
425
|
+
const queryClient = reactQuery.useQueryClient();
|
|
426
|
+
return reactQuery.useMutation({
|
|
427
|
+
mutationFn: async ({ creator, gasFee, account }) => {
|
|
428
|
+
if (!client) {
|
|
429
|
+
throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useSetCustomFee", "factory");
|
|
430
|
+
}
|
|
431
|
+
return client.setCustomFee(creator, gasFee, account);
|
|
432
|
+
},
|
|
433
|
+
onSuccess: (_hash, variables) => {
|
|
434
|
+
void queryClient.invalidateQueries({
|
|
435
|
+
queryKey: chunkEBLBPUPI_cjs.airdropKeys.customFee({ chainId, address: resolvedAddress }, variables.creator)
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
function useSetDefaultDelegateToCompliance(options = {}) {
|
|
441
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(options);
|
|
442
|
+
const queryClient = reactQuery.useQueryClient();
|
|
443
|
+
return reactQuery.useMutation({
|
|
444
|
+
mutationFn: async (args) => {
|
|
445
|
+
if (!client) {
|
|
446
|
+
throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useSetDefaultDelegateToCompliance", "factory");
|
|
447
|
+
}
|
|
448
|
+
return client.setDefaultDelegateToCompliance(args.on, args.account);
|
|
449
|
+
},
|
|
450
|
+
onSuccess: () => {
|
|
451
|
+
void queryClient.invalidateQueries({
|
|
452
|
+
queryKey: chunkEBLBPUPI_cjs.airdropQueryKeyPrefix({
|
|
453
|
+
chainId,
|
|
454
|
+
address: resolvedAddress,
|
|
455
|
+
fn: "effectiveDelegateToCompliance"
|
|
456
|
+
})
|
|
457
|
+
});
|
|
458
|
+
void queryClient.invalidateQueries({
|
|
459
|
+
queryKey: chunkEBLBPUPI_cjs.airdropKeys.compliancePolicyAll({ chainId, address: resolvedAddress })
|
|
460
|
+
});
|
|
461
|
+
}
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
function useSetDefaultGasFee(options = {}) {
|
|
465
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(options);
|
|
466
|
+
const queryClient = reactQuery.useQueryClient();
|
|
467
|
+
return reactQuery.useMutation({
|
|
468
|
+
mutationFn: async ({ gasFee, account }) => {
|
|
469
|
+
if (!client) {
|
|
470
|
+
throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useSetDefaultGasFee", "factory");
|
|
471
|
+
}
|
|
472
|
+
return client.setDefaultGasFee(gasFee, account);
|
|
473
|
+
},
|
|
474
|
+
onSuccess: () => {
|
|
475
|
+
void queryClient.invalidateQueries({
|
|
476
|
+
queryKey: chunkEBLBPUPI_cjs.airdropKeys.fees({ chainId, address: resolvedAddress })
|
|
477
|
+
});
|
|
478
|
+
}
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
function useSetDefaultUpgradeable(options = {}) {
|
|
482
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(options);
|
|
483
|
+
const queryClient = reactQuery.useQueryClient();
|
|
484
|
+
return reactQuery.useMutation({
|
|
485
|
+
mutationFn: async (args) => {
|
|
486
|
+
if (!client) {
|
|
487
|
+
throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useSetDefaultUpgradeable", "factory");
|
|
488
|
+
}
|
|
489
|
+
return client.setDefaultUpgradeable(args.allowed, args.account);
|
|
490
|
+
},
|
|
491
|
+
onSuccess: () => {
|
|
492
|
+
const scope = { chainId, address: resolvedAddress };
|
|
493
|
+
void queryClient.invalidateQueries({
|
|
494
|
+
queryKey: chunkEBLBPUPI_cjs.airdropQueryKeyPrefix({ ...scope, fn: "effectiveUpgradeable" })
|
|
495
|
+
});
|
|
496
|
+
void queryClient.invalidateQueries({
|
|
497
|
+
queryKey: chunkEBLBPUPI_cjs.airdropKeys.upgradeabilityPolicyAll(scope)
|
|
498
|
+
});
|
|
499
|
+
void queryClient.invalidateQueries({
|
|
500
|
+
queryKey: chunkEBLBPUPI_cjs.airdropKeys.preflightCreateAll(scope)
|
|
501
|
+
});
|
|
502
|
+
}
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
function useSetEcdsaImplementation(options = {}) {
|
|
506
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(options);
|
|
507
|
+
const queryClient = reactQuery.useQueryClient();
|
|
508
|
+
return reactQuery.useMutation({
|
|
509
|
+
mutationFn: async ({ implementation, account }) => {
|
|
510
|
+
if (!client) {
|
|
511
|
+
throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useSetEcdsaImplementation", "factory");
|
|
512
|
+
}
|
|
513
|
+
return client.setEcdsaImplementation(implementation, account);
|
|
514
|
+
},
|
|
515
|
+
onSuccess: () => {
|
|
516
|
+
const scope = { chainId, address: resolvedAddress };
|
|
517
|
+
void queryClient.invalidateQueries({ queryKey: chunkEBLBPUPI_cjs.airdropKeys.implementations(scope) });
|
|
518
|
+
void queryClient.invalidateQueries({
|
|
519
|
+
queryKey: chunkEBLBPUPI_cjs.airdropQueryKeyPrefix({ ...scope, fn: "getEcdsaInitCodeHash" })
|
|
520
|
+
});
|
|
521
|
+
void queryClient.invalidateQueries({
|
|
522
|
+
queryKey: chunkEBLBPUPI_cjs.airdropQueryKeyPrefix({ ...scope, fn: "predictEcdsaAirdropAddress" })
|
|
523
|
+
});
|
|
524
|
+
void queryClient.invalidateQueries({
|
|
525
|
+
queryKey: chunkEBLBPUPI_cjs.airdropKeys.preflightCreateAll(scope)
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
function useSetFeeCollector(options = {}) {
|
|
531
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(options);
|
|
532
|
+
const queryClient = reactQuery.useQueryClient();
|
|
533
|
+
return reactQuery.useMutation({
|
|
534
|
+
mutationFn: async ({ feeCollector, account }) => {
|
|
535
|
+
if (!client) {
|
|
536
|
+
throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useSetFeeCollector", "factory");
|
|
537
|
+
}
|
|
538
|
+
return client.setFeeCollector(feeCollector, account);
|
|
539
|
+
},
|
|
540
|
+
onSuccess: () => {
|
|
541
|
+
void queryClient.invalidateQueries({
|
|
542
|
+
queryKey: chunkEBLBPUPI_cjs.airdropKeys.fees({ chainId, address: resolvedAddress })
|
|
543
|
+
});
|
|
544
|
+
}
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
function useSetMerkleImplementation(options = {}) {
|
|
548
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(options);
|
|
549
|
+
const queryClient = reactQuery.useQueryClient();
|
|
550
|
+
return reactQuery.useMutation({
|
|
551
|
+
mutationFn: async ({ implementation, account }) => {
|
|
552
|
+
if (!client) {
|
|
553
|
+
throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useSetMerkleImplementation", "factory");
|
|
554
|
+
}
|
|
555
|
+
return client.setMerkleImplementation(implementation, account);
|
|
556
|
+
},
|
|
557
|
+
onSuccess: () => {
|
|
558
|
+
const scope = { chainId, address: resolvedAddress };
|
|
559
|
+
void queryClient.invalidateQueries({ queryKey: chunkEBLBPUPI_cjs.airdropKeys.implementations(scope) });
|
|
560
|
+
void queryClient.invalidateQueries({
|
|
561
|
+
queryKey: chunkEBLBPUPI_cjs.airdropQueryKeyPrefix({ ...scope, fn: "getMerkleInitCodeHash" })
|
|
562
|
+
});
|
|
563
|
+
void queryClient.invalidateQueries({
|
|
564
|
+
queryKey: chunkEBLBPUPI_cjs.airdropQueryKeyPrefix({ ...scope, fn: "predictMerkleAirdropAddress" })
|
|
565
|
+
});
|
|
566
|
+
void queryClient.invalidateQueries({
|
|
567
|
+
queryKey: chunkEBLBPUPI_cjs.airdropKeys.preflightCreateAll(scope)
|
|
568
|
+
});
|
|
569
|
+
}
|
|
570
|
+
});
|
|
571
|
+
}
|
|
572
|
+
function useSetUpgradeabilityPolicy(options = {}) {
|
|
573
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkEBLBPUPI_cjs.useMemoAirdropFactoryClient(options);
|
|
574
|
+
const queryClient = reactQuery.useQueryClient();
|
|
575
|
+
return reactQuery.useMutation({
|
|
576
|
+
mutationFn: async (args) => {
|
|
577
|
+
if (!client) {
|
|
578
|
+
throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useSetUpgradeabilityPolicy", "factory");
|
|
579
|
+
}
|
|
580
|
+
return client.setUpgradeabilityPolicy(args.creator, args.allowed, args.account);
|
|
581
|
+
},
|
|
582
|
+
onSuccess: (_hash, variables) => {
|
|
583
|
+
const scope = { chainId, address: resolvedAddress };
|
|
584
|
+
void queryClient.invalidateQueries({
|
|
585
|
+
queryKey: chunkEBLBPUPI_cjs.airdropQueryKey({
|
|
586
|
+
...scope,
|
|
587
|
+
fn: "effectiveUpgradeable",
|
|
588
|
+
args: [variables.creator]
|
|
589
|
+
})
|
|
590
|
+
});
|
|
591
|
+
void queryClient.invalidateQueries({
|
|
592
|
+
queryKey: chunkEBLBPUPI_cjs.airdropKeys.upgradeabilityPolicy(scope, variables.creator)
|
|
593
|
+
});
|
|
594
|
+
void queryClient.invalidateQueries({
|
|
595
|
+
queryKey: chunkEBLBPUPI_cjs.airdropKeys.preflightCreateAll(scope)
|
|
596
|
+
});
|
|
597
|
+
}
|
|
58
598
|
});
|
|
59
599
|
}
|
|
60
600
|
|
|
61
|
-
exports.
|
|
601
|
+
exports.useClearCompliancePolicy = useClearCompliancePolicy;
|
|
602
|
+
exports.useClearUpgradeabilityPolicy = useClearUpgradeabilityPolicy;
|
|
603
|
+
exports.useDisableCustomFee = useDisableCustomFee;
|
|
604
|
+
exports.useEcdsaInitCodeHash = useEcdsaInitCodeHash;
|
|
605
|
+
exports.useFactoryComplianceDelegate = useFactoryComplianceDelegate;
|
|
606
|
+
exports.useFactoryCompliancePolicy = useFactoryCompliancePolicy;
|
|
607
|
+
exports.useFactoryCustomFee = useFactoryCustomFee;
|
|
608
|
+
exports.useFactoryGrantRole = useFactoryGrantRole;
|
|
609
|
+
exports.useFactoryHasRole = useFactoryHasRole;
|
|
610
|
+
exports.useFactoryImplementations = useFactoryImplementations;
|
|
611
|
+
exports.useFactoryRenounceRole = useFactoryRenounceRole;
|
|
612
|
+
exports.useFactoryRevokeRole = useFactoryRevokeRole;
|
|
613
|
+
exports.useFactoryRoleConstants = useFactoryRoleConstants;
|
|
614
|
+
exports.useFactoryRoleMembers = useFactoryRoleMembers;
|
|
615
|
+
exports.useFactoryUpgradeabilityPolicy = useFactoryUpgradeabilityPolicy;
|
|
616
|
+
exports.useMerkleInitCodeHash = useMerkleInitCodeHash;
|
|
617
|
+
exports.usePredictEcdsaAirdropAddress = usePredictEcdsaAirdropAddress;
|
|
618
|
+
exports.usePredictMerkleAirdropAddress = usePredictMerkleAirdropAddress;
|
|
619
|
+
exports.useSetComplianceDelegate = useSetComplianceDelegate;
|
|
620
|
+
exports.useSetComplianceManagerImpl = useSetComplianceManagerImpl;
|
|
621
|
+
exports.useSetCompliancePolicy = useSetCompliancePolicy;
|
|
622
|
+
exports.useSetCustomFee = useSetCustomFee;
|
|
623
|
+
exports.useSetDefaultDelegateToCompliance = useSetDefaultDelegateToCompliance;
|
|
624
|
+
exports.useSetDefaultGasFee = useSetDefaultGasFee;
|
|
625
|
+
exports.useSetDefaultUpgradeable = useSetDefaultUpgradeable;
|
|
626
|
+
exports.useSetEcdsaImplementation = useSetEcdsaImplementation;
|
|
627
|
+
exports.useSetFeeCollector = useSetFeeCollector;
|
|
628
|
+
exports.useSetMerkleImplementation = useSetMerkleImplementation;
|
|
629
|
+
exports.useSetUpgradeabilityPolicy = useSetUpgradeabilityPolicy;
|