@tokenops/sdk 1.5.1 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +158 -2
- package/SECURITY.md +7 -1
- package/dist/{chunk-67OV5CX2.cjs → chunk-2RNW4MIJ.cjs} +18 -0
- package/dist/{chunk-KLKI352M.cjs → chunk-43RFBQ73.cjs} +29 -29
- package/dist/{chunk-ZA673I3O.js → chunk-46T67CE2.js} +1 -1
- package/dist/{chunk-6BMP4ICG.js → chunk-4KJ66YRH.js} +61 -3
- package/dist/{chunk-JYOTGRSO.cjs → chunk-4ZCXK4VI.cjs} +68 -8
- package/dist/{chunk-SG65XWH7.js → chunk-6WSNS3UV.js} +1 -1
- package/dist/{chunk-V2PXZVBF.cjs → chunk-7G7UOQV4.cjs} +4 -4
- package/dist/{chunk-WENHUPZC.cjs → chunk-AYGRYDBX.cjs} +35 -36
- package/dist/{chunk-2NCLOQ56.cjs → chunk-BD4LZBVF.cjs} +85 -9
- package/dist/{chunk-5X5WL5CU.cjs → chunk-BK7YIVLK.cjs} +110 -149
- package/dist/{chunk-W7IGCOVL.cjs → chunk-CBRL2PJA.cjs} +12 -11
- package/dist/{chunk-ORFTDNFZ.js → chunk-CNP4L3GF.js} +4 -4
- package/dist/{chunk-QBJ7O2B4.js → chunk-DRSPMIZ7.js} +11 -1
- package/dist/{chunk-C7BRZXJA.cjs → chunk-EUKPOXWR.cjs} +15 -16
- package/dist/{chunk-YQIBBEFJ.js → chunk-HETNKZEE.js} +1 -1
- package/dist/{chunk-ODLTEGHB.js → chunk-KSDSXJ34.js} +1 -1
- package/dist/{chunk-TIUKIY5V.cjs → chunk-LBWRFZR3.cjs} +58 -40
- package/dist/{chunk-WMACINXO.js → chunk-NFW7AUEX.js} +1 -1
- package/dist/{chunk-4WPGQSNT.cjs → chunk-OL6SHN3D.cjs} +3 -3
- package/dist/{chunk-AOP6HMPW.js → chunk-PD7ME2BT.js} +75 -2
- package/dist/{chunk-2PWNH3UE.js → chunk-QET3Q4JP.js} +65 -9
- package/dist/{chunk-XGGTQQFH.js → chunk-QKKBBH7I.js} +2 -2
- package/dist/{chunk-6R4KNAPK.js → chunk-S2XD75JM.js} +10 -3
- package/dist/{chunk-MCRBVJGZ.cjs → chunk-SPGSO5SO.cjs} +29 -22
- package/dist/{chunk-FAXIIH5R.cjs → chunk-SYHNZSZZ.cjs} +3 -3
- package/dist/{chunk-IXLO7GO5.js → chunk-TN65XNTI.js} +47 -83
- package/dist/chunk-U57COLUE.js +56 -0
- package/dist/{chunk-DUZIIRPF.js → chunk-UE5XK2SY.js} +27 -9
- package/dist/{chunk-TEBM66WA.cjs → chunk-UJS4N2XM.cjs} +12 -12
- package/dist/{chunk-OXTLPTO3.js → chunk-V5D7BHW3.js} +4 -5
- package/dist/{chunk-NTZY6IB7.js → chunk-VHSNYUYV.js} +5 -4
- package/dist/{chunk-JK4XMMKM.cjs → chunk-VR3FREBX.cjs} +3 -3
- package/dist/{chunk-T46YXSBP.cjs → chunk-WO72UBQD.cjs} +11 -11
- package/dist/chunk-WOEETTH7.cjs +59 -0
- package/dist/{chunk-IJFQ5L4I.js → chunk-WTK6JDSI.js} +4 -5
- package/dist/{chunk-PUPKNW3R.cjs → chunk-WUXUWTFW.cjs} +3 -3
- package/dist/{chunk-PFXURMBZ.cjs → chunk-YFIWCYHC.cjs} +112 -54
- package/dist/{chunk-ZWXJTBZO.js → chunk-YPYCWLYP.js} +1 -1
- package/dist/core/addresses.d.ts +1 -1
- package/dist/core/errors.d.ts +1 -1
- package/dist/fhe/index.cjs +84 -64
- package/dist/fhe/index.d.cts +1 -0
- package/dist/fhe/index.d.ts +1 -0
- package/dist/fhe/index.js +21 -9
- package/dist/fhe/mock-erc7984.d.ts +4 -4
- package/dist/fhe/operators.d.ts +142 -2
- package/dist/fhe/react/index.cjs +21 -8
- package/dist/fhe/react/index.d.cts +2 -0
- package/dist/fhe/react/index.d.ts +2 -0
- package/dist/fhe/react/index.js +8 -3
- package/dist/fhe/react/useEnsureOperator.d.ts +56 -0
- package/dist/fhe/react/useIsOperator.d.ts +54 -0
- package/dist/fhe/sepolia-encryptor-web.d.ts +18 -3
- package/dist/fhe-airdrop/advanced/index.cjs +8 -9
- package/dist/fhe-airdrop/advanced/index.js +6 -7
- package/dist/fhe-airdrop/advanced/react/index.cjs +13 -14
- package/dist/fhe-airdrop/advanced/react/index.js +9 -10
- package/dist/fhe-airdrop/airdrop.d.ts +7 -0
- package/dist/fhe-airdrop/index.cjs +66 -67
- package/dist/fhe-airdrop/index.js +7 -8
- package/dist/fhe-airdrop/react/index.cjs +148 -137
- package/dist/fhe-airdrop/react/index.d.cts +3 -1
- package/dist/fhe-airdrop/react/index.d.ts +3 -1
- package/dist/fhe-airdrop/react/index.js +16 -14
- package/dist/fhe-airdrop/react/useAccessClaimAmount.d.ts +17 -11
- package/dist/fhe-airdrop/react/useClaim.d.ts +8 -0
- package/dist/fhe-airdrop/react/useSignClaimAuthorization.d.ts +1 -1
- package/dist/fhe-airdrop/types.d.ts +14 -3
- package/dist/fhe-disperse/errors.d.ts +55 -0
- package/dist/fhe-disperse/index.cjs +74 -67
- package/dist/fhe-disperse/index.d.cts +1 -1
- package/dist/fhe-disperse/index.d.ts +1 -1
- package/dist/fhe-disperse/index.js +8 -9
- package/dist/fhe-disperse/react/index.cjs +105 -88
- package/dist/fhe-disperse/react/index.d.cts +3 -1
- package/dist/fhe-disperse/react/index.d.ts +3 -1
- package/dist/fhe-disperse/react/index.js +12 -11
- package/dist/fhe-vesting/advanced/index.cjs +8 -9
- package/dist/fhe-vesting/advanced/index.js +6 -7
- package/dist/fhe-vesting/advanced/react/index.cjs +14 -15
- package/dist/fhe-vesting/advanced/react/index.js +11 -12
- package/dist/fhe-vesting/index.cjs +75 -76
- package/dist/fhe-vesting/index.js +9 -10
- package/dist/fhe-vesting/manager.d.ts +19 -0
- package/dist/fhe-vesting/react/index.cjs +245 -227
- package/dist/fhe-vesting/react/index.d.cts +6 -4
- package/dist/fhe-vesting/react/index.d.ts +6 -4
- package/dist/fhe-vesting/react/index.js +27 -21
- package/dist/fhe-vesting/react/useAccessClaimableAmount.d.ts +11 -3
- package/dist/fhe-vesting/react/useAccessSettledAmount.d.ts +11 -3
- package/dist/fhe-vesting/react/useAccessTotalAllocation.d.ts +11 -3
- package/dist/fhe-vesting/react/useAccessVestedAmount.d.ts +11 -3
- package/dist/fhe-vesting/react/useAdminGetClaimableAmount.d.ts +1 -1
- package/dist/fhe-vesting/react/useAdminGetSettledAmount.d.ts +1 -1
- package/dist/fhe-vesting/react/useAdminGetTotalAllocation.d.ts +1 -1
- package/dist/fhe-vesting/react/useAdminGetVestedAmount.d.ts +1 -1
- package/dist/fhe-vesting/react/useAdminPartialClaim.d.ts +8 -0
- package/dist/fhe-vesting/react/useClaim.d.ts +1 -1
- package/dist/fhe-vesting/react/useDiscloseHandleToParty.d.ts +1 -1
- package/dist/fhe-vesting/react/useManagerDiscloseHandleToParty.d.ts +1 -1
- package/dist/fhe-vesting/react/usePartialClaim.d.ts +1 -1
- package/dist/fhe-vesting/react/useVestingInfo.d.ts +1 -1
- package/dist/fhe-vesting/types.d.ts +12 -1
- package/dist/index.cjs +87 -88
- package/dist/index.js +2 -3
- package/dist/testnet-faucet/index.cjs +55 -56
- package/dist/testnet-faucet/index.js +5 -6
- package/dist/testnet-faucet/react/index.cjs +53 -54
- package/dist/testnet-faucet/react/index.js +7 -8
- package/package.json +13 -8
- package/dist/chunk-66IHPTOK.cjs +0 -20
- package/dist/chunk-KWFFIJYX.js +0 -11
- package/dist/fhe-airdrop/react/useAirdropClaim.d.ts +0 -27
- package/dist/fhe-airdrop/react/useGetClaimAmount.d.ts +0 -30
- package/dist/fhe-vesting/react/useGetClaimableAmount.d.ts +0 -13
- package/dist/fhe-vesting/react/useGetSettledAmount.d.ts +0 -14
- package/dist/fhe-vesting/react/useGetTotalAllocation.d.ts +0 -13
- package/dist/fhe-vesting/react/useGetVestedAmount.d.ts +0 -25
|
@@ -72,10 +72,10 @@ export { useRecipientVestingsSliced, type UseRecipientVestingsSlicedArgs, } from
|
|
|
72
72
|
export { usePendingVestingTransfer, type UsePendingVestingTransferArgs, } from "./usePendingVestingTransfer.js";
|
|
73
73
|
export { useHasRole, type UseHasRoleArgs } from "./useHasRole.js";
|
|
74
74
|
export { useRoleConstants, type RoleConstants } from "./useRoleConstants.js";
|
|
75
|
-
export { useGetVestedAmount, type UseGetVestedAmountArgs } from "./
|
|
76
|
-
export { useGetClaimableAmount, type UseGetClaimableAmountArgs } from "./
|
|
77
|
-
export { useGetTotalAllocation, type UseGetTotalAllocationArgs } from "./
|
|
78
|
-
export { useGetSettledAmount, type UseGetSettledAmountArgs } from "./
|
|
75
|
+
export { useAccessVestedAmount, useGetVestedAmount, type UseAccessVestedAmountArgs, type UseGetVestedAmountArgs, } from "./useAccessVestedAmount.js";
|
|
76
|
+
export { useAccessClaimableAmount, useGetClaimableAmount, type UseAccessClaimableAmountArgs, type UseGetClaimableAmountArgs, } from "./useAccessClaimableAmount.js";
|
|
77
|
+
export { useAccessTotalAllocation, useGetTotalAllocation, type UseAccessTotalAllocationArgs, type UseGetTotalAllocationArgs, } from "./useAccessTotalAllocation.js";
|
|
78
|
+
export { useAccessSettledAmount, useGetSettledAmount, type UseAccessSettledAmountArgs, type UseGetSettledAmountArgs, } from "./useAccessSettledAmount.js";
|
|
79
79
|
export { useAdminGetVestedAmount, type UseAdminGetVestedAmountArgs, } from "./useAdminGetVestedAmount.js";
|
|
80
80
|
export { useAdminGetClaimableAmount, type UseAdminGetClaimableAmountArgs, } from "./useAdminGetClaimableAmount.js";
|
|
81
81
|
export { useAdminGetTotalAllocation, type UseAdminGetTotalAllocationArgs, } from "./useAdminGetTotalAllocation.js";
|
|
@@ -122,3 +122,5 @@ export { scaleRatio, type ScaleRatioArgs, type ScaledRatio } from "../../fhe/sca
|
|
|
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
124
|
export { VestingNotFoundError, NotVestingRecipientError, ClaimLockedError, VestingRevokedError, VestingNotRevocableError, VestingExpiredError, TransferAlreadyPendingError, NoPendingTransferError, NotPendingRecipientError, TransferExpiredError, } from "../errors.js";
|
|
125
|
+
export { useIsOperator, type UseIsOperatorOptions } from "../../fhe/react/useIsOperator.js";
|
|
126
|
+
export { useEnsureOperator, type UseEnsureOperatorOptions, type EnsureOperatorVariables, } from "../../fhe/react/useEnsureOperator.js";
|
|
@@ -72,10 +72,10 @@ export { useRecipientVestingsSliced, type UseRecipientVestingsSlicedArgs, } from
|
|
|
72
72
|
export { usePendingVestingTransfer, type UsePendingVestingTransferArgs, } from "./usePendingVestingTransfer.js";
|
|
73
73
|
export { useHasRole, type UseHasRoleArgs } from "./useHasRole.js";
|
|
74
74
|
export { useRoleConstants, type RoleConstants } from "./useRoleConstants.js";
|
|
75
|
-
export { useGetVestedAmount, type UseGetVestedAmountArgs } from "./
|
|
76
|
-
export { useGetClaimableAmount, type UseGetClaimableAmountArgs } from "./
|
|
77
|
-
export { useGetTotalAllocation, type UseGetTotalAllocationArgs } from "./
|
|
78
|
-
export { useGetSettledAmount, type UseGetSettledAmountArgs } from "./
|
|
75
|
+
export { useAccessVestedAmount, useGetVestedAmount, type UseAccessVestedAmountArgs, type UseGetVestedAmountArgs, } from "./useAccessVestedAmount.js";
|
|
76
|
+
export { useAccessClaimableAmount, useGetClaimableAmount, type UseAccessClaimableAmountArgs, type UseGetClaimableAmountArgs, } from "./useAccessClaimableAmount.js";
|
|
77
|
+
export { useAccessTotalAllocation, useGetTotalAllocation, type UseAccessTotalAllocationArgs, type UseGetTotalAllocationArgs, } from "./useAccessTotalAllocation.js";
|
|
78
|
+
export { useAccessSettledAmount, useGetSettledAmount, type UseAccessSettledAmountArgs, type UseGetSettledAmountArgs, } from "./useAccessSettledAmount.js";
|
|
79
79
|
export { useAdminGetVestedAmount, type UseAdminGetVestedAmountArgs, } from "./useAdminGetVestedAmount.js";
|
|
80
80
|
export { useAdminGetClaimableAmount, type UseAdminGetClaimableAmountArgs, } from "./useAdminGetClaimableAmount.js";
|
|
81
81
|
export { useAdminGetTotalAllocation, type UseAdminGetTotalAllocationArgs, } from "./useAdminGetTotalAllocation.js";
|
|
@@ -122,3 +122,5 @@ export { scaleRatio, type ScaleRatioArgs, type ScaledRatio } from "../../fhe/sca
|
|
|
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
124
|
export { VestingNotFoundError, NotVestingRecipientError, ClaimLockedError, VestingRevokedError, VestingNotRevocableError, VestingExpiredError, TransferAlreadyPendingError, NoPendingTransferError, NotPendingRecipientError, TransferExpiredError, } from "../errors.js";
|
|
125
|
+
export { useIsOperator, type UseIsOperatorOptions } from "../../fhe/react/useIsOperator.js";
|
|
126
|
+
export { useEnsureOperator, type UseEnsureOperatorOptions, type EnsureOperatorVariables, } from "../../fhe/react/useEnsureOperator.js";
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import '../../chunk-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export { useEnsureOperator, useIsOperator } from '../../chunk-U57COLUE.js';
|
|
2
|
+
import '../../chunk-FT4LNBOS.js';
|
|
3
|
+
import '../../chunk-4KJ66YRH.js';
|
|
4
|
+
import { useMemoFactoryClient, buildQueryKey, useMemoManagerClient } from '../../chunk-VHSNYUYV.js';
|
|
5
|
+
export { ClaimLockedError, NoPendingTransferError, NotPendingRecipientError, NotVestingRecipientError, TransferAlreadyPendingError, TransferExpiredError, VestingExpiredError, VestingNotFoundError, VestingNotRevocableError, VestingRevokedError } from '../../chunk-TN65XNTI.js';
|
|
6
|
+
import '../../chunk-NFW7AUEX.js';
|
|
7
|
+
export { encryptUint64, encryptUint64Batch, resolveEncryptor, scaleRatio } from '../../chunk-PD7ME2BT.js';
|
|
8
|
+
import '../../chunk-YPYCWLYP.js';
|
|
6
9
|
import '../../chunk-7VELUOMI.js';
|
|
7
|
-
export { DisclosureType, FeeType } from '../../chunk-
|
|
8
|
-
import '../../chunk-
|
|
9
|
-
import '../../chunk-
|
|
10
|
-
import '../../chunk-
|
|
10
|
+
export { DisclosureType, FeeType } from '../../chunk-V5D7BHW3.js';
|
|
11
|
+
import '../../chunk-6WSNS3UV.js';
|
|
12
|
+
import '../../chunk-QKKBBH7I.js';
|
|
13
|
+
import '../../chunk-46T67CE2.js';
|
|
14
|
+
import { MissingClientError } from '../../chunk-DRSPMIZ7.js';
|
|
15
|
+
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, TokenOpsSdkError, TransferFailedError, UnknownWriteFailureError, UnsupportedChainError, UserDecryptNotAllowedError, UserRejectedSignatureError, WalletChainMismatchError, WalletRejectedError, isTokenOpsSdkError } from '../../chunk-DRSPMIZ7.js';
|
|
11
16
|
import '../../chunk-Q2GP5UDC.js';
|
|
12
|
-
import '../../chunk-KWFFIJYX.js';
|
|
13
|
-
import { MissingClientError } from '../../chunk-QBJ7O2B4.js';
|
|
14
|
-
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, TokenOpsSdkError, TransferFailedError, UnknownWriteFailureError, UnsupportedChainError, UserDecryptNotAllowedError, UserRejectedSignatureError, WalletChainMismatchError, WalletRejectedError, isTokenOpsSdkError } from '../../chunk-QBJ7O2B4.js';
|
|
15
17
|
import { useQuery, useMutation } from '@tanstack/react-query';
|
|
16
18
|
|
|
17
19
|
function useConfidentialVestingFactoryImplementation(options = {}) {
|
|
@@ -415,42 +417,46 @@ function useRoleConstants(options) {
|
|
|
415
417
|
staleTime: 0
|
|
416
418
|
});
|
|
417
419
|
}
|
|
418
|
-
function
|
|
420
|
+
function useAccessVestedAmount(options) {
|
|
419
421
|
const { client } = useMemoManagerClient(options);
|
|
420
422
|
return useMutation({
|
|
421
423
|
mutationFn: async (args) => {
|
|
422
|
-
if (!client) throw new MissingClientError("
|
|
424
|
+
if (!client) throw new MissingClientError("useAccessVestedAmount", "manager");
|
|
423
425
|
return client.getVestedAmount(args);
|
|
424
426
|
}
|
|
425
427
|
});
|
|
426
428
|
}
|
|
427
|
-
|
|
429
|
+
var useGetVestedAmount = useAccessVestedAmount;
|
|
430
|
+
function useAccessClaimableAmount(options) {
|
|
428
431
|
const { client } = useMemoManagerClient(options);
|
|
429
432
|
return useMutation({
|
|
430
433
|
mutationFn: async (args) => {
|
|
431
|
-
if (!client) throw new MissingClientError("
|
|
434
|
+
if (!client) throw new MissingClientError("useAccessClaimableAmount", "manager");
|
|
432
435
|
return client.getClaimableAmount(args);
|
|
433
436
|
}
|
|
434
437
|
});
|
|
435
438
|
}
|
|
436
|
-
|
|
439
|
+
var useGetClaimableAmount = useAccessClaimableAmount;
|
|
440
|
+
function useAccessTotalAllocation(options) {
|
|
437
441
|
const { client } = useMemoManagerClient(options);
|
|
438
442
|
return useMutation({
|
|
439
443
|
mutationFn: async (args) => {
|
|
440
|
-
if (!client) throw new MissingClientError("
|
|
444
|
+
if (!client) throw new MissingClientError("useAccessTotalAllocation", "manager");
|
|
441
445
|
return client.getTotalAllocation(args);
|
|
442
446
|
}
|
|
443
447
|
});
|
|
444
448
|
}
|
|
445
|
-
|
|
449
|
+
var useGetTotalAllocation = useAccessTotalAllocation;
|
|
450
|
+
function useAccessSettledAmount(options) {
|
|
446
451
|
const { client } = useMemoManagerClient(options);
|
|
447
452
|
return useMutation({
|
|
448
453
|
mutationFn: async (args) => {
|
|
449
|
-
if (!client) throw new MissingClientError("
|
|
454
|
+
if (!client) throw new MissingClientError("useAccessSettledAmount", "manager");
|
|
450
455
|
return client.getSettledAmount(args);
|
|
451
456
|
}
|
|
452
457
|
});
|
|
453
458
|
}
|
|
459
|
+
var useGetSettledAmount = useAccessSettledAmount;
|
|
454
460
|
function useAdminGetVestedAmount(options) {
|
|
455
461
|
const { client } = useMemoManagerClient(options);
|
|
456
462
|
return useMutation({
|
|
@@ -785,4 +791,4 @@ function useRenounceRole(options) {
|
|
|
785
791
|
});
|
|
786
792
|
}
|
|
787
793
|
|
|
788
|
-
export { useAcceptVestingTransfer, useAdminBatchDiscloseToParty, useAdminClaim, useAdminDiscloseToParty, useAdminGetClaimableAmount, useAdminGetSettledAmount, useAdminGetTokenBalance, useAdminGetTotalAllocation, useAdminGetVestedAmount, useAdminPartialClaim, useAllRecipients, useAllRecipientsLength, useAllRecipientsSliced, useBatchCreateVesting, useBatchDiscloseHandlesToParty, useBatchDiscloseToParty, useBatchRevokeVesting, useCancelVestingTransfer, useClaim, useConfidentialVestingFactoryImplementation, useCreateManager, useCreateManagerAndGetAddress, useCreateVesting, useDirectVestingTransfer, useDisableCustomFee, useDiscloseHandleToParty, useDiscloseToParty, useFactoryCustomFee, useFactoryDefaultFeeType, useFactoryDefaultGasFee, useFactoryDefaultTokenFee, useFactoryFeeCollector, useFactoryInitCodeHash, useGetClaimableAmount, useGetSettledAmount, useGetTotalAllocation, useGetVestedAmount, useGrantRole, useHasRole, useInitiateVestingTransfer, useIsRecipient, useManagerDeploymentBlockNumber, useManagerFee, useManagerFeeInfo, useManagerFeeType, useManagerIsPausable, useManagerIsSplitEnabled, useManagerMaxBatchSize, useManagerMaxRevokeBatchSize, useManagerPaused, useManagerToken, usePartialClaim, usePause, usePendingVestingTransfer, usePreflightCreateVesting, useRecipientVestings, useRecipientVestingsLength, useRecipientVestingsSliced, useRenounceRole, useResetGasFee, useResetTokenFee, useRevokeRole, useRevokeVesting, useRoleConstants, useSetCustomFee, useSetDefaultFeeType, useSetDefaultGasFee, useSetDefaultTokenFee, useSetFeeCollector, useSetMaxBatchSize, useSetMaxRevokeBatchSize, useSplitVesting, useTransferFeeCollectorRole, useUnpause, useVestingInfo, useWithdrawAdmin, useWithdrawGasFee, useWithdrawOtherConfidentialToken, useWithdrawOtherToken, useWithdrawTokenFee };
|
|
794
|
+
export { useAcceptVestingTransfer, useAccessClaimableAmount, useAccessSettledAmount, useAccessTotalAllocation, useAccessVestedAmount, useAdminBatchDiscloseToParty, useAdminClaim, useAdminDiscloseToParty, useAdminGetClaimableAmount, useAdminGetSettledAmount, useAdminGetTokenBalance, useAdminGetTotalAllocation, useAdminGetVestedAmount, useAdminPartialClaim, useAllRecipients, useAllRecipientsLength, useAllRecipientsSliced, useBatchCreateVesting, useBatchDiscloseHandlesToParty, useBatchDiscloseToParty, useBatchRevokeVesting, useCancelVestingTransfer, useClaim, useConfidentialVestingFactoryImplementation, useCreateManager, useCreateManagerAndGetAddress, useCreateVesting, useDirectVestingTransfer, useDisableCustomFee, useDiscloseHandleToParty, useDiscloseToParty, useFactoryCustomFee, useFactoryDefaultFeeType, useFactoryDefaultGasFee, useFactoryDefaultTokenFee, useFactoryFeeCollector, useFactoryInitCodeHash, useGetClaimableAmount, useGetSettledAmount, useGetTotalAllocation, useGetVestedAmount, useGrantRole, useHasRole, useInitiateVestingTransfer, useIsRecipient, useManagerDeploymentBlockNumber, useManagerFee, useManagerFeeInfo, useManagerFeeType, useManagerIsPausable, useManagerIsSplitEnabled, useManagerMaxBatchSize, useManagerMaxRevokeBatchSize, useManagerPaused, useManagerToken, usePartialClaim, usePause, usePendingVestingTransfer, usePreflightCreateVesting, useRecipientVestings, useRecipientVestingsLength, useRecipientVestingsSliced, useRenounceRole, useResetGasFee, useResetTokenFee, useRevokeRole, useRevokeVesting, useRoleConstants, useSetCustomFee, useSetDefaultFeeType, useSetDefaultGasFee, useSetDefaultTokenFee, useSetFeeCollector, useSetMaxBatchSize, useSetMaxRevokeBatchSize, useSplitVesting, useTransferFeeCollectorRole, useUnpause, useVestingInfo, useWithdrawAdmin, useWithdrawGasFee, useWithdrawOtherConfidentialToken, useWithdrawOtherToken, useWithdrawTokenFee };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
-
import type { Account, Address } from "viem";
|
|
3
|
-
import type { VestingId } from "../../core/brands.js";
|
|
2
|
+
import type { Account, Address, Hex } from "viem";
|
|
4
3
|
import type { EncryptedViewResult } from "../manager.js";
|
|
5
4
|
import { type ManagerHookOptions } from "./_shared.js";
|
|
6
5
|
export interface UseAccessClaimableAmountArgs {
|
|
7
|
-
vestingId:
|
|
6
|
+
vestingId: Hex;
|
|
8
7
|
account?: Account | Address;
|
|
9
8
|
}
|
|
10
9
|
/**
|
|
@@ -12,3 +11,12 @@ export interface UseAccessClaimableAmountArgs {
|
|
|
12
11
|
* `euint128` handle. Pass `data.handle` to the Zama relayer's `userDecrypt`.
|
|
13
12
|
*/
|
|
14
13
|
export declare function useAccessClaimableAmount(options: ManagerHookOptions): UseMutationResult<EncryptedViewResult, Error, UseAccessClaimableAmountArgs>;
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Renamed to {@link useAccessClaimableAmount}. Both submit a transaction, and the
|
|
16
|
+
* `useGet*` name reads as a free query — which misled bounty builders. This
|
|
17
|
+
* is the same function object, not a wrapper: behavior, argument types and
|
|
18
|
+
* thrown errors are identical. Removed in the next major.
|
|
19
|
+
*/
|
|
20
|
+
export declare const useGetClaimableAmount: typeof useAccessClaimableAmount;
|
|
21
|
+
/** @deprecated Renamed to {@link UseAccessClaimableAmountArgs}. Identical shape. */
|
|
22
|
+
export type UseGetClaimableAmountArgs = UseAccessClaimableAmountArgs;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
-
import type { Account, Address } from "viem";
|
|
3
|
-
import type { VestingId } from "../../core/brands.js";
|
|
2
|
+
import type { Account, Address, Hex } from "viem";
|
|
4
3
|
import type { EncryptedViewResult } from "../manager.js";
|
|
5
4
|
import { type ManagerHookOptions } from "./_shared.js";
|
|
6
5
|
export interface UseAccessSettledAmountArgs {
|
|
7
|
-
vestingId:
|
|
6
|
+
vestingId: Hex;
|
|
8
7
|
account?: Account | Address;
|
|
9
8
|
}
|
|
10
9
|
/**
|
|
@@ -13,3 +12,12 @@ export interface UseAccessSettledAmountArgs {
|
|
|
13
12
|
* `userDecrypt`.
|
|
14
13
|
*/
|
|
15
14
|
export declare function useAccessSettledAmount(options: ManagerHookOptions): UseMutationResult<EncryptedViewResult, Error, UseAccessSettledAmountArgs>;
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Renamed to {@link useAccessSettledAmount}. Both submit a transaction, and the
|
|
17
|
+
* `useGet*` name reads as a free query — which misled bounty builders. This
|
|
18
|
+
* is the same function object, not a wrapper: behavior, argument types and
|
|
19
|
+
* thrown errors are identical. Removed in the next major.
|
|
20
|
+
*/
|
|
21
|
+
export declare const useGetSettledAmount: typeof useAccessSettledAmount;
|
|
22
|
+
/** @deprecated Renamed to {@link UseAccessSettledAmountArgs}. Identical shape. */
|
|
23
|
+
export type UseGetSettledAmountArgs = UseAccessSettledAmountArgs;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
-
import type { Account, Address } from "viem";
|
|
3
|
-
import type { VestingId } from "../../core/brands.js";
|
|
2
|
+
import type { Account, Address, Hex } from "viem";
|
|
4
3
|
import type { EncryptedViewResult } from "../manager.js";
|
|
5
4
|
import { type ManagerHookOptions } from "./_shared.js";
|
|
6
5
|
export interface UseAccessTotalAllocationArgs {
|
|
7
|
-
vestingId:
|
|
6
|
+
vestingId: Hex;
|
|
8
7
|
account?: Account | Address;
|
|
9
8
|
}
|
|
10
9
|
/**
|
|
@@ -12,3 +11,12 @@ export interface UseAccessTotalAllocationArgs {
|
|
|
12
11
|
* `euint128` handle. Pass `data.handle` to the Zama relayer's `userDecrypt`.
|
|
13
12
|
*/
|
|
14
13
|
export declare function useAccessTotalAllocation(options: ManagerHookOptions): UseMutationResult<EncryptedViewResult, Error, UseAccessTotalAllocationArgs>;
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Renamed to {@link useAccessTotalAllocation}. Both submit a transaction, and the
|
|
16
|
+
* `useGet*` name reads as a free query — which misled bounty builders. This
|
|
17
|
+
* is the same function object, not a wrapper: behavior, argument types and
|
|
18
|
+
* thrown errors are identical. Removed in the next major.
|
|
19
|
+
*/
|
|
20
|
+
export declare const useGetTotalAllocation: typeof useAccessTotalAllocation;
|
|
21
|
+
/** @deprecated Renamed to {@link UseAccessTotalAllocationArgs}. Identical shape. */
|
|
22
|
+
export type UseGetTotalAllocationArgs = UseAccessTotalAllocationArgs;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { type UseMutationResult } from "@tanstack/react-query";
|
|
2
|
-
import type { Account, Address } from "viem";
|
|
3
|
-
import type { VestingId } from "../../core/brands.js";
|
|
2
|
+
import type { Account, Address, Hex } from "viem";
|
|
4
3
|
import type { EncryptedViewResult } from "../manager.js";
|
|
5
4
|
import { type ManagerHookOptions } from "./_shared.js";
|
|
6
5
|
export interface UseAccessVestedAmountArgs {
|
|
7
|
-
vestingId:
|
|
6
|
+
vestingId: Hex;
|
|
8
7
|
/** Unix timestamp (seconds) — `Math.floor(Date.now() / 1000)` for "now". */
|
|
9
8
|
timestamp: number;
|
|
10
9
|
account?: Account | Address;
|
|
@@ -24,3 +23,12 @@ export interface UseAccessVestedAmountArgs {
|
|
|
24
23
|
* // getVested.data → { handle: "0x...", hash: "0x..." }
|
|
25
24
|
*/
|
|
26
25
|
export declare function useAccessVestedAmount(options: ManagerHookOptions): UseMutationResult<EncryptedViewResult, Error, UseAccessVestedAmountArgs>;
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated Renamed to {@link useAccessVestedAmount}. Both submit a transaction, and the
|
|
28
|
+
* `useGet*` name reads as a free query — which misled bounty builders. This
|
|
29
|
+
* is the same function object, not a wrapper: behavior, argument types and
|
|
30
|
+
* thrown errors are identical. Removed in the next major.
|
|
31
|
+
*/
|
|
32
|
+
export declare const useGetVestedAmount: typeof useAccessVestedAmount;
|
|
33
|
+
/** @deprecated Renamed to {@link UseAccessVestedAmountArgs}. Identical shape. */
|
|
34
|
+
export type UseGetVestedAmountArgs = UseAccessVestedAmountArgs;
|
|
@@ -7,7 +7,7 @@ export interface UseAdminGetClaimableAmountArgs {
|
|
|
7
7
|
account?: Account | Address;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* Admin variant of {@link
|
|
10
|
+
* Admin variant of {@link useAccessClaimableAmount} — caller must hold
|
|
11
11
|
* `DISCLOSURE_ADMIN_ROLE`. Submits a tx; returns an `euint128` handle.
|
|
12
12
|
*/
|
|
13
13
|
export declare function useAdminGetClaimableAmount(options: ManagerHookOptions): UseMutationResult<EncryptedViewResult, Error, UseAdminGetClaimableAmountArgs>;
|
|
@@ -7,7 +7,7 @@ export interface UseAdminGetSettledAmountArgs {
|
|
|
7
7
|
account?: Account | Address;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* Admin variant of {@link
|
|
10
|
+
* Admin variant of {@link useAccessSettledAmount} — caller must hold
|
|
11
11
|
* `DISCLOSURE_ADMIN_ROLE`. Submits a tx; returns an `euint128` handle.
|
|
12
12
|
*/
|
|
13
13
|
export declare function useAdminGetSettledAmount(options: ManagerHookOptions): UseMutationResult<EncryptedViewResult, Error, UseAdminGetSettledAmountArgs>;
|
|
@@ -7,7 +7,7 @@ export interface UseAdminGetTotalAllocationArgs {
|
|
|
7
7
|
account?: Account | Address;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* Admin variant of {@link
|
|
10
|
+
* Admin variant of {@link useAccessTotalAllocation} — caller must hold
|
|
11
11
|
* `DISCLOSURE_ADMIN_ROLE`. Submits a tx; returns an `euint128` handle.
|
|
12
12
|
*/
|
|
13
13
|
export declare function useAdminGetTotalAllocation(options: ManagerHookOptions): UseMutationResult<EncryptedViewResult, Error, UseAdminGetTotalAllocationArgs>;
|
|
@@ -8,7 +8,7 @@ export interface UseAdminGetVestedAmountArgs {
|
|
|
8
8
|
account?: Account | Address;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
* Admin variant of {@link
|
|
11
|
+
* Admin variant of {@link useAccessVestedAmount} — caller must hold
|
|
12
12
|
* `DISCLOSURE_ADMIN_ROLE`. Submits a tx; returns an `euint128` handle granted
|
|
13
13
|
* to the admin caller. Pass `data.handle` to the Zama relayer's `userDecrypt`.
|
|
14
14
|
*/
|
|
@@ -5,6 +5,14 @@ import { type ManagerHookOptions } from "./_shared.js";
|
|
|
5
5
|
/**
|
|
6
6
|
* Admin variant of {@link usePartialClaim} — caller must hold `CLAIMER_ROLE`.
|
|
7
7
|
*
|
|
8
|
+
* **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
|
|
9
|
+
* convention (1 token = 1_000_000 base units), not the 18 decimals typical of
|
|
10
|
+
* ERC-20. Amount parameters are base units of the token's actual decimals:
|
|
11
|
+
* for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
|
|
12
|
+
* transparent TTT test token uses 18 decimals. This hook shares
|
|
13
|
+
* {@link PartialClaimArgs} with {@link usePartialClaim}, so an 18-decimals
|
|
14
|
+
* assumption over-claims by 10^12.
|
|
15
|
+
*
|
|
8
16
|
* **Silent-zero transfers.** ERC-7984 transfers do not revert when the sender's encrypted balance is insufficient — the transfer succeeds and moves an encrypted zero instead. This is by design: reverting would leak balance information. The transaction receipt alone cannot tell you whether value actually moved.
|
|
9
17
|
*/
|
|
10
18
|
export declare function useAdminPartialClaim(options: ManagerHookOptions): UseMutationResult<Hex, Error, PartialClaimArgs>;
|
|
@@ -9,7 +9,7 @@ import { type ManagerHookOptions } from "./_shared.js";
|
|
|
9
9
|
* {@link useManagerFeeInfo} to read it. For `FeeType.DistributionToken`,
|
|
10
10
|
* omit `value`.
|
|
11
11
|
*
|
|
12
|
-
* After success, invalidate `
|
|
12
|
+
* After success, invalidate `useAccessClaimableAmount` (the encrypted view) and
|
|
13
13
|
* any UI counts you computed off it.
|
|
14
14
|
*
|
|
15
15
|
* **Silent-zero transfers.** ERC-7984 transfers do not revert when the sender's encrypted balance is insufficient — the transfer succeeds and moves an encrypted zero instead. This is by design: reverting would leak balance information. The transaction receipt alone cannot tell you whether value actually moved.
|
|
@@ -8,7 +8,7 @@ export interface UseDiscloseHandleToPartyArgs {
|
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Grant `party` decrypt access to an arbitrary already-allowed `handle` you
|
|
11
|
-
* own. Typical use: forward a handle returned by `
|
|
11
|
+
* own. Typical use: forward a handle returned by `useAccessClaimableAmount` to
|
|
12
12
|
* an auditor without leaking plaintext.
|
|
13
13
|
*/
|
|
14
14
|
export declare function useDiscloseHandleToParty(options: ManagerHookOptions): UseMutationResult<Hex, Error, UseDiscloseHandleToPartyArgs>;
|
|
@@ -10,7 +10,7 @@ export interface UseManagerDiscloseHandleToPartyArgs {
|
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* Grant `party` decrypt access to an arbitrary already-allowed `handle` you
|
|
13
|
-
* own. Typical use: forward a handle returned by `
|
|
13
|
+
* own. Typical use: forward a handle returned by `useAccessClaimableAmount` to
|
|
14
14
|
* an auditor without leaking plaintext.
|
|
15
15
|
*/
|
|
16
16
|
export declare function useManagerDiscloseHandleToParty(options: ManagerHookOptions): UseMutationResult<TxHash, Error, UseManagerDiscloseHandleToPartyArgs>;
|
|
@@ -12,7 +12,7 @@ import { type ManagerHookOptions } from "./_shared.js";
|
|
|
12
12
|
* for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
|
|
13
13
|
* transparent TTT test token uses 18 decimals.
|
|
14
14
|
*
|
|
15
|
-
* After success, invalidate `
|
|
15
|
+
* After success, invalidate `useAccessClaimableAmount` and `useAccessSettledAmount`.
|
|
16
16
|
*
|
|
17
17
|
* **Silent-zero transfers.** ERC-7984 transfers do not revert when the sender's encrypted balance is insufficient — the transfer succeeds and moves an encrypted zero instead. This is by design: reverting would leak balance information. The transaction receipt alone cannot tell you whether value actually moved.
|
|
18
18
|
*
|
|
@@ -8,7 +8,7 @@ export interface UseVestingInfoArgs extends ManagerHookOptions {
|
|
|
8
8
|
/**
|
|
9
9
|
* Read the plaintext snapshot of a vesting schedule — recipient, timestamps,
|
|
10
10
|
* unlock bps, revocability flag. **Amounts are encrypted and NOT in this
|
|
11
|
-
* payload** — use {@link
|
|
11
|
+
* payload** — use {@link useAccessTotalAllocation} / {@link useAccessVestedAmount}
|
|
12
12
|
* for encrypted-amount handles.
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
@@ -79,6 +79,13 @@ export interface PendingTransfer {
|
|
|
79
79
|
* - `isOperatorSet` — `true` when the creator has approved the manager as an
|
|
80
80
|
* ERC-7984 operator on `token` (required for the manager's
|
|
81
81
|
* `confidentialTransferFrom` pull).
|
|
82
|
+
*
|
|
83
|
+
* **`false` does not mean "not approved" on its own** — it is also `false`
|
|
84
|
+
* when approval could not be determined at all: the bound `token` is not an
|
|
85
|
+
* ERC-7984 token, so the `isOperator` read failed. Do not render an
|
|
86
|
+
* "approve the manager" prompt off this field alone; check `blockerErrors`
|
|
87
|
+
* for `TOKENOPS_OPERATOR_NOT_APPROVED` first, which is present only when
|
|
88
|
+
* the approval genuinely is the missing step.
|
|
82
89
|
* - `ready` — `true` when no blockers were detected.
|
|
83
90
|
* - `blockers` — human-readable blocker descriptions. Empty when
|
|
84
91
|
* `ready === true`.
|
|
@@ -90,7 +97,11 @@ export interface CreateVestingPreflightReport {
|
|
|
90
97
|
token: Address;
|
|
91
98
|
/** `true` when the creator holds `VESTING_CREATOR_ROLE` on the manager. */
|
|
92
99
|
hasCreatorRole: boolean;
|
|
93
|
-
/**
|
|
100
|
+
/**
|
|
101
|
+
* `true` when the creator has approved the manager as operator on `token`.
|
|
102
|
+
* Also `false` when approval could not be determined (non-ERC-7984 token);
|
|
103
|
+
* branch on `blockerErrors` rather than this field alone.
|
|
104
|
+
*/
|
|
94
105
|
isOperatorSet: boolean;
|
|
95
106
|
/** `true` when no blockers were detected — green light to submit the write. */
|
|
96
107
|
ready: boolean;
|