@tokenops/sdk 1.1.1 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +158 -2
- package/README.md +18 -8
- package/SECURITY.md +7 -1
- package/dist/{chunk-56UI7LUR.cjs → chunk-2RNW4MIJ.cjs} +37 -0
- package/dist/{chunk-VDXVNZCO.cjs → chunk-43RFBQ73.cjs} +85 -29
- package/dist/{chunk-BE2AIZ3K.js → chunk-46T67CE2.js} +1 -1
- package/dist/{chunk-WRCUDSUJ.js → chunk-4KJ66YRH.js} +61 -3
- package/dist/{chunk-ITQ7WKVC.cjs → chunk-4ZCXK4VI.cjs} +68 -8
- package/dist/{chunk-JFLEEXKP.js → chunk-6WSNS3UV.js} +58 -2
- package/dist/{chunk-W7JHOK7G.cjs → chunk-7G7UOQV4.cjs} +4 -4
- package/dist/{chunk-5KHIQG7Y.cjs → chunk-AYGRYDBX.cjs} +35 -36
- package/dist/{chunk-5SGMJADP.cjs → chunk-BD4LZBVF.cjs} +85 -9
- package/dist/{chunk-OYLZEEHF.cjs → chunk-BK7YIVLK.cjs} +304 -179
- package/dist/{chunk-SEKC7H5Y.cjs → chunk-CBRL2PJA.cjs} +12 -11
- package/dist/{chunk-XWDVPV42.js → chunk-CNP4L3GF.js} +4 -4
- package/dist/{chunk-IVE3QEGD.js → chunk-DRSPMIZ7.js} +28 -1
- package/dist/{chunk-SAGJIEQK.cjs → chunk-EUKPOXWR.cjs} +15 -16
- package/dist/chunk-FT4LNBOS.js +11 -0
- package/dist/{chunk-ITQBDRWX.js → chunk-HETNKZEE.js} +1 -1
- package/dist/{chunk-JJ4R5QXF.js → chunk-KSDSXJ34.js} +1 -1
- package/dist/{chunk-SYHXDHWX.cjs → chunk-LBWRFZR3.cjs} +218 -31
- package/dist/{chunk-ZXCOJY2Z.js → chunk-NFW7AUEX.js} +1 -1
- package/dist/{chunk-FPQBFIUW.cjs → chunk-OL6SHN3D.cjs} +3 -3
- package/dist/{chunk-XSNLAS5M.js → chunk-PD7ME2BT.js} +75 -2
- package/dist/{chunk-FXCW7LVB.js → chunk-QET3Q4JP.js} +94 -9
- package/dist/{chunk-M7V2EDPB.js → chunk-QKKBBH7I.js} +2 -2
- package/dist/{chunk-XXXDQSHE.js → chunk-S2XD75JM.js} +12 -3
- package/dist/{chunk-5SA2HF2W.cjs → chunk-SPGSO5SO.cjs} +31 -22
- package/dist/{chunk-Q7ARQSUH.cjs → chunk-SYHNZSZZ.cjs} +3 -3
- package/dist/{chunk-X56UVEXS.js → chunk-TN65XNTI.js} +248 -120
- package/dist/chunk-U57COLUE.js +56 -0
- package/dist/{chunk-OQZAZIAS.js → chunk-UE5XK2SY.js} +193 -6
- package/dist/{chunk-NS44KBV5.cjs → chunk-UJS4N2XM.cjs} +12 -12
- package/dist/{chunk-IR5AK5U5.js → chunk-V5D7BHW3.js} +4 -5
- package/dist/{chunk-3PQ2RFPC.js → chunk-VHSNYUYV.js} +5 -4
- package/dist/{chunk-CQIPRNS7.cjs → chunk-VR3FREBX.cjs} +3 -3
- package/dist/{chunk-G7G75C46.cjs → chunk-WO72UBQD.cjs} +11 -11
- package/dist/chunk-WOEETTH7.cjs +59 -0
- package/dist/{chunk-QE7ZONJ2.js → chunk-WTK6JDSI.js} +4 -5
- package/dist/{chunk-3ZRHDTEX.cjs → chunk-WUXUWTFW.cjs} +3 -3
- package/dist/{chunk-23F7JIK5.cjs → chunk-YFIWCYHC.cjs} +141 -54
- package/dist/{chunk-FYQ2UW4T.js → chunk-YPYCWLYP.js} +1 -1
- package/dist/chunk-ZQUE2B3Q.cjs +33 -0
- package/dist/core/addresses.d.ts +1 -1
- package/dist/core/errors.d.ts +41 -1
- package/dist/core/revert-mapper.d.ts +77 -0
- package/dist/core/wagmi-compat.d.ts +40 -0
- package/dist/fhe/index.cjs +134 -68
- package/dist/fhe/index.d.cts +2 -1
- package/dist/fhe/index.d.ts +2 -1
- package/dist/fhe/index.js +64 -10
- package/dist/fhe/mock-erc7984.d.ts +4 -4
- package/dist/fhe/operators.d.ts +142 -2
- package/dist/fhe/react/index.cjs +21 -8
- package/dist/fhe/react/index.d.cts +2 -0
- package/dist/fhe/react/index.d.ts +2 -0
- package/dist/fhe/react/index.js +8 -3
- 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 +45 -4
- package/dist/fhe/sepolia-encryptor.d.ts +38 -0
- package/dist/fhe-airdrop/advanced/index.cjs +9 -9
- package/dist/fhe-airdrop/advanced/index.js +7 -7
- package/dist/fhe-airdrop/advanced/react/index.cjs +14 -14
- package/dist/fhe-airdrop/advanced/react/index.js +10 -10
- package/dist/fhe-airdrop/airdrop.d.ts +9 -0
- package/dist/fhe-airdrop/encryption.d.ts +8 -0
- package/dist/fhe-airdrop/factory.d.ts +86 -1
- package/dist/fhe-airdrop/index.cjs +69 -66
- package/dist/fhe-airdrop/index.d.cts +3 -3
- package/dist/fhe-airdrop/index.d.ts +3 -3
- package/dist/fhe-airdrop/index.js +7 -8
- package/dist/fhe-airdrop/react/index.cjs +176 -135
- package/dist/fhe-airdrop/react/index.d.cts +7 -4
- package/dist/fhe-airdrop/react/index.d.ts +7 -4
- package/dist/fhe-airdrop/react/index.js +43 -16
- package/dist/fhe-airdrop/react/useAccessClaimAmount.d.ts +17 -11
- package/dist/fhe-airdrop/react/useAirdropIsSignatureValid.d.ts +3 -2
- package/dist/fhe-airdrop/react/useClaim.d.ts +10 -0
- package/dist/fhe-airdrop/react/useCreateAndFundConfidentialAirdrop.d.ts +8 -0
- package/dist/fhe-airdrop/react/useCreateAndFundConfidentialAirdropAndGetAddress.d.ts +8 -0
- package/dist/fhe-airdrop/react/useFundConfidentialAirdrop.d.ts +8 -0
- package/dist/fhe-airdrop/react/usePreflightCreateAirdrop.d.ts +51 -0
- package/dist/fhe-airdrop/react/useSignClaimAuthorization.d.ts +1 -1
- package/dist/fhe-airdrop/types.d.ts +56 -0
- package/dist/fhe-disperse/encryption.d.ts +8 -0
- package/dist/fhe-disperse/errors.d.ts +55 -0
- package/dist/fhe-disperse/index.cjs +77 -66
- package/dist/fhe-disperse/index.d.cts +2 -2
- package/dist/fhe-disperse/index.d.ts +2 -2
- package/dist/fhe-disperse/index.js +8 -9
- package/dist/fhe-disperse/react/index.cjs +108 -87
- package/dist/fhe-disperse/react/index.d.cts +4 -2
- package/dist/fhe-disperse/react/index.d.ts +4 -2
- package/dist/fhe-disperse/react/index.js +12 -11
- package/dist/fhe-disperse/react/useCalculateFee.d.ts +7 -0
- package/dist/fhe-disperse/react/useDisperse.d.ts +9 -0
- package/dist/fhe-disperse/react/usePreflightDisperse.d.ts +7 -0
- package/dist/fhe-disperse/react/useSingletonCalculateFee.d.ts +7 -0
- package/dist/fhe-disperse/react/useSingletonWithdrawTokenFee.d.ts +6 -0
- package/dist/fhe-disperse/react/useWithdrawTokenFee.d.ts +6 -0
- package/dist/fhe-disperse/singleton.d.ts +29 -0
- package/dist/fhe-disperse/subtotals.d.ts +6 -0
- package/dist/fhe-vesting/advanced/index.cjs +8 -9
- package/dist/fhe-vesting/advanced/index.js +6 -7
- package/dist/fhe-vesting/advanced/react/index.cjs +15 -15
- package/dist/fhe-vesting/advanced/react/index.js +12 -12
- package/dist/fhe-vesting/encryption.d.ts +8 -0
- package/dist/fhe-vesting/index.cjs +82 -79
- package/dist/fhe-vesting/index.d.cts +2 -2
- package/dist/fhe-vesting/index.d.ts +2 -2
- package/dist/fhe-vesting/index.js +9 -10
- package/dist/fhe-vesting/manager.d.ts +119 -1
- package/dist/fhe-vesting/react/index.cjs +264 -224
- package/dist/fhe-vesting/react/index.d.cts +9 -6
- package/dist/fhe-vesting/react/index.d.ts +9 -6
- package/dist/fhe-vesting/react/index.js +44 -21
- 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/useAdminClaim.d.ts +2 -0
- 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 +10 -0
- package/dist/fhe-vesting/react/useBatchCreateVesting.d.ts +8 -0
- package/dist/fhe-vesting/react/useClaim.d.ts +3 -1
- package/dist/fhe-vesting/react/useCreateVesting.d.ts +8 -0
- 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/useManagerWithdrawTokenFee.d.ts +6 -0
- package/dist/fhe-vesting/react/usePartialClaim.d.ts +9 -1
- package/dist/fhe-vesting/react/usePreflightCreateVesting.d.ts +37 -0
- package/dist/fhe-vesting/react/useVestingClaim.d.ts +2 -0
- package/dist/fhe-vesting/react/useVestingInfo.d.ts +1 -1
- package/dist/fhe-vesting/react/useWithdrawAdmin.d.ts +6 -0
- package/dist/fhe-vesting/react/useWithdrawTokenFee.d.ts +6 -0
- package/dist/fhe-vesting/types.d.ts +45 -0
- package/dist/index.cjs +93 -86
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -3
- package/dist/testnet-faucet/index.cjs +58 -55
- package/dist/testnet-faucet/index.d.cts +1 -1
- package/dist/testnet-faucet/index.d.ts +1 -1
- package/dist/testnet-faucet/index.js +5 -6
- package/dist/testnet-faucet/react/index.cjs +60 -56
- package/dist/testnet-faucet/react/index.d.cts +3 -2
- package/dist/testnet-faucet/react/index.d.ts +3 -2
- package/dist/testnet-faucet/react/index.js +11 -11
- package/dist/testnet-faucet/react/useConfidentialBalance.d.ts +3 -2
- package/dist/testnet-faucet/react/useUnderlyingBalance.d.ts +2 -2
- package/package.json +14 -8
- package/dist/chunk-66IHPTOK.cjs +0 -20
- package/dist/chunk-KWFFIJYX.js +0 -11
- package/dist/fhe-airdrop/react/useAirdropClaim.d.ts +0 -25
- package/dist/fhe-airdrop/react/useGetClaimAmount.d.ts +0 -30
- 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,21 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
5
|
-
require('../../chunk-
|
|
6
|
-
require('../../chunk-
|
|
7
|
-
require('../../chunk-
|
|
3
|
+
var chunkOL6SHN3D_cjs = require('../../chunk-OL6SHN3D.cjs');
|
|
4
|
+
require('../../chunk-LBWRFZR3.cjs');
|
|
5
|
+
require('../../chunk-FWHYQZ5E.cjs');
|
|
6
|
+
require('../../chunk-43RFBQ73.cjs');
|
|
7
|
+
require('../../chunk-WUXUWTFW.cjs');
|
|
8
|
+
require('../../chunk-VR3FREBX.cjs');
|
|
9
|
+
require('../../chunk-2RNW4MIJ.cjs');
|
|
8
10
|
require('../../chunk-VJKZWYYJ.cjs');
|
|
9
|
-
require('../../chunk-66IHPTOK.cjs');
|
|
10
|
-
require('../../chunk-56UI7LUR.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
Object.defineProperty(exports, "ConfidentialAirdropFactoryAdvancedClient", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunkOL6SHN3D_cjs.ConfidentialAirdropFactoryAdvancedClient; }
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "createConfidentialAirdropFactoryAdvancedClient", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkOL6SHN3D_cjs.createConfidentialAirdropFactoryAdvancedClient; }
|
|
21
21
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { ConfidentialAirdropFactoryAdvancedClient, createConfidentialAirdropFactoryAdvancedClient } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
1
|
+
export { ConfidentialAirdropFactoryAdvancedClient, createConfidentialAirdropFactoryAdvancedClient } from '../../chunk-KSDSXJ34.js';
|
|
2
|
+
import '../../chunk-UE5XK2SY.js';
|
|
3
|
+
import '../../chunk-7VELUOMI.js';
|
|
4
|
+
import '../../chunk-6WSNS3UV.js';
|
|
5
|
+
import '../../chunk-QKKBBH7I.js';
|
|
6
|
+
import '../../chunk-46T67CE2.js';
|
|
7
|
+
import '../../chunk-DRSPMIZ7.js';
|
|
6
8
|
import '../../chunk-Q2GP5UDC.js';
|
|
7
|
-
import '../../chunk-KWFFIJYX.js';
|
|
8
|
-
import '../../chunk-IVE3QEGD.js';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../../chunk-
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
require('../../../chunk-
|
|
8
|
-
require('../../../chunk-
|
|
9
|
-
|
|
10
|
-
require('../../../chunk-
|
|
3
|
+
var chunkWO72UBQD_cjs = require('../../../chunk-WO72UBQD.cjs');
|
|
4
|
+
require('../../../chunk-SPGSO5SO.cjs');
|
|
5
|
+
var chunkOL6SHN3D_cjs = require('../../../chunk-OL6SHN3D.cjs');
|
|
6
|
+
var chunkLBWRFZR3_cjs = require('../../../chunk-LBWRFZR3.cjs');
|
|
7
|
+
require('../../../chunk-SYHNZSZZ.cjs');
|
|
8
|
+
require('../../../chunk-FWHYQZ5E.cjs');
|
|
9
|
+
require('../../../chunk-43RFBQ73.cjs');
|
|
10
|
+
var chunkWUXUWTFW_cjs = require('../../../chunk-WUXUWTFW.cjs');
|
|
11
|
+
require('../../../chunk-VR3FREBX.cjs');
|
|
12
|
+
require('../../../chunk-2RNW4MIJ.cjs');
|
|
11
13
|
require('../../../chunk-VJKZWYYJ.cjs');
|
|
12
|
-
require('../../../chunk-66IHPTOK.cjs');
|
|
13
|
-
require('../../../chunk-56UI7LUR.cjs');
|
|
14
14
|
var react = require('react');
|
|
15
15
|
var reactQuery = require('@tanstack/react-query');
|
|
16
16
|
var wagmi = require('wagmi');
|
|
@@ -23,22 +23,22 @@ function usePredictAirdropAddress(args = {}) {
|
|
|
23
23
|
...chainId !== void 0 ? { chainId } : {}
|
|
24
24
|
});
|
|
25
25
|
const resolvedChainId = chainId ?? resolvedPublicClient?.chain?.id;
|
|
26
|
-
const resolvedAddress = address ?? (resolvedChainId === void 0 ? void 0 :
|
|
26
|
+
const resolvedAddress = address ?? (resolvedChainId === void 0 ? void 0 : chunkWUXUWTFW_cjs.DEPLOYED_ADDRESSES.fheAirdrop?.confidentialAirdropFactory?.[resolvedChainId] ?? void 0);
|
|
27
27
|
const encryptorSourceRef = react.useRef(encryptor);
|
|
28
28
|
encryptorSourceRef.current = encryptor;
|
|
29
29
|
const client = react.useMemo(() => {
|
|
30
30
|
if (!resolvedPublicClient) return void 0;
|
|
31
31
|
if (!resolvedAddress) return void 0;
|
|
32
|
-
return
|
|
32
|
+
return chunkOL6SHN3D_cjs.createConfidentialAirdropFactoryAdvancedClient({
|
|
33
33
|
publicClient: resolvedPublicClient,
|
|
34
34
|
...walletClient ? { walletClient } : {},
|
|
35
35
|
address: resolvedAddress,
|
|
36
36
|
...resolvedChainId !== void 0 ? { chainId: resolvedChainId } : {},
|
|
37
|
-
encryptor: () =>
|
|
37
|
+
encryptor: () => chunkLBWRFZR3_cjs.resolveEncryptor(encryptorSourceRef.current)
|
|
38
38
|
});
|
|
39
39
|
}, [resolvedPublicClient, walletClient, resolvedAddress, resolvedChainId]);
|
|
40
40
|
return reactQuery.useQuery({
|
|
41
|
-
queryKey:
|
|
41
|
+
queryKey: chunkWO72UBQD_cjs.buildQueryKey(
|
|
42
42
|
"factory:predictAirdropAddress",
|
|
43
43
|
resolvedChainId,
|
|
44
44
|
resolvedAddress,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { buildQueryKey } from '../../../chunk-
|
|
2
|
-
import '../../../chunk-
|
|
3
|
-
import { createConfidentialAirdropFactoryAdvancedClient } from '../../../chunk-
|
|
4
|
-
import { resolveEncryptor } from '../../../chunk-
|
|
5
|
-
import '../../../chunk-
|
|
6
|
-
import '../../../chunk-
|
|
7
|
-
import
|
|
8
|
-
import '../../../chunk-
|
|
1
|
+
import { buildQueryKey } from '../../../chunk-CNP4L3GF.js';
|
|
2
|
+
import '../../../chunk-S2XD75JM.js';
|
|
3
|
+
import { createConfidentialAirdropFactoryAdvancedClient } from '../../../chunk-KSDSXJ34.js';
|
|
4
|
+
import { resolveEncryptor } from '../../../chunk-UE5XK2SY.js';
|
|
5
|
+
import '../../../chunk-YPYCWLYP.js';
|
|
6
|
+
import '../../../chunk-7VELUOMI.js';
|
|
7
|
+
import '../../../chunk-6WSNS3UV.js';
|
|
8
|
+
import { DEPLOYED_ADDRESSES } from '../../../chunk-QKKBBH7I.js';
|
|
9
|
+
import '../../../chunk-46T67CE2.js';
|
|
10
|
+
import '../../../chunk-DRSPMIZ7.js';
|
|
9
11
|
import '../../../chunk-Q2GP5UDC.js';
|
|
10
|
-
import '../../../chunk-KWFFIJYX.js';
|
|
11
|
-
import '../../../chunk-IVE3QEGD.js';
|
|
12
12
|
import { useRef, useMemo } from 'react';
|
|
13
13
|
import { useQuery } from '@tanstack/react-query';
|
|
14
14
|
import { usePublicClient, useWalletClient } from 'wagmi';
|
|
@@ -239,6 +239,15 @@ export declare class ConfidentialAirdropClient {
|
|
|
239
239
|
* {@link signClaimAuthorization}. The signature commits to that handle, so the SDK
|
|
240
240
|
* does NOT re-encrypt — submit the admin-issued payload as-is.
|
|
241
241
|
*
|
|
242
|
+
* **Silent-zero transfers.** ERC-7984 transfers do not revert when the sender's encrypted balance is insufficient — the transfer succeeds and moves an encrypted zero instead. This is by design: reverting would leak balance information. The transaction receipt alone cannot tell you whether value actually moved.
|
|
243
|
+
*
|
|
244
|
+
* **An unfunded pool is the opposite case — it reverts loudly.** Do not
|
|
245
|
+
* generalize the silent-zero rule above to a clone whose pool was never
|
|
246
|
+
* funded: that claim throws {@link FheHandleNotAllowedError} (the FHEVM ACL
|
|
247
|
+
* rejects `FHE.allowTransient` on an uninitialized handle), and
|
|
248
|
+
* {@link preflightClaim} cannot detect it because the pool balance is an
|
|
249
|
+
* encrypted `euint64` the SDK cannot read in plaintext.
|
|
250
|
+
*
|
|
242
251
|
* @returns Transaction hash.
|
|
243
252
|
* @example
|
|
244
253
|
* const fee = await airdrop.gasFee();
|
|
@@ -71,6 +71,14 @@ export interface EncryptUint64BatchArgs {
|
|
|
71
71
|
* `userAddress` MUST be the **recipient** (not the admin), because the contract's
|
|
72
72
|
* `FHE.fromExternal` rejects proofs bound to any other address.
|
|
73
73
|
*
|
|
74
|
+
* **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
|
|
75
|
+
* convention (1 token = 1_000_000 base units), not the 18 decimals typical of
|
|
76
|
+
* ERC-20. Amount parameters are base units of the token's actual decimals:
|
|
77
|
+
* for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
|
|
78
|
+
* transparent TTT test token uses 18 decimals. `value` (and each entry of
|
|
79
|
+
* `values` in {@link encryptUint64Batch}) follows this convention when it
|
|
80
|
+
* encodes a token amount.
|
|
81
|
+
*
|
|
74
82
|
* @param args Encryption request; `value` must fit in `uint64` (0 to 2^64-1).
|
|
75
83
|
* @returns `{ handle: Hex, inputProof: Hex }` — pass both to the contract.
|
|
76
84
|
* @example
|
|
@@ -2,7 +2,7 @@ import type { Account, Address, Hex, PublicClient, WalletClient } from "viem";
|
|
|
2
2
|
import { type TxHash } from "../core/brands.js";
|
|
3
3
|
import { type SdkTelemetry } from "../core/telemetry.js";
|
|
4
4
|
import { type Encryptor, type EncryptorSource } from "./encryption.js";
|
|
5
|
-
import type { AirdropParams, CustomFee, EncryptedInput } from "./types.js";
|
|
5
|
+
import type { AirdropParams, CreateAirdropPreflightReport, CustomFee, EncryptedInput } from "./types.js";
|
|
6
6
|
export interface ConfidentialAirdropFactoryClientConfig {
|
|
7
7
|
publicClient: PublicClient;
|
|
8
8
|
walletClient?: WalletClient;
|
|
@@ -114,6 +114,27 @@ export interface CreateAirdropResult {
|
|
|
114
114
|
/** Address of the deployed clone, parsed from the `ConfidentialAirdropCreated` event. */
|
|
115
115
|
airdrop: Address;
|
|
116
116
|
}
|
|
117
|
+
/** Arguments for {@link ConfidentialAirdropFactoryClient.preflightCreateAirdrop}. */
|
|
118
|
+
export interface PreflightCreateAirdropArgs {
|
|
119
|
+
/** The airdrop parameters that will be passed to the create call. */
|
|
120
|
+
params: AirdropParams;
|
|
121
|
+
/** The address that will send the create transaction (`msg.sender`). */
|
|
122
|
+
creator: Address;
|
|
123
|
+
/**
|
|
124
|
+
* The `userSalt` planned for the create call. Optional — when supplied, the
|
|
125
|
+
* preflight also predicts the CREATE2 clone address and reports whether a
|
|
126
|
+
* clone already exists there (a repeat create with the same salt reverts).
|
|
127
|
+
*/
|
|
128
|
+
userSalt?: Hex;
|
|
129
|
+
/**
|
|
130
|
+
* Set `true` when the plan is `createAndFundConfidentialAirdrop` (or a
|
|
131
|
+
* follow-up `fundConfidentialAirdrop`). Funding pulls tokens from the
|
|
132
|
+
* creator via `confidentialTransferFrom`, so a missing factory-operator
|
|
133
|
+
* approval becomes a blocker. When `false`/omitted, the operator state is
|
|
134
|
+
* still reported (`isFactoryOperator`) but does not block a create-only tx.
|
|
135
|
+
*/
|
|
136
|
+
funding?: boolean;
|
|
137
|
+
}
|
|
117
138
|
export interface PredictAirdropArgs {
|
|
118
139
|
params: AirdropParams;
|
|
119
140
|
userSalt: Hex;
|
|
@@ -172,6 +193,14 @@ export declare class ConfidentialAirdropFactoryClient {
|
|
|
172
193
|
* Prerequisites: caller must have set this factory as an operator on the
|
|
173
194
|
* token: `token.setOperator(factoryAddress, deadline)`.
|
|
174
195
|
*
|
|
196
|
+
* **Silent-zero transfers.** ERC-7984 transfers do not revert when the sender's encrypted balance is insufficient — the transfer succeeds and moves an encrypted zero instead. This is by design: reverting would leak balance information. The transaction receipt alone cannot tell you whether value actually moved.
|
|
197
|
+
*
|
|
198
|
+
* **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
|
|
199
|
+
* convention (1 token = 1_000_000 base units), not the 18 decimals typical of
|
|
200
|
+
* ERC-20. Amount parameters are base units of the token's actual decimals:
|
|
201
|
+
* for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
|
|
202
|
+
* transparent TTT test token uses 18 decimals.
|
|
203
|
+
*
|
|
175
204
|
* Symmetric with {@link ConfidentialAirdropFactoryClient.createConfidentialAirdrop}
|
|
176
205
|
* — both return `{ hash, airdrop }` parsed from the
|
|
177
206
|
* `ConfidentialAirdropCreated` event.
|
|
@@ -188,6 +217,14 @@ export declare class ConfidentialAirdropFactoryClient {
|
|
|
188
217
|
* Prerequisites: caller must have set this factory as an operator on the token:
|
|
189
218
|
* `token.setOperator(factoryAddress, deadline)`
|
|
190
219
|
*
|
|
220
|
+
* **Silent-zero transfers.** ERC-7984 transfers do not revert when the sender's encrypted balance is insufficient — the transfer succeeds and moves an encrypted zero instead. This is by design: reverting would leak balance information. The transaction receipt alone cannot tell you whether value actually moved.
|
|
221
|
+
*
|
|
222
|
+
* **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
|
|
223
|
+
* convention (1 token = 1_000_000 base units), not the 18 decimals typical of
|
|
224
|
+
* ERC-20. Amount parameters are base units of the token's actual decimals:
|
|
225
|
+
* for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
|
|
226
|
+
* transparent TTT test token uses 18 decimals.
|
|
227
|
+
*
|
|
191
228
|
* @returns Transaction hash.
|
|
192
229
|
*/
|
|
193
230
|
fundConfidentialAirdrop(args: FundAirdropArgs): Promise<Hex>;
|
|
@@ -218,6 +255,14 @@ export declare class ConfidentialAirdropFactoryClient {
|
|
|
218
255
|
* Symmetry with {@link ConfidentialAirdropFactoryClient.createConfidentialAirdropAndGetAddress}
|
|
219
256
|
* — use this when you also need to seed the pool in the same transaction.
|
|
220
257
|
*
|
|
258
|
+
* **Silent-zero transfers.** ERC-7984 transfers do not revert when the sender's encrypted balance is insufficient — the transfer succeeds and moves an encrypted zero instead. This is by design: reverting would leak balance information. The transaction receipt alone cannot tell you whether value actually moved.
|
|
259
|
+
*
|
|
260
|
+
* **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
|
|
261
|
+
* convention (1 token = 1_000_000 base units), not the 18 decimals typical of
|
|
262
|
+
* ERC-20. Amount parameters are base units of the token's actual decimals:
|
|
263
|
+
* for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
|
|
264
|
+
* transparent TTT test token uses 18 decimals.
|
|
265
|
+
*
|
|
221
266
|
* Internally: {@link ConfidentialAirdropFactoryClient.createAndFundConfidentialAirdrop} →
|
|
222
267
|
* {@link PublicClient.waitForTransactionReceipt} →
|
|
223
268
|
* `parseEventLogs({ eventName: "ConfidentialAirdropCreated" })`.
|
|
@@ -268,6 +313,46 @@ export declare class ConfidentialAirdropFactoryClient {
|
|
|
268
313
|
params: AirdropParams;
|
|
269
314
|
gasFee: bigint;
|
|
270
315
|
}): Promise<Hex>;
|
|
316
|
+
/**
|
|
317
|
+
* Read-only preflight for {@link createConfidentialAirdrop} /
|
|
318
|
+
* {@link createAndFundConfidentialAirdrop}. Runs the
|
|
319
|
+
* deterministic-from-off-chain checks and reports blockers both as
|
|
320
|
+
* human-readable strings (`blockers`) and as typed {@link TokenOpsSdkError}s
|
|
321
|
+
* (`blockerErrors`), index-aligned.
|
|
322
|
+
*
|
|
323
|
+
* Preflight is **opt-in**. Consumers who have already validated state can
|
|
324
|
+
* skip this call and invoke the write directly — they'll receive the same
|
|
325
|
+
* typed errors at write time via the revert mapper.
|
|
326
|
+
*
|
|
327
|
+
* Report fields: `isFactoryOperator`, `gasFee`, `predictedAirdrop`,
|
|
328
|
+
* `alreadyDeployed`, `ready`, `blockers`, `blockerErrors` — see
|
|
329
|
+
* {@link CreateAirdropPreflightReport} for the meaning of each.
|
|
330
|
+
*
|
|
331
|
+
* Checks performed (all read-only, no gas):
|
|
332
|
+
* - Structural `params` validation mirroring the factory + clone
|
|
333
|
+
* `initialize` requirements (`InvalidArgumentError` blockers): `token` and
|
|
334
|
+
* `admin` are checksummed non-zero addresses,
|
|
335
|
+
* `startTimestamp < endTimestamp`, and `endTimestamp` is in the future
|
|
336
|
+
* (the clone's `initialize` reverts with `EndTimeInPast`).
|
|
337
|
+
* - Operator: creator has approved this factory as an ERC-7984 operator on
|
|
338
|
+
* `params.token` — a blocker only when `funding: true`
|
|
339
|
+
* ({@link OperatorNotApprovedError}); otherwise informational via
|
|
340
|
+
* `isFactoryOperator`.
|
|
341
|
+
* - Collision (only when `userSalt` is supplied): bytecode already at the
|
|
342
|
+
* predicted CREATE2 address means a repeat create with the same
|
|
343
|
+
* `(params, userSalt, gasFee)` would revert
|
|
344
|
+
* ({@link AlreadyInitializedError} blocker).
|
|
345
|
+
*
|
|
346
|
+
* **Not preflight-detectable — read before trusting `ready: true`:** the
|
|
347
|
+
* creator's confidential token balance is an encrypted `euint64` the SDK
|
|
348
|
+
* cannot read in plaintext, and an underfunded `createAndFund` does **not**
|
|
349
|
+
* revert — the ERC-7984 transfer silently moves an encrypted zero. Confirm
|
|
350
|
+
* the creator's balance covers the pool before submitting.
|
|
351
|
+
*
|
|
352
|
+
* @param args See {@link PreflightCreateAirdropArgs}.
|
|
353
|
+
* @returns A {@link CreateAirdropPreflightReport}.
|
|
354
|
+
*/
|
|
355
|
+
preflightCreateAirdrop(args: PreflightCreateAirdropArgs): Promise<CreateAirdropPreflightReport>;
|
|
271
356
|
}
|
|
272
357
|
/**
|
|
273
358
|
* Create a {@link ConfidentialAirdropFactoryClient}. Mirrors viem's `create*` convention.
|
|
@@ -1,227 +1,230 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkSPGSO5SO_cjs = require('../chunk-SPGSO5SO.cjs');
|
|
4
|
+
var chunkLBWRFZR3_cjs = require('../chunk-LBWRFZR3.cjs');
|
|
5
|
+
require('../chunk-SYHNZSZZ.cjs');
|
|
5
6
|
var chunkFWHYQZ5E_cjs = require('../chunk-FWHYQZ5E.cjs');
|
|
6
|
-
require('../chunk-
|
|
7
|
-
require('../chunk-
|
|
8
|
-
require('../chunk-
|
|
9
|
-
require('../chunk-
|
|
7
|
+
require('../chunk-43RFBQ73.cjs');
|
|
8
|
+
require('../chunk-WUXUWTFW.cjs');
|
|
9
|
+
require('../chunk-VR3FREBX.cjs');
|
|
10
|
+
var chunk2RNW4MIJ_cjs = require('../chunk-2RNW4MIJ.cjs');
|
|
10
11
|
require('../chunk-VJKZWYYJ.cjs');
|
|
11
|
-
var chunk66IHPTOK_cjs = require('../chunk-66IHPTOK.cjs');
|
|
12
|
-
var chunk56UI7LUR_cjs = require('../chunk-56UI7LUR.cjs');
|
|
13
12
|
|
|
14
13
|
|
|
15
14
|
|
|
16
15
|
Object.defineProperty(exports, "AlreadyClaimedError", {
|
|
17
16
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkSPGSO5SO_cjs.AlreadyClaimedError; }
|
|
19
18
|
});
|
|
20
19
|
Object.defineProperty(exports, "ClaimNotStartedError", {
|
|
21
20
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkSPGSO5SO_cjs.ClaimNotStartedError; }
|
|
23
22
|
});
|
|
24
23
|
Object.defineProperty(exports, "ClaimWindowClosedError", {
|
|
25
24
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkSPGSO5SO_cjs.ClaimWindowClosedError; }
|
|
27
26
|
});
|
|
28
27
|
Object.defineProperty(exports, "ConfidentialAirdropClient", {
|
|
29
28
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkSPGSO5SO_cjs.ConfidentialAirdropClient; }
|
|
31
30
|
});
|
|
32
31
|
Object.defineProperty(exports, "confidentialAirdropCloneableAbi", {
|
|
33
32
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkSPGSO5SO_cjs.confidentialAirdropCloneableAbi; }
|
|
35
34
|
});
|
|
36
35
|
Object.defineProperty(exports, "createConfidentialAirdropClient", {
|
|
37
36
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkSPGSO5SO_cjs.createConfidentialAirdropClient; }
|
|
39
38
|
});
|
|
40
39
|
Object.defineProperty(exports, "ConfidentialAirdropFactoryClient", {
|
|
41
40
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkLBWRFZR3_cjs.ConfidentialAirdropFactoryClient; }
|
|
43
42
|
});
|
|
44
43
|
Object.defineProperty(exports, "confidentialAirdropFactoryAbi", {
|
|
45
44
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkLBWRFZR3_cjs.confidentialAirdropFactoryAbi; }
|
|
47
46
|
});
|
|
48
47
|
Object.defineProperty(exports, "createConfidentialAirdropFactoryClient", {
|
|
49
48
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkLBWRFZR3_cjs.createConfidentialAirdropFactoryClient; }
|
|
51
50
|
});
|
|
52
51
|
Object.defineProperty(exports, "encryptUint64", {
|
|
53
52
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkLBWRFZR3_cjs.encryptUint64; }
|
|
55
54
|
});
|
|
56
55
|
Object.defineProperty(exports, "encryptUint64Batch", {
|
|
57
56
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkLBWRFZR3_cjs.encryptUint64Batch; }
|
|
59
58
|
});
|
|
60
59
|
Object.defineProperty(exports, "resolveEncryptor", {
|
|
61
60
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkLBWRFZR3_cjs.resolveEncryptor; }
|
|
63
62
|
});
|
|
64
63
|
Object.defineProperty(exports, "signClaimAuthorization", {
|
|
65
64
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkLBWRFZR3_cjs.signClaimAuthorization; }
|
|
67
66
|
});
|
|
68
67
|
Object.defineProperty(exports, "erc7984OperatorAbi", {
|
|
69
68
|
enumerable: true,
|
|
70
69
|
get: function () { return chunkFWHYQZ5E_cjs.erc7984OperatorAbi; }
|
|
71
70
|
});
|
|
72
|
-
Object.defineProperty(exports, "asAirdropId", {
|
|
73
|
-
enumerable: true,
|
|
74
|
-
get: function () { return chunk66IHPTOK_cjs.asAirdropId; }
|
|
75
|
-
});
|
|
76
|
-
Object.defineProperty(exports, "asEncryptedHandle", {
|
|
77
|
-
enumerable: true,
|
|
78
|
-
get: function () { return chunk66IHPTOK_cjs.asEncryptedHandle; }
|
|
79
|
-
});
|
|
80
71
|
Object.defineProperty(exports, "AccessDeniedError", {
|
|
81
72
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
73
|
+
get: function () { return chunk2RNW4MIJ_cjs.AccessDeniedError; }
|
|
83
74
|
});
|
|
84
75
|
Object.defineProperty(exports, "AlreadyInitializedError", {
|
|
85
76
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
77
|
+
get: function () { return chunk2RNW4MIJ_cjs.AlreadyInitializedError; }
|
|
87
78
|
});
|
|
88
79
|
Object.defineProperty(exports, "BatchTooLargeError", {
|
|
89
80
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
81
|
+
get: function () { return chunk2RNW4MIJ_cjs.BatchTooLargeError; }
|
|
91
82
|
});
|
|
92
83
|
Object.defineProperty(exports, "ContractRevertError", {
|
|
93
84
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
85
|
+
get: function () { return chunk2RNW4MIJ_cjs.ContractRevertError; }
|
|
95
86
|
});
|
|
96
87
|
Object.defineProperty(exports, "DecryptionFailedError", {
|
|
97
88
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
89
|
+
get: function () { return chunk2RNW4MIJ_cjs.DecryptionFailedError; }
|
|
99
90
|
});
|
|
100
91
|
Object.defineProperty(exports, "DeploymentAddressUnavailableError", {
|
|
101
92
|
enumerable: true,
|
|
102
|
-
get: function () { return
|
|
93
|
+
get: function () { return chunk2RNW4MIJ_cjs.DeploymentAddressUnavailableError; }
|
|
103
94
|
});
|
|
104
95
|
Object.defineProperty(exports, "EncryptionFailedError", {
|
|
105
96
|
enumerable: true,
|
|
106
|
-
get: function () { return
|
|
97
|
+
get: function () { return chunk2RNW4MIJ_cjs.EncryptionFailedError; }
|
|
107
98
|
});
|
|
108
99
|
Object.defineProperty(exports, "FeatureDisabledError", {
|
|
109
100
|
enumerable: true,
|
|
110
|
-
get: function () { return
|
|
101
|
+
get: function () { return chunk2RNW4MIJ_cjs.FeatureDisabledError; }
|
|
111
102
|
});
|
|
112
103
|
Object.defineProperty(exports, "FheHandleNotAllowedError", {
|
|
113
104
|
enumerable: true,
|
|
114
|
-
get: function () { return
|
|
105
|
+
get: function () { return chunk2RNW4MIJ_cjs.FheHandleNotAllowedError; }
|
|
115
106
|
});
|
|
116
107
|
Object.defineProperty(exports, "InsufficientBalanceError", {
|
|
117
108
|
enumerable: true,
|
|
118
|
-
get: function () { return
|
|
109
|
+
get: function () { return chunk2RNW4MIJ_cjs.InsufficientBalanceError; }
|
|
119
110
|
});
|
|
120
111
|
Object.defineProperty(exports, "InsufficientFeeError", {
|
|
121
112
|
enumerable: true,
|
|
122
|
-
get: function () { return
|
|
113
|
+
get: function () { return chunk2RNW4MIJ_cjs.InsufficientFeeError; }
|
|
123
114
|
});
|
|
124
115
|
Object.defineProperty(exports, "InsufficientGasFundsError", {
|
|
125
116
|
enumerable: true,
|
|
126
|
-
get: function () { return
|
|
117
|
+
get: function () { return chunk2RNW4MIJ_cjs.InsufficientGasFundsError; }
|
|
127
118
|
});
|
|
128
119
|
Object.defineProperty(exports, "InvalidArgumentError", {
|
|
129
120
|
enumerable: true,
|
|
130
|
-
get: function () { return
|
|
121
|
+
get: function () { return chunk2RNW4MIJ_cjs.InvalidArgumentError; }
|
|
131
122
|
});
|
|
132
123
|
Object.defineProperty(exports, "InvalidSignatureError", {
|
|
133
124
|
enumerable: true,
|
|
134
|
-
get: function () { return
|
|
125
|
+
get: function () { return chunk2RNW4MIJ_cjs.InvalidSignatureError; }
|
|
135
126
|
});
|
|
136
127
|
Object.defineProperty(exports, "MissingAccountError", {
|
|
137
128
|
enumerable: true,
|
|
138
|
-
get: function () { return
|
|
129
|
+
get: function () { return chunk2RNW4MIJ_cjs.MissingAccountError; }
|
|
139
130
|
});
|
|
140
131
|
Object.defineProperty(exports, "MissingClientError", {
|
|
141
132
|
enumerable: true,
|
|
142
|
-
get: function () { return
|
|
133
|
+
get: function () { return chunk2RNW4MIJ_cjs.MissingClientError; }
|
|
143
134
|
});
|
|
144
135
|
Object.defineProperty(exports, "MissingEncryptorError", {
|
|
145
136
|
enumerable: true,
|
|
146
|
-
get: function () { return
|
|
137
|
+
get: function () { return chunk2RNW4MIJ_cjs.MissingEncryptorError; }
|
|
147
138
|
});
|
|
148
139
|
Object.defineProperty(exports, "MissingPublicClientError", {
|
|
149
140
|
enumerable: true,
|
|
150
|
-
get: function () { return
|
|
141
|
+
get: function () { return chunk2RNW4MIJ_cjs.MissingPublicClientError; }
|
|
151
142
|
});
|
|
152
143
|
Object.defineProperty(exports, "MissingWalletClientError", {
|
|
153
144
|
enumerable: true,
|
|
154
|
-
get: function () { return
|
|
145
|
+
get: function () { return chunk2RNW4MIJ_cjs.MissingWalletClientError; }
|
|
155
146
|
});
|
|
156
147
|
Object.defineProperty(exports, "NetworkError", {
|
|
157
148
|
enumerable: true,
|
|
158
|
-
get: function () { return
|
|
149
|
+
get: function () { return chunk2RNW4MIJ_cjs.NetworkError; }
|
|
150
|
+
});
|
|
151
|
+
Object.defineProperty(exports, "OperatorNotApprovedError", {
|
|
152
|
+
enumerable: true,
|
|
153
|
+
get: function () { return chunk2RNW4MIJ_cjs.OperatorNotApprovedError; }
|
|
159
154
|
});
|
|
160
155
|
Object.defineProperty(exports, "PausedError", {
|
|
161
156
|
enumerable: true,
|
|
162
|
-
get: function () { return
|
|
157
|
+
get: function () { return chunk2RNW4MIJ_cjs.PausedError; }
|
|
163
158
|
});
|
|
164
159
|
Object.defineProperty(exports, "ReceiptEventAmbiguousError", {
|
|
165
160
|
enumerable: true,
|
|
166
|
-
get: function () { return
|
|
161
|
+
get: function () { return chunk2RNW4MIJ_cjs.ReceiptEventAmbiguousError; }
|
|
167
162
|
});
|
|
168
163
|
Object.defineProperty(exports, "ReceiptEventNotFoundError", {
|
|
169
164
|
enumerable: true,
|
|
170
|
-
get: function () { return
|
|
165
|
+
get: function () { return chunk2RNW4MIJ_cjs.ReceiptEventNotFoundError; }
|
|
171
166
|
});
|
|
172
167
|
Object.defineProperty(exports, "ReentrancyError", {
|
|
173
168
|
enumerable: true,
|
|
174
|
-
get: function () { return
|
|
169
|
+
get: function () { return chunk2RNW4MIJ_cjs.ReentrancyError; }
|
|
175
170
|
});
|
|
176
171
|
Object.defineProperty(exports, "RelayerUnreachableError", {
|
|
177
172
|
enumerable: true,
|
|
178
|
-
get: function () { return
|
|
173
|
+
get: function () { return chunk2RNW4MIJ_cjs.RelayerUnreachableError; }
|
|
179
174
|
});
|
|
180
175
|
Object.defineProperty(exports, "SigningFailedError", {
|
|
181
176
|
enumerable: true,
|
|
182
|
-
get: function () { return
|
|
177
|
+
get: function () { return chunk2RNW4MIJ_cjs.SigningFailedError; }
|
|
183
178
|
});
|
|
184
179
|
Object.defineProperty(exports, "TokenOpsContractError", {
|
|
185
180
|
enumerable: true,
|
|
186
|
-
get: function () { return
|
|
181
|
+
get: function () { return chunk2RNW4MIJ_cjs.TokenOpsContractError; }
|
|
187
182
|
});
|
|
188
183
|
Object.defineProperty(exports, "TokenOpsSdkError", {
|
|
189
184
|
enumerable: true,
|
|
190
|
-
get: function () { return
|
|
185
|
+
get: function () { return chunk2RNW4MIJ_cjs.TokenOpsSdkError; }
|
|
191
186
|
});
|
|
192
187
|
Object.defineProperty(exports, "TokenOpsValidationError", {
|
|
193
188
|
enumerable: true,
|
|
194
|
-
get: function () { return
|
|
189
|
+
get: function () { return chunk2RNW4MIJ_cjs.TokenOpsValidationError; }
|
|
195
190
|
});
|
|
196
191
|
Object.defineProperty(exports, "TransferFailedError", {
|
|
197
192
|
enumerable: true,
|
|
198
|
-
get: function () { return
|
|
193
|
+
get: function () { return chunk2RNW4MIJ_cjs.TransferFailedError; }
|
|
199
194
|
});
|
|
200
195
|
Object.defineProperty(exports, "UnknownWriteFailureError", {
|
|
201
196
|
enumerable: true,
|
|
202
|
-
get: function () { return
|
|
197
|
+
get: function () { return chunk2RNW4MIJ_cjs.UnknownWriteFailureError; }
|
|
203
198
|
});
|
|
204
199
|
Object.defineProperty(exports, "UnsupportedChainError", {
|
|
205
200
|
enumerable: true,
|
|
206
|
-
get: function () { return
|
|
201
|
+
get: function () { return chunk2RNW4MIJ_cjs.UnsupportedChainError; }
|
|
207
202
|
});
|
|
208
203
|
Object.defineProperty(exports, "UserDecryptNotAllowedError", {
|
|
209
204
|
enumerable: true,
|
|
210
|
-
get: function () { return
|
|
205
|
+
get: function () { return chunk2RNW4MIJ_cjs.UserDecryptNotAllowedError; }
|
|
211
206
|
});
|
|
212
207
|
Object.defineProperty(exports, "UserRejectedSignatureError", {
|
|
213
208
|
enumerable: true,
|
|
214
|
-
get: function () { return
|
|
209
|
+
get: function () { return chunk2RNW4MIJ_cjs.UserRejectedSignatureError; }
|
|
215
210
|
});
|
|
216
211
|
Object.defineProperty(exports, "WalletChainMismatchError", {
|
|
217
212
|
enumerable: true,
|
|
218
|
-
get: function () { return
|
|
213
|
+
get: function () { return chunk2RNW4MIJ_cjs.WalletChainMismatchError; }
|
|
219
214
|
});
|
|
220
215
|
Object.defineProperty(exports, "WalletRejectedError", {
|
|
221
216
|
enumerable: true,
|
|
222
|
-
get: function () { return
|
|
217
|
+
get: function () { return chunk2RNW4MIJ_cjs.WalletRejectedError; }
|
|
218
|
+
});
|
|
219
|
+
Object.defineProperty(exports, "asAirdropId", {
|
|
220
|
+
enumerable: true,
|
|
221
|
+
get: function () { return chunk2RNW4MIJ_cjs.asAirdropId; }
|
|
222
|
+
});
|
|
223
|
+
Object.defineProperty(exports, "asEncryptedHandle", {
|
|
224
|
+
enumerable: true,
|
|
225
|
+
get: function () { return chunk2RNW4MIJ_cjs.asEncryptedHandle; }
|
|
223
226
|
});
|
|
224
227
|
Object.defineProperty(exports, "isTokenOpsSdkError", {
|
|
225
228
|
enumerable: true,
|
|
226
|
-
get: function () { return
|
|
229
|
+
get: function () { return chunk2RNW4MIJ_cjs.isTokenOpsSdkError; }
|
|
227
230
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { ConfidentialAirdropFactoryClient, createConfidentialAirdropFactoryClient, type ConfidentialAirdropFactoryClientConfig, type CreateAirdropArgs, type CreateAirdropResult, type CreateAndFundAirdropArgs, type FundAirdropArgs, } from "./factory.js";
|
|
1
|
+
export { ConfidentialAirdropFactoryClient, createConfidentialAirdropFactoryClient, type ConfidentialAirdropFactoryClientConfig, type CreateAirdropArgs, type CreateAirdropResult, type CreateAndFundAirdropArgs, type FundAirdropArgs, type PreflightCreateAirdropArgs, } from "./factory.js";
|
|
2
2
|
export { ConfidentialAirdropClient, createConfidentialAirdropClient, type ClaimArgs, type ConfidentialAirdropClientConfig, type EncryptedViewResult, type GetClaimAmountArgs, type IsSignatureValidArgs, } from "./airdrop.js";
|
|
3
3
|
export { encryptUint64, encryptUint64Batch, resolveEncryptor, signClaimAuthorization, type Encryptor, type EncryptorSource, type EncryptUint64Args, type EncryptUint64BatchArgs, type FheValueInput, } from "./encryption.js";
|
|
4
|
-
export { type AirdropParams, type CustomFee, type EncryptedInput, type EncryptedInputs, } from "./types.js";
|
|
4
|
+
export { type AirdropParams, type CreateAirdropPreflightReport, type CustomFee, type EncryptedInput, type EncryptedInputs, } from "./types.js";
|
|
5
5
|
export { asAirdropId, type AirdropId, asEncryptedHandle, type EncryptedHandle, } from "../core/brands.js";
|
|
6
6
|
export { confidentialAirdropFactoryAbi, confidentialAirdropCloneableAbi } from "./abis/index.js";
|
|
7
7
|
export { erc7984OperatorAbi } from "../fhe/erc7984-abi.js";
|
|
8
|
-
export { TokenOpsSdkError, isTokenOpsSdkError, DeploymentAddressUnavailableError, UnsupportedChainError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, InvalidArgumentError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, TokenOpsValidationError, ContractRevertError, TokenOpsContractError, PausedError, AccessDeniedError, InsufficientFeeError, InsufficientBalanceError, BatchTooLargeError, FeatureDisabledError, TransferFailedError, FheHandleNotAllowedError, AlreadyInitializedError, ReentrancyError, InvalidSignatureError, WalletRejectedError, WalletChainMismatchError, NetworkError, InsufficientGasFundsError, UnknownWriteFailureError, UserRejectedSignatureError, SigningFailedError, RelayerUnreachableError, EncryptionFailedError, DecryptionFailedError, UserDecryptNotAllowedError, type DeploymentAddressUnavailableReason, type TokenOpsSdkErrorCode, } from "../core/errors.js";
|
|
8
|
+
export { TokenOpsSdkError, isTokenOpsSdkError, DeploymentAddressUnavailableError, UnsupportedChainError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, InvalidArgumentError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, TokenOpsValidationError, ContractRevertError, TokenOpsContractError, PausedError, AccessDeniedError, OperatorNotApprovedError, InsufficientFeeError, InsufficientBalanceError, BatchTooLargeError, FeatureDisabledError, TransferFailedError, FheHandleNotAllowedError, AlreadyInitializedError, ReentrancyError, InvalidSignatureError, WalletRejectedError, WalletChainMismatchError, NetworkError, InsufficientGasFundsError, UnknownWriteFailureError, UserRejectedSignatureError, SigningFailedError, RelayerUnreachableError, EncryptionFailedError, DecryptionFailedError, UserDecryptNotAllowedError, type DeploymentAddressUnavailableReason, type TokenOpsSdkErrorCode, } from "../core/errors.js";
|
|
9
9
|
export { type PreflightResult } from "../core/preflight.js";
|
|
10
10
|
export { AlreadyClaimedError, ClaimNotStartedError, ClaimWindowClosedError } from "./errors.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { ConfidentialAirdropFactoryClient, createConfidentialAirdropFactoryClient, type ConfidentialAirdropFactoryClientConfig, type CreateAirdropArgs, type CreateAirdropResult, type CreateAndFundAirdropArgs, type FundAirdropArgs, } from "./factory.js";
|
|
1
|
+
export { ConfidentialAirdropFactoryClient, createConfidentialAirdropFactoryClient, type ConfidentialAirdropFactoryClientConfig, type CreateAirdropArgs, type CreateAirdropResult, type CreateAndFundAirdropArgs, type FundAirdropArgs, type PreflightCreateAirdropArgs, } from "./factory.js";
|
|
2
2
|
export { ConfidentialAirdropClient, createConfidentialAirdropClient, type ClaimArgs, type ConfidentialAirdropClientConfig, type EncryptedViewResult, type GetClaimAmountArgs, type IsSignatureValidArgs, } from "./airdrop.js";
|
|
3
3
|
export { encryptUint64, encryptUint64Batch, resolveEncryptor, signClaimAuthorization, type Encryptor, type EncryptorSource, type EncryptUint64Args, type EncryptUint64BatchArgs, type FheValueInput, } from "./encryption.js";
|
|
4
|
-
export { type AirdropParams, type CustomFee, type EncryptedInput, type EncryptedInputs, } from "./types.js";
|
|
4
|
+
export { type AirdropParams, type CreateAirdropPreflightReport, type CustomFee, type EncryptedInput, type EncryptedInputs, } from "./types.js";
|
|
5
5
|
export { asAirdropId, type AirdropId, asEncryptedHandle, type EncryptedHandle, } from "../core/brands.js";
|
|
6
6
|
export { confidentialAirdropFactoryAbi, confidentialAirdropCloneableAbi } from "./abis/index.js";
|
|
7
7
|
export { erc7984OperatorAbi } from "../fhe/erc7984-abi.js";
|
|
8
|
-
export { TokenOpsSdkError, isTokenOpsSdkError, DeploymentAddressUnavailableError, UnsupportedChainError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, InvalidArgumentError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, TokenOpsValidationError, ContractRevertError, TokenOpsContractError, PausedError, AccessDeniedError, InsufficientFeeError, InsufficientBalanceError, BatchTooLargeError, FeatureDisabledError, TransferFailedError, FheHandleNotAllowedError, AlreadyInitializedError, ReentrancyError, InvalidSignatureError, WalletRejectedError, WalletChainMismatchError, NetworkError, InsufficientGasFundsError, UnknownWriteFailureError, UserRejectedSignatureError, SigningFailedError, RelayerUnreachableError, EncryptionFailedError, DecryptionFailedError, UserDecryptNotAllowedError, type DeploymentAddressUnavailableReason, type TokenOpsSdkErrorCode, } from "../core/errors.js";
|
|
8
|
+
export { TokenOpsSdkError, isTokenOpsSdkError, DeploymentAddressUnavailableError, UnsupportedChainError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, InvalidArgumentError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, TokenOpsValidationError, ContractRevertError, TokenOpsContractError, PausedError, AccessDeniedError, OperatorNotApprovedError, InsufficientFeeError, InsufficientBalanceError, BatchTooLargeError, FeatureDisabledError, TransferFailedError, FheHandleNotAllowedError, AlreadyInitializedError, ReentrancyError, InvalidSignatureError, WalletRejectedError, WalletChainMismatchError, NetworkError, InsufficientGasFundsError, UnknownWriteFailureError, UserRejectedSignatureError, SigningFailedError, RelayerUnreachableError, EncryptionFailedError, DecryptionFailedError, UserDecryptNotAllowedError, type DeploymentAddressUnavailableReason, type TokenOpsSdkErrorCode, } from "../core/errors.js";
|
|
9
9
|
export { type PreflightResult } from "../core/preflight.js";
|
|
10
10
|
export { AlreadyClaimedError, ClaimNotStartedError, ClaimWindowClosedError } from "./errors.js";
|