@tokenops/sdk 2.0.0-alpha.1 → 2.0.0-alpha.3
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 +67 -2
- package/README.md +14 -8
- package/dist/{chunk-PUX5VXDB.cjs → chunk-4AWQJQXY.cjs} +1415 -69
- package/dist/{chunk-74QFZ5MK.js → chunk-4IB4IY5Y.js} +1 -1
- package/dist/{chunk-DZHYSUGY.js → chunk-6HCT4QIX.js} +12 -5
- package/dist/{chunk-FGEB7RMY.cjs → chunk-6XOAYDC6.cjs} +4 -4
- package/dist/{chunk-XAYGD4E4.cjs → chunk-AHU2HMNE.cjs} +3 -3
- package/dist/{chunk-6NAVMWZQ.js → chunk-BPIVVCSQ.js} +2 -2
- package/dist/{chunk-GKKDAW44.js → chunk-BXX5TETM.js} +1401 -59
- package/dist/{chunk-456VDDA3.js → chunk-GCJFAY4X.js} +78 -25
- package/dist/{chunk-CTED3MTR.cjs → chunk-GKYZQJGP.cjs} +82 -29
- package/dist/{chunk-JZLGCTGK.cjs → chunk-IEKTGJ4J.cjs} +2 -2
- package/dist/{chunk-6PXXGACR.cjs → chunk-JVNJSDQ4.cjs} +2 -2
- package/dist/{chunk-O5676ZWY.js → chunk-LEYYG4RF.js} +232 -6
- package/dist/{chunk-335Z2W67.js → chunk-NGU4JYIR.js} +1 -1
- package/dist/{chunk-5576FRT3.cjs → chunk-PG3WXT3K.cjs} +12 -5
- package/dist/{chunk-H5POPGOZ.js → chunk-PK6Q6J5F.js} +1 -1
- package/dist/chunk-TND5NDV7.cjs +263 -0
- package/dist/chunk-U3TBQRT7.js +253 -0
- package/dist/{chunk-EAJ7SYHE.js → chunk-WRWRA4TN.js} +1 -1
- package/dist/{chunk-JQYC66TO.cjs → chunk-YABHXJNH.cjs} +5 -5
- package/dist/{chunk-M4IT6DNJ.cjs → chunk-YTIYTV4K.cjs} +236 -4
- package/dist/core/addresses.d.ts +4 -4
- package/dist/core/errors.d.ts +1 -1
- package/dist/fhe/types.d.ts +2 -2
- package/dist/fhe-airdrop/abis/airdrop-base.d.ts +19 -0
- package/dist/fhe-airdrop/abis/ecdsa.d.ts +19 -0
- package/dist/fhe-airdrop/abis/factory.d.ts +113 -0
- package/dist/fhe-airdrop/abis/merkle.d.ts +43 -12
- package/dist/fhe-airdrop/advanced/index.cjs +4 -4
- package/dist/fhe-airdrop/advanced/index.js +1 -1
- package/dist/fhe-airdrop/advanced/react/index.cjs +620 -9
- package/dist/fhe-airdrop/advanced/react/index.d.cts +35 -0
- package/dist/fhe-airdrop/advanced/react/index.d.ts +35 -0
- package/dist/fhe-airdrop/advanced/react/index.js +590 -7
- package/dist/fhe-airdrop/advanced/react/useClearCompliancePolicy.d.ts +28 -0
- package/dist/fhe-airdrop/advanced/react/useClearUpgradeabilityPolicy.d.ts +26 -0
- package/dist/fhe-airdrop/advanced/react/useDisableCustomFee.d.ts +26 -0
- package/dist/fhe-airdrop/advanced/react/useEcdsaInitCodeHash.d.ts +30 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryComplianceDelegate.d.ts +25 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryCompliancePolicy.d.ts +38 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryCustomFee.d.ts +24 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryGrantRole.d.ts +32 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryHasRole.d.ts +27 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryImplementations.d.ts +33 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryRenounceRole.d.ts +37 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryRevokeRole.d.ts +37 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryRoleConstants.d.ts +46 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryRoleMembers.d.ts +48 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryUpgradeabilityPolicy.d.ts +39 -0
- package/dist/fhe-airdrop/advanced/react/useMerkleInitCodeHash.d.ts +24 -0
- package/dist/fhe-airdrop/advanced/react/useSetComplianceDelegate.d.ts +33 -0
- package/dist/fhe-airdrop/advanced/react/useSetComplianceManagerImpl.d.ts +27 -0
- package/dist/fhe-airdrop/advanced/react/useSetCompliancePolicy.d.ts +28 -0
- package/dist/fhe-airdrop/advanced/react/useSetCustomFee.d.ts +29 -0
- package/dist/fhe-airdrop/advanced/react/useSetDefaultDelegateToCompliance.d.ts +31 -0
- package/dist/fhe-airdrop/advanced/react/useSetDefaultGasFee.d.ts +30 -0
- package/dist/fhe-airdrop/advanced/react/useSetDefaultUpgradeable.d.ts +27 -0
- package/dist/fhe-airdrop/advanced/react/useSetEcdsaImplementation.d.ts +34 -0
- package/dist/fhe-airdrop/advanced/react/useSetFeeCollector.d.ts +27 -0
- package/dist/fhe-airdrop/advanced/react/useSetMaxGasFee.d.ts +33 -0
- package/dist/fhe-airdrop/advanced/react/useSetMerkleImplementation.d.ts +30 -0
- package/dist/fhe-airdrop/advanced/react/useSetUpgradeabilityPolicy.d.ts +31 -0
- package/dist/fhe-airdrop/airdrop-base.d.ts +55 -8
- package/dist/fhe-airdrop/campaign.d.ts +61 -20
- package/dist/fhe-airdrop/constants.d.ts +9 -1
- package/dist/fhe-airdrop/ecdsa.d.ts +13 -0
- package/dist/fhe-airdrop/errors.d.ts +87 -0
- package/dist/fhe-airdrop/factory.d.ts +62 -22
- package/dist/fhe-airdrop/guards.d.ts +133 -4
- package/dist/fhe-airdrop/index.cjs +86 -971
- package/dist/fhe-airdrop/index.d.cts +4 -4
- package/dist/fhe-airdrop/index.d.ts +4 -4
- package/dist/fhe-airdrop/index.js +8 -927
- package/dist/fhe-airdrop/merkle-tree.d.ts +32 -38
- package/dist/fhe-airdrop/merkle.d.ts +52 -31
- package/dist/fhe-airdrop/react/_shared.d.ts +13 -0
- package/dist/fhe-airdrop/react/index.cjs +997 -87
- package/dist/fhe-airdrop/react/index.d.cts +53 -4
- package/dist/fhe-airdrop/react/index.d.ts +53 -4
- package/dist/fhe-airdrop/react/index.js +887 -27
- package/dist/fhe-airdrop/react/keys.d.ts +98 -0
- package/dist/fhe-airdrop/react/useAccessEcdsaClaimAmount.d.ts +26 -0
- package/dist/fhe-airdrop/react/useAccessMerkleClaimAmount.d.ts +27 -0
- package/dist/fhe-airdrop/react/useAddComplianceDelegate.d.ts +37 -0
- package/dist/fhe-airdrop/react/useAdminBatchDiscloseBalanceToParties.d.ts +36 -0
- package/dist/fhe-airdrop/react/useAdminDiscloseBalanceToParty.d.ts +31 -0
- package/dist/fhe-airdrop/react/useAdminGetCurrentBalance.d.ts +27 -0
- package/dist/fhe-airdrop/react/useAirdropConfig.d.ts +49 -0
- package/dist/fhe-airdrop/react/useAirdropDeploymentMode.d.ts +28 -0
- package/dist/fhe-airdrop/react/useAirdropGrantRole.d.ts +35 -0
- package/dist/fhe-airdrop/react/useAirdropRenounceRole.d.ts +36 -0
- package/dist/fhe-airdrop/react/useAirdropRevokeRole.d.ts +33 -0
- package/dist/fhe-airdrop/react/useAirdropRoleAdmin.d.ts +28 -0
- package/dist/fhe-airdrop/react/useAirdropRoleConstants.d.ts +67 -0
- package/dist/fhe-airdrop/react/useAirdropRoleMembers.d.ts +49 -0
- package/dist/fhe-airdrop/react/useAirdropUpgradeToAndCall.d.ts +45 -0
- package/dist/fhe-airdrop/react/useBatchDiscloseHandlesToParty.d.ts +32 -0
- package/dist/fhe-airdrop/react/useBuildMerkleCampaign.d.ts +68 -0
- package/dist/fhe-airdrop/react/useComplianceGrantRole.d.ts +32 -0
- package/dist/fhe-airdrop/react/useComplianceHasRole.d.ts +37 -0
- package/dist/fhe-airdrop/react/useComplianceInfo.d.ts +50 -0
- package/dist/fhe-airdrop/react/useComplianceManagerOf.d.ts +32 -0
- package/dist/fhe-airdrop/react/useComplianceRenounceRole.d.ts +38 -0
- package/dist/fhe-airdrop/react/useComplianceRevokeRole.d.ts +36 -0
- package/dist/fhe-airdrop/react/useComplianceRoleConstants.d.ts +41 -0
- package/dist/fhe-airdrop/react/useComplianceRoleMembers.d.ts +45 -0
- package/dist/fhe-airdrop/react/useCreateAndFundEcdsaAirdrop.d.ts +55 -0
- package/dist/fhe-airdrop/react/useCreateAndFundMerkleAirdrop.d.ts +52 -0
- package/dist/fhe-airdrop/react/useDiscloseHandleToParty.d.ts +35 -0
- package/dist/fhe-airdrop/react/useEcdsaClaim.d.ts +4 -3
- package/dist/fhe-airdrop/react/useEcdsaClaimAndUnwrap.d.ts +27 -0
- package/dist/fhe-airdrop/react/useEcdsaDomain.d.ts +41 -0
- package/dist/fhe-airdrop/react/useEffectiveDelegateToCompliance.d.ts +26 -0
- package/dist/fhe-airdrop/react/useEncryptCampaignAmounts.d.ts +59 -0
- package/dist/fhe-airdrop/react/useFactoryFees.d.ts +11 -4
- package/dist/fhe-airdrop/react/useIsActiveDelegate.d.ts +29 -0
- package/dist/fhe-airdrop/react/useIsAirdrop.d.ts +44 -0
- package/dist/fhe-airdrop/react/useIsMerkleRootMutable.d.ts +21 -0
- package/dist/fhe-airdrop/react/useIsSignatureValid.d.ts +46 -0
- package/dist/fhe-airdrop/react/useMerkleClaim.d.ts +7 -19
- package/dist/fhe-airdrop/react/useMerkleClaimAndUnwrap.d.ts +29 -0
- package/dist/fhe-airdrop/react/usePlanMerkleCampaign.d.ts +53 -0
- package/dist/fhe-airdrop/react/usePreflightClaim.d.ts +46 -0
- package/dist/fhe-airdrop/react/usePreflightCreateAirdrop.d.ts +67 -0
- package/dist/fhe-airdrop/react/useRefreshComplianceBalance.d.ts +36 -0
- package/dist/fhe-airdrop/react/useRescueERC20.d.ts +30 -0
- package/dist/fhe-airdrop/react/useRescueOtherConfidentialToken.d.ts +34 -0
- package/dist/fhe-airdrop/react/useResolveGasFee.d.ts +30 -0
- package/dist/fhe-airdrop/react/useRevokeComplianceDelegate.d.ts +37 -0
- package/dist/fhe-airdrop/react/useRotateMerkleRoot.d.ts +52 -0
- package/dist/fhe-airdrop/react/useSignClaimAuthorization.d.ts +42 -0
- package/dist/fhe-airdrop/react/useWithdrawGasFee.d.ts +37 -0
- package/dist/fhe-airdrop/types.d.ts +27 -1
- package/dist/fhe-disperse/index.cjs +21 -21
- package/dist/fhe-disperse/index.js +2 -2
- package/dist/fhe-disperse/react/index.cjs +22 -22
- package/dist/fhe-disperse/react/index.js +3 -3
- package/dist/fhe-vesting/advanced/index.cjs +5 -5
- package/dist/fhe-vesting/advanced/index.js +3 -3
- package/dist/fhe-vesting/advanced/react/index.cjs +7 -7
- package/dist/fhe-vesting/advanced/react/index.js +4 -4
- package/dist/fhe-vesting/index.cjs +8 -8
- package/dist/fhe-vesting/index.js +2 -2
- package/dist/fhe-vesting/react/index.cjs +114 -114
- package/dist/fhe-vesting/react/index.js +3 -3
- package/dist/index.cjs +18 -18
- package/dist/index.js +1 -1
- package/dist/testnet-faucet/index.cjs +14 -14
- package/dist/testnet-faucet/index.js +2 -2
- package/dist/testnet-faucet/react/index.cjs +8 -8
- package/dist/testnet-faucet/react/index.js +3 -3
- package/package.json +1 -1
- package/dist/chunk-NCVX3K2N.cjs +0 -161
- package/dist/chunk-VP2B4WM2.js +0 -154
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type UseQueryResult } from "@tanstack/react-query";
|
|
2
|
+
import type { Address } from "viem";
|
|
3
|
+
import { type AirdropHookOptions } from "./_shared.js";
|
|
4
|
+
/** @alpha */
|
|
5
|
+
export interface UseResolveGasFeeArgs extends AirdropHookOptions<bigint> {
|
|
6
|
+
/** The account that will send `create*`. Fee overrides are per-creator. */
|
|
7
|
+
creator?: Address;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The per-claim fee a `create*` from `creator` would freeze into the new
|
|
11
|
+
* instance right now: their `setCustomFee` override when enabled, else the
|
|
12
|
+
* factory default.
|
|
13
|
+
*
|
|
14
|
+
* **This is the number `common.maxAcceptedGasFee` is checked against**, so it is
|
|
15
|
+
* what a create form should show before the creator picks a bound. Composing it
|
|
16
|
+
* from `useFactoryFees` and `useFactoryCustomFee` by hand means re-implementing
|
|
17
|
+
* the override-over-default rule in every consumer, and getting it wrong reads
|
|
18
|
+
* as "no fee" on exactly the accounts that have one.
|
|
19
|
+
*
|
|
20
|
+
* **A snapshot, not a quote.** `FEE_MANAGER_ROLE` can move it between this read
|
|
21
|
+
* and the create landing, which is the case `maxAcceptedGasFee` exists to catch -
|
|
22
|
+
* so treat this as what to *show*, never as a reason to skip the bound.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* const { data: fee } = useResolveGasFee({ creator: address });
|
|
26
|
+
* // then: params.common.maxAcceptedGasFee = fee ?? 0n
|
|
27
|
+
*
|
|
28
|
+
* @alpha
|
|
29
|
+
*/
|
|
30
|
+
export declare function useResolveGasFee(args?: UseResolveGasFeeArgs): UseQueryResult<bigint, Error>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { Address, Hex } from "viem";
|
|
3
|
+
import type { WriteAccountOverride } from "../airdrop-base.js";
|
|
4
|
+
import { type AirdropInstanceClientOptions } from "./_shared.js";
|
|
5
|
+
/** @alpha */
|
|
6
|
+
export interface RevokeComplianceDelegateArgs extends WriteAccountOverride {
|
|
7
|
+
/** The client delegate to revoke. Must currently be active, and must not be the platform delegate. */
|
|
8
|
+
delegate: Address;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Revoke a client delegate's user-decryption delegation. `options.address` is
|
|
12
|
+
* the CLONE. Requires `DELEGATION_ADMIN_ROLE` on it.
|
|
13
|
+
*
|
|
14
|
+
* **Cannot revoke the platform compliance delegate** - that slot is
|
|
15
|
+
* irrevocable by construction, and targeting it reverts. Only the addresses in
|
|
16
|
+
* {@link useComplianceInfo}'s `clientDelegates` are revocable.
|
|
17
|
+
*
|
|
18
|
+
* The same gateway lag applies on the way out: the revocation is effective
|
|
19
|
+
* on-chain immediately, but a revoked delegate may still complete a delegated
|
|
20
|
+
* decrypt for a short window afterwards.
|
|
21
|
+
*
|
|
22
|
+
* **Invalidates:** this clone's {@link useComplianceInfo} entry and its
|
|
23
|
+
* {@link useIsActiveDelegate} entry for exactly `delegate`, both keyed on the
|
|
24
|
+
* clone address.
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* Not in the same block as {@link useAddComplianceDelegate} for the same
|
|
28
|
+
* delegate - the FHEVM ACL refuses both writes at one height with an opaque
|
|
29
|
+
* revert.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* const revoke = useRevokeComplianceDelegate({ address: managerAddress });
|
|
33
|
+
* await revoke.mutateAsync({ delegate: formerOfficer });
|
|
34
|
+
*
|
|
35
|
+
* @alpha
|
|
36
|
+
*/
|
|
37
|
+
export declare function useRevokeComplianceDelegate(options: AirdropInstanceClientOptions): UseMutationResult<Hex, Error, RevokeComplianceDelegateArgs>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { WriteAccountOverride } from "../airdrop-base.js";
|
|
3
|
+
import { type CampaignSubmitterOption, type RotatedCampaign } from "../campaign.js";
|
|
4
|
+
import type { CampaignRecipient } from "../types.js";
|
|
5
|
+
import { type AirdropInstanceClientOptions } from "./_shared.js";
|
|
6
|
+
/**
|
|
7
|
+
* Variables for {@link useRotateMerkleRoot}.
|
|
8
|
+
*
|
|
9
|
+
* @alpha
|
|
10
|
+
*/
|
|
11
|
+
export interface UseRotateMerkleRootArgs extends CampaignSubmitterOption, WriteAccountOverride {
|
|
12
|
+
/** The FULL updated roster, carrying each account's new CUMULATIVE total — never the delta since the last root. */
|
|
13
|
+
recipients: readonly CampaignRecipient[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Rebuild a campaign against updated totals and publish the new root in one
|
|
17
|
+
* call.
|
|
18
|
+
*
|
|
19
|
+
* **`recipients` must carry CUMULATIVE totals, not deltas.** `claimedAmount`
|
|
20
|
+
* survives a rotation and a claim pays
|
|
21
|
+
* `newTotal - min(newTotal, alreadyDelivered)`, so passing increments pays the
|
|
22
|
+
* increment minus everything already delivered — encrypted zero for most
|
|
23
|
+
* rosters. A total below what an account already received pays nothing; a
|
|
24
|
+
* rotation cannot claw back.
|
|
25
|
+
*
|
|
26
|
+
* The root is published LAST, so a failed rebuild leaves the previous campaign
|
|
27
|
+
* intact and claimable. Once it lands the old proofs stop verifying:
|
|
28
|
+
* **distribute the new entries to every recipient**, including those whose
|
|
29
|
+
* total did not change, or they are stuck.
|
|
30
|
+
*
|
|
31
|
+
* Requires `MERKLE_ADMIN_ROLE` and an instance created with
|
|
32
|
+
* `isMerkleRootMutable: true`. Distinct from {@link useSetMerkleRoot}, which
|
|
33
|
+
* publishes a root you already built.
|
|
34
|
+
*
|
|
35
|
+
* **Invalidates:** this instance's `useMerkleRoot` entry only. Explicitly NOT
|
|
36
|
+
* `useClaimedAmount`: a rotation changes no account's delivered total (it is
|
|
37
|
+
* keyed by account, not by root), so invalidating it would fan out a pointless
|
|
38
|
+
* RPC per mounted recipient row.
|
|
39
|
+
*
|
|
40
|
+
* @throws {@link FeatureDisabledError} when the instance was created with `isMerkleRootMutable: false`.
|
|
41
|
+
* @throws {@link InvalidArgumentError} on a duplicate, zero-address or out-of-`uint64`-range roster entry.
|
|
42
|
+
* @throws {@link MissingEncryptorError} when `encryptor` resolves to `undefined`.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* const rotate = useRotateMerkleRoot({ address: airdrop, encryptor: () => sdk.relayer });
|
|
46
|
+
* const { root, entries, hash } = await rotate.mutateAsync({
|
|
47
|
+
* recipients: [{ recipient: alice, cumulativeTotal: 1_500_000n }], // was 1_000_000n
|
|
48
|
+
* });
|
|
49
|
+
*
|
|
50
|
+
* @alpha
|
|
51
|
+
*/
|
|
52
|
+
export declare function useRotateMerkleRoot(options: AirdropInstanceClientOptions): UseMutationResult<RotatedCampaign, Error, UseRotateMerkleRootArgs>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { Address, Hex } from "viem";
|
|
3
|
+
import type { Signature } from "../../core/brands.js";
|
|
4
|
+
import type { WriteAccountOverride } from "../airdrop-base.js";
|
|
5
|
+
import { type AirdropInstanceClientOptions } from "./_shared.js";
|
|
6
|
+
/** @alpha */
|
|
7
|
+
export interface SignClaimAuthorizationArgs extends WriteAccountOverride {
|
|
8
|
+
/** The account the signature entitles. Bound into the digest. */
|
|
9
|
+
recipient: Address;
|
|
10
|
+
/** The 32-byte encrypted-amount handle the recipient will present with this signature. */
|
|
11
|
+
encryptedAmountHandle: Hex;
|
|
12
|
+
/** Replay-scoping id, interpreted per the instance's deploy-time `dedupMode`. */
|
|
13
|
+
dedupId: Hex;
|
|
14
|
+
/** Unix seconds after which the signature is worthless. */
|
|
15
|
+
deadline: bigint;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Sign a v2 `Claim(address recipient, bytes32 encryptedAmount, bytes32
|
|
19
|
+
* dedupId, uint256 deadline)` authorization for an `ECDSAConfidentialAirdrop`
|
|
20
|
+
* instance. The signer must hold `SIGNER_ROLE` on that instance.
|
|
21
|
+
*
|
|
22
|
+
* `airdrop` and `chainId` come from the hook's own options, so a component
|
|
23
|
+
* supplies only the claim fields.
|
|
24
|
+
*
|
|
25
|
+
* **Under `perDedupId` and `none` the contract enforces no per-recipient
|
|
26
|
+
* ceiling.** Every mode consumes the EIP-712 digest, so the exact signature
|
|
27
|
+
* bytes cannot be replayed - but under `perDedupId` the same ciphertext
|
|
28
|
+
* signed for two different `dedupId`s is claimable twice, and under `none`
|
|
29
|
+
* every distinct signature is independently claimable with no on-chain
|
|
30
|
+
* ceiling at all. The signing UI is then the ONLY bound on total payout. See
|
|
31
|
+
* {@link signClaimAuthorization}.
|
|
32
|
+
*
|
|
33
|
+
* **Invalidates:** nothing. The signature is produced off-chain and lands no
|
|
34
|
+
* transaction, so no cached read moves until the recipient claims.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* const sign = useSignClaimAuthorization({ address: airdropAddress });
|
|
38
|
+
* const signature = await sign.mutateAsync({ recipient, encryptedAmountHandle, dedupId, deadline });
|
|
39
|
+
*
|
|
40
|
+
* @alpha
|
|
41
|
+
*/
|
|
42
|
+
export declare function useSignClaimAuthorization(options: AirdropInstanceClientOptions): UseMutationResult<Signature, Error, SignClaimAuthorizationArgs>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
+
import type { Address, Hex } from "viem";
|
|
3
|
+
import type { WriteAccountOverride } from "../airdrop-base.js";
|
|
4
|
+
import { type AirdropInstanceClientOptions } from "./_shared.js";
|
|
5
|
+
/** @alpha */
|
|
6
|
+
export interface WithdrawGasFeeArgs extends WriteAccountOverride {
|
|
7
|
+
/** Where the ETH goes. */
|
|
8
|
+
recipient: Address;
|
|
9
|
+
/**
|
|
10
|
+
* Wei. Exceeding the accrued balance reverts `InsufficientFeeBalance`,
|
|
11
|
+
* surfaced as `InsufficientBalanceError`.
|
|
12
|
+
*/
|
|
13
|
+
amount: bigint;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Withdraw an airdrop instance's accrued per-claim fee ETH to `recipient`.
|
|
17
|
+
*
|
|
18
|
+
* Requires `FEE_COLLECTOR_ROLE`, which is self-administered on
|
|
19
|
+
* `ConfidentialAirdropBase` — no other role can grant it, so
|
|
20
|
+
* {@link useGrantInstanceRoles} cannot bootstrap it from an admin key. Use
|
|
21
|
+
* `useAirdropRoleMembers(FEE_COLLECTOR_ROLE)` to show who can actually call
|
|
22
|
+
* this.
|
|
23
|
+
*
|
|
24
|
+
* **`amount` is public ETH in wei, not a confidential quantity** — unlike
|
|
25
|
+
* every other amount in this module it is safe to log and to render.
|
|
26
|
+
*
|
|
27
|
+
* **Invalidates:** nothing. No read hook in this subpath exposes the
|
|
28
|
+
* instance's accrued fee balance, so no cached query is left stale. If such a
|
|
29
|
+
* read is ever added, this is its invalidator.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* const withdrawFees = useWithdrawGasFee({ address: airdropAddress });
|
|
33
|
+
* await withdrawFees.mutateAsync({ recipient: treasuryAddress, amount: parseEther("0.1") });
|
|
34
|
+
*
|
|
35
|
+
* @alpha
|
|
36
|
+
*/
|
|
37
|
+
export declare function useWithdrawGasFee(options: AirdropInstanceClientOptions): UseMutationResult<Hex, Error, WithdrawGasFeeArgs>;
|
|
@@ -20,6 +20,19 @@ export interface CommonAirdropParams {
|
|
|
20
20
|
unwrappable: boolean;
|
|
21
21
|
/** Client admin AND client delegate of the compliance clone. Zero means msg.sender. */
|
|
22
22
|
complianceAdmin: Address;
|
|
23
|
+
/**
|
|
24
|
+
* The highest per-claim gas fee this creator accepts being frozen into the new
|
|
25
|
+
* instance, in wei. The factory resolves the creator's fee at execution time
|
|
26
|
+
* (their custom override, else the factory default) and reverts
|
|
27
|
+
* `GasFeeNotAccepted` if it lands above this bound.
|
|
28
|
+
*
|
|
29
|
+
* Required, and deliberately so: the fee is immutable once frozen, and the
|
|
30
|
+
* value that resolves is chosen by the factory admin, not the creator. A
|
|
31
|
+
* default here would hand that decision back to whoever is not making it.
|
|
32
|
+
* Pass `0n` to accept only a zero-fee campaign, or {@link UINT96_MAX} to
|
|
33
|
+
* accept whatever resolves.
|
|
34
|
+
*/
|
|
35
|
+
maxAcceptedGasFee: bigint;
|
|
23
36
|
}
|
|
24
37
|
/** @alpha */
|
|
25
38
|
export interface EcdsaAirdropParams {
|
|
@@ -64,10 +77,23 @@ export interface CampaignRecipient {
|
|
|
64
77
|
/**
|
|
65
78
|
* One recipient's encrypted, proof-bearing claim input — everything `merkle.claim` needs.
|
|
66
79
|
*
|
|
80
|
+
* Carries TWO addresses because the contract keys two different things on them:
|
|
81
|
+
* `account` selects the leaf and the cumulative accounting, `boundTo` is who the
|
|
82
|
+
* coprocessor will accept as the sender. They are equal on a self-claim campaign
|
|
83
|
+
* and differ on a relayed one.
|
|
84
|
+
*
|
|
67
85
|
* @alpha
|
|
68
86
|
*/
|
|
69
87
|
export interface CampaignEntry {
|
|
70
|
-
|
|
88
|
+
/** The claim identity: whose leaf this is, whose delivered total advances, and where payout defaults. */
|
|
89
|
+
account: Address;
|
|
90
|
+
/**
|
|
91
|
+
* The only address that can submit this entry. The FHE input proof is bound to
|
|
92
|
+
* `(instance, boundTo)`, so any other sender is rejected by the coprocessor —
|
|
93
|
+
* a leaf cannot be re-pointed at a different submitter without re-encrypting,
|
|
94
|
+
* which changes the handle and therefore the root.
|
|
95
|
+
*/
|
|
96
|
+
boundTo: Address;
|
|
71
97
|
handle: Hex;
|
|
72
98
|
inputProof: Hex;
|
|
73
99
|
merkleProof: readonly Hex[];
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkIEKTGJ4J_cjs = require('../chunk-IEKTGJ4J.cjs');
|
|
4
4
|
var chunkKFRDLKMA_cjs = require('../chunk-KFRDLKMA.cjs');
|
|
5
5
|
require('../chunk-TEBM66WA.cjs');
|
|
6
6
|
require('../chunk-FAXIIH5R.cjs');
|
|
7
7
|
var chunkFWHYQZ5E_cjs = require('../chunk-FWHYQZ5E.cjs');
|
|
8
8
|
require('../chunk-UG5RKLU2.cjs');
|
|
9
9
|
require('../chunk-MVDQMV25.cjs');
|
|
10
|
-
require('../chunk-
|
|
10
|
+
require('../chunk-PG3WXT3K.cjs');
|
|
11
11
|
require('../chunk-JK4XMMKM.cjs');
|
|
12
12
|
require('../chunk-66IHPTOK.cjs');
|
|
13
13
|
var chunk67OV5CX2_cjs = require('../chunk-67OV5CX2.cjs');
|
|
@@ -17,79 +17,79 @@ require('../chunk-VJKZWYYJ.cjs');
|
|
|
17
17
|
|
|
18
18
|
Object.defineProperty(exports, "AlreadyRegisteredError", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkIEKTGJ4J_cjs.AlreadyRegisteredError; }
|
|
21
21
|
});
|
|
22
22
|
Object.defineProperty(exports, "ConfidentialDisperseClient", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkIEKTGJ4J_cjs.ConfidentialDisperseClient; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "DEFAULT_ADMIN_ROLE", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkIEKTGJ4J_cjs.DEFAULT_ADMIN_ROLE; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "DisperseEncryptedReserveNotGrantedError", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkIEKTGJ4J_cjs.DisperseEncryptedReserveNotGrantedError; }
|
|
33
33
|
});
|
|
34
34
|
Object.defineProperty(exports, "DisperseSubwalletNotFoundError", {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkIEKTGJ4J_cjs.DisperseSubwalletNotFoundError; }
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "FEE_COLLECTOR_ROLE", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkIEKTGJ4J_cjs.FEE_COLLECTOR_ROLE; }
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "FEE_MANAGER_ROLE", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkIEKTGJ4J_cjs.FEE_MANAGER_ROLE; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "NotRegisteredError", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkIEKTGJ4J_cjs.NotRegisteredError; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "PAUSER_ROLE", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkIEKTGJ4J_cjs.PAUSER_ROLE; }
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "SingletonNotApprovedError", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkIEKTGJ4J_cjs.SingletonNotApprovedError; }
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperty(exports, "SubwalletsNotApprovedError", {
|
|
59
59
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkIEKTGJ4J_cjs.SubwalletsNotApprovedError; }
|
|
61
61
|
});
|
|
62
62
|
Object.defineProperty(exports, "WITHDRAWER_ROLE", {
|
|
63
63
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunkIEKTGJ4J_cjs.WITHDRAWER_ROLE; }
|
|
65
65
|
});
|
|
66
66
|
Object.defineProperty(exports, "computeSubtotals", {
|
|
67
67
|
enumerable: true,
|
|
68
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunkIEKTGJ4J_cjs.computeSubtotals; }
|
|
69
69
|
});
|
|
70
70
|
Object.defineProperty(exports, "createConfidentialDisperseClient", {
|
|
71
71
|
enumerable: true,
|
|
72
|
-
get: function () { return
|
|
72
|
+
get: function () { return chunkIEKTGJ4J_cjs.createConfidentialDisperseClient; }
|
|
73
73
|
});
|
|
74
74
|
Object.defineProperty(exports, "disperseConfidentialAbi", {
|
|
75
75
|
enumerable: true,
|
|
76
|
-
get: function () { return
|
|
76
|
+
get: function () { return chunkIEKTGJ4J_cjs.disperseConfidentialAbi; }
|
|
77
77
|
});
|
|
78
78
|
Object.defineProperty(exports, "disperseWalletAbi", {
|
|
79
79
|
enumerable: true,
|
|
80
|
-
get: function () { return
|
|
80
|
+
get: function () { return chunkIEKTGJ4J_cjs.disperseWalletAbi; }
|
|
81
81
|
});
|
|
82
82
|
Object.defineProperty(exports, "encryptUint64", {
|
|
83
83
|
enumerable: true,
|
|
84
|
-
get: function () { return
|
|
84
|
+
get: function () { return chunkIEKTGJ4J_cjs.encryptUint64; }
|
|
85
85
|
});
|
|
86
86
|
Object.defineProperty(exports, "encryptUint64Batch", {
|
|
87
87
|
enumerable: true,
|
|
88
|
-
get: function () { return
|
|
88
|
+
get: function () { return chunkIEKTGJ4J_cjs.encryptUint64Batch; }
|
|
89
89
|
});
|
|
90
90
|
Object.defineProperty(exports, "resolveEncryptor", {
|
|
91
91
|
enumerable: true,
|
|
92
|
-
get: function () { return
|
|
92
|
+
get: function () { return chunkIEKTGJ4J_cjs.resolveEncryptor; }
|
|
93
93
|
});
|
|
94
94
|
Object.defineProperty(exports, "ERC7984_OPERATOR_MAX_DEADLINE", {
|
|
95
95
|
enumerable: true,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { AlreadyRegisteredError, ConfidentialDisperseClient, DEFAULT_ADMIN_ROLE, DisperseEncryptedReserveNotGrantedError, DisperseSubwalletNotFoundError, FEE_COLLECTOR_ROLE, FEE_MANAGER_ROLE, NotRegisteredError, PAUSER_ROLE, SingletonNotApprovedError, SubwalletsNotApprovedError, WITHDRAWER_ROLE, computeSubtotals, createConfidentialDisperseClient, disperseConfidentialAbi, disperseWalletAbi, encryptUint64, encryptUint64Batch, resolveEncryptor } from '../chunk-
|
|
1
|
+
export { AlreadyRegisteredError, ConfidentialDisperseClient, DEFAULT_ADMIN_ROLE, DisperseEncryptedReserveNotGrantedError, DisperseSubwalletNotFoundError, FEE_COLLECTOR_ROLE, FEE_MANAGER_ROLE, NotRegisteredError, PAUSER_ROLE, SingletonNotApprovedError, SubwalletsNotApprovedError, WITHDRAWER_ROLE, computeSubtotals, createConfidentialDisperseClient, disperseConfidentialAbi, disperseWalletAbi, encryptUint64, encryptUint64Batch, resolveEncryptor } from '../chunk-PK6Q6J5F.js';
|
|
2
2
|
export { ERC7984_OPERATOR_MAX_DEADLINE, revokeOperator, setOperator } from '../chunk-4TSDNZQ3.js';
|
|
3
3
|
import '../chunk-WMACINXO.js';
|
|
4
4
|
import '../chunk-ZWXJTBZO.js';
|
|
5
5
|
export { erc7984OperatorAbi } from '../chunk-7VELUOMI.js';
|
|
6
6
|
import '../chunk-NWFMBLSQ.js';
|
|
7
7
|
import '../chunk-4RAAATVY.js';
|
|
8
|
-
import '../chunk-
|
|
8
|
+
import '../chunk-6HCT4QIX.js';
|
|
9
9
|
import '../chunk-ZA673I3O.js';
|
|
10
10
|
import '../chunk-KWFFIJYX.js';
|
|
11
11
|
export { AccessDeniedError, AlreadyInitializedError, BatchTooLargeError, ContractRevertError, DecryptionFailedError, DeploymentAddressUnavailableError, EncryptionFailedError, FeatureDisabledError, FheHandleNotAllowedError, InsufficientBalanceError, InsufficientFeeError, InsufficientGasFundsError, InvalidArgumentError, InvalidSignatureError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, NetworkError, OperatorNotApprovedError, PausedError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, ReentrancyError, RelayerUnreachableError, SigningFailedError, TokenOpsContractError, TokenOpsSdkError, TokenOpsValidationError, TransferFailedError, UnknownWriteFailureError, UnsupportedChainError, UserDecryptNotAllowedError, UserRejectedSignatureError, WalletChainMismatchError, WalletRejectedError, isTokenOpsSdkError } from '../chunk-QBJ7O2B4.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkIEKTGJ4J_cjs = require('../../chunk-IEKTGJ4J.cjs');
|
|
4
4
|
var chunk7AFPOE7N_cjs = require('../../chunk-7AFPOE7N.cjs');
|
|
5
5
|
require('../../chunk-ZQUE2B3Q.cjs');
|
|
6
6
|
require('../../chunk-KFRDLKMA.cjs');
|
|
@@ -9,7 +9,7 @@ require('../../chunk-FAXIIH5R.cjs');
|
|
|
9
9
|
require('../../chunk-FWHYQZ5E.cjs');
|
|
10
10
|
require('../../chunk-UG5RKLU2.cjs');
|
|
11
11
|
require('../../chunk-MVDQMV25.cjs');
|
|
12
|
-
var
|
|
12
|
+
var chunkPG3WXT3K_cjs = require('../../chunk-PG3WXT3K.cjs');
|
|
13
13
|
require('../../chunk-JK4XMMKM.cjs');
|
|
14
14
|
require('../../chunk-66IHPTOK.cjs');
|
|
15
15
|
var chunk67OV5CX2_cjs = require('../../chunk-67OV5CX2.cjs');
|
|
@@ -23,7 +23,7 @@ var FHE_DISPERSE_NAMESPACE = "fhe-disperse";
|
|
|
23
23
|
function tryResolveSingletonAddress(override, chainId) {
|
|
24
24
|
if (override) return override;
|
|
25
25
|
if (chainId === void 0) return void 0;
|
|
26
|
-
return
|
|
26
|
+
return chunkPG3WXT3K_cjs.getFheDisperseSingletonAddress(chainId);
|
|
27
27
|
}
|
|
28
28
|
function useMemoDisperseClient(opts = {}) {
|
|
29
29
|
const publicClient = wagmi.usePublicClient({ chainId: opts.chainId });
|
|
@@ -36,14 +36,14 @@ function useMemoDisperseClient(opts = {}) {
|
|
|
36
36
|
const client = react.useMemo(() => {
|
|
37
37
|
if (!publicClient) return void 0;
|
|
38
38
|
if (!resolvedAddress) return void 0;
|
|
39
|
-
return
|
|
39
|
+
return chunkIEKTGJ4J_cjs.createConfidentialDisperseClient({
|
|
40
40
|
publicClient,
|
|
41
41
|
...walletClient ? { walletClient } : {},
|
|
42
42
|
address: resolvedAddress,
|
|
43
43
|
...chainId !== void 0 ? { chainId } : {},
|
|
44
44
|
// Lazy — invoked per-encryption inside the headless client. Picks up
|
|
45
45
|
// whichever EncryptorSource the consumer last passed in.
|
|
46
|
-
encryptor: () =>
|
|
46
|
+
encryptor: () => chunkIEKTGJ4J_cjs.resolveEncryptor(encryptorSourceRef.current),
|
|
47
47
|
...opts.aclAddress ? { aclAddress: opts.aclAddress } : {}
|
|
48
48
|
});
|
|
49
49
|
}, [publicClient, walletClient, resolvedAddress, chainId, opts.aclAddress]);
|
|
@@ -66,7 +66,7 @@ function computeSingletonResolutionError(override, chainId) {
|
|
|
66
66
|
clientLabel: "ConfidentialDisperseClient"
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
const resolved =
|
|
69
|
+
const resolved = chunkPG3WXT3K_cjs.getFheDisperseSingletonAddress(chainId);
|
|
70
70
|
if (!resolved) {
|
|
71
71
|
return new chunk67OV5CX2_cjs.DeploymentAddressUnavailableError({
|
|
72
72
|
reason: "registry-not-deployed",
|
|
@@ -472,7 +472,7 @@ function useWithdrawTokenFee(options = {}) {
|
|
|
472
472
|
});
|
|
473
473
|
}
|
|
474
474
|
const { token, to, amount, encryptor: encryptorSource, account } = args;
|
|
475
|
-
const eager = encryptorSource ?
|
|
475
|
+
const eager = encryptorSource ? chunkIEKTGJ4J_cjs.resolveEncryptor(encryptorSource) : void 0;
|
|
476
476
|
return client.withdrawTokenFee({
|
|
477
477
|
token,
|
|
478
478
|
to,
|
|
@@ -524,63 +524,63 @@ function useRevokeRole(options = {}) {
|
|
|
524
524
|
|
|
525
525
|
Object.defineProperty(exports, "AlreadyRegisteredError", {
|
|
526
526
|
enumerable: true,
|
|
527
|
-
get: function () { return
|
|
527
|
+
get: function () { return chunkIEKTGJ4J_cjs.AlreadyRegisteredError; }
|
|
528
528
|
});
|
|
529
529
|
Object.defineProperty(exports, "DEFAULT_ADMIN_ROLE", {
|
|
530
530
|
enumerable: true,
|
|
531
|
-
get: function () { return
|
|
531
|
+
get: function () { return chunkIEKTGJ4J_cjs.DEFAULT_ADMIN_ROLE; }
|
|
532
532
|
});
|
|
533
533
|
Object.defineProperty(exports, "DisperseEncryptedReserveNotGrantedError", {
|
|
534
534
|
enumerable: true,
|
|
535
|
-
get: function () { return
|
|
535
|
+
get: function () { return chunkIEKTGJ4J_cjs.DisperseEncryptedReserveNotGrantedError; }
|
|
536
536
|
});
|
|
537
537
|
Object.defineProperty(exports, "DisperseSubwalletNotFoundError", {
|
|
538
538
|
enumerable: true,
|
|
539
|
-
get: function () { return
|
|
539
|
+
get: function () { return chunkIEKTGJ4J_cjs.DisperseSubwalletNotFoundError; }
|
|
540
540
|
});
|
|
541
541
|
Object.defineProperty(exports, "FEE_COLLECTOR_ROLE", {
|
|
542
542
|
enumerable: true,
|
|
543
|
-
get: function () { return
|
|
543
|
+
get: function () { return chunkIEKTGJ4J_cjs.FEE_COLLECTOR_ROLE; }
|
|
544
544
|
});
|
|
545
545
|
Object.defineProperty(exports, "FEE_MANAGER_ROLE", {
|
|
546
546
|
enumerable: true,
|
|
547
|
-
get: function () { return
|
|
547
|
+
get: function () { return chunkIEKTGJ4J_cjs.FEE_MANAGER_ROLE; }
|
|
548
548
|
});
|
|
549
549
|
Object.defineProperty(exports, "NotRegisteredError", {
|
|
550
550
|
enumerable: true,
|
|
551
|
-
get: function () { return
|
|
551
|
+
get: function () { return chunkIEKTGJ4J_cjs.NotRegisteredError; }
|
|
552
552
|
});
|
|
553
553
|
Object.defineProperty(exports, "PAUSER_ROLE", {
|
|
554
554
|
enumerable: true,
|
|
555
|
-
get: function () { return
|
|
555
|
+
get: function () { return chunkIEKTGJ4J_cjs.PAUSER_ROLE; }
|
|
556
556
|
});
|
|
557
557
|
Object.defineProperty(exports, "SingletonNotApprovedError", {
|
|
558
558
|
enumerable: true,
|
|
559
|
-
get: function () { return
|
|
559
|
+
get: function () { return chunkIEKTGJ4J_cjs.SingletonNotApprovedError; }
|
|
560
560
|
});
|
|
561
561
|
Object.defineProperty(exports, "SubwalletsNotApprovedError", {
|
|
562
562
|
enumerable: true,
|
|
563
|
-
get: function () { return
|
|
563
|
+
get: function () { return chunkIEKTGJ4J_cjs.SubwalletsNotApprovedError; }
|
|
564
564
|
});
|
|
565
565
|
Object.defineProperty(exports, "WITHDRAWER_ROLE", {
|
|
566
566
|
enumerable: true,
|
|
567
|
-
get: function () { return
|
|
567
|
+
get: function () { return chunkIEKTGJ4J_cjs.WITHDRAWER_ROLE; }
|
|
568
568
|
});
|
|
569
569
|
Object.defineProperty(exports, "computeSubtotals", {
|
|
570
570
|
enumerable: true,
|
|
571
|
-
get: function () { return
|
|
571
|
+
get: function () { return chunkIEKTGJ4J_cjs.computeSubtotals; }
|
|
572
572
|
});
|
|
573
573
|
Object.defineProperty(exports, "encryptUint64", {
|
|
574
574
|
enumerable: true,
|
|
575
|
-
get: function () { return
|
|
575
|
+
get: function () { return chunkIEKTGJ4J_cjs.encryptUint64; }
|
|
576
576
|
});
|
|
577
577
|
Object.defineProperty(exports, "encryptUint64Batch", {
|
|
578
578
|
enumerable: true,
|
|
579
|
-
get: function () { return
|
|
579
|
+
get: function () { return chunkIEKTGJ4J_cjs.encryptUint64Batch; }
|
|
580
580
|
});
|
|
581
581
|
Object.defineProperty(exports, "resolveEncryptor", {
|
|
582
582
|
enumerable: true,
|
|
583
|
-
get: function () { return
|
|
583
|
+
get: function () { return chunkIEKTGJ4J_cjs.resolveEncryptor; }
|
|
584
584
|
});
|
|
585
585
|
Object.defineProperty(exports, "useEnsureOperator", {
|
|
586
586
|
enumerable: true,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { resolveEncryptor, createConfidentialDisperseClient } from '../../chunk-
|
|
2
|
-
export { AlreadyRegisteredError, DEFAULT_ADMIN_ROLE, DisperseEncryptedReserveNotGrantedError, DisperseSubwalletNotFoundError, FEE_COLLECTOR_ROLE, FEE_MANAGER_ROLE, NotRegisteredError, PAUSER_ROLE, SingletonNotApprovedError, SubwalletsNotApprovedError, WITHDRAWER_ROLE, computeSubtotals, encryptUint64, encryptUint64Batch, resolveEncryptor } from '../../chunk-
|
|
1
|
+
import { resolveEncryptor, createConfidentialDisperseClient } from '../../chunk-PK6Q6J5F.js';
|
|
2
|
+
export { AlreadyRegisteredError, DEFAULT_ADMIN_ROLE, DisperseEncryptedReserveNotGrantedError, DisperseSubwalletNotFoundError, FEE_COLLECTOR_ROLE, FEE_MANAGER_ROLE, NotRegisteredError, PAUSER_ROLE, SingletonNotApprovedError, SubwalletsNotApprovedError, WITHDRAWER_ROLE, computeSubtotals, encryptUint64, encryptUint64Batch, resolveEncryptor } from '../../chunk-PK6Q6J5F.js';
|
|
3
3
|
export { useEnsureOperator, useIsOperator } from '../../chunk-AXIPOR3C.js';
|
|
4
4
|
import '../../chunk-FT4LNBOS.js';
|
|
5
5
|
import '../../chunk-4TSDNZQ3.js';
|
|
@@ -8,7 +8,7 @@ import '../../chunk-ZWXJTBZO.js';
|
|
|
8
8
|
import '../../chunk-7VELUOMI.js';
|
|
9
9
|
import '../../chunk-NWFMBLSQ.js';
|
|
10
10
|
import '../../chunk-4RAAATVY.js';
|
|
11
|
-
import { getFheDisperseSingletonAddress } from '../../chunk-
|
|
11
|
+
import { getFheDisperseSingletonAddress } from '../../chunk-6HCT4QIX.js';
|
|
12
12
|
import '../../chunk-ZA673I3O.js';
|
|
13
13
|
import '../../chunk-KWFFIJYX.js';
|
|
14
14
|
import { MissingClientError, DeploymentAddressUnavailableError } from '../../chunk-QBJ7O2B4.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../../chunk-
|
|
3
|
+
var chunk6XOAYDC6_cjs = require('../../chunk-6XOAYDC6.cjs');
|
|
4
|
+
require('../../chunk-JVNJSDQ4.cjs');
|
|
5
5
|
require('../../chunk-UG5RKLU2.cjs');
|
|
6
6
|
require('../../chunk-MVDQMV25.cjs');
|
|
7
|
-
require('../../chunk-
|
|
7
|
+
require('../../chunk-PG3WXT3K.cjs');
|
|
8
8
|
require('../../chunk-JK4XMMKM.cjs');
|
|
9
9
|
require('../../chunk-66IHPTOK.cjs');
|
|
10
10
|
require('../../chunk-67OV5CX2.cjs');
|
|
@@ -14,9 +14,9 @@ require('../../chunk-VJKZWYYJ.cjs');
|
|
|
14
14
|
|
|
15
15
|
Object.defineProperty(exports, "ConfidentialVestingFactoryAdvancedClient", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunk6XOAYDC6_cjs.ConfidentialVestingFactoryAdvancedClient; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "createConfidentialVestingFactoryAdvancedClient", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunk6XOAYDC6_cjs.createConfidentialVestingFactoryAdvancedClient; }
|
|
22
22
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { ConfidentialVestingFactoryAdvancedClient, createConfidentialVestingFactoryAdvancedClient } from '../../chunk-
|
|
2
|
-
import '../../chunk-
|
|
1
|
+
export { ConfidentialVestingFactoryAdvancedClient, createConfidentialVestingFactoryAdvancedClient } from '../../chunk-NGU4JYIR.js';
|
|
2
|
+
import '../../chunk-WRWRA4TN.js';
|
|
3
3
|
import '../../chunk-NWFMBLSQ.js';
|
|
4
4
|
import '../../chunk-4RAAATVY.js';
|
|
5
|
-
import '../../chunk-
|
|
5
|
+
import '../../chunk-6HCT4QIX.js';
|
|
6
6
|
import '../../chunk-ZA673I3O.js';
|
|
7
7
|
import '../../chunk-KWFFIJYX.js';
|
|
8
8
|
import '../../chunk-QBJ7O2B4.js';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkYABHXJNH_cjs = require('../../../chunk-YABHXJNH.cjs');
|
|
4
4
|
require('../../../chunk-WJLECC22.cjs');
|
|
5
5
|
require('../../../chunk-TEBM66WA.cjs');
|
|
6
6
|
require('../../../chunk-3QHNYEQD.cjs');
|
|
7
7
|
require('../../../chunk-FAXIIH5R.cjs');
|
|
8
8
|
require('../../../chunk-FWHYQZ5E.cjs');
|
|
9
|
-
var
|
|
10
|
-
require('../../../chunk-
|
|
9
|
+
var chunk6XOAYDC6_cjs = require('../../../chunk-6XOAYDC6.cjs');
|
|
10
|
+
require('../../../chunk-JVNJSDQ4.cjs');
|
|
11
11
|
require('../../../chunk-UG5RKLU2.cjs');
|
|
12
12
|
require('../../../chunk-MVDQMV25.cjs');
|
|
13
|
-
var
|
|
13
|
+
var chunkPG3WXT3K_cjs = require('../../../chunk-PG3WXT3K.cjs');
|
|
14
14
|
require('../../../chunk-JK4XMMKM.cjs');
|
|
15
15
|
require('../../../chunk-66IHPTOK.cjs');
|
|
16
16
|
require('../../../chunk-67OV5CX2.cjs');
|
|
@@ -37,12 +37,12 @@ function usePredictManagerAddress(args = {}) {
|
|
|
37
37
|
...chainId !== void 0 ? { chainId } : {}
|
|
38
38
|
});
|
|
39
39
|
const resolvedChainId = chainId ?? resolvedPublicClient?.chain?.id;
|
|
40
|
-
const resolvedAddress = address ?? (resolvedChainId === void 0 ? void 0 :
|
|
40
|
+
const resolvedAddress = address ?? (resolvedChainId === void 0 ? void 0 : chunkPG3WXT3K_cjs.DEPLOYED_ADDRESSES.fheVesting?.confidentialVestingFactory?.[resolvedChainId] ?? void 0);
|
|
41
41
|
react.useRef(void 0);
|
|
42
42
|
const client = react.useMemo(() => {
|
|
43
43
|
if (!resolvedPublicClient) return void 0;
|
|
44
44
|
if (!resolvedAddress) return void 0;
|
|
45
|
-
return
|
|
45
|
+
return chunk6XOAYDC6_cjs.createConfidentialVestingFactoryAdvancedClient({
|
|
46
46
|
publicClient: resolvedPublicClient,
|
|
47
47
|
...walletClient ? { walletClient } : {},
|
|
48
48
|
address: resolvedAddress,
|
|
@@ -50,7 +50,7 @@ function usePredictManagerAddress(args = {}) {
|
|
|
50
50
|
});
|
|
51
51
|
}, [resolvedPublicClient, walletClient, resolvedAddress, resolvedChainId]);
|
|
52
52
|
return reactQuery.useQuery({
|
|
53
|
-
queryKey:
|
|
53
|
+
queryKey: chunkYABHXJNH_cjs.buildQueryKey(
|
|
54
54
|
"factory:predictManagerAddress",
|
|
55
55
|
resolvedChainId,
|
|
56
56
|
resolvedAddress,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { buildQueryKey } from '../../../chunk-
|
|
1
|
+
import { buildQueryKey } from '../../../chunk-BPIVVCSQ.js';
|
|
2
2
|
import '../../../chunk-TWT3STIX.js';
|
|
3
3
|
import '../../../chunk-WMACINXO.js';
|
|
4
4
|
import '../../../chunk-6GNR22OV.js';
|
|
5
5
|
import '../../../chunk-ZWXJTBZO.js';
|
|
6
6
|
import '../../../chunk-7VELUOMI.js';
|
|
7
|
-
import { createConfidentialVestingFactoryAdvancedClient } from '../../../chunk-
|
|
8
|
-
import '../../../chunk-
|
|
7
|
+
import { createConfidentialVestingFactoryAdvancedClient } from '../../../chunk-NGU4JYIR.js';
|
|
8
|
+
import '../../../chunk-WRWRA4TN.js';
|
|
9
9
|
import '../../../chunk-NWFMBLSQ.js';
|
|
10
10
|
import '../../../chunk-4RAAATVY.js';
|
|
11
|
-
import { DEPLOYED_ADDRESSES } from '../../../chunk-
|
|
11
|
+
import { DEPLOYED_ADDRESSES } from '../../../chunk-6HCT4QIX.js';
|
|
12
12
|
import '../../../chunk-ZA673I3O.js';
|
|
13
13
|
import '../../../chunk-KWFFIJYX.js';
|
|
14
14
|
import '../../../chunk-QBJ7O2B4.js';
|