@tokenops/sdk 1.5.1 → 2.0.0-alpha.1
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 +198 -2
- package/CONTRIBUTING.md +4 -2
- package/README.md +146 -90
- package/SECURITY.md +7 -1
- package/SUPPORT.md +47 -0
- package/dist/{chunk-YQIBBEFJ.js → chunk-335Z2W67.js} +1 -1
- package/dist/{chunk-2NCLOQ56.cjs → chunk-3QHNYEQD.cjs} +77 -0
- package/dist/chunk-456VDDA3.js +370 -0
- package/dist/{chunk-SG65XWH7.js → chunk-4RAAATVY.js} +1 -3
- package/dist/{chunk-6BMP4ICG.js → chunk-4TSDNZQ3.js} +60 -2
- package/dist/{chunk-PUPKNW3R.cjs → chunk-5576FRT3.cjs} +30 -6
- package/dist/{chunk-AOP6HMPW.js → chunk-6GNR22OV.js} +75 -1
- package/dist/{chunk-NTZY6IB7.js → chunk-6NAVMWZQ.js} +4 -3
- package/dist/{chunk-C7BRZXJA.cjs → chunk-6PXXGACR.cjs} +8 -7
- package/dist/{chunk-IJFQ5L4I.js → chunk-74QFZ5MK.js} +4 -3
- package/dist/chunk-7AFPOE7N.cjs +59 -0
- package/dist/chunk-AXIPOR3C.js +56 -0
- package/dist/chunk-CTED3MTR.cjs +380 -0
- package/dist/{chunk-XGGTQQFH.js → chunk-DZHYSUGY.js} +28 -7
- package/dist/{chunk-OXTLPTO3.js → chunk-EAJ7SYHE.js} +4 -3
- package/dist/{chunk-V2PXZVBF.cjs → chunk-FGEB7RMY.cjs} +4 -4
- package/dist/chunk-GKKDAW44.js +8823 -0
- package/dist/{chunk-2PWNH3UE.js → chunk-H5POPGOZ.js} +63 -5
- package/dist/{chunk-W7IGCOVL.cjs → chunk-JQYC66TO.cjs} +9 -8
- package/dist/{chunk-PFXURMBZ.cjs → chunk-JZLGCTGK.cjs} +68 -8
- package/dist/{chunk-JYOTGRSO.cjs → chunk-KFRDLKMA.cjs} +61 -1
- package/dist/chunk-M4IT6DNJ.cjs +608 -0
- package/dist/{chunk-KLKI352M.cjs → chunk-MVDQMV25.cjs} +0 -3
- package/dist/chunk-NCVX3K2N.cjs +161 -0
- package/dist/chunk-NWFMBLSQ.js +4 -0
- package/dist/chunk-O5676ZWY.js +585 -0
- package/dist/chunk-PUX5VXDB.cjs +8845 -0
- package/dist/{chunk-IXLO7GO5.js → chunk-TWT3STIX.js} +46 -80
- package/dist/chunk-UG5RKLU2.cjs +6 -0
- package/dist/chunk-VP2B4WM2.js +154 -0
- package/dist/{chunk-5X5WL5CU.cjs → chunk-WJLECC22.cjs} +51 -88
- package/dist/{chunk-WENHUPZC.cjs → chunk-XAYGD4E4.cjs} +9 -8
- package/dist/core/addresses.d.ts +15 -3
- 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 +34 -13
- package/dist/fhe/index.d.cts +1 -0
- package/dist/fhe/index.d.ts +1 -0
- package/dist/fhe/index.js +19 -6
- package/dist/fhe/mock-erc7984.d.ts +4 -4
- package/dist/fhe/operators.d.ts +160 -3
- package/dist/fhe/react/index.cjs +14 -0
- package/dist/fhe/react/index.d.cts +2 -0
- package/dist/fhe/react/index.d.ts +2 -0
- package/dist/fhe/react/index.js +6 -0
- package/dist/fhe/react/useEnsureOperator.d.ts +56 -0
- package/dist/fhe/react/useIsOperator.d.ts +54 -0
- package/dist/fhe/sepolia-encryptor-web.d.ts +18 -3
- package/dist/fhe/types.d.ts +6 -0
- 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 +1238 -0
- package/dist/fhe-airdrop/advanced/index.cjs +10 -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 +2 -8
- package/dist/fhe-airdrop/advanced/react/index.cjs +34 -48
- package/dist/fhe-airdrop/advanced/react/index.d.cts +9 -3
- package/dist/fhe-airdrop/advanced/react/index.d.ts +9 -3
- package/dist/fhe-airdrop/advanced/react/index.js +33 -48
- 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/airdrop-base.d.ts +600 -0
- package/dist/fhe-airdrop/campaign.d.ts +297 -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 +245 -15
- package/dist/fhe-airdrop/factory.d.ts +533 -274
- package/dist/fhe-airdrop/guards.d.ts +273 -0
- package/dist/fhe-airdrop/index.cjs +1089 -33
- package/dist/fhe-airdrop/index.d.cts +46 -8
- package/dist/fhe-airdrop/index.d.ts +46 -8
- package/dist/fhe-airdrop/index.js +929 -7
- package/dist/fhe-airdrop/merkle-tree.d.ts +103 -0
- package/dist/fhe-airdrop/merkle.d.ts +180 -0
- package/dist/fhe-airdrop/react/_shared.d.ts +144 -71
- package/dist/fhe-airdrop/react/index.cjs +364 -413
- package/dist/fhe-airdrop/react/index.d.cts +53 -72
- package/dist/fhe-airdrop/react/index.d.ts +53 -72
- package/dist/fhe-airdrop/react/index.js +258 -369
- package/dist/fhe-airdrop/react/useAirdropGasFee.d.ts +10 -5
- 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/useAirdropToken.d.ts +11 -4
- package/dist/fhe-airdrop/react/useAirdropWindow.d.ts +37 -0
- package/dist/fhe-airdrop/react/useClaimedAmount.d.ts +29 -0
- package/dist/fhe-airdrop/react/useComplianceManager.d.ts +16 -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/useEcdsaClaim.d.ts +23 -0
- package/dist/fhe-airdrop/react/useEffectiveUpgradeable.d.ts +20 -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/useMerkleClaim.d.ts +34 -0
- package/dist/fhe-airdrop/react/useMerkleRoot.d.ts +15 -0
- package/dist/fhe-airdrop/react/useSetMerkleRoot.d.ts +22 -0
- package/dist/fhe-airdrop/react/useWithdrawConfidential.d.ts +23 -0
- package/dist/fhe-airdrop/roles.d.ts +147 -0
- package/dist/fhe-airdrop/types.d.ts +68 -55
- package/dist/fhe-disperse/errors.d.ts +55 -0
- package/dist/fhe-disperse/index.cjs +34 -25
- package/dist/fhe-disperse/index.d.cts +1 -1
- package/dist/fhe-disperse/index.d.ts +1 -1
- package/dist/fhe-disperse/index.js +6 -5
- package/dist/fhe-disperse/react/index.cjs +42 -23
- package/dist/fhe-disperse/react/index.d.cts +3 -1
- package/dist/fhe-disperse/react/index.d.ts +3 -1
- package/dist/fhe-disperse/react/index.js +9 -6
- package/dist/fhe-vesting/advanced/index.cjs +8 -7
- package/dist/fhe-vesting/advanced/index.js +6 -5
- package/dist/fhe-vesting/advanced/react/index.cjs +12 -11
- package/dist/fhe-vesting/advanced/react/index.js +9 -8
- package/dist/fhe-vesting/index.cjs +35 -34
- package/dist/fhe-vesting/index.js +7 -6
- package/dist/fhe-vesting/manager.d.ts +19 -0
- package/dist/fhe-vesting/react/index.cjs +160 -140
- package/dist/fhe-vesting/react/index.d.cts +6 -4
- package/dist/fhe-vesting/react/index.d.ts +6 -4
- package/dist/fhe-vesting/react/index.js +24 -16
- package/dist/fhe-vesting/react/useAccessClaimableAmount.d.ts +11 -3
- package/dist/fhe-vesting/react/useAccessSettledAmount.d.ts +11 -3
- package/dist/fhe-vesting/react/useAccessTotalAllocation.d.ts +11 -3
- package/dist/fhe-vesting/react/useAccessVestedAmount.d.ts +11 -3
- package/dist/fhe-vesting/react/useAdminGetClaimableAmount.d.ts +1 -1
- package/dist/fhe-vesting/react/useAdminGetSettledAmount.d.ts +1 -1
- package/dist/fhe-vesting/react/useAdminGetTotalAllocation.d.ts +1 -1
- package/dist/fhe-vesting/react/useAdminGetVestedAmount.d.ts +1 -1
- package/dist/fhe-vesting/react/useAdminPartialClaim.d.ts +8 -0
- package/dist/fhe-vesting/react/useClaim.d.ts +1 -1
- package/dist/fhe-vesting/react/useDiscloseHandleToParty.d.ts +1 -1
- package/dist/fhe-vesting/react/useManagerDiscloseHandleToParty.d.ts +1 -1
- package/dist/fhe-vesting/react/usePartialClaim.d.ts +1 -1
- package/dist/fhe-vesting/react/useVestingInfo.d.ts +1 -1
- package/dist/fhe-vesting/types.d.ts +12 -1
- package/dist/index.cjs +27 -15
- package/dist/index.js +1 -1
- package/dist/testnet-faucet/index.cjs +17 -16
- package/dist/testnet-faucet/index.js +5 -4
- package/dist/testnet-faucet/react/index.cjs +11 -10
- package/dist/testnet-faucet/react/index.js +6 -5
- package/package.json +18 -9
- package/dist/chunk-4WPGQSNT.cjs +0 -44
- package/dist/chunk-6R4KNAPK.js +0 -1630
- package/dist/chunk-DUZIIRPF.js +0 -1655
- package/dist/chunk-MCRBVJGZ.cjs +0 -1637
- package/dist/chunk-ODLTEGHB.js +0 -41
- package/dist/chunk-ORFTDNFZ.js +0 -105
- package/dist/chunk-T46YXSBP.cjs +0 -109
- package/dist/chunk-TIUKIY5V.cjs +0 -1663
- 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 -310
- package/dist/fhe-airdrop/react/useAccessClaimAmount.d.ts +0 -31
- package/dist/fhe-airdrop/react/useAirdropCanExtendClaimWindow.d.ts +0 -7
- package/dist/fhe-airdrop/react/useAirdropClaim.d.ts +0 -27
- 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/useAirdropGrantRole.d.ts +0 -16
- 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/useAirdropRevokeRole.d.ts +0 -15
- 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 -31
- 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/useGetClaimAmount.d.ts +0 -30
- package/dist/fhe-airdrop/react/usePreflightCreateAirdrop.d.ts +0 -51
- 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/useSignClaimAuthorization.d.ts +0 -31
- 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
- package/dist/fhe-vesting/react/useGetClaimableAmount.d.ts +0 -13
- package/dist/fhe-vesting/react/useGetSettledAmount.d.ts +0 -14
- package/dist/fhe-vesting/react/useGetTotalAllocation.d.ts +0 -13
- package/dist/fhe-vesting/react/useGetVestedAmount.d.ts +0 -25
|
@@ -1,484 +1,456 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
3
|
+
var chunkCTED3MTR_cjs = require('../../chunk-CTED3MTR.cjs');
|
|
4
|
+
var chunkNCVX3K2N_cjs = require('../../chunk-NCVX3K2N.cjs');
|
|
5
|
+
var chunkPUX5VXDB_cjs = require('../../chunk-PUX5VXDB.cjs');
|
|
6
|
+
var chunkM4IT6DNJ_cjs = require('../../chunk-M4IT6DNJ.cjs');
|
|
7
7
|
require('../../chunk-FAXIIH5R.cjs');
|
|
8
|
-
require('../../chunk-
|
|
9
|
-
require('../../chunk-
|
|
10
|
-
require('../../chunk-
|
|
8
|
+
require('../../chunk-UG5RKLU2.cjs');
|
|
9
|
+
require('../../chunk-MVDQMV25.cjs');
|
|
10
|
+
require('../../chunk-5576FRT3.cjs');
|
|
11
11
|
require('../../chunk-JK4XMMKM.cjs');
|
|
12
|
-
require('../../chunk-VJKZWYYJ.cjs');
|
|
13
12
|
require('../../chunk-66IHPTOK.cjs');
|
|
14
13
|
var chunk67OV5CX2_cjs = require('../../chunk-67OV5CX2.cjs');
|
|
14
|
+
require('../../chunk-VJKZWYYJ.cjs');
|
|
15
15
|
var reactQuery = require('@tanstack/react-query');
|
|
16
|
-
var wagmi = require('wagmi');
|
|
17
16
|
|
|
18
|
-
function
|
|
19
|
-
const { client, chainId
|
|
17
|
+
function useAirdropToken(args) {
|
|
18
|
+
const { client, chainId } = chunkNCVX3K2N_cjs.useMemoAirdropBaseClient(args);
|
|
20
19
|
return reactQuery.useQuery({
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
...args.query,
|
|
21
|
+
queryKey: chunkNCVX3K2N_cjs.airdropQueryKey({ chainId, address: args.address, fn: "token", args: [] }),
|
|
22
|
+
queryFn: () => client.token(),
|
|
23
|
+
enabled: Boolean(client && (args.query?.enabled ?? true))
|
|
25
24
|
});
|
|
26
25
|
}
|
|
27
|
-
function
|
|
28
|
-
const { client, chainId
|
|
26
|
+
function useAirdropWindow(args) {
|
|
27
|
+
const { client, chainId } = chunkNCVX3K2N_cjs.useMemoAirdropBaseClient(args);
|
|
29
28
|
return reactQuery.useQuery({
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
...args.query,
|
|
30
|
+
queryKey: chunkNCVX3K2N_cjs.airdropQueryKey({ chainId, address: args.address, fn: "window", args: [] }),
|
|
31
|
+
queryFn: async () => {
|
|
32
|
+
const [startTime, endTime, hasStarted, hasEnded, isActive] = await Promise.all([
|
|
33
|
+
client.startTime(),
|
|
34
|
+
client.endTime(),
|
|
35
|
+
client.hasClaimStarted(),
|
|
36
|
+
client.hasClaimEnded(),
|
|
37
|
+
client.isClaimWindowActive()
|
|
38
|
+
]);
|
|
39
|
+
return { startTime, endTime, hasStarted, hasEnded, isActive };
|
|
40
|
+
},
|
|
41
|
+
enabled: Boolean(client && (args.query?.enabled ?? true))
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function useAirdropPaused(args) {
|
|
45
|
+
const { client, chainId } = chunkNCVX3K2N_cjs.useMemoAirdropBaseClient(args);
|
|
46
|
+
return reactQuery.useQuery({
|
|
47
|
+
...args.query,
|
|
48
|
+
queryKey: chunkNCVX3K2N_cjs.airdropQueryKey({ chainId, address: args.address, fn: "paused", args: [] }),
|
|
49
|
+
queryFn: () => client.paused(),
|
|
50
|
+
enabled: Boolean(client && (args.query?.enabled ?? true))
|
|
34
51
|
});
|
|
35
52
|
}
|
|
36
|
-
function
|
|
37
|
-
const { client, chainId
|
|
53
|
+
function useAirdropGasFee(args) {
|
|
54
|
+
const { client, chainId } = chunkNCVX3K2N_cjs.useMemoAirdropBaseClient(args);
|
|
38
55
|
return reactQuery.useQuery({
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
56
|
+
...args.query,
|
|
57
|
+
queryKey: chunkNCVX3K2N_cjs.airdropQueryKey({ chainId, address: args.address, fn: "gasFee", args: [] }),
|
|
58
|
+
queryFn: () => client.gasFee(),
|
|
59
|
+
enabled: Boolean(client && (args.query?.enabled ?? true))
|
|
43
60
|
});
|
|
44
61
|
}
|
|
45
|
-
function
|
|
46
|
-
const {
|
|
47
|
-
const { client, chainId
|
|
62
|
+
function useAirdropHasRole(args) {
|
|
63
|
+
const { role, holder, ...base } = args;
|
|
64
|
+
const { client, chainId } = chunkNCVX3K2N_cjs.useMemoAirdropBaseClient(base);
|
|
48
65
|
return reactQuery.useQuery({
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
66
|
+
...args.query,
|
|
67
|
+
queryKey: chunkNCVX3K2N_cjs.airdropQueryKey({
|
|
68
|
+
chainId,
|
|
69
|
+
address: args.address,
|
|
70
|
+
fn: "hasRole",
|
|
71
|
+
args: [role, holder]
|
|
72
|
+
}),
|
|
73
|
+
queryFn: () => client.hasRole({ role, holder }),
|
|
74
|
+
enabled: Boolean(client && role && holder && (args.query?.enabled ?? true))
|
|
53
75
|
});
|
|
54
76
|
}
|
|
55
|
-
function
|
|
56
|
-
const {
|
|
57
|
-
const { client, chainId, resolvedAddress } = chunkT46YXSBP_cjs.useMemoFactoryClient(base);
|
|
77
|
+
function useMerkleRoot(args) {
|
|
78
|
+
const { client, chainId } = chunkNCVX3K2N_cjs.useMemoMerkleAirdropClient(args);
|
|
58
79
|
return reactQuery.useQuery({
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
80
|
+
...args.query,
|
|
81
|
+
queryKey: chunkNCVX3K2N_cjs.airdropQueryKey({ chainId, address: args.address, fn: "merkleRoot", args: [] }),
|
|
82
|
+
queryFn: () => client.merkleRoot(),
|
|
83
|
+
enabled: Boolean(client && (args.query?.enabled ?? true))
|
|
63
84
|
});
|
|
64
85
|
}
|
|
65
|
-
function
|
|
66
|
-
const {
|
|
67
|
-
const { client, chainId
|
|
86
|
+
function useClaimedAmount(args) {
|
|
87
|
+
const { account, ...base } = args;
|
|
88
|
+
const { client, chainId } = chunkNCVX3K2N_cjs.useMemoMerkleAirdropClient(base);
|
|
68
89
|
return reactQuery.useQuery({
|
|
69
|
-
|
|
70
|
-
|
|
90
|
+
...args.query,
|
|
91
|
+
queryKey: chunkNCVX3K2N_cjs.airdropQueryKey({
|
|
71
92
|
chainId,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
userSalt,
|
|
76
|
-
funding
|
|
77
|
-
),
|
|
78
|
-
queryFn: () => client.preflightCreateAirdrop({
|
|
79
|
-
params,
|
|
80
|
-
creator,
|
|
81
|
-
...userSalt !== void 0 ? { userSalt } : {},
|
|
82
|
-
...funding !== void 0 ? { funding } : {}
|
|
93
|
+
address: args.address,
|
|
94
|
+
fn: "getClaimedAmount",
|
|
95
|
+
args: [account]
|
|
83
96
|
}),
|
|
84
|
-
|
|
85
|
-
|
|
97
|
+
queryFn: () => client.getClaimedAmount(account),
|
|
98
|
+
enabled: Boolean(client && account && (args.query?.enabled ?? true))
|
|
86
99
|
});
|
|
87
100
|
}
|
|
88
|
-
function
|
|
89
|
-
const { client,
|
|
90
|
-
return reactQuery.
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
101
|
+
function useComplianceManager(args) {
|
|
102
|
+
const { client, chainId } = chunkNCVX3K2N_cjs.useMemoAirdropBaseClient(args);
|
|
103
|
+
return reactQuery.useQuery({
|
|
104
|
+
...args.query,
|
|
105
|
+
queryKey: chunkNCVX3K2N_cjs.airdropQueryKey({
|
|
106
|
+
chainId,
|
|
107
|
+
address: args.address,
|
|
108
|
+
fn: "complianceManager",
|
|
109
|
+
args: []
|
|
110
|
+
}),
|
|
111
|
+
queryFn: () => client.complianceManager(),
|
|
112
|
+
enabled: Boolean(client && (args.query?.enabled ?? true))
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
function useFactoryFees(args = {}) {
|
|
116
|
+
const { client, chainId, resolvedAddress } = chunkNCVX3K2N_cjs.useMemoAirdropFactoryClient(args);
|
|
117
|
+
return reactQuery.useQuery({
|
|
118
|
+
...args.query,
|
|
119
|
+
queryKey: chunkNCVX3K2N_cjs.airdropQueryKey({ chainId, address: resolvedAddress, fn: "fees", args: [] }),
|
|
120
|
+
queryFn: async () => {
|
|
121
|
+
const [feeCollector, defaultGasFee] = await Promise.all([
|
|
122
|
+
client.feeCollector(),
|
|
123
|
+
client.defaultGasFee()
|
|
124
|
+
]);
|
|
125
|
+
return { feeCollector, defaultGasFee };
|
|
126
|
+
},
|
|
127
|
+
enabled: Boolean(client && (args.query?.enabled ?? true))
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
function useFactoryRegistry(args = {}) {
|
|
131
|
+
const { offset = 0n, limit = 50n, ...base } = args;
|
|
132
|
+
const { client, chainId, resolvedAddress } = chunkNCVX3K2N_cjs.useMemoAirdropFactoryClient(base);
|
|
133
|
+
return reactQuery.useQuery({
|
|
134
|
+
...args.query,
|
|
135
|
+
queryKey: chunkNCVX3K2N_cjs.airdropQueryKey({
|
|
136
|
+
chainId,
|
|
137
|
+
address: resolvedAddress,
|
|
138
|
+
fn: "registry",
|
|
139
|
+
args: [offset, limit]
|
|
140
|
+
}),
|
|
141
|
+
queryFn: async () => {
|
|
142
|
+
const [count, items] = await Promise.all([
|
|
143
|
+
client.airdropCount(),
|
|
144
|
+
client.airdrops(offset, limit)
|
|
145
|
+
]);
|
|
146
|
+
return { count, items };
|
|
147
|
+
},
|
|
148
|
+
enabled: Boolean(client && (args.query?.enabled ?? true))
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
function useEffectiveUpgradeable(args = {}) {
|
|
152
|
+
const { creator, ...base } = args;
|
|
153
|
+
const { client, chainId, resolvedAddress } = chunkNCVX3K2N_cjs.useMemoAirdropFactoryClient(base);
|
|
154
|
+
return reactQuery.useQuery({
|
|
155
|
+
...args.query,
|
|
156
|
+
queryKey: chunkNCVX3K2N_cjs.airdropQueryKey({
|
|
157
|
+
chainId,
|
|
158
|
+
address: resolvedAddress,
|
|
159
|
+
fn: "effectiveUpgradeable",
|
|
160
|
+
args: [creator]
|
|
161
|
+
}),
|
|
162
|
+
queryFn: () => client.effectiveUpgradeable(creator),
|
|
163
|
+
enabled: Boolean(client && creator && (args.query?.enabled ?? true))
|
|
97
164
|
});
|
|
98
165
|
}
|
|
99
|
-
function
|
|
100
|
-
const { client, resolutionError } =
|
|
166
|
+
function useCreateEcdsaAirdrop(options = {}) {
|
|
167
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkNCVX3K2N_cjs.useMemoAirdropFactoryClient(options);
|
|
168
|
+
const queryClient = reactQuery.useQueryClient();
|
|
101
169
|
return reactQuery.useMutation({
|
|
102
170
|
mutationFn: async (args) => {
|
|
103
171
|
if (!client) {
|
|
104
|
-
throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("
|
|
172
|
+
throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useCreateEcdsaAirdrop", "factory");
|
|
105
173
|
}
|
|
106
|
-
return client.
|
|
174
|
+
return client.createEcdsaAirdrop(args);
|
|
175
|
+
},
|
|
176
|
+
onSuccess: () => {
|
|
177
|
+
void queryClient.invalidateQueries({
|
|
178
|
+
queryKey: chunkNCVX3K2N_cjs.airdropQueryKeyPrefix({ chainId, address: resolvedAddress, fn: "registry" })
|
|
179
|
+
});
|
|
107
180
|
}
|
|
108
181
|
});
|
|
109
182
|
}
|
|
110
|
-
function
|
|
111
|
-
const { client, resolutionError } =
|
|
183
|
+
function useCreateMerkleAirdrop(options = {}) {
|
|
184
|
+
const { client, resolutionError, chainId, resolvedAddress } = chunkNCVX3K2N_cjs.useMemoAirdropFactoryClient(options);
|
|
185
|
+
const queryClient = reactQuery.useQueryClient();
|
|
112
186
|
return reactQuery.useMutation({
|
|
113
187
|
mutationFn: async (args) => {
|
|
114
188
|
if (!client) {
|
|
115
|
-
throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("
|
|
189
|
+
throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useCreateMerkleAirdrop", "factory");
|
|
116
190
|
}
|
|
117
|
-
return client.
|
|
191
|
+
return client.createMerkleAirdrop(args);
|
|
192
|
+
},
|
|
193
|
+
onSuccess: () => {
|
|
194
|
+
void queryClient.invalidateQueries({
|
|
195
|
+
queryKey: chunkNCVX3K2N_cjs.airdropQueryKeyPrefix({ chainId, address: resolvedAddress, fn: "registry" })
|
|
196
|
+
});
|
|
118
197
|
}
|
|
119
198
|
});
|
|
120
199
|
}
|
|
121
|
-
function
|
|
122
|
-
const { client, resolutionError } =
|
|
200
|
+
function useFundAirdrop(options = {}) {
|
|
201
|
+
const { client, resolutionError } = chunkNCVX3K2N_cjs.useMemoAirdropFactoryClient(options);
|
|
123
202
|
return reactQuery.useMutation({
|
|
124
203
|
mutationFn: async (args) => {
|
|
125
204
|
if (!client) {
|
|
126
|
-
throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("
|
|
205
|
+
throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useFundAirdrop", "factory");
|
|
127
206
|
}
|
|
128
|
-
return client.
|
|
207
|
+
return client.fundAirdrop(args);
|
|
129
208
|
}
|
|
130
209
|
});
|
|
131
210
|
}
|
|
132
|
-
function
|
|
133
|
-
const { client
|
|
211
|
+
function useEcdsaClaim(options) {
|
|
212
|
+
const { client } = chunkNCVX3K2N_cjs.useMemoEcdsaAirdropClient(options);
|
|
134
213
|
return reactQuery.useMutation({
|
|
135
214
|
mutationFn: async (args) => {
|
|
136
215
|
if (!client) {
|
|
137
|
-
throw
|
|
216
|
+
throw new chunk67OV5CX2_cjs.MissingClientError("useEcdsaClaim", "ecdsa-airdrop");
|
|
138
217
|
}
|
|
139
|
-
return client.
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
function useSetFeeCollector(options = {}) {
|
|
144
|
-
const { client, resolutionError } = chunkT46YXSBP_cjs.useMemoFactoryClient(options);
|
|
145
|
-
return reactQuery.useMutation({
|
|
146
|
-
mutationFn: async ({ newFeeCollector, account }) => {
|
|
147
|
-
if (!client) throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useSetFeeCollector", "factory");
|
|
148
|
-
return client.setFeeCollector(newFeeCollector, account);
|
|
149
|
-
}
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
function useSetDefaultGasFee(options = {}) {
|
|
153
|
-
const { client, resolutionError } = chunkT46YXSBP_cjs.useMemoFactoryClient(options);
|
|
154
|
-
return reactQuery.useMutation({
|
|
155
|
-
mutationFn: async ({ newGasFee, account }) => {
|
|
156
|
-
if (!client)
|
|
157
|
-
throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useSetDefaultGasFee", "factory");
|
|
158
|
-
return client.setDefaultGasFee(newGasFee, account);
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
function useSetCustomFee(options = {}) {
|
|
163
|
-
const { client, resolutionError } = chunkT46YXSBP_cjs.useMemoFactoryClient(options);
|
|
164
|
-
return reactQuery.useMutation({
|
|
165
|
-
mutationFn: async ({ campaignCreator, gasFee, account }) => {
|
|
166
|
-
if (!client) throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useSetCustomFee", "factory");
|
|
167
|
-
return client.setCustomFee(campaignCreator, gasFee, account);
|
|
218
|
+
return client.claim(args);
|
|
168
219
|
}
|
|
169
220
|
});
|
|
170
221
|
}
|
|
171
|
-
function
|
|
172
|
-
const { client,
|
|
173
|
-
|
|
174
|
-
mutationFn: async ({ campaignCreator, account }) => {
|
|
175
|
-
if (!client)
|
|
176
|
-
throw resolutionError ?? new chunk67OV5CX2_cjs.MissingClientError("useDisableCustomFee", "factory");
|
|
177
|
-
return client.disableCustomFee(campaignCreator, account);
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
function useAirdropToken(options) {
|
|
182
|
-
const { client, chainId } = chunkT46YXSBP_cjs.useMemoAirdropClient(options);
|
|
183
|
-
return reactQuery.useQuery({
|
|
184
|
-
queryKey: chunkT46YXSBP_cjs.buildQueryKey("airdrop:TOKEN", chainId, options.address),
|
|
185
|
-
queryFn: () => client.token(),
|
|
186
|
-
enabled: !!client,
|
|
187
|
-
staleTime: 0
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
function useAirdropGasFee(options) {
|
|
191
|
-
const { client, chainId } = chunkT46YXSBP_cjs.useMemoAirdropClient(options);
|
|
192
|
-
return reactQuery.useQuery({
|
|
193
|
-
queryKey: chunkT46YXSBP_cjs.buildQueryKey("airdrop:GAS_FEE", chainId, options.address),
|
|
194
|
-
queryFn: () => client.gasFee(),
|
|
195
|
-
enabled: !!client,
|
|
196
|
-
staleTime: 0
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
function useAirdropStartTime(options) {
|
|
200
|
-
const { client, chainId } = chunkT46YXSBP_cjs.useMemoAirdropClient(options);
|
|
201
|
-
return reactQuery.useQuery({
|
|
202
|
-
queryKey: chunkT46YXSBP_cjs.buildQueryKey("airdrop:START_TIME", chainId, options.address),
|
|
203
|
-
queryFn: () => client.startTime(),
|
|
204
|
-
enabled: !!client,
|
|
205
|
-
staleTime: 0
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
function useAirdropCanExtendClaimWindow(options) {
|
|
209
|
-
const { client, chainId } = chunkT46YXSBP_cjs.useMemoAirdropClient(options);
|
|
210
|
-
return reactQuery.useQuery({
|
|
211
|
-
queryKey: chunkT46YXSBP_cjs.buildQueryKey("airdrop:CAN_EXTEND_CLAIM_WINDOW", chainId, options.address),
|
|
212
|
-
queryFn: () => client.canExtendClaimWindow(),
|
|
213
|
-
enabled: !!client,
|
|
214
|
-
staleTime: 0
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
function useAirdropEndTime(options) {
|
|
218
|
-
const { client, chainId } = chunkT46YXSBP_cjs.useMemoAirdropClient(options);
|
|
219
|
-
return reactQuery.useQuery({
|
|
220
|
-
queryKey: chunkT46YXSBP_cjs.buildQueryKey("airdrop:endTime", chainId, options.address),
|
|
221
|
-
queryFn: () => client.endTime(),
|
|
222
|
-
enabled: !!client,
|
|
223
|
-
staleTime: 0
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
function useAirdropIsPaused(options) {
|
|
227
|
-
const { client, chainId } = chunkT46YXSBP_cjs.useMemoAirdropClient(options);
|
|
228
|
-
return reactQuery.useQuery({
|
|
229
|
-
queryKey: chunkT46YXSBP_cjs.buildQueryKey("airdrop:isPaused", chainId, options.address),
|
|
230
|
-
queryFn: () => client.isPaused(),
|
|
231
|
-
enabled: !!client,
|
|
232
|
-
staleTime: 0
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
|
-
function useAirdropDeploymentBlockNumber(options) {
|
|
236
|
-
const { client, chainId } = chunkT46YXSBP_cjs.useMemoAirdropClient(options);
|
|
237
|
-
return reactQuery.useQuery({
|
|
238
|
-
queryKey: chunkT46YXSBP_cjs.buildQueryKey("airdrop:deploymentBlockNumber", chainId, options.address),
|
|
239
|
-
queryFn: () => client.deploymentBlockNumber(),
|
|
240
|
-
enabled: !!client,
|
|
241
|
-
staleTime: 0
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
|
-
function useAirdropDomainSeparator(options) {
|
|
245
|
-
const { client, chainId } = chunkT46YXSBP_cjs.useMemoAirdropClient(options);
|
|
246
|
-
return reactQuery.useQuery({
|
|
247
|
-
queryKey: chunkT46YXSBP_cjs.buildQueryKey("airdrop:DOMAIN_SEPARATOR", chainId, options.address),
|
|
248
|
-
queryFn: () => client.domainSeparator(),
|
|
249
|
-
enabled: !!client,
|
|
250
|
-
staleTime: 0
|
|
251
|
-
});
|
|
252
|
-
}
|
|
253
|
-
function useAirdropClaimTypehash(options) {
|
|
254
|
-
const { client, chainId } = chunkT46YXSBP_cjs.useMemoAirdropClient(options);
|
|
255
|
-
return reactQuery.useQuery({
|
|
256
|
-
queryKey: chunkT46YXSBP_cjs.buildQueryKey("airdrop:CLAIM_TYPEHASH", chainId, options.address),
|
|
257
|
-
queryFn: () => client.claimTypehash(),
|
|
258
|
-
enabled: !!client,
|
|
259
|
-
staleTime: 0
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
function useAirdropIsClaimWindowActive(options) {
|
|
263
|
-
const { client, chainId } = chunkT46YXSBP_cjs.useMemoAirdropClient(options);
|
|
264
|
-
return reactQuery.useQuery({
|
|
265
|
-
queryKey: chunkT46YXSBP_cjs.buildQueryKey("airdrop:isClaimWindowActive", chainId, options.address),
|
|
266
|
-
queryFn: () => client.isClaimWindowActive(),
|
|
267
|
-
enabled: !!client,
|
|
268
|
-
staleTime: 0
|
|
269
|
-
});
|
|
270
|
-
}
|
|
271
|
-
function useAirdropHasClaimStarted(options) {
|
|
272
|
-
const { client, chainId } = chunkT46YXSBP_cjs.useMemoAirdropClient(options);
|
|
273
|
-
return reactQuery.useQuery({
|
|
274
|
-
queryKey: chunkT46YXSBP_cjs.buildQueryKey("airdrop:hasClaimStarted", chainId, options.address),
|
|
275
|
-
queryFn: () => client.hasClaimStarted(),
|
|
276
|
-
enabled: !!client,
|
|
277
|
-
staleTime: 0
|
|
278
|
-
});
|
|
279
|
-
}
|
|
280
|
-
function useAirdropHasClaimEnded(options) {
|
|
281
|
-
const { client, chainId } = chunkT46YXSBP_cjs.useMemoAirdropClient(options);
|
|
282
|
-
return reactQuery.useQuery({
|
|
283
|
-
queryKey: chunkT46YXSBP_cjs.buildQueryKey("airdrop:hasClaimEnded", chainId, options.address),
|
|
284
|
-
queryFn: () => client.hasClaimEnded(),
|
|
285
|
-
enabled: !!client,
|
|
286
|
-
staleTime: 0
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
function useAirdropClaimedSignatures(args) {
|
|
290
|
-
const { signatureHash, ...base } = args;
|
|
291
|
-
const { client, chainId } = chunkT46YXSBP_cjs.useMemoAirdropClient(base);
|
|
292
|
-
return reactQuery.useQuery({
|
|
293
|
-
queryKey: chunkT46YXSBP_cjs.buildQueryKey("airdrop:claimedSignatures", chainId, base.address, signatureHash),
|
|
294
|
-
queryFn: () => client.claimedSignatures(signatureHash),
|
|
295
|
-
enabled: !!client && !!signatureHash,
|
|
296
|
-
staleTime: 0
|
|
297
|
-
});
|
|
298
|
-
}
|
|
299
|
-
function useAirdropIsSignatureClaimed(args) {
|
|
300
|
-
const { user, encryptedAmountHandle, ...base } = args;
|
|
301
|
-
const { client, chainId } = chunkT46YXSBP_cjs.useMemoAirdropClient(base);
|
|
302
|
-
return reactQuery.useQuery({
|
|
303
|
-
queryKey: chunkT46YXSBP_cjs.buildQueryKey(
|
|
304
|
-
"airdrop:isSignatureClaimed",
|
|
305
|
-
chainId,
|
|
306
|
-
base.address,
|
|
307
|
-
user,
|
|
308
|
-
encryptedAmountHandle
|
|
309
|
-
),
|
|
310
|
-
queryFn: () => client.isSignatureClaimed(user, encryptedAmountHandle),
|
|
311
|
-
enabled: !!client && !!user && !!encryptedAmountHandle,
|
|
312
|
-
staleTime: 0
|
|
313
|
-
});
|
|
314
|
-
}
|
|
315
|
-
function useAirdropIsSignatureValid(args) {
|
|
316
|
-
const { encryptedAmountHandle, signature, caller, ...base } = args;
|
|
317
|
-
const { client, chainId } = chunkT46YXSBP_cjs.useMemoAirdropClient(base);
|
|
318
|
-
const { address: connectedAddress } = chunkZQUE2B3Q_cjs.useWagmiAccount();
|
|
319
|
-
const resolvedCaller = caller ?? connectedAddress;
|
|
320
|
-
return reactQuery.useQuery({
|
|
321
|
-
queryKey: chunkT46YXSBP_cjs.buildQueryKey(
|
|
322
|
-
"airdrop:isSignatureValid",
|
|
323
|
-
chainId,
|
|
324
|
-
base.address,
|
|
325
|
-
encryptedAmountHandle,
|
|
326
|
-
signature,
|
|
327
|
-
resolvedCaller
|
|
328
|
-
),
|
|
329
|
-
queryFn: () => client.isSignatureValid({
|
|
330
|
-
encryptedAmountHandle,
|
|
331
|
-
signature,
|
|
332
|
-
caller: resolvedCaller
|
|
333
|
-
}),
|
|
334
|
-
enabled: !!client && !!encryptedAmountHandle && !!signature && !!resolvedCaller,
|
|
335
|
-
staleTime: 0
|
|
336
|
-
});
|
|
337
|
-
}
|
|
338
|
-
function useAirdropHasRole(args) {
|
|
339
|
-
const { role, account, ...base } = args;
|
|
340
|
-
const { client, chainId } = chunkT46YXSBP_cjs.useMemoAirdropClient(base);
|
|
341
|
-
return reactQuery.useQuery({
|
|
342
|
-
queryKey: chunkT46YXSBP_cjs.buildQueryKey("airdrop:hasRole", chainId, base.address, role, account),
|
|
343
|
-
queryFn: () => client.hasRole(role, account),
|
|
344
|
-
enabled: !!client && !!role && !!account,
|
|
345
|
-
staleTime: 0
|
|
346
|
-
});
|
|
347
|
-
}
|
|
348
|
-
function useClaim(options) {
|
|
349
|
-
const { client } = chunkT46YXSBP_cjs.useMemoAirdropClient(options);
|
|
222
|
+
function useMerkleClaim(options) {
|
|
223
|
+
const { client, chainId, walletClient } = chunkNCVX3K2N_cjs.useMemoMerkleAirdropClient(options);
|
|
224
|
+
const queryClient = reactQuery.useQueryClient();
|
|
350
225
|
return reactQuery.useMutation({
|
|
351
226
|
mutationFn: async (args) => {
|
|
352
|
-
if (!client)
|
|
227
|
+
if (!client) {
|
|
228
|
+
throw new chunk67OV5CX2_cjs.MissingClientError("useMerkleClaim", "merkle-airdrop");
|
|
229
|
+
}
|
|
353
230
|
return client.claim(args);
|
|
231
|
+
},
|
|
232
|
+
onMutate: (variables) => {
|
|
233
|
+
const account = variables.account ?? walletClient?.account;
|
|
234
|
+
return {
|
|
235
|
+
claimant: account ? typeof account === "string" ? account : account.address : void 0
|
|
236
|
+
};
|
|
237
|
+
},
|
|
238
|
+
onSuccess: (_hash, _variables, context) => {
|
|
239
|
+
if (!context?.claimant) return;
|
|
240
|
+
void queryClient.invalidateQueries({
|
|
241
|
+
queryKey: chunkNCVX3K2N_cjs.airdropQueryKey({
|
|
242
|
+
chainId,
|
|
243
|
+
address: options.address,
|
|
244
|
+
fn: "getClaimedAmount",
|
|
245
|
+
args: [context.claimant]
|
|
246
|
+
})
|
|
247
|
+
});
|
|
354
248
|
}
|
|
355
249
|
});
|
|
356
250
|
}
|
|
357
|
-
function
|
|
358
|
-
const { client } =
|
|
251
|
+
function useSetMerkleRoot(options) {
|
|
252
|
+
const { client, chainId } = chunkNCVX3K2N_cjs.useMemoMerkleAirdropClient(options);
|
|
253
|
+
const queryClient = reactQuery.useQueryClient();
|
|
359
254
|
return reactQuery.useMutation({
|
|
360
255
|
mutationFn: async (args) => {
|
|
361
|
-
if (!client)
|
|
362
|
-
|
|
256
|
+
if (!client) {
|
|
257
|
+
throw new chunk67OV5CX2_cjs.MissingClientError("useSetMerkleRoot", "merkle-airdrop");
|
|
258
|
+
}
|
|
259
|
+
return client.setMerkleRoot(args);
|
|
260
|
+
},
|
|
261
|
+
onSuccess: () => {
|
|
262
|
+
void queryClient.invalidateQueries({
|
|
263
|
+
queryKey: chunkNCVX3K2N_cjs.airdropQueryKey({
|
|
264
|
+
chainId,
|
|
265
|
+
address: options.address,
|
|
266
|
+
fn: "merkleRoot",
|
|
267
|
+
args: []
|
|
268
|
+
})
|
|
269
|
+
});
|
|
363
270
|
}
|
|
364
271
|
});
|
|
365
272
|
}
|
|
366
|
-
function
|
|
367
|
-
const { client } =
|
|
273
|
+
function useGrantInstanceRoles(options) {
|
|
274
|
+
const { client, chainId } = chunkNCVX3K2N_cjs.useMemoAirdropBaseClient(options);
|
|
275
|
+
const queryClient = reactQuery.useQueryClient();
|
|
368
276
|
return reactQuery.useMutation({
|
|
369
|
-
mutationFn: async (
|
|
370
|
-
if (!client)
|
|
371
|
-
|
|
277
|
+
mutationFn: async (args) => {
|
|
278
|
+
if (!client) {
|
|
279
|
+
throw new chunk67OV5CX2_cjs.MissingClientError("useGrantInstanceRoles", "airdrop-base");
|
|
280
|
+
}
|
|
281
|
+
return chunkCTED3MTR_cjs.grantInstanceRoles({
|
|
282
|
+
airdrop: client,
|
|
283
|
+
assignment: args.assignment,
|
|
284
|
+
...args.revokeFromCreator !== void 0 ? { revokeFromCreator: args.revokeFromCreator } : {}
|
|
285
|
+
});
|
|
286
|
+
},
|
|
287
|
+
onSuccess: () => {
|
|
288
|
+
void queryClient.invalidateQueries({
|
|
289
|
+
queryKey: chunkNCVX3K2N_cjs.airdropQueryKeyPrefix({ chainId, address: options.address, fn: "hasRole" })
|
|
290
|
+
});
|
|
372
291
|
}
|
|
373
292
|
});
|
|
374
293
|
}
|
|
375
|
-
function
|
|
376
|
-
const { client } =
|
|
294
|
+
function useAirdropPause(options) {
|
|
295
|
+
const { client, chainId } = chunkNCVX3K2N_cjs.useMemoAirdropBaseClient(options);
|
|
296
|
+
const queryClient = reactQuery.useQueryClient();
|
|
377
297
|
return reactQuery.useMutation({
|
|
378
|
-
mutationFn: async ({ paused,
|
|
379
|
-
if (!client)
|
|
380
|
-
|
|
298
|
+
mutationFn: async ({ paused, ...rest }) => {
|
|
299
|
+
if (!client) {
|
|
300
|
+
throw new chunk67OV5CX2_cjs.MissingClientError("useAirdropPause", "airdrop-base");
|
|
301
|
+
}
|
|
302
|
+
return paused ? client.pause(rest) : client.unpause(rest);
|
|
303
|
+
},
|
|
304
|
+
onSuccess: () => {
|
|
305
|
+
void queryClient.invalidateQueries({
|
|
306
|
+
queryKey: chunkNCVX3K2N_cjs.airdropQueryKey({ chainId, address: options.address, fn: "paused", args: [] })
|
|
307
|
+
});
|
|
308
|
+
void queryClient.invalidateQueries({
|
|
309
|
+
queryKey: chunkNCVX3K2N_cjs.airdropQueryKey({ chainId, address: options.address, fn: "window", args: [] })
|
|
310
|
+
});
|
|
381
311
|
}
|
|
382
312
|
});
|
|
383
313
|
}
|
|
384
314
|
function useExtendClaimWindow(options) {
|
|
385
|
-
const { client } =
|
|
386
|
-
|
|
387
|
-
mutationFn: async ({ newEndTime, account }) => {
|
|
388
|
-
if (!client) throw new chunk67OV5CX2_cjs.MissingClientError("useExtendClaimWindow", "airdrop");
|
|
389
|
-
return client.extendClaimWindow(newEndTime, account);
|
|
390
|
-
}
|
|
391
|
-
});
|
|
392
|
-
}
|
|
393
|
-
function useWithdrawOtherToken(options) {
|
|
394
|
-
const { client } = chunkT46YXSBP_cjs.useMemoAirdropClient(options);
|
|
395
|
-
return reactQuery.useMutation({
|
|
396
|
-
mutationFn: async ({ tokenAddress, recipient, account }) => {
|
|
397
|
-
if (!client) throw new chunk67OV5CX2_cjs.MissingClientError("useWithdrawOtherToken", "airdrop");
|
|
398
|
-
return client.withdrawOtherToken(tokenAddress, recipient, account);
|
|
399
|
-
}
|
|
400
|
-
});
|
|
401
|
-
}
|
|
402
|
-
function useWithdrawOtherConfidentialToken(options) {
|
|
403
|
-
const { client } = chunkT46YXSBP_cjs.useMemoAirdropClient(options);
|
|
404
|
-
return reactQuery.useMutation({
|
|
405
|
-
mutationFn: async ({ tokenAddress, recipient, account }) => {
|
|
406
|
-
if (!client) throw new chunk67OV5CX2_cjs.MissingClientError("useWithdrawOtherConfidentialToken", "airdrop");
|
|
407
|
-
return client.withdrawOtherConfidentialToken(tokenAddress, recipient, account);
|
|
408
|
-
}
|
|
409
|
-
});
|
|
410
|
-
}
|
|
411
|
-
function useAirdropWithdrawGasFee(options) {
|
|
412
|
-
const { client } = chunkT46YXSBP_cjs.useMemoAirdropClient(options);
|
|
413
|
-
return reactQuery.useMutation({
|
|
414
|
-
mutationFn: async ({ recipient, amount, account }) => {
|
|
415
|
-
if (!client) throw new chunk67OV5CX2_cjs.MissingClientError("useAirdropWithdrawGasFee", "airdrop");
|
|
416
|
-
return client.withdrawGasFee(recipient, amount, account);
|
|
417
|
-
}
|
|
418
|
-
});
|
|
419
|
-
}
|
|
420
|
-
function useAirdropGrantRole(options) {
|
|
421
|
-
const { client } = chunkT46YXSBP_cjs.useMemoAirdropClient(options);
|
|
422
|
-
return reactQuery.useMutation({
|
|
423
|
-
mutationFn: async ({ role, accountTarget, account }) => {
|
|
424
|
-
if (!client) throw new chunk67OV5CX2_cjs.MissingClientError("useAirdropGrantRole", "airdrop");
|
|
425
|
-
return client.grantRole(role, accountTarget, account);
|
|
426
|
-
}
|
|
427
|
-
});
|
|
428
|
-
}
|
|
429
|
-
function useAirdropRevokeRole(options) {
|
|
430
|
-
const { client } = chunkT46YXSBP_cjs.useMemoAirdropClient(options);
|
|
315
|
+
const { client, chainId } = chunkNCVX3K2N_cjs.useMemoAirdropBaseClient(options);
|
|
316
|
+
const queryClient = reactQuery.useQueryClient();
|
|
431
317
|
return reactQuery.useMutation({
|
|
432
|
-
mutationFn: async (
|
|
433
|
-
if (!client)
|
|
434
|
-
|
|
318
|
+
mutationFn: async (args) => {
|
|
319
|
+
if (!client) {
|
|
320
|
+
throw new chunk67OV5CX2_cjs.MissingClientError("useExtendClaimWindow", "airdrop-base");
|
|
321
|
+
}
|
|
322
|
+
return client.extendClaimWindow(args);
|
|
323
|
+
},
|
|
324
|
+
onSuccess: () => {
|
|
325
|
+
void queryClient.invalidateQueries({
|
|
326
|
+
queryKey: chunkNCVX3K2N_cjs.airdropQueryKey({ chainId, address: options.address, fn: "window", args: [] })
|
|
327
|
+
});
|
|
435
328
|
}
|
|
436
329
|
});
|
|
437
330
|
}
|
|
438
|
-
function
|
|
439
|
-
const {
|
|
331
|
+
function useWithdrawConfidential(options) {
|
|
332
|
+
const { client } = chunkNCVX3K2N_cjs.useMemoAirdropBaseClient(options);
|
|
440
333
|
return reactQuery.useMutation({
|
|
441
334
|
mutationFn: async (args) => {
|
|
442
|
-
if (!
|
|
443
|
-
throw new chunk67OV5CX2_cjs.
|
|
335
|
+
if (!client) {
|
|
336
|
+
throw new chunk67OV5CX2_cjs.MissingClientError("useWithdrawConfidential", "airdrop-base");
|
|
444
337
|
}
|
|
445
|
-
return
|
|
446
|
-
walletClient,
|
|
447
|
-
airdropAddress: args.airdropAddress,
|
|
448
|
-
recipient: args.recipient,
|
|
449
|
-
encryptedAmountHandle: args.encryptedAmountHandle
|
|
450
|
-
});
|
|
338
|
+
return client.withdrawConfidential(args);
|
|
451
339
|
}
|
|
452
340
|
});
|
|
453
341
|
}
|
|
454
342
|
|
|
455
|
-
Object.defineProperty(exports, "
|
|
343
|
+
Object.defineProperty(exports, "buildMerkleCampaign", {
|
|
456
344
|
enumerable: true,
|
|
457
|
-
get: function () { return
|
|
345
|
+
get: function () { return chunkCTED3MTR_cjs.buildMerkleCampaign; }
|
|
458
346
|
});
|
|
459
|
-
Object.defineProperty(exports, "
|
|
347
|
+
Object.defineProperty(exports, "buildMerkleTree", {
|
|
460
348
|
enumerable: true,
|
|
461
|
-
get: function () { return
|
|
349
|
+
get: function () { return chunkCTED3MTR_cjs.buildMerkleTree; }
|
|
462
350
|
});
|
|
463
|
-
Object.defineProperty(exports, "
|
|
351
|
+
Object.defineProperty(exports, "encryptCampaignAmounts", {
|
|
352
|
+
enumerable: true,
|
|
353
|
+
get: function () { return chunkCTED3MTR_cjs.encryptCampaignAmounts; }
|
|
354
|
+
});
|
|
355
|
+
Object.defineProperty(exports, "grantInstanceRoles", {
|
|
356
|
+
enumerable: true,
|
|
357
|
+
get: function () { return chunkCTED3MTR_cjs.grantInstanceRoles; }
|
|
358
|
+
});
|
|
359
|
+
Object.defineProperty(exports, "leafOf", {
|
|
360
|
+
enumerable: true,
|
|
361
|
+
get: function () { return chunkCTED3MTR_cjs.leafOf; }
|
|
362
|
+
});
|
|
363
|
+
Object.defineProperty(exports, "planInstanceRoleSplit", {
|
|
364
|
+
enumerable: true,
|
|
365
|
+
get: function () { return chunkCTED3MTR_cjs.planInstanceRoleSplit; }
|
|
366
|
+
});
|
|
367
|
+
Object.defineProperty(exports, "planMerkleCampaign", {
|
|
368
|
+
enumerable: true,
|
|
369
|
+
get: function () { return chunkCTED3MTR_cjs.planMerkleCampaign; }
|
|
370
|
+
});
|
|
371
|
+
Object.defineProperty(exports, "rotateMerkleRoot", {
|
|
464
372
|
enumerable: true,
|
|
465
|
-
get: function () { return
|
|
373
|
+
get: function () { return chunkCTED3MTR_cjs.rotateMerkleRoot; }
|
|
374
|
+
});
|
|
375
|
+
Object.defineProperty(exports, "validateCampaignRecipients", {
|
|
376
|
+
enumerable: true,
|
|
377
|
+
get: function () { return chunkCTED3MTR_cjs.validateCampaignRecipients; }
|
|
378
|
+
});
|
|
379
|
+
Object.defineProperty(exports, "airdropQueryKey", {
|
|
380
|
+
enumerable: true,
|
|
381
|
+
get: function () { return chunkNCVX3K2N_cjs.airdropQueryKey; }
|
|
382
|
+
});
|
|
383
|
+
Object.defineProperty(exports, "airdropQueryKeyPrefix", {
|
|
384
|
+
enumerable: true,
|
|
385
|
+
get: function () { return chunkNCVX3K2N_cjs.airdropQueryKeyPrefix; }
|
|
466
386
|
});
|
|
467
387
|
Object.defineProperty(exports, "encryptUint64", {
|
|
468
388
|
enumerable: true,
|
|
469
|
-
get: function () { return
|
|
389
|
+
get: function () { return chunkPUX5VXDB_cjs.encryptUint64; }
|
|
470
390
|
});
|
|
471
391
|
Object.defineProperty(exports, "encryptUint64Batch", {
|
|
472
392
|
enumerable: true,
|
|
473
|
-
get: function () { return
|
|
393
|
+
get: function () { return chunkPUX5VXDB_cjs.encryptUint64Batch; }
|
|
474
394
|
});
|
|
475
395
|
Object.defineProperty(exports, "resolveEncryptor", {
|
|
476
396
|
enumerable: true,
|
|
477
|
-
get: function () { return
|
|
397
|
+
get: function () { return chunkPUX5VXDB_cjs.resolveEncryptor; }
|
|
478
398
|
});
|
|
479
399
|
Object.defineProperty(exports, "signClaimAuthorization", {
|
|
480
400
|
enumerable: true,
|
|
481
|
-
get: function () { return
|
|
401
|
+
get: function () { return chunkPUX5VXDB_cjs.signClaimAuthorization; }
|
|
402
|
+
});
|
|
403
|
+
Object.defineProperty(exports, "AlreadyClaimedError", {
|
|
404
|
+
enumerable: true,
|
|
405
|
+
get: function () { return chunkM4IT6DNJ_cjs.AlreadyClaimedError; }
|
|
406
|
+
});
|
|
407
|
+
Object.defineProperty(exports, "ClaimNotStartedError", {
|
|
408
|
+
enumerable: true,
|
|
409
|
+
get: function () { return chunkM4IT6DNJ_cjs.ClaimNotStartedError; }
|
|
410
|
+
});
|
|
411
|
+
Object.defineProperty(exports, "ClaimWindowClosedError", {
|
|
412
|
+
enumerable: true,
|
|
413
|
+
get: function () { return chunkM4IT6DNJ_cjs.ClaimWindowClosedError; }
|
|
414
|
+
});
|
|
415
|
+
Object.defineProperty(exports, "DedupIdConsumedError", {
|
|
416
|
+
enumerable: true,
|
|
417
|
+
get: function () { return chunkM4IT6DNJ_cjs.DedupIdConsumedError; }
|
|
418
|
+
});
|
|
419
|
+
Object.defineProperty(exports, "FeeCollectorSelfAdministeredError", {
|
|
420
|
+
enumerable: true,
|
|
421
|
+
get: function () { return chunkM4IT6DNJ_cjs.FeeCollectorSelfAdministeredError; }
|
|
422
|
+
});
|
|
423
|
+
Object.defineProperty(exports, "MerkleUupsUnsupportedError", {
|
|
424
|
+
enumerable: true,
|
|
425
|
+
get: function () { return chunkM4IT6DNJ_cjs.MerkleUupsUnsupportedError; }
|
|
426
|
+
});
|
|
427
|
+
Object.defineProperty(exports, "NonStockWrapperError", {
|
|
428
|
+
enumerable: true,
|
|
429
|
+
get: function () { return chunkM4IT6DNJ_cjs.NonStockWrapperError; }
|
|
430
|
+
});
|
|
431
|
+
Object.defineProperty(exports, "PredictionDriftError", {
|
|
432
|
+
enumerable: true,
|
|
433
|
+
get: function () { return chunkM4IT6DNJ_cjs.PredictionDriftError; }
|
|
434
|
+
});
|
|
435
|
+
Object.defineProperty(exports, "SaltCollisionError", {
|
|
436
|
+
enumerable: true,
|
|
437
|
+
get: function () { return chunkM4IT6DNJ_cjs.SaltCollisionError; }
|
|
438
|
+
});
|
|
439
|
+
Object.defineProperty(exports, "SignatureExpiredError", {
|
|
440
|
+
enumerable: true,
|
|
441
|
+
get: function () { return chunkM4IT6DNJ_cjs.SignatureExpiredError; }
|
|
442
|
+
});
|
|
443
|
+
Object.defineProperty(exports, "UpgradeabilityNotAllowedError", {
|
|
444
|
+
enumerable: true,
|
|
445
|
+
get: function () { return chunkM4IT6DNJ_cjs.UpgradeabilityNotAllowedError; }
|
|
446
|
+
});
|
|
447
|
+
Object.defineProperty(exports, "preflightClaim", {
|
|
448
|
+
enumerable: true,
|
|
449
|
+
get: function () { return chunkM4IT6DNJ_cjs.preflightClaim; }
|
|
450
|
+
});
|
|
451
|
+
Object.defineProperty(exports, "preflightCreate", {
|
|
452
|
+
enumerable: true,
|
|
453
|
+
get: function () { return chunkM4IT6DNJ_cjs.preflightCreate; }
|
|
482
454
|
});
|
|
483
455
|
Object.defineProperty(exports, "AccessDeniedError", {
|
|
484
456
|
enumerable: true,
|
|
@@ -624,45 +596,24 @@ Object.defineProperty(exports, "isTokenOpsSdkError", {
|
|
|
624
596
|
enumerable: true,
|
|
625
597
|
get: function () { return chunk67OV5CX2_cjs.isTokenOpsSdkError; }
|
|
626
598
|
});
|
|
627
|
-
exports.useAirdropCanExtendClaimWindow = useAirdropCanExtendClaimWindow;
|
|
628
|
-
exports.useAirdropClaimTypehash = useAirdropClaimTypehash;
|
|
629
|
-
exports.useAirdropClaimedSignatures = useAirdropClaimedSignatures;
|
|
630
|
-
exports.useAirdropDeploymentBlockNumber = useAirdropDeploymentBlockNumber;
|
|
631
|
-
exports.useAirdropDomainSeparator = useAirdropDomainSeparator;
|
|
632
|
-
exports.useAirdropEndTime = useAirdropEndTime;
|
|
633
599
|
exports.useAirdropGasFee = useAirdropGasFee;
|
|
634
|
-
exports.useAirdropGrantRole = useAirdropGrantRole;
|
|
635
|
-
exports.useAirdropHasClaimEnded = useAirdropHasClaimEnded;
|
|
636
|
-
exports.useAirdropHasClaimStarted = useAirdropHasClaimStarted;
|
|
637
600
|
exports.useAirdropHasRole = useAirdropHasRole;
|
|
638
|
-
exports.
|
|
639
|
-
exports.
|
|
640
|
-
exports.useAirdropIsSignatureClaimed = useAirdropIsSignatureClaimed;
|
|
641
|
-
exports.useAirdropIsSignatureValid = useAirdropIsSignatureValid;
|
|
642
|
-
exports.useAirdropRevokeRole = useAirdropRevokeRole;
|
|
643
|
-
exports.useAirdropStartTime = useAirdropStartTime;
|
|
601
|
+
exports.useAirdropPause = useAirdropPause;
|
|
602
|
+
exports.useAirdropPaused = useAirdropPaused;
|
|
644
603
|
exports.useAirdropToken = useAirdropToken;
|
|
645
|
-
exports.
|
|
646
|
-
exports.
|
|
647
|
-
exports.
|
|
648
|
-
exports.
|
|
649
|
-
exports.
|
|
650
|
-
exports.
|
|
651
|
-
exports.
|
|
652
|
-
exports.useDisableCustomFee = useDisableCustomFee;
|
|
604
|
+
exports.useAirdropWindow = useAirdropWindow;
|
|
605
|
+
exports.useClaimedAmount = useClaimedAmount;
|
|
606
|
+
exports.useComplianceManager = useComplianceManager;
|
|
607
|
+
exports.useCreateEcdsaAirdrop = useCreateEcdsaAirdrop;
|
|
608
|
+
exports.useCreateMerkleAirdrop = useCreateMerkleAirdrop;
|
|
609
|
+
exports.useEcdsaClaim = useEcdsaClaim;
|
|
610
|
+
exports.useEffectiveUpgradeable = useEffectiveUpgradeable;
|
|
653
611
|
exports.useExtendClaimWindow = useExtendClaimWindow;
|
|
654
|
-
exports.
|
|
655
|
-
exports.
|
|
656
|
-
exports.
|
|
657
|
-
exports.
|
|
658
|
-
exports.
|
|
659
|
-
exports.
|
|
660
|
-
exports.
|
|
661
|
-
exports.
|
|
662
|
-
exports.useSetDefaultGasFee = useSetDefaultGasFee;
|
|
663
|
-
exports.useSetFeeCollector = useSetFeeCollector;
|
|
664
|
-
exports.useSetPaused = useSetPaused;
|
|
665
|
-
exports.useSignClaimAuthorization = useSignClaimAuthorization;
|
|
666
|
-
exports.useWithdraw = useWithdraw;
|
|
667
|
-
exports.useWithdrawOtherConfidentialToken = useWithdrawOtherConfidentialToken;
|
|
668
|
-
exports.useWithdrawOtherToken = useWithdrawOtherToken;
|
|
612
|
+
exports.useFactoryFees = useFactoryFees;
|
|
613
|
+
exports.useFactoryRegistry = useFactoryRegistry;
|
|
614
|
+
exports.useFundAirdrop = useFundAirdrop;
|
|
615
|
+
exports.useGrantInstanceRoles = useGrantInstanceRoles;
|
|
616
|
+
exports.useMerkleClaim = useMerkleClaim;
|
|
617
|
+
exports.useMerkleRoot = useMerkleRoot;
|
|
618
|
+
exports.useSetMerkleRoot = useSetMerkleRoot;
|
|
619
|
+
exports.useWithdrawConfidential = useWithdrawConfidential;
|