@tokenops/sdk 2.0.0-alpha.2 → 2.0.0-alpha.4
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 +92 -3
- package/README.md +76 -34
- package/SUPPORT.md +1 -1
- package/dist/{chunk-PYYSB5ZN.js → chunk-2ND7US2I.js} +1 -1
- package/dist/{chunk-EYDA6Q6C.js → chunk-3ZSPRHR3.js} +63 -12
- package/dist/{chunk-X7WBPCEU.js → chunk-67Q6KSVV.js} +4578 -3383
- package/dist/{chunk-UHHMVBLU.cjs → chunk-6AYJRUGP.cjs} +7 -50
- package/dist/{chunk-FEDX7B6T.cjs → chunk-6FUHF73F.cjs} +5 -5
- package/dist/{chunk-NWFMBLSQ.js → chunk-7KY4K4PH.js} +1 -1
- package/dist/{chunk-FHWSBGWE.cjs → chunk-ARZ5C3FS.cjs} +7 -7
- package/dist/{chunk-SPLNGUFF.js → chunk-AX6MQAWU.js} +2 -2
- package/dist/{chunk-IGO5XSPS.js → chunk-BSXEX2SH.js} +3 -3
- package/dist/{chunk-44YJPMQC.js → chunk-CHGY6B7L.js} +34 -81
- package/dist/{chunk-IUKKNJ2R.cjs → chunk-DFK5GCJP.cjs} +55 -72
- package/dist/{chunk-PZZK3O3S.cjs → chunk-E4IV4M4E.cjs} +4598 -3403
- package/dist/{chunk-A4DCEE33.js → chunk-GHGF65LN.js} +16 -12
- package/dist/{chunk-TWT3STIX.js → chunk-K3R27WX4.js} +8 -46
- package/dist/{chunk-GADGBQJO.js → chunk-KJUNBOJQ.js} +52 -71
- package/dist/{chunk-MM5BV5CS.cjs → chunk-PO3A2AQX.cjs} +4 -4
- package/dist/{chunk-EBLBPUPI.cjs → chunk-QHDMPT7I.cjs} +72 -19
- package/dist/{chunk-3YHBO2DL.cjs → chunk-S47IBDTA.cjs} +36 -83
- package/dist/{chunk-UG5RKLU2.cjs → chunk-SUYBAF27.cjs} +1 -1
- package/dist/{chunk-WJMEBBU7.js → chunk-TWU7L5H7.js} +5 -48
- package/dist/{chunk-WJLECC22.cjs → chunk-UUSSWOPR.cjs} +9 -47
- package/dist/{chunk-AREQJHKA.cjs → chunk-VHKMWWBA.cjs} +428 -22
- package/dist/{chunk-FT5H2Q7Y.cjs → chunk-YAL6JSAZ.cjs} +16 -12
- package/dist/{chunk-VW356KR3.js → chunk-YMWMIWBP.js} +421 -25
- package/dist/core/addresses.d.ts +4 -4
- package/dist/core/errors.d.ts +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/pending.d.ts +57 -0
- package/dist/core/version.d.ts +1 -1
- package/dist/fhe/operators.d.ts +6 -5
- package/dist/fhe/types.d.ts +1 -1
- package/dist/fhe-airdrop/abis/airdrop-base.d.ts +97 -1
- package/dist/fhe-airdrop/abis/ecdsa.d.ts +117 -1
- package/dist/fhe-airdrop/abis/factory.d.ts +332 -1
- package/dist/fhe-airdrop/abis/merkle.d.ts +116 -1
- package/dist/fhe-airdrop/advanced/index.cjs +8 -4
- package/dist/fhe-airdrop/advanced/index.d.cts +1 -0
- package/dist/fhe-airdrop/advanced/index.d.ts +1 -0
- package/dist/fhe-airdrop/advanced/index.js +1 -1
- package/dist/fhe-airdrop/advanced/react/index.cjs +145 -137
- package/dist/fhe-airdrop/advanced/react/index.d.cts +1 -0
- package/dist/fhe-airdrop/advanced/react/index.d.ts +1 -0
- package/dist/fhe-airdrop/advanced/react/index.js +85 -78
- package/dist/fhe-airdrop/advanced/react/useClearCompliancePolicy.d.ts +3 -1
- package/dist/fhe-airdrop/advanced/react/useDisableCustomFee.d.ts +4 -1
- package/dist/fhe-airdrop/advanced/react/useFactoryComplianceDelegate.d.ts +2 -4
- package/dist/fhe-airdrop/advanced/react/useFactoryRenounceRole.d.ts +4 -3
- package/dist/fhe-airdrop/advanced/react/useFactoryRevokeRole.d.ts +9 -7
- package/dist/fhe-airdrop/advanced/react/useFactoryRoleMembers.d.ts +6 -5
- package/dist/fhe-airdrop/advanced/react/useSetComplianceDelegate.d.ts +7 -7
- package/dist/fhe-airdrop/advanced/react/useSetComplianceManagerImpl.d.ts +3 -1
- package/dist/fhe-airdrop/advanced/react/useSetCompliancePolicy.d.ts +2 -1
- package/dist/fhe-airdrop/advanced/react/useSetCustomFee.d.ts +4 -1
- package/dist/fhe-airdrop/advanced/react/useSetDefaultDelegateToCompliance.d.ts +5 -4
- package/dist/fhe-airdrop/advanced/react/useSetDefaultGasFee.d.ts +7 -3
- package/dist/fhe-airdrop/advanced/react/useSetMaxGasFee.d.ts +37 -0
- package/dist/fhe-airdrop/airdrop-base.d.ts +142 -18
- package/dist/fhe-airdrop/campaign.d.ts +37 -73
- package/dist/fhe-airdrop/compliance-clone.d.ts +21 -0
- package/dist/fhe-airdrop/constants.d.ts +11 -1
- package/dist/fhe-airdrop/ecdsa.d.ts +79 -26
- package/dist/fhe-airdrop/encryption.d.ts +19 -6
- package/dist/fhe-airdrop/errors.d.ts +136 -2
- package/dist/fhe-airdrop/factory-params.d.ts +2361 -0
- package/dist/fhe-airdrop/factory.d.ts +189 -75
- package/dist/fhe-airdrop/guards.d.ts +183 -19
- package/dist/fhe-airdrop/index.cjs +88 -56
- package/dist/fhe-airdrop/index.d.cts +12 -10
- package/dist/fhe-airdrop/index.d.ts +12 -10
- package/dist/fhe-airdrop/index.js +5 -5
- package/dist/fhe-airdrop/merkle-tree.d.ts +9 -9
- package/dist/fhe-airdrop/merkle.d.ts +32 -11
- package/dist/fhe-airdrop/react/_shared.d.ts +12 -6
- package/dist/fhe-airdrop/react/index.cjs +336 -240
- package/dist/fhe-airdrop/react/index.d.cts +19 -9
- package/dist/fhe-airdrop/react/index.d.ts +19 -9
- package/dist/fhe-airdrop/react/index.js +158 -97
- package/dist/fhe-airdrop/react/keys.d.ts +54 -7
- package/dist/fhe-airdrop/react/useAccessEcdsaClaimAmount.d.ts +6 -3
- package/dist/fhe-airdrop/react/useAccessMerkleClaimAmount.d.ts +2 -2
- package/dist/fhe-airdrop/react/useAirdropConfig.d.ts +8 -3
- package/dist/fhe-airdrop/react/useAirdropPause.d.ts +5 -0
- package/dist/fhe-airdrop/react/useBuildMerkleCampaign.d.ts +4 -6
- package/dist/fhe-airdrop/react/useComplianceManager.d.ts +2 -2
- package/dist/fhe-airdrop/react/useComplianceManagerOf.d.ts +1 -2
- package/dist/fhe-airdrop/react/useCreateAndFundEcdsaAirdrop.d.ts +16 -11
- package/dist/fhe-airdrop/react/useCreateAndFundMerkleAirdrop.d.ts +23 -7
- package/dist/fhe-airdrop/react/useCreateEcdsaAirdrop.d.ts +13 -8
- package/dist/fhe-airdrop/react/useCreateMerkleAirdrop.d.ts +27 -7
- package/dist/fhe-airdrop/react/useDedupMode.d.ts +16 -0
- package/dist/fhe-airdrop/react/useDiscloseHandleToParty.d.ts +4 -3
- package/dist/fhe-airdrop/react/useEcdsaClaim.d.ts +6 -4
- package/dist/fhe-airdrop/react/useEcdsaClaimAndUnwrap.d.ts +15 -8
- package/dist/fhe-airdrop/react/useEcdsaDomain.d.ts +1 -1
- package/dist/fhe-airdrop/react/useEncryptCampaignAmounts.d.ts +5 -7
- package/dist/fhe-airdrop/react/useExtendClaimWindow.d.ts +4 -1
- package/dist/fhe-airdrop/react/useFactoryFees.d.ts +11 -4
- package/dist/fhe-airdrop/react/useFundAirdrop.d.ts +3 -4
- package/dist/fhe-airdrop/react/useGrantInstanceRoles.d.ts +2 -1
- package/dist/fhe-airdrop/react/useIsAirdrop.d.ts +44 -0
- package/dist/fhe-airdrop/react/useIsSignatureValid.d.ts +5 -4
- package/dist/fhe-airdrop/react/useMerkleClaim.d.ts +4 -1
- package/dist/fhe-airdrop/react/useMerkleClaimAndUnwrap.d.ts +14 -3
- package/dist/fhe-airdrop/react/usePlanMerkleCampaign.d.ts +18 -3
- package/dist/fhe-airdrop/react/usePreflightClaim.d.ts +1 -1
- package/dist/fhe-airdrop/react/usePreflightCreateAirdrop.d.ts +34 -13
- package/dist/fhe-airdrop/react/useRefreshComplianceBalance.d.ts +36 -0
- package/dist/fhe-airdrop/react/useRescueERC20.d.ts +3 -3
- package/dist/fhe-airdrop/react/useRescueNativeToken.d.ts +23 -0
- package/dist/fhe-airdrop/react/useResolveGasFee.d.ts +30 -0
- package/dist/fhe-airdrop/react/useRotateMerkleRoot.d.ts +5 -2
- package/dist/fhe-airdrop/react/useSignClaimAuthorization.d.ts +4 -0
- package/dist/fhe-airdrop/react/useTokenOf.d.ts +29 -0
- package/dist/fhe-airdrop/react/useUnwrapRequest.d.ts +25 -0
- package/dist/fhe-airdrop/react/useWithdrawConfidential.d.ts +4 -0
- package/dist/fhe-airdrop/roles.d.ts +82 -7
- package/dist/fhe-airdrop/types.d.ts +122 -14
- package/dist/fhe-disperse/errors.d.ts +3 -3
- package/dist/fhe-disperse/index.cjs +22 -22
- package/dist/fhe-disperse/index.d.cts +2 -1
- package/dist/fhe-disperse/index.d.ts +2 -1
- package/dist/fhe-disperse/index.js +3 -3
- package/dist/fhe-disperse/react/index.cjs +27 -25
- package/dist/fhe-disperse/react/index.d.cts +2 -1
- package/dist/fhe-disperse/react/index.d.ts +2 -1
- package/dist/fhe-disperse/react/index.js +8 -6
- package/dist/fhe-disperse/react/useDisperse.d.ts +6 -2
- package/dist/fhe-disperse/react/useRegister.d.ts +9 -3
- package/dist/fhe-disperse/react/useSingletonWithdrawTokenFee.d.ts +7 -2
- package/dist/fhe-disperse/react/useWithdrawTokenFee.d.ts +7 -2
- package/dist/fhe-disperse/singleton.d.ts +33 -19
- package/dist/fhe-disperse/types.d.ts +48 -8
- package/dist/fhe-vesting/advanced/index.cjs +6 -6
- package/dist/fhe-vesting/advanced/index.js +4 -4
- package/dist/fhe-vesting/advanced/react/index.cjs +9 -9
- package/dist/fhe-vesting/advanced/react/index.js +6 -6
- package/dist/fhe-vesting/factory.d.ts +31 -8
- package/dist/fhe-vesting/index.cjs +23 -23
- package/dist/fhe-vesting/index.d.cts +3 -2
- package/dist/fhe-vesting/index.d.ts +3 -2
- package/dist/fhe-vesting/index.js +4 -4
- package/dist/fhe-vesting/manager.d.ts +27 -2
- package/dist/fhe-vesting/react/index.cjs +126 -126
- package/dist/fhe-vesting/react/index.d.cts +3 -2
- package/dist/fhe-vesting/react/index.d.ts +3 -2
- package/dist/fhe-vesting/react/index.js +5 -5
- package/dist/fhe-vesting/react/useCreateManager.d.ts +16 -9
- package/dist/fhe-vesting/react/useCreateManagerAndGetAddress.d.ts +9 -5
- package/dist/fhe-vesting/react/useSplitVesting.d.ts +9 -3
- package/dist/index.cjs +18 -18
- package/dist/index.js +1 -1
- package/dist/testnet-faucet/faucet.d.ts +3 -0
- package/dist/testnet-faucet/index.cjs +15 -15
- package/dist/testnet-faucet/index.js +3 -3
- package/dist/testnet-faucet/react/index.cjs +9 -9
- package/dist/testnet-faucet/react/index.js +4 -4
- package/package.json +1 -1
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* React/wagmi hooks for `@tokenops/sdk/fhe-airdrop`.
|
|
3
3
|
*
|
|
4
|
-
* v1 shipped 30 hooks, many one-line reads nobody called
|
|
5
|
-
*
|
|
4
|
+
* v1 shipped 30 hooks, many one-line reads nobody called, and v2 dropped all of
|
|
5
|
+
* them. This subpath ships exactly the v2 hook list — a consumer who
|
|
6
6
|
* needs a headless method not wrapped here calls it directly from
|
|
7
7
|
* `@tokenops/sdk/fhe-airdrop`; every hook below composes with wagmi
|
|
8
8
|
* (`usePublicClient`, `useWalletClient`) and TanStack Query (`useQuery`,
|
|
9
9
|
* `useMutation`) — no extra provider needed beyond the standard wagmi
|
|
10
10
|
* `<WagmiProvider>` + `<QueryClientProvider>`.
|
|
11
11
|
*
|
|
12
|
-
* **Encryptor.**
|
|
12
|
+
* **Encryptor.** The fund hooks (`useFundAirdrop`, `useCreateAndFund*`) and the
|
|
13
|
+
* campaign builders (`useBuildMerkleCampaign`, `usePlanMerkleCampaign`,
|
|
14
|
+
* `useRotateMerkleRoot`, `useEncryptCampaignAmounts`) encrypt. Pass an
|
|
13
15
|
* explicit `encryptor` source (eager `Encryptor` or `() => Encryptor |
|
|
14
16
|
* undefined`) — wire it as a lazy factory so the SDK picks up the live React
|
|
15
17
|
* context at submit time (CLAUDE.md Pitfall #3):
|
|
@@ -42,7 +44,9 @@ export { useMerkleRoot, type UseMerkleRootArgs } from "./useMerkleRoot.js";
|
|
|
42
44
|
export { useClaimedAmount, type UseClaimedAmountArgs } from "./useClaimedAmount.js";
|
|
43
45
|
export { useComplianceManager, type UseComplianceManagerArgs } from "./useComplianceManager.js";
|
|
44
46
|
export { useFactoryFees, type FactoryFees, type UseFactoryFeesArgs } from "./useFactoryFees.js";
|
|
47
|
+
export { useResolveGasFee, type UseResolveGasFeeArgs } from "./useResolveGasFee.js";
|
|
45
48
|
export { useFactoryRegistry, type FactoryRegistryPage, type UseFactoryRegistryArgs, } from "./useFactoryRegistry.js";
|
|
49
|
+
export { useIsAirdrop, type UseIsAirdropArgs } from "./useIsAirdrop.js";
|
|
46
50
|
export { useEffectiveUpgradeable, type UseEffectiveUpgradeableArgs, } from "./useEffectiveUpgradeable.js";
|
|
47
51
|
export { useAirdropConfig, type AirdropConfig, type UseAirdropConfigArgs, } from "./useAirdropConfig.js";
|
|
48
52
|
export { useAirdropDeploymentMode, type UseAirdropDeploymentModeArgs, } from "./useAirdropDeploymentMode.js";
|
|
@@ -54,6 +58,7 @@ export { useComplianceInfo, type ComplianceInfo, type UseComplianceInfoArgs, } f
|
|
|
54
58
|
export { useComplianceManagerOf, type UseComplianceManagerOfArgs, } from "./useComplianceManagerOf.js";
|
|
55
59
|
export { useComplianceRoleConstants, type ComplianceRoleConstants, type UseComplianceRoleConstantsArgs, } from "./useComplianceRoleConstants.js";
|
|
56
60
|
export { useComplianceRoleMembers, type ComplianceRoleMembership, type UseComplianceRoleMembersArgs, } from "./useComplianceRoleMembers.js";
|
|
61
|
+
export { useDedupMode, type UseDedupModeArgs } from "./useDedupMode.js";
|
|
57
62
|
export { useEcdsaDomain, type EcdsaDomain, type UseEcdsaDomainArgs } from "./useEcdsaDomain.js";
|
|
58
63
|
export { useEffectiveDelegateToCompliance, type UseEffectiveDelegateToComplianceArgs, } from "./useEffectiveDelegateToCompliance.js";
|
|
59
64
|
export { useIsActiveDelegate, type UseIsActiveDelegateArgs } from "./useIsActiveDelegate.js";
|
|
@@ -61,6 +66,7 @@ export { useIsMerkleRootMutable, type UseIsMerkleRootMutableArgs, } from "./useI
|
|
|
61
66
|
export { useIsSignatureValid, type UseIsSignatureValidArgs } from "./useIsSignatureValid.js";
|
|
62
67
|
export { usePreflightClaim, type UsePreflightClaimArgs } from "./usePreflightClaim.js";
|
|
63
68
|
export { usePreflightCreateAirdrop, type PreflightCreateAirdropCommon, type UsePreflightCreateAirdropArgs, } from "./usePreflightCreateAirdrop.js";
|
|
69
|
+
export { useTokenOf, type UseTokenOfArgs } from "./useTokenOf.js";
|
|
64
70
|
export { useCreateEcdsaAirdrop } from "./useCreateEcdsaAirdrop.js";
|
|
65
71
|
export { useCreateMerkleAirdrop } from "./useCreateMerkleAirdrop.js";
|
|
66
72
|
export { useFundAirdrop } from "./useFundAirdrop.js";
|
|
@@ -71,6 +77,7 @@ export { useGrantInstanceRoles, type GrantInstanceRolesArgs } from "./useGrantIn
|
|
|
71
77
|
export { useAirdropPause, type AirdropPauseArgs } from "./useAirdropPause.js";
|
|
72
78
|
export { useExtendClaimWindow } from "./useExtendClaimWindow.js";
|
|
73
79
|
export { useWithdrawConfidential } from "./useWithdrawConfidential.js";
|
|
80
|
+
export { useRescueNativeToken } from "./useRescueNativeToken.js";
|
|
74
81
|
export { useAddComplianceDelegate, type AddComplianceDelegateArgs, } from "./useAddComplianceDelegate.js";
|
|
75
82
|
export { useAirdropGrantRole, type AirdropGrantRoleArgs } from "./useAirdropGrantRole.js";
|
|
76
83
|
export { useAirdropRenounceRole, type AirdropRenounceRoleArgs } from "./useAirdropRenounceRole.js";
|
|
@@ -87,6 +94,7 @@ export { useDiscloseHandleToParty, type UseDiscloseHandleToPartyArgs, } from "./
|
|
|
87
94
|
export { useEcdsaClaimAndUnwrap } from "./useEcdsaClaimAndUnwrap.js";
|
|
88
95
|
export { useEncryptCampaignAmounts, type UseEncryptCampaignAmountsOptions, type UseEncryptCampaignAmountsArgs, } from "./useEncryptCampaignAmounts.js";
|
|
89
96
|
export { useMerkleClaimAndUnwrap } from "./useMerkleClaimAndUnwrap.js";
|
|
97
|
+
export { useUnwrapRequest, type UseUnwrapRequestArgs } from "./useUnwrapRequest.js";
|
|
90
98
|
export { usePlanMerkleCampaign, type UsePlanMerkleCampaignArgs } from "./usePlanMerkleCampaign.js";
|
|
91
99
|
export { useRescueERC20, type RescueERC20Args } from "./useRescueERC20.js";
|
|
92
100
|
export { useRescueOtherConfidentialToken, type RescueOtherConfidentialTokenArgs, } from "./useRescueOtherConfidentialToken.js";
|
|
@@ -97,22 +105,24 @@ export { useWithdrawGasFee, type WithdrawGasFeeArgs } from "./useWithdrawGasFee.
|
|
|
97
105
|
export { useAdminBatchDiscloseBalanceToParties, type UseAdminBatchDiscloseBalanceToPartiesArgs, } from "./useAdminBatchDiscloseBalanceToParties.js";
|
|
98
106
|
export { useAdminDiscloseBalanceToParty, type UseAdminDiscloseBalanceToPartyArgs, } from "./useAdminDiscloseBalanceToParty.js";
|
|
99
107
|
export { useAdminGetCurrentBalance } from "./useAdminGetCurrentBalance.js";
|
|
108
|
+
export { useRefreshComplianceBalance } from "./useRefreshComplianceBalance.js";
|
|
100
109
|
export { useAccessEcdsaClaimAmount } from "./useAccessEcdsaClaimAmount.js";
|
|
101
110
|
export { useAccessMerkleClaimAmount } from "./useAccessMerkleClaimAmount.js";
|
|
102
111
|
export { airdropQueryKey, airdropQueryKeyPrefix, type AirdropClientOptions, type AirdropHookOptions, type AirdropInstanceClientOptions, type AirdropInstanceHookOptions, type EcdsaAirdropInstanceClientOptions, type EcdsaAirdropInstanceHookOptions, } from "./_shared.js";
|
|
103
112
|
export { encryptUint64, encryptUint64Batch, resolveEncryptor, signClaimAuthorization, type Encryptor, type EncryptorSource, type EncryptUint64Args, type EncryptUint64BatchArgs, type FheValueInput, } from "../encryption.js";
|
|
104
113
|
export type { EncryptedInput, EncryptedInputs, EncryptedViewResult } from "../../fhe/types.js";
|
|
105
|
-
export type { CreateAirdropArgs, CreateAirdropResult, EcdsaAirdropParams, MerkleAirdropParams, CommonAirdropParams, BuiltCampaign, CampaignEntry, CampaignRecipient, } from "../types.js";
|
|
114
|
+
export type { CreateAirdropArgs, AirdropVariantParams, CreateAirdropResult, CreateCommitments, CreateMerkleAirdropArgs, EcdsaAirdropParams, MerkleAirdropParams, CommonAirdropParams, BuiltCampaign, CampaignEntry, CampaignRecipient, PendingCreateAirdropResult, } from "../types.js";
|
|
115
|
+
export type { MinedWrite, PendingWrite, ReceiptMode } from "../../core/pending.js";
|
|
106
116
|
export type { EcdsaClaimArgs, Eip712Domain, GetClaimAmountArgs as EcdsaGetClaimAmountArgs, } from "../ecdsa.js";
|
|
107
117
|
export type { GetClaimAmountArgs as MerkleGetClaimAmountArgs } from "../merkle.js";
|
|
108
118
|
export type { MerkleClaimArgs } from "../merkle.js";
|
|
109
119
|
export { buildMerkleTree, leafOf, type BuildMerkleTreeArgs, type BuiltMerkleTree, type LeafOfArgs, type MerkleLeafInput, } from "../merkle-tree.js";
|
|
110
120
|
export type { FundInput } from "../factory.js";
|
|
111
|
-
export type { WriteAccountOverride } from "../airdrop-base.js";
|
|
112
|
-
export { buildMerkleCampaign, encryptCampaignAmounts, planMerkleCampaign, rotateMerkleRoot, validateCampaignRecipients, type BuildMerkleCampaignArgs, type
|
|
113
|
-
export { preflightClaim, preflightCreate, type ClaimPreflightTarget, type EcdsaClaimPreflightSignature, type PreflightClaimArgs, type PreflightCreateArgs, } from "../guards.js";
|
|
121
|
+
export type { UnwrapRequest, WriteAccountOverride } from "../airdrop-base.js";
|
|
122
|
+
export { buildMerkleCampaign, encryptCampaignAmounts, MERKLE_BATCH_LIMIT, planMerkleCampaign, rotateMerkleRoot, validateCampaignRecipients, type BuildMerkleCampaignArgs, type EncryptCampaignAmountsArgs, type EncryptedCampaignLeaf, type PlanMerkleCampaignArgs, type PlannedCampaign, type RotatedCampaign, type RotateMerkleRootArgs, } from "../campaign.js";
|
|
123
|
+
export { preflightClaim, preflightCreate, type AirdropRegistry, type ClaimPreflightTarget, type EcdsaClaimPreflightSignature, type PreflightClaimArgs, type PreflightCreateArgs, type PreflightCreateResult, } from "../guards.js";
|
|
114
124
|
export type { PreflightResult } from "../../core/preflight.js";
|
|
115
125
|
export { grantInstanceRoles, planInstanceRoleSplit, type InstanceRoleAssignment, type RoleGrantOutcome, type RoleGrantStep, type RoleName, } from "../roles.js";
|
|
116
|
-
export { type DedupMode, type DeploymentMode } from "../constants.js";
|
|
126
|
+
export { UINT96_MAX, type DedupMode, type DeploymentMode } from "../constants.js";
|
|
117
127
|
export { TokenOpsSdkError, isTokenOpsSdkError, DeploymentAddressUnavailableError, UnsupportedChainError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, InvalidArgumentError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, ContractRevertError, 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";
|
|
118
|
-
export { AlreadyClaimedError, ClaimNotStartedError, ClaimWindowClosedError, DedupIdConsumedError, FeeCollectorSelfAdministeredError, MerkleUupsUnsupportedError, NonStockWrapperError, PredictionDriftError, SaltCollisionError, SignatureExpiredError, UnauthorizedRedirectError, UpgradeabilityNotAllowedError, type AirdropVariant, } from "../errors.js";
|
|
128
|
+
export { AlreadyClaimedError, ClaimNotStartedError, ClaimWindowClosedError, ClawbackRequiresPauseError, CreateCommitmentMismatchError, DedupIdConsumedError, FeeCollectorSelfAdministeredError, GasFeeNotAcceptedError, MerkleUupsUnsupportedError, NativeRescueRequiresZeroFeeError, NonStockWrapperError, PredictionDriftError, SaltCollisionError, SignatureExpiredError, UnauthorizedRedirectError, UnrecognisedAirdropError, UpgradeabilityNotAllowedError, type AirdropVariant, } from "../errors.js";
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* React/wagmi hooks for `@tokenops/sdk/fhe-airdrop`.
|
|
3
3
|
*
|
|
4
|
-
* v1 shipped 30 hooks, many one-line reads nobody called
|
|
5
|
-
*
|
|
4
|
+
* v1 shipped 30 hooks, many one-line reads nobody called, and v2 dropped all of
|
|
5
|
+
* them. This subpath ships exactly the v2 hook list — a consumer who
|
|
6
6
|
* needs a headless method not wrapped here calls it directly from
|
|
7
7
|
* `@tokenops/sdk/fhe-airdrop`; every hook below composes with wagmi
|
|
8
8
|
* (`usePublicClient`, `useWalletClient`) and TanStack Query (`useQuery`,
|
|
9
9
|
* `useMutation`) — no extra provider needed beyond the standard wagmi
|
|
10
10
|
* `<WagmiProvider>` + `<QueryClientProvider>`.
|
|
11
11
|
*
|
|
12
|
-
* **Encryptor.**
|
|
12
|
+
* **Encryptor.** The fund hooks (`useFundAirdrop`, `useCreateAndFund*`) and the
|
|
13
|
+
* campaign builders (`useBuildMerkleCampaign`, `usePlanMerkleCampaign`,
|
|
14
|
+
* `useRotateMerkleRoot`, `useEncryptCampaignAmounts`) encrypt. Pass an
|
|
13
15
|
* explicit `encryptor` source (eager `Encryptor` or `() => Encryptor |
|
|
14
16
|
* undefined`) — wire it as a lazy factory so the SDK picks up the live React
|
|
15
17
|
* context at submit time (CLAUDE.md Pitfall #3):
|
|
@@ -42,7 +44,9 @@ export { useMerkleRoot, type UseMerkleRootArgs } from "./useMerkleRoot.js";
|
|
|
42
44
|
export { useClaimedAmount, type UseClaimedAmountArgs } from "./useClaimedAmount.js";
|
|
43
45
|
export { useComplianceManager, type UseComplianceManagerArgs } from "./useComplianceManager.js";
|
|
44
46
|
export { useFactoryFees, type FactoryFees, type UseFactoryFeesArgs } from "./useFactoryFees.js";
|
|
47
|
+
export { useResolveGasFee, type UseResolveGasFeeArgs } from "./useResolveGasFee.js";
|
|
45
48
|
export { useFactoryRegistry, type FactoryRegistryPage, type UseFactoryRegistryArgs, } from "./useFactoryRegistry.js";
|
|
49
|
+
export { useIsAirdrop, type UseIsAirdropArgs } from "./useIsAirdrop.js";
|
|
46
50
|
export { useEffectiveUpgradeable, type UseEffectiveUpgradeableArgs, } from "./useEffectiveUpgradeable.js";
|
|
47
51
|
export { useAirdropConfig, type AirdropConfig, type UseAirdropConfigArgs, } from "./useAirdropConfig.js";
|
|
48
52
|
export { useAirdropDeploymentMode, type UseAirdropDeploymentModeArgs, } from "./useAirdropDeploymentMode.js";
|
|
@@ -54,6 +58,7 @@ export { useComplianceInfo, type ComplianceInfo, type UseComplianceInfoArgs, } f
|
|
|
54
58
|
export { useComplianceManagerOf, type UseComplianceManagerOfArgs, } from "./useComplianceManagerOf.js";
|
|
55
59
|
export { useComplianceRoleConstants, type ComplianceRoleConstants, type UseComplianceRoleConstantsArgs, } from "./useComplianceRoleConstants.js";
|
|
56
60
|
export { useComplianceRoleMembers, type ComplianceRoleMembership, type UseComplianceRoleMembersArgs, } from "./useComplianceRoleMembers.js";
|
|
61
|
+
export { useDedupMode, type UseDedupModeArgs } from "./useDedupMode.js";
|
|
57
62
|
export { useEcdsaDomain, type EcdsaDomain, type UseEcdsaDomainArgs } from "./useEcdsaDomain.js";
|
|
58
63
|
export { useEffectiveDelegateToCompliance, type UseEffectiveDelegateToComplianceArgs, } from "./useEffectiveDelegateToCompliance.js";
|
|
59
64
|
export { useIsActiveDelegate, type UseIsActiveDelegateArgs } from "./useIsActiveDelegate.js";
|
|
@@ -61,6 +66,7 @@ export { useIsMerkleRootMutable, type UseIsMerkleRootMutableArgs, } from "./useI
|
|
|
61
66
|
export { useIsSignatureValid, type UseIsSignatureValidArgs } from "./useIsSignatureValid.js";
|
|
62
67
|
export { usePreflightClaim, type UsePreflightClaimArgs } from "./usePreflightClaim.js";
|
|
63
68
|
export { usePreflightCreateAirdrop, type PreflightCreateAirdropCommon, type UsePreflightCreateAirdropArgs, } from "./usePreflightCreateAirdrop.js";
|
|
69
|
+
export { useTokenOf, type UseTokenOfArgs } from "./useTokenOf.js";
|
|
64
70
|
export { useCreateEcdsaAirdrop } from "./useCreateEcdsaAirdrop.js";
|
|
65
71
|
export { useCreateMerkleAirdrop } from "./useCreateMerkleAirdrop.js";
|
|
66
72
|
export { useFundAirdrop } from "./useFundAirdrop.js";
|
|
@@ -71,6 +77,7 @@ export { useGrantInstanceRoles, type GrantInstanceRolesArgs } from "./useGrantIn
|
|
|
71
77
|
export { useAirdropPause, type AirdropPauseArgs } from "./useAirdropPause.js";
|
|
72
78
|
export { useExtendClaimWindow } from "./useExtendClaimWindow.js";
|
|
73
79
|
export { useWithdrawConfidential } from "./useWithdrawConfidential.js";
|
|
80
|
+
export { useRescueNativeToken } from "./useRescueNativeToken.js";
|
|
74
81
|
export { useAddComplianceDelegate, type AddComplianceDelegateArgs, } from "./useAddComplianceDelegate.js";
|
|
75
82
|
export { useAirdropGrantRole, type AirdropGrantRoleArgs } from "./useAirdropGrantRole.js";
|
|
76
83
|
export { useAirdropRenounceRole, type AirdropRenounceRoleArgs } from "./useAirdropRenounceRole.js";
|
|
@@ -87,6 +94,7 @@ export { useDiscloseHandleToParty, type UseDiscloseHandleToPartyArgs, } from "./
|
|
|
87
94
|
export { useEcdsaClaimAndUnwrap } from "./useEcdsaClaimAndUnwrap.js";
|
|
88
95
|
export { useEncryptCampaignAmounts, type UseEncryptCampaignAmountsOptions, type UseEncryptCampaignAmountsArgs, } from "./useEncryptCampaignAmounts.js";
|
|
89
96
|
export { useMerkleClaimAndUnwrap } from "./useMerkleClaimAndUnwrap.js";
|
|
97
|
+
export { useUnwrapRequest, type UseUnwrapRequestArgs } from "./useUnwrapRequest.js";
|
|
90
98
|
export { usePlanMerkleCampaign, type UsePlanMerkleCampaignArgs } from "./usePlanMerkleCampaign.js";
|
|
91
99
|
export { useRescueERC20, type RescueERC20Args } from "./useRescueERC20.js";
|
|
92
100
|
export { useRescueOtherConfidentialToken, type RescueOtherConfidentialTokenArgs, } from "./useRescueOtherConfidentialToken.js";
|
|
@@ -97,22 +105,24 @@ export { useWithdrawGasFee, type WithdrawGasFeeArgs } from "./useWithdrawGasFee.
|
|
|
97
105
|
export { useAdminBatchDiscloseBalanceToParties, type UseAdminBatchDiscloseBalanceToPartiesArgs, } from "./useAdminBatchDiscloseBalanceToParties.js";
|
|
98
106
|
export { useAdminDiscloseBalanceToParty, type UseAdminDiscloseBalanceToPartyArgs, } from "./useAdminDiscloseBalanceToParty.js";
|
|
99
107
|
export { useAdminGetCurrentBalance } from "./useAdminGetCurrentBalance.js";
|
|
108
|
+
export { useRefreshComplianceBalance } from "./useRefreshComplianceBalance.js";
|
|
100
109
|
export { useAccessEcdsaClaimAmount } from "./useAccessEcdsaClaimAmount.js";
|
|
101
110
|
export { useAccessMerkleClaimAmount } from "./useAccessMerkleClaimAmount.js";
|
|
102
111
|
export { airdropQueryKey, airdropQueryKeyPrefix, type AirdropClientOptions, type AirdropHookOptions, type AirdropInstanceClientOptions, type AirdropInstanceHookOptions, type EcdsaAirdropInstanceClientOptions, type EcdsaAirdropInstanceHookOptions, } from "./_shared.js";
|
|
103
112
|
export { encryptUint64, encryptUint64Batch, resolveEncryptor, signClaimAuthorization, type Encryptor, type EncryptorSource, type EncryptUint64Args, type EncryptUint64BatchArgs, type FheValueInput, } from "../encryption.js";
|
|
104
113
|
export type { EncryptedInput, EncryptedInputs, EncryptedViewResult } from "../../fhe/types.js";
|
|
105
|
-
export type { CreateAirdropArgs, CreateAirdropResult, EcdsaAirdropParams, MerkleAirdropParams, CommonAirdropParams, BuiltCampaign, CampaignEntry, CampaignRecipient, } from "../types.js";
|
|
114
|
+
export type { CreateAirdropArgs, AirdropVariantParams, CreateAirdropResult, CreateCommitments, CreateMerkleAirdropArgs, EcdsaAirdropParams, MerkleAirdropParams, CommonAirdropParams, BuiltCampaign, CampaignEntry, CampaignRecipient, PendingCreateAirdropResult, } from "../types.js";
|
|
115
|
+
export type { MinedWrite, PendingWrite, ReceiptMode } from "../../core/pending.js";
|
|
106
116
|
export type { EcdsaClaimArgs, Eip712Domain, GetClaimAmountArgs as EcdsaGetClaimAmountArgs, } from "../ecdsa.js";
|
|
107
117
|
export type { GetClaimAmountArgs as MerkleGetClaimAmountArgs } from "../merkle.js";
|
|
108
118
|
export type { MerkleClaimArgs } from "../merkle.js";
|
|
109
119
|
export { buildMerkleTree, leafOf, type BuildMerkleTreeArgs, type BuiltMerkleTree, type LeafOfArgs, type MerkleLeafInput, } from "../merkle-tree.js";
|
|
110
120
|
export type { FundInput } from "../factory.js";
|
|
111
|
-
export type { WriteAccountOverride } from "../airdrop-base.js";
|
|
112
|
-
export { buildMerkleCampaign, encryptCampaignAmounts, planMerkleCampaign, rotateMerkleRoot, validateCampaignRecipients, type BuildMerkleCampaignArgs, type
|
|
113
|
-
export { preflightClaim, preflightCreate, type ClaimPreflightTarget, type EcdsaClaimPreflightSignature, type PreflightClaimArgs, type PreflightCreateArgs, } from "../guards.js";
|
|
121
|
+
export type { UnwrapRequest, WriteAccountOverride } from "../airdrop-base.js";
|
|
122
|
+
export { buildMerkleCampaign, encryptCampaignAmounts, MERKLE_BATCH_LIMIT, planMerkleCampaign, rotateMerkleRoot, validateCampaignRecipients, type BuildMerkleCampaignArgs, type EncryptCampaignAmountsArgs, type EncryptedCampaignLeaf, type PlanMerkleCampaignArgs, type PlannedCampaign, type RotatedCampaign, type RotateMerkleRootArgs, } from "../campaign.js";
|
|
123
|
+
export { preflightClaim, preflightCreate, type AirdropRegistry, type ClaimPreflightTarget, type EcdsaClaimPreflightSignature, type PreflightClaimArgs, type PreflightCreateArgs, type PreflightCreateResult, } from "../guards.js";
|
|
114
124
|
export type { PreflightResult } from "../../core/preflight.js";
|
|
115
125
|
export { grantInstanceRoles, planInstanceRoleSplit, type InstanceRoleAssignment, type RoleGrantOutcome, type RoleGrantStep, type RoleName, } from "../roles.js";
|
|
116
|
-
export { type DedupMode, type DeploymentMode } from "../constants.js";
|
|
126
|
+
export { UINT96_MAX, type DedupMode, type DeploymentMode } from "../constants.js";
|
|
117
127
|
export { TokenOpsSdkError, isTokenOpsSdkError, DeploymentAddressUnavailableError, UnsupportedChainError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, InvalidArgumentError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, ContractRevertError, 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";
|
|
118
|
-
export { AlreadyClaimedError, ClaimNotStartedError, ClaimWindowClosedError, DedupIdConsumedError, FeeCollectorSelfAdministeredError, MerkleUupsUnsupportedError, NonStockWrapperError, PredictionDriftError, SaltCollisionError, SignatureExpiredError, UnauthorizedRedirectError, UpgradeabilityNotAllowedError, type AirdropVariant, } from "../errors.js";
|
|
128
|
+
export { AlreadyClaimedError, ClaimNotStartedError, ClaimWindowClosedError, ClawbackRequiresPauseError, CreateCommitmentMismatchError, DedupIdConsumedError, FeeCollectorSelfAdministeredError, GasFeeNotAcceptedError, MerkleUupsUnsupportedError, NativeRescueRequiresZeroFeeError, NonStockWrapperError, PredictionDriftError, SaltCollisionError, SignatureExpiredError, UnauthorizedRedirectError, UnrecognisedAirdropError, UpgradeabilityNotAllowedError, type AirdropVariant, } from "../errors.js";
|