@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
|
@@ -116,11 +116,12 @@ export { useRenounceRole, type UseRenounceRoleArgs } from "./useRenounceRole.js"
|
|
|
116
116
|
export type { BaseHookOptions, ManagerHookOptions } from "./_shared.js";
|
|
117
117
|
export { encryptUint64, encryptUint64Batch, resolveEncryptor, type Encryptor, type EncryptorSource, type EncryptUint64Args, type EncryptUint64BatchArgs, type FheValueInput, } from "../encryption.js";
|
|
118
118
|
export { DisclosureType, FeeType, type CreateVestingPreflightReport, type CustomFee, type EncryptedInput, type EncryptedInputs, type PendingTransfer, type VestingInfo, type VestingParams, } from "../types.js";
|
|
119
|
-
export type { BatchCreateVestingArgs, ClaimArgs, CreateVestingArgs, DiscloseArgs, EncryptedViewResult, InitiateTransferArgs, PartialClaimArgs, SplitVestingArgs, } from "../manager.js";
|
|
120
|
-
export type { CreateManagerResult, CreateManagerArgs, PredictManagerArgs } from "../factory.js";
|
|
119
|
+
export type { BatchCreateVestingArgs, ClaimArgs, CreateVestingArgs, DiscloseArgs, EncryptedViewResult, InitiateTransferArgs, PartialClaimArgs, PendingSplitVestingResult, SplitVestingArgs, SplitVestingResult, } from "../manager.js";
|
|
120
|
+
export type { CreateManagerResult, CreateManagerArgs, PendingCreateManagerResult, PredictManagerArgs, } from "../factory.js";
|
|
121
121
|
export { scaleRatio, type ScaleRatioArgs, type ScaledRatio } from "../../fhe/scale-ratio.js";
|
|
122
122
|
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";
|
|
123
123
|
export { type PreflightResult } from "../../core/preflight.js";
|
|
124
|
+
export type { MinedWrite, PendingWrite, ReceiptMode } from "../../core/pending.js";
|
|
124
125
|
export { VestingNotFoundError, NotVestingRecipientError, ClaimLockedError, VestingRevokedError, VestingNotRevocableError, VestingExpiredError, TransferAlreadyPendingError, NoPendingTransferError, NotPendingRecipientError, TransferExpiredError, } from "../errors.js";
|
|
125
126
|
export { useIsOperator, type UseIsOperatorOptions } from "../../fhe/react/useIsOperator.js";
|
|
126
127
|
export { useEnsureOperator, type UseEnsureOperatorOptions, type EnsureOperatorVariables, } from "../../fhe/react/useEnsureOperator.js";
|
|
@@ -116,11 +116,12 @@ export { useRenounceRole, type UseRenounceRoleArgs } from "./useRenounceRole.js"
|
|
|
116
116
|
export type { BaseHookOptions, ManagerHookOptions } from "./_shared.js";
|
|
117
117
|
export { encryptUint64, encryptUint64Batch, resolveEncryptor, type Encryptor, type EncryptorSource, type EncryptUint64Args, type EncryptUint64BatchArgs, type FheValueInput, } from "../encryption.js";
|
|
118
118
|
export { DisclosureType, FeeType, type CreateVestingPreflightReport, type CustomFee, type EncryptedInput, type EncryptedInputs, type PendingTransfer, type VestingInfo, type VestingParams, } from "../types.js";
|
|
119
|
-
export type { BatchCreateVestingArgs, ClaimArgs, CreateVestingArgs, DiscloseArgs, EncryptedViewResult, InitiateTransferArgs, PartialClaimArgs, SplitVestingArgs, } from "../manager.js";
|
|
120
|
-
export type { CreateManagerResult, CreateManagerArgs, PredictManagerArgs } from "../factory.js";
|
|
119
|
+
export type { BatchCreateVestingArgs, ClaimArgs, CreateVestingArgs, DiscloseArgs, EncryptedViewResult, InitiateTransferArgs, PartialClaimArgs, PendingSplitVestingResult, SplitVestingArgs, SplitVestingResult, } from "../manager.js";
|
|
120
|
+
export type { CreateManagerResult, CreateManagerArgs, PendingCreateManagerResult, PredictManagerArgs, } from "../factory.js";
|
|
121
121
|
export { scaleRatio, type ScaleRatioArgs, type ScaledRatio } from "../../fhe/scale-ratio.js";
|
|
122
122
|
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";
|
|
123
123
|
export { type PreflightResult } from "../../core/preflight.js";
|
|
124
|
+
export type { MinedWrite, PendingWrite, ReceiptMode } from "../../core/pending.js";
|
|
124
125
|
export { VestingNotFoundError, NotVestingRecipientError, ClaimLockedError, VestingRevokedError, VestingNotRevocableError, VestingExpiredError, TransferAlreadyPendingError, NoPendingTransferError, NotPendingRecipientError, TransferExpiredError, } from "../errors.js";
|
|
125
126
|
export { useIsOperator, type UseIsOperatorOptions } from "../../fhe/react/useIsOperator.js";
|
|
126
127
|
export { useEnsureOperator, type UseEnsureOperatorOptions, type EnsureOperatorVariables, } from "../../fhe/react/useEnsureOperator.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export { useEnsureOperator, useIsOperator } from '../../chunk-AXIPOR3C.js';
|
|
2
2
|
import '../../chunk-FT4LNBOS.js';
|
|
3
3
|
import '../../chunk-4TSDNZQ3.js';
|
|
4
|
-
import { useMemoFactoryClient, buildQueryKey, useMemoManagerClient } from '../../chunk-
|
|
5
|
-
export { ClaimLockedError, NoPendingTransferError, NotPendingRecipientError, NotVestingRecipientError, TransferAlreadyPendingError, TransferExpiredError, VestingExpiredError, VestingNotFoundError, VestingNotRevocableError, VestingRevokedError } from '../../chunk-
|
|
4
|
+
import { useMemoFactoryClient, buildQueryKey, useMemoManagerClient } from '../../chunk-BSXEX2SH.js';
|
|
5
|
+
export { ClaimLockedError, NoPendingTransferError, NotPendingRecipientError, NotVestingRecipientError, TransferAlreadyPendingError, TransferExpiredError, VestingExpiredError, VestingNotFoundError, VestingNotRevocableError, VestingRevokedError } from '../../chunk-K3R27WX4.js';
|
|
6
6
|
import '../../chunk-WMACINXO.js';
|
|
7
7
|
export { encryptUint64, encryptUint64Batch, resolveEncryptor, scaleRatio } from '../../chunk-6GNR22OV.js';
|
|
8
8
|
import '../../chunk-ZWXJTBZO.js';
|
|
9
9
|
import '../../chunk-7VELUOMI.js';
|
|
10
|
-
export { DisclosureType, FeeType } from '../../chunk-
|
|
11
|
-
import '../../chunk-
|
|
10
|
+
export { DisclosureType, FeeType } from '../../chunk-TWU7L5H7.js';
|
|
11
|
+
import '../../chunk-7KY4K4PH.js';
|
|
12
12
|
import '../../chunk-4RAAATVY.js';
|
|
13
|
-
import '../../chunk-
|
|
13
|
+
import '../../chunk-GHGF65LN.js';
|
|
14
14
|
import '../../chunk-ZA673I3O.js';
|
|
15
15
|
import '../../chunk-KWFFIJYX.js';
|
|
16
16
|
import { MissingClientError } from '../../chunk-QBJ7O2B4.js';
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ReceiptMode } from "../../core/pending.js";
|
|
3
|
+
import type { CreateManagerArgs, CreateManagerResult, PendingCreateManagerResult } from "../factory.js";
|
|
3
4
|
import { type BaseHookOptions } from "./_shared.js";
|
|
4
5
|
/**
|
|
5
6
|
* Deploy a new `ConfidentialVestingManager` clone via the factory.
|
|
6
7
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* only knowable after the tx
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* {@link useCreateManagerAndGetAddress}** — same submission, but it parses the
|
|
13
|
-
* `ManagerCreated` event from the receipt and returns the address in one call.
|
|
8
|
+
* Resolves to `{ hash, manager }`, with `manager` parsed from the receipt's
|
|
9
|
+
* `ManagerCreated` event (the factory packs the deployment block number into
|
|
10
|
+
* the clone's immutable args, so the address is only knowable after the tx
|
|
11
|
+
* mines). Identical to {@link useCreateManagerAndGetAddress}, which is kept as
|
|
12
|
+
* the descriptive name.
|
|
14
13
|
*
|
|
15
14
|
* After a successful create, you should invalidate any factory-level queries
|
|
16
15
|
* that depend on per-creator state (e.g. `useFactoryCustomFee({ creator })`):
|
|
@@ -25,8 +24,16 @@ import { type BaseHookOptions } from "./_shared.js";
|
|
|
25
24
|
* });
|
|
26
25
|
* ```
|
|
27
26
|
*
|
|
27
|
+
* For Safe / multisig signers, pass `waitForReceipt: false` in the mutate args
|
|
28
|
+
* (see {@link ReceiptMode}). The mutation then resolves to a
|
|
29
|
+
* {@link PendingCreateManagerResult}; narrow with `if (data.pending)` before reading `manager`.
|
|
30
|
+
*
|
|
28
31
|
* @example
|
|
29
32
|
* const create = useCreateManager();
|
|
30
33
|
* create.mutate({ token, userSalt });
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* // Safe / multisig: skip the receipt wait, resolve the address yourself.
|
|
37
|
+
* create.mutate({ token, userSalt, waitForReceipt: false });
|
|
31
38
|
*/
|
|
32
|
-
export declare function useCreateManager(options?: BaseHookOptions): UseMutationResult<CreateManagerResult, Error, CreateManagerArgs>;
|
|
39
|
+
export declare function useCreateManager(options?: BaseHookOptions): UseMutationResult<CreateManagerResult | PendingCreateManagerResult, Error, CreateManagerArgs & ReceiptMode>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ReceiptMode } from "../../core/pending.js";
|
|
3
|
+
import type { CreateManagerArgs, CreateManagerResult, PendingCreateManagerResult } from "../factory.js";
|
|
3
4
|
import { type BaseHookOptions } from "./_shared.js";
|
|
4
5
|
/**
|
|
5
6
|
* **Recommended factory entry point.** Deploy a new
|
|
@@ -16,16 +17,19 @@ import { type BaseHookOptions } from "./_shared.js";
|
|
|
16
17
|
* const queryClient = useQueryClient();
|
|
17
18
|
* const create = useCreateManagerAndGetAddress();
|
|
18
19
|
* create.mutate(args, {
|
|
19
|
-
* onSuccess: (
|
|
20
|
+
* onSuccess: (result) => {
|
|
20
21
|
* queryClient.invalidateQueries({ queryKey: ["tokenops-sdk", "fhe-vesting"] });
|
|
21
|
-
* navigate(`/manager/${manager}`);
|
|
22
|
+
* if (!result.pending) navigate(`/manager/${result.manager}`);
|
|
22
23
|
* },
|
|
23
24
|
* });
|
|
24
25
|
* ```
|
|
25
26
|
*
|
|
27
|
+
* For Safe / multisig signers, pass `waitForReceipt: false`; see
|
|
28
|
+
* {@link ReceiptMode}.
|
|
29
|
+
*
|
|
26
30
|
* @example
|
|
27
31
|
* const create = useCreateManagerAndGetAddress();
|
|
28
32
|
* create.mutate({ token, userSalt });
|
|
29
|
-
* // create.data → { hash, manager }
|
|
33
|
+
* // create.data → { hash, manager } (or a pending result with waitForReceipt: false)
|
|
30
34
|
*/
|
|
31
|
-
export declare function useCreateManagerAndGetAddress(options?: BaseHookOptions): UseMutationResult<CreateManagerResult, Error, CreateManagerArgs>;
|
|
35
|
+
export declare function useCreateManagerAndGetAddress(options?: BaseHookOptions): UseMutationResult<CreateManagerResult | PendingCreateManagerResult, Error, CreateManagerArgs & ReceiptMode>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ReceiptMode } from "../../core/pending.js";
|
|
3
|
+
import type { PendingSplitVestingResult, SplitVestingArgs, SplitVestingResult } from "../manager.js";
|
|
3
4
|
import { type ManagerHookOptions } from "./_shared.js";
|
|
4
5
|
/**
|
|
5
6
|
* Split a vesting into two positions by encrypted `numerator/denominator` share.
|
|
@@ -17,12 +18,17 @@ import { type ManagerHookOptions } from "./_shared.js";
|
|
|
17
18
|
* from the receipt's `VestingSplit` event. Required for any follow-up call
|
|
18
19
|
* (claim, transfer, disclose) on the new position.
|
|
19
20
|
*
|
|
21
|
+
* For Safe / multisig signers, pass `waitForReceipt: false` (see
|
|
22
|
+
* {@link ReceiptMode}). The mutation then resolves to a
|
|
23
|
+
* {@link PendingSplitVestingResult}; narrow with `if (result.pending)` before reading the id.
|
|
24
|
+
*
|
|
20
25
|
* @example
|
|
21
26
|
* const split = useSplitVesting({ address: managerAddress, encryptor: () => useZamaSDK() });
|
|
22
|
-
* const
|
|
27
|
+
* const result = await split.mutateAsync({
|
|
23
28
|
* vestingId,
|
|
24
29
|
* numerator: 1n, denominator: 2n, // 50% split, SDK scales automatically
|
|
25
30
|
* newRecipient: "0xNewRecipient",
|
|
26
31
|
* });
|
|
32
|
+
* if (!result.pending) openVesting(result.newVestingId);
|
|
27
33
|
*/
|
|
28
|
-
export declare function useSplitVesting(options: ManagerHookOptions): UseMutationResult<SplitVestingResult, Error, SplitVestingArgs>;
|
|
34
|
+
export declare function useSplitVesting(options: ManagerHookOptions): UseMutationResult<SplitVestingResult | PendingSplitVestingResult, Error, SplitVestingArgs & ReceiptMode>;
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkYAL6JSAZ_cjs = require('./chunk-YAL6JSAZ.cjs');
|
|
4
4
|
var chunk66IHPTOK_cjs = require('./chunk-66IHPTOK.cjs');
|
|
5
5
|
var chunk67OV5CX2_cjs = require('./chunk-67OV5CX2.cjs');
|
|
6
6
|
var chains = require('viem/chains');
|
|
@@ -15,71 +15,71 @@ function isSupportedChainId(chainId) {
|
|
|
15
15
|
|
|
16
16
|
Object.defineProperty(exports, "DEPLOYED_ADDRESSES", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkYAL6JSAZ_cjs.DEPLOYED_ADDRESSES; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "chainsWithDeployment", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkYAL6JSAZ_cjs.chainsWithDeployment; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "chainsWithKnownRegistryEntry", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkYAL6JSAZ_cjs.chainsWithKnownRegistryEntry; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "getConfidentialTestTokenAddress", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkYAL6JSAZ_cjs.getConfidentialTestTokenAddress; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "getDeployedAddress", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkYAL6JSAZ_cjs.getDeployedAddress; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "getFheAirdropComplianceImplementationAddress", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkYAL6JSAZ_cjs.getFheAirdropComplianceImplementationAddress; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "getFheAirdropEcdsaImplementationAddress", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkYAL6JSAZ_cjs.getFheAirdropEcdsaImplementationAddress; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "getFheAirdropFactoryAddress", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkYAL6JSAZ_cjs.getFheAirdropFactoryAddress; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "getFheAirdropMerkleImplementationAddress", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkYAL6JSAZ_cjs.getFheAirdropMerkleImplementationAddress; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "getFheDisperseSingletonAddress", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkYAL6JSAZ_cjs.getFheDisperseSingletonAddress; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "getFheVestingFactoryAddress", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkYAL6JSAZ_cjs.getFheVestingFactoryAddress; }
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "getTestTokenAddress", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunkYAL6JSAZ_cjs.getTestTokenAddress; }
|
|
63
63
|
});
|
|
64
64
|
Object.defineProperty(exports, "requireConfidentialTestTokenAddress", {
|
|
65
65
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunkYAL6JSAZ_cjs.requireConfidentialTestTokenAddress; }
|
|
67
67
|
});
|
|
68
68
|
Object.defineProperty(exports, "requireFheAirdropFactoryAddress", {
|
|
69
69
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunkYAL6JSAZ_cjs.requireFheAirdropFactoryAddress; }
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, "requireFheDisperseSingletonAddress", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunkYAL6JSAZ_cjs.requireFheDisperseSingletonAddress; }
|
|
75
75
|
});
|
|
76
76
|
Object.defineProperty(exports, "requireFheVestingFactoryAddress", {
|
|
77
77
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunkYAL6JSAZ_cjs.requireFheVestingFactoryAddress; }
|
|
79
79
|
});
|
|
80
80
|
Object.defineProperty(exports, "requireTestTokenAddress", {
|
|
81
81
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunkYAL6JSAZ_cjs.requireTestTokenAddress; }
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "asAirdropId", {
|
|
85
85
|
enumerable: true,
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { DEPLOYED_ADDRESSES, chainsWithDeployment, chainsWithKnownRegistryEntry, getConfidentialTestTokenAddress, getDeployedAddress, getFheAirdropComplianceImplementationAddress, getFheAirdropEcdsaImplementationAddress, getFheAirdropFactoryAddress, getFheAirdropMerkleImplementationAddress, getFheDisperseSingletonAddress, getFheVestingFactoryAddress, getTestTokenAddress, requireConfidentialTestTokenAddress, requireFheAirdropFactoryAddress, requireFheDisperseSingletonAddress, requireFheVestingFactoryAddress, requireTestTokenAddress } from './chunk-
|
|
1
|
+
export { DEPLOYED_ADDRESSES, chainsWithDeployment, chainsWithKnownRegistryEntry, getConfidentialTestTokenAddress, getDeployedAddress, getFheAirdropComplianceImplementationAddress, getFheAirdropEcdsaImplementationAddress, getFheAirdropFactoryAddress, getFheAirdropMerkleImplementationAddress, getFheDisperseSingletonAddress, getFheVestingFactoryAddress, getTestTokenAddress, requireConfidentialTestTokenAddress, requireFheAirdropFactoryAddress, requireFheDisperseSingletonAddress, requireFheVestingFactoryAddress, requireTestTokenAddress } from './chunk-GHGF65LN.js';
|
|
2
2
|
export { asAirdropId, asDisperseId, asEncryptedHandle, asExternalInputProof, asRole, asSignature, asTxHash, asVestingId } from './chunk-KWFFIJYX.js';
|
|
3
3
|
export { AccessDeniedError, AlreadyInitializedError, BatchTooLargeError, ContractRevertError, DecryptionFailedError, DeploymentAddressUnavailableError, EncryptionFailedError, FeatureDisabledError, FheHandleNotAllowedError, InsufficientBalanceError, InsufficientFeeError, InsufficientGasFundsError, InvalidArgumentError, InvalidSignatureError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, NetworkError, OPERATOR_NOT_APPROVED_REMEDIATION, OperatorNotApprovedError, PausedError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, ReentrancyError, RelayerUnreachableError, SigningFailedError, TokenOpsContractError, TokenOpsSdkError, TokenOpsValidationError, TransferFailedError, UnknownWriteFailureError, UnsupportedChainError, UserDecryptNotAllowedError, UserRejectedSignatureError, WalletChainMismatchError, WalletRejectedError, isTokenOpsSdkError } from './chunk-QBJ7O2B4.js';
|
|
4
4
|
import { sepolia, mainnet } from 'viem/chains';
|
|
@@ -58,6 +58,9 @@ export interface TestnetFaucetClientConfig {
|
|
|
58
58
|
* pre-deployed CTTT proxy (and discovers the TTT backing token from it), exactly
|
|
59
59
|
* like the other deployed-only SDK products.
|
|
60
60
|
*
|
|
61
|
+
* Testnet EOA flow: there is no `waitForReceipt: false`; mints wait for their
|
|
62
|
+
* receipt.
|
|
63
|
+
*
|
|
61
64
|
* @example
|
|
62
65
|
* // On Sepolia the addresses auto-resolve from DEPLOYED_ADDRESSES.
|
|
63
66
|
* const faucet = new TestnetFaucetClient({ publicClient, walletClient });
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunk6FUHF73F_cjs = require('../chunk-6FUHF73F.cjs');
|
|
4
|
+
require('../chunk-SUYBAF27.cjs');
|
|
5
5
|
require('../chunk-MVDQMV25.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkYAL6JSAZ_cjs = require('../chunk-YAL6JSAZ.cjs');
|
|
7
7
|
require('../chunk-JK4XMMKM.cjs');
|
|
8
8
|
require('../chunk-66IHPTOK.cjs');
|
|
9
9
|
var chunk67OV5CX2_cjs = require('../chunk-67OV5CX2.cjs');
|
|
@@ -13,51 +13,51 @@ require('../chunk-VJKZWYYJ.cjs');
|
|
|
13
13
|
|
|
14
14
|
Object.defineProperty(exports, "FaucetSupplyExhaustedError", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunk6FUHF73F_cjs.FaucetSupplyExhaustedError; }
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "TESTNET_FAUCET_SUPPORTED_CHAIN_IDS", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunk6FUHF73F_cjs.TESTNET_FAUCET_SUPPORTED_CHAIN_IDS; }
|
|
21
21
|
});
|
|
22
22
|
Object.defineProperty(exports, "TestnetFaucetClient", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunk6FUHF73F_cjs.TestnetFaucetClient; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "assertTestnetFaucetChain", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunk6FUHF73F_cjs.assertTestnetFaucetChain; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "confidentialTokenopsTestTokenAbi", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunk6FUHF73F_cjs.confidentialTokenopsTestTokenAbi; }
|
|
33
33
|
});
|
|
34
34
|
Object.defineProperty(exports, "createTestnetFaucetClient", {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunk6FUHF73F_cjs.createTestnetFaucetClient; }
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "isTestnetFaucetChainId", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunk6FUHF73F_cjs.isTestnetFaucetChainId; }
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "tokenopsTestTokenAbi", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunk6FUHF73F_cjs.tokenopsTestTokenAbi; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "getConfidentialTestTokenAddress", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkYAL6JSAZ_cjs.getConfidentialTestTokenAddress; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "getTestTokenAddress", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkYAL6JSAZ_cjs.getTestTokenAddress; }
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "requireConfidentialTestTokenAddress", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkYAL6JSAZ_cjs.requireConfidentialTestTokenAddress; }
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperty(exports, "requireTestTokenAddress", {
|
|
59
59
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkYAL6JSAZ_cjs.requireTestTokenAddress; }
|
|
61
61
|
});
|
|
62
62
|
Object.defineProperty(exports, "AccessDeniedError", {
|
|
63
63
|
enumerable: true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { FaucetSupplyExhaustedError, TESTNET_FAUCET_SUPPORTED_CHAIN_IDS, TestnetFaucetClient, assertTestnetFaucetChain, confidentialTokenopsTestTokenAbi, createTestnetFaucetClient, isTestnetFaucetChainId, tokenopsTestTokenAbi } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { FaucetSupplyExhaustedError, TESTNET_FAUCET_SUPPORTED_CHAIN_IDS, TestnetFaucetClient, assertTestnetFaucetChain, confidentialTokenopsTestTokenAbi, createTestnetFaucetClient, isTestnetFaucetChainId, tokenopsTestTokenAbi } from '../chunk-AX6MQAWU.js';
|
|
2
|
+
import '../chunk-7KY4K4PH.js';
|
|
3
3
|
import '../chunk-4RAAATVY.js';
|
|
4
|
-
export { getConfidentialTestTokenAddress, getTestTokenAddress, requireConfidentialTestTokenAddress, requireTestTokenAddress } from '../chunk-
|
|
4
|
+
export { getConfidentialTestTokenAddress, getTestTokenAddress, requireConfidentialTestTokenAddress, requireTestTokenAddress } from '../chunk-GHGF65LN.js';
|
|
5
5
|
import '../chunk-ZA673I3O.js';
|
|
6
6
|
import '../chunk-KWFFIJYX.js';
|
|
7
7
|
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,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk6FUHF73F_cjs = require('../../chunk-6FUHF73F.cjs');
|
|
4
4
|
var chunkZQUE2B3Q_cjs = require('../../chunk-ZQUE2B3Q.cjs');
|
|
5
|
-
require('../../chunk-
|
|
5
|
+
require('../../chunk-SUYBAF27.cjs');
|
|
6
6
|
require('../../chunk-MVDQMV25.cjs');
|
|
7
|
-
var
|
|
7
|
+
var chunkYAL6JSAZ_cjs = require('../../chunk-YAL6JSAZ.cjs');
|
|
8
8
|
require('../../chunk-JK4XMMKM.cjs');
|
|
9
9
|
require('../../chunk-66IHPTOK.cjs');
|
|
10
10
|
var chunk67OV5CX2_cjs = require('../../chunk-67OV5CX2.cjs');
|
|
@@ -16,10 +16,10 @@ var wagmi = require('wagmi');
|
|
|
16
16
|
var TESTNET_FAUCET_KEY = "tokenops-sdk";
|
|
17
17
|
var TESTNET_FAUCET_NAMESPACE = "testnet-faucet";
|
|
18
18
|
function tryResolveSingletonAddress(override, chainId) {
|
|
19
|
-
if (chainId !== void 0 && !
|
|
19
|
+
if (chainId !== void 0 && !chunk6FUHF73F_cjs.isTestnetFaucetChainId(chainId)) return void 0;
|
|
20
20
|
if (override) return override;
|
|
21
21
|
if (chainId === void 0) return void 0;
|
|
22
|
-
return
|
|
22
|
+
return chunkYAL6JSAZ_cjs.getConfidentialTestTokenAddress(chainId);
|
|
23
23
|
}
|
|
24
24
|
function useMemoFaucetClient(opts = {}) {
|
|
25
25
|
const publicClient = wagmi.usePublicClient({ chainId: opts.chainId });
|
|
@@ -30,7 +30,7 @@ function useMemoFaucetClient(opts = {}) {
|
|
|
30
30
|
const client = react.useMemo(() => {
|
|
31
31
|
if (!publicClient) return void 0;
|
|
32
32
|
if (!resolvedAddress) return void 0;
|
|
33
|
-
return
|
|
33
|
+
return chunk6FUHF73F_cjs.createTestnetFaucetClient({
|
|
34
34
|
publicClient,
|
|
35
35
|
...walletClient ? { walletClient } : {},
|
|
36
36
|
...opts.address ? { address: resolvedAddress } : {},
|
|
@@ -47,7 +47,7 @@ function useMemoFaucetClient(opts = {}) {
|
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
function computeSingletonResolutionError(override, chainId) {
|
|
50
|
-
if (chainId !== void 0 && !
|
|
50
|
+
if (chainId !== void 0 && !chunk6FUHF73F_cjs.isTestnetFaucetChainId(chainId)) {
|
|
51
51
|
return new chunk67OV5CX2_cjs.UnsupportedChainError(chainId);
|
|
52
52
|
}
|
|
53
53
|
if (override) return void 0;
|
|
@@ -59,7 +59,7 @@ function computeSingletonResolutionError(override, chainId) {
|
|
|
59
59
|
clientLabel: "TestnetFaucetClient"
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
-
const resolved =
|
|
62
|
+
const resolved = chunkYAL6JSAZ_cjs.getConfidentialTestTokenAddress(chainId);
|
|
63
63
|
if (!resolved) {
|
|
64
64
|
return new chunk67OV5CX2_cjs.DeploymentAddressUnavailableError({
|
|
65
65
|
reason: "registry-not-deployed",
|
|
@@ -220,7 +220,7 @@ function useMintUnderlying(options = {}) {
|
|
|
220
220
|
|
|
221
221
|
Object.defineProperty(exports, "FaucetSupplyExhaustedError", {
|
|
222
222
|
enumerable: true,
|
|
223
|
-
get: function () { return
|
|
223
|
+
get: function () { return chunk6FUHF73F_cjs.FaucetSupplyExhaustedError; }
|
|
224
224
|
});
|
|
225
225
|
Object.defineProperty(exports, "AccessDeniedError", {
|
|
226
226
|
enumerable: true,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { createTestnetFaucetClient, isTestnetFaucetChainId } from '../../chunk-
|
|
2
|
-
export { FaucetSupplyExhaustedError } from '../../chunk-
|
|
1
|
+
import { createTestnetFaucetClient, isTestnetFaucetChainId } from '../../chunk-AX6MQAWU.js';
|
|
2
|
+
export { FaucetSupplyExhaustedError } from '../../chunk-AX6MQAWU.js';
|
|
3
3
|
import { useWagmiAccount } from '../../chunk-FT4LNBOS.js';
|
|
4
|
-
import '../../chunk-
|
|
4
|
+
import '../../chunk-7KY4K4PH.js';
|
|
5
5
|
import '../../chunk-4RAAATVY.js';
|
|
6
|
-
import { getConfidentialTestTokenAddress } from '../../chunk-
|
|
6
|
+
import { getConfidentialTestTokenAddress } from '../../chunk-GHGF65LN.js';
|
|
7
7
|
import '../../chunk-ZA673I3O.js';
|
|
8
8
|
import '../../chunk-KWFFIJYX.js';
|
|
9
9
|
import { MissingClientError, UnsupportedChainError, DeploymentAddressUnavailableError } from '../../chunk-QBJ7O2B4.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokenops/sdk",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.4",
|
|
4
4
|
"description": "Typed viem-first SDK for TokenOps FHEVM contracts (confidential vesting, confidential airdrops, confidential disperse, plus a testnet faucet for the ERC-7984 test-token pair TTT + CTTT) — consumed by tokenops-app (Next.js) and tokenops-api (Express).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|