@tokenops/sdk 1.0.0 → 1.5.1
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/README.md +120 -26
- package/dist/{chunk-5SGMJADP.cjs → chunk-2NCLOQ56.cjs} +9 -9
- package/dist/{chunk-QIHZVLIK.js → chunk-2PWNH3UE.js} +35 -6
- package/dist/{chunk-T5LVV3KY.cjs → chunk-4WPGQSNT.cjs} +3 -3
- package/dist/{chunk-SUOG3BQS.cjs → chunk-5X5WL5CU.cjs} +266 -103
- package/dist/{chunk-56UI7LUR.cjs → chunk-67OV5CX2.cjs} +19 -0
- package/dist/{chunk-WRCUDSUJ.js → chunk-6BMP4ICG.js} +2 -2
- package/dist/{chunk-XXXDQSHE.js → chunk-6R4KNAPK.js} +5 -3
- package/dist/{chunk-XSNLAS5M.js → chunk-AOP6HMPW.js} +1 -1
- package/dist/{chunk-62DF53UQ.cjs → chunk-C7BRZXJA.cjs} +19 -21
- package/dist/{chunk-UOG4PJL5.js → chunk-DUZIIRPF.js} +181 -14
- package/dist/{chunk-Q7ARQSUH.cjs → chunk-FAXIIH5R.cjs} +3 -3
- package/dist/chunk-FT4LNBOS.js +11 -0
- package/dist/chunk-IJFQ5L4I.js +2171 -0
- package/dist/{chunk-52TC6BF7.js → chunk-IXLO7GO5.js} +210 -47
- package/dist/{chunk-CQIPRNS7.cjs → chunk-JK4XMMKM.cjs} +3 -3
- package/dist/{chunk-ITQ7WKVC.cjs → chunk-JYOTGRSO.cjs} +8 -8
- package/dist/{chunk-VDXVNZCO.cjs → chunk-KLKI352M.cjs} +85 -29
- package/dist/{chunk-5SA2HF2W.cjs → chunk-MCRBVJGZ.cjs} +24 -22
- package/dist/{chunk-ECT3NL2L.js → chunk-NTZY6IB7.js} +4 -4
- package/dist/{chunk-ZHFLRKFY.js → chunk-ODLTEGHB.js} +1 -1
- package/dist/{chunk-HGXNRR25.js → chunk-ORFTDNFZ.js} +4 -4
- package/dist/{chunk-72YGZEQE.js → chunk-OXTLPTO3.js} +9 -11
- package/dist/{chunk-HTOMTEA3.cjs → chunk-PFXURMBZ.cjs} +77 -48
- package/dist/{chunk-OLDGMKW2.cjs → chunk-PUPKNW3R.cjs} +35 -2
- package/dist/{chunk-IVE3QEGD.js → chunk-QBJ7O2B4.js} +18 -1
- package/dist/{chunk-JFLEEXKP.js → chunk-SG65XWH7.js} +58 -2
- package/dist/{chunk-K6MFFDBJ.cjs → chunk-T46YXSBP.cjs} +11 -11
- package/dist/{chunk-NS44KBV5.cjs → chunk-TEBM66WA.cjs} +12 -12
- package/dist/{chunk-6ECAHP5O.cjs → chunk-TIUKIY5V.cjs} +200 -33
- package/dist/{chunk-QCA7O2Q5.cjs → chunk-V2PXZVBF.cjs} +4 -4
- package/dist/{chunk-JFR5J4FL.cjs → chunk-W7IGCOVL.cjs} +11 -11
- package/dist/chunk-WENHUPZC.cjs +2180 -0
- package/dist/{chunk-ZXCOJY2Z.js → chunk-WMACINXO.js} +1 -1
- package/dist/{chunk-COPFW5Z4.js → chunk-XGGTQQFH.js} +31 -2
- package/dist/{chunk-CMRETRZO.js → chunk-YQIBBEFJ.js} +1 -1
- package/dist/{chunk-BE2AIZ3K.js → chunk-ZA673I3O.js} +1 -1
- package/dist/chunk-ZQUE2B3Q.cjs +33 -0
- package/dist/{chunk-FYQ2UW4T.js → chunk-ZWXJTBZO.js} +1 -1
- package/dist/core/addresses.d.ts +22 -0
- package/dist/core/errors.d.ts +41 -1
- package/dist/core/revert-mapper.d.ts +77 -0
- package/dist/core/telemetry.d.ts +0 -3
- package/dist/core/wagmi-compat.d.ts +40 -0
- package/dist/fhe/index.cjs +112 -66
- package/dist/fhe/index.d.cts +1 -1
- package/dist/fhe/index.d.ts +1 -1
- package/dist/fhe/index.js +50 -8
- package/dist/fhe/operators.d.ts +1 -1
- package/dist/fhe/react/index.cjs +7 -7
- package/dist/fhe/react/index.js +2 -2
- package/dist/fhe/sepolia-encryptor-web.d.ts +27 -1
- package/dist/fhe/sepolia-encryptor.d.ts +38 -0
- package/dist/fhe-airdrop/advanced/factory-advanced.d.ts +3 -3
- package/dist/fhe-airdrop/advanced/index.cjs +9 -8
- package/dist/fhe-airdrop/advanced/index.d.cts +2 -2
- package/dist/fhe-airdrop/advanced/index.d.ts +2 -2
- package/dist/fhe-airdrop/advanced/index.js +7 -6
- package/dist/fhe-airdrop/advanced/react/index.cjs +14 -13
- package/dist/fhe-airdrop/advanced/react/index.d.cts +1 -1
- package/dist/fhe-airdrop/advanced/react/index.d.ts +1 -1
- package/dist/fhe-airdrop/advanced/react/index.js +10 -9
- package/dist/fhe-airdrop/airdrop.d.ts +2 -0
- package/dist/fhe-airdrop/encryption.d.ts +8 -0
- package/dist/fhe-airdrop/factory.d.ts +94 -11
- package/dist/fhe-airdrop/index.cjs +61 -57
- package/dist/fhe-airdrop/index.d.cts +3 -3
- package/dist/fhe-airdrop/index.d.ts +3 -3
- package/dist/fhe-airdrop/index.js +7 -7
- package/dist/fhe-airdrop/react/index.cjs +163 -133
- package/dist/fhe-airdrop/react/index.d.cts +4 -3
- package/dist/fhe-airdrop/react/index.d.ts +4 -3
- package/dist/fhe-airdrop/react/index.js +38 -13
- package/dist/fhe-airdrop/react/useAirdropClaim.d.ts +2 -0
- package/dist/fhe-airdrop/react/useAirdropIsSignatureValid.d.ts +3 -2
- package/dist/fhe-airdrop/react/useClaim.d.ts +2 -0
- package/dist/fhe-airdrop/react/useCreateAndFundConfidentialAirdrop.d.ts +8 -0
- package/dist/fhe-airdrop/react/useCreateAndFundConfidentialAirdropAndGetAddress.d.ts +8 -0
- package/dist/fhe-airdrop/react/useFundConfidentialAirdrop.d.ts +8 -0
- package/dist/fhe-airdrop/react/usePreflightCreateAirdrop.d.ts +51 -0
- package/dist/fhe-airdrop/types.d.ts +45 -0
- package/dist/fhe-disperse/encryption.d.ts +8 -0
- package/dist/fhe-disperse/index.cjs +69 -65
- 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 -8
- package/dist/fhe-disperse/react/index.cjs +90 -86
- package/dist/fhe-disperse/react/index.d.cts +1 -1
- package/dist/fhe-disperse/react/index.d.ts +1 -1
- package/dist/fhe-disperse/react/index.js +10 -10
- package/dist/fhe-disperse/react/useCalculateFee.d.ts +7 -0
- package/dist/fhe-disperse/react/useDisperse.d.ts +9 -0
- package/dist/fhe-disperse/react/usePreflightDisperse.d.ts +7 -0
- package/dist/fhe-disperse/react/useSingletonCalculateFee.d.ts +7 -0
- package/dist/fhe-disperse/react/useSingletonWithdrawTokenFee.d.ts +8 -2
- package/dist/fhe-disperse/react/useWithdrawTokenFee.d.ts +6 -0
- package/dist/fhe-disperse/singleton.d.ts +29 -0
- package/dist/fhe-disperse/subtotals.d.ts +6 -0
- package/dist/fhe-vesting/advanced/factory-advanced.d.ts +2 -2
- package/dist/fhe-vesting/advanced/index.cjs +8 -8
- package/dist/fhe-vesting/advanced/index.d.cts +2 -2
- package/dist/fhe-vesting/advanced/index.d.ts +2 -2
- package/dist/fhe-vesting/advanced/index.js +6 -6
- package/dist/fhe-vesting/advanced/react/index.cjs +15 -14
- package/dist/fhe-vesting/advanced/react/index.d.cts +1 -1
- package/dist/fhe-vesting/advanced/react/index.d.ts +1 -1
- package/dist/fhe-vesting/advanced/react/index.js +12 -11
- package/dist/fhe-vesting/encryption.d.ts +8 -0
- package/dist/fhe-vesting/factory.d.ts +6 -8
- package/dist/fhe-vesting/index.cjs +79 -75
- package/dist/fhe-vesting/index.d.cts +2 -2
- package/dist/fhe-vesting/index.d.ts +2 -2
- package/dist/fhe-vesting/index.js +9 -9
- package/dist/fhe-vesting/manager.d.ts +101 -3
- package/dist/fhe-vesting/react/index.cjs +241 -219
- 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 +29 -12
- package/dist/fhe-vesting/react/useAdminClaim.d.ts +2 -0
- package/dist/fhe-vesting/react/useAdminPartialClaim.d.ts +2 -0
- package/dist/fhe-vesting/react/useBatchCreateVesting.d.ts +8 -0
- package/dist/fhe-vesting/react/useClaim.d.ts +2 -0
- package/dist/fhe-vesting/react/useCreateVesting.d.ts +8 -0
- package/dist/fhe-vesting/react/useManagerWithdrawTokenFee.d.ts +7 -1
- package/dist/fhe-vesting/react/usePartialClaim.d.ts +8 -0
- package/dist/fhe-vesting/react/usePreflightCreateVesting.d.ts +37 -0
- package/dist/fhe-vesting/react/useVestingClaim.d.ts +2 -0
- package/dist/fhe-vesting/react/useWithdrawAdmin.d.ts +6 -0
- package/dist/fhe-vesting/react/useWithdrawTokenFee.d.ts +6 -0
- package/dist/fhe-vesting/types.d.ts +34 -2
- package/dist/index.cjs +73 -49
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/testnet-faucet/abis/confidential-test-token.d.ts +1039 -0
- package/dist/testnet-faucet/abis/index.d.ts +2 -0
- package/dist/testnet-faucet/abis/test-token.d.ts +253 -0
- package/dist/testnet-faucet/errors.d.ts +21 -0
- package/dist/testnet-faucet/faucet.d.ts +173 -0
- package/dist/testnet-faucet/index.cjs +212 -0
- package/dist/testnet-faucet/index.d.cts +8 -0
- package/dist/testnet-faucet/index.d.ts +8 -0
- package/dist/testnet-faucet/index.js +7 -0
- package/dist/testnet-faucet/react/_shared.d.ts +61 -0
- package/dist/testnet-faucet/react/index.cjs +384 -0
- package/dist/testnet-faucet/react/index.d.cts +39 -0
- package/dist/testnet-faucet/react/index.d.ts +39 -0
- package/dist/testnet-faucet/react/index.js +220 -0
- package/dist/testnet-faucet/react/useConfidentialBalance.d.ts +25 -0
- package/dist/testnet-faucet/react/useFaucetDecimals.d.ts +9 -0
- package/dist/testnet-faucet/react/useFaucetMetadata.d.ts +14 -0
- package/dist/testnet-faucet/react/useFaucetRate.d.ts +11 -0
- package/dist/testnet-faucet/react/useInferredTotalSupply.d.ts +11 -0
- package/dist/testnet-faucet/react/useMaxTotalSupply.d.ts +10 -0
- package/dist/testnet-faucet/react/useMintConfidential.d.ts +35 -0
- package/dist/testnet-faucet/react/useMintUnderlying.d.ts +31 -0
- package/dist/testnet-faucet/react/useUnderlyingBalance.d.ts +19 -0
- package/dist/testnet-faucet/react/useUnderlyingDecimals.d.ts +9 -0
- package/dist/testnet-faucet/react/useUnderlyingTokenAddress.d.ts +12 -0
- package/dist/testnet-faucet/types.d.ts +92 -0
- package/dist/testnet-faucet/validate.d.ts +44 -0
- package/package.json +79 -30
|
@@ -65,6 +65,7 @@ export { useAllRecipients } from "./useAllRecipients.js";
|
|
|
65
65
|
export { useAllRecipientsLength } from "./useAllRecipientsLength.js";
|
|
66
66
|
export { useAllRecipientsSliced, type UseAllRecipientsSlicedArgs, } from "./useAllRecipientsSliced.js";
|
|
67
67
|
export { useIsRecipient, type UseIsRecipientArgs } from "./useIsRecipient.js";
|
|
68
|
+
export { usePreflightCreateVesting, type UsePreflightCreateVestingArgs, } from "./usePreflightCreateVesting.js";
|
|
68
69
|
export { useRecipientVestings, type UseRecipientVestingsArgs } from "./useRecipientVestings.js";
|
|
69
70
|
export { useRecipientVestingsLength, type UseRecipientVestingsLengthArgs, } from "./useRecipientVestingsLength.js";
|
|
70
71
|
export { useRecipientVestingsSliced, type UseRecipientVestingsSlicedArgs, } from "./useRecipientVestingsSliced.js";
|
|
@@ -114,10 +115,10 @@ export { useRevokeRole, type UseRevokeRoleArgs } from "./useRevokeRole.js";
|
|
|
114
115
|
export { useRenounceRole, type UseRenounceRoleArgs } from "./useRenounceRole.js";
|
|
115
116
|
export type { BaseHookOptions, ManagerHookOptions } from "./_shared.js";
|
|
116
117
|
export { encryptUint64, encryptUint64Batch, resolveEncryptor, type Encryptor, type EncryptorSource, type EncryptUint64Args, type EncryptUint64BatchArgs, type FheValueInput, } from "../encryption.js";
|
|
117
|
-
export { DisclosureType, FeeType, type CustomFee, type EncryptedInput, type EncryptedInputs, type PendingTransfer, type VestingInfo, type VestingParams, } from "../types.js";
|
|
118
|
+
export { DisclosureType, FeeType, type CreateVestingPreflightReport, type CustomFee, type EncryptedInput, type EncryptedInputs, type PendingTransfer, type VestingInfo, type VestingParams, } from "../types.js";
|
|
118
119
|
export type { BatchCreateVestingArgs, ClaimArgs, CreateVestingArgs, DiscloseArgs, EncryptedViewResult, InitiateTransferArgs, PartialClaimArgs, SplitVestingArgs, } from "../manager.js";
|
|
119
120
|
export type { CreateManagerResult, CreateManagerArgs, PredictManagerArgs } from "../factory.js";
|
|
120
121
|
export { scaleRatio, type ScaleRatioArgs, type ScaledRatio } from "../../fhe/scale-ratio.js";
|
|
121
|
-
export { TokenOpsSdkError, isTokenOpsSdkError, DeploymentAddressUnavailableError, UnsupportedChainError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, InvalidArgumentError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, ContractRevertError, PausedError, AccessDeniedError, InsufficientFeeError, InsufficientBalanceError, BatchTooLargeError, FeatureDisabledError, TransferFailedError, FheHandleNotAllowedError, AlreadyInitializedError, ReentrancyError, InvalidSignatureError, WalletRejectedError, WalletChainMismatchError, NetworkError, InsufficientGasFundsError, UnknownWriteFailureError, UserRejectedSignatureError, SigningFailedError, RelayerUnreachableError, EncryptionFailedError, DecryptionFailedError, UserDecryptNotAllowedError, type DeploymentAddressUnavailableReason, type TokenOpsSdkErrorCode, } from "../../core/errors.js";
|
|
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";
|
|
122
123
|
export { type PreflightResult } from "../../core/preflight.js";
|
|
123
124
|
export { VestingNotFoundError, NotVestingRecipientError, ClaimLockedError, VestingRevokedError, VestingNotRevocableError, VestingExpiredError, TransferAlreadyPendingError, NoPendingTransferError, NotPendingRecipientError, TransferExpiredError, } from "../errors.js";
|
|
@@ -65,6 +65,7 @@ export { useAllRecipients } from "./useAllRecipients.js";
|
|
|
65
65
|
export { useAllRecipientsLength } from "./useAllRecipientsLength.js";
|
|
66
66
|
export { useAllRecipientsSliced, type UseAllRecipientsSlicedArgs, } from "./useAllRecipientsSliced.js";
|
|
67
67
|
export { useIsRecipient, type UseIsRecipientArgs } from "./useIsRecipient.js";
|
|
68
|
+
export { usePreflightCreateVesting, type UsePreflightCreateVestingArgs, } from "./usePreflightCreateVesting.js";
|
|
68
69
|
export { useRecipientVestings, type UseRecipientVestingsArgs } from "./useRecipientVestings.js";
|
|
69
70
|
export { useRecipientVestingsLength, type UseRecipientVestingsLengthArgs, } from "./useRecipientVestingsLength.js";
|
|
70
71
|
export { useRecipientVestingsSliced, type UseRecipientVestingsSlicedArgs, } from "./useRecipientVestingsSliced.js";
|
|
@@ -114,10 +115,10 @@ export { useRevokeRole, type UseRevokeRoleArgs } from "./useRevokeRole.js";
|
|
|
114
115
|
export { useRenounceRole, type UseRenounceRoleArgs } from "./useRenounceRole.js";
|
|
115
116
|
export type { BaseHookOptions, ManagerHookOptions } from "./_shared.js";
|
|
116
117
|
export { encryptUint64, encryptUint64Batch, resolveEncryptor, type Encryptor, type EncryptorSource, type EncryptUint64Args, type EncryptUint64BatchArgs, type FheValueInput, } from "../encryption.js";
|
|
117
|
-
export { DisclosureType, FeeType, type CustomFee, type EncryptedInput, type EncryptedInputs, type PendingTransfer, type VestingInfo, type VestingParams, } from "../types.js";
|
|
118
|
+
export { DisclosureType, FeeType, type CreateVestingPreflightReport, type CustomFee, type EncryptedInput, type EncryptedInputs, type PendingTransfer, type VestingInfo, type VestingParams, } from "../types.js";
|
|
118
119
|
export type { BatchCreateVestingArgs, ClaimArgs, CreateVestingArgs, DiscloseArgs, EncryptedViewResult, InitiateTransferArgs, PartialClaimArgs, SplitVestingArgs, } from "../manager.js";
|
|
119
120
|
export type { CreateManagerResult, CreateManagerArgs, PredictManagerArgs } from "../factory.js";
|
|
120
121
|
export { scaleRatio, type ScaleRatioArgs, type ScaledRatio } from "../../fhe/scale-ratio.js";
|
|
121
|
-
export { TokenOpsSdkError, isTokenOpsSdkError, DeploymentAddressUnavailableError, UnsupportedChainError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, InvalidArgumentError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, ContractRevertError, PausedError, AccessDeniedError, InsufficientFeeError, InsufficientBalanceError, BatchTooLargeError, FeatureDisabledError, TransferFailedError, FheHandleNotAllowedError, AlreadyInitializedError, ReentrancyError, InvalidSignatureError, WalletRejectedError, WalletChainMismatchError, NetworkError, InsufficientGasFundsError, UnknownWriteFailureError, UserRejectedSignatureError, SigningFailedError, RelayerUnreachableError, EncryptionFailedError, DecryptionFailedError, UserDecryptNotAllowedError, type DeploymentAddressUnavailableReason, type TokenOpsSdkErrorCode, } from "../../core/errors.js";
|
|
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";
|
|
122
123
|
export { type PreflightResult } from "../../core/preflight.js";
|
|
123
124
|
export { VestingNotFoundError, NotVestingRecipientError, ClaimLockedError, VestingRevokedError, VestingNotRevocableError, VestingExpiredError, TransferAlreadyPendingError, NoPendingTransferError, NotPendingRecipientError, TransferExpiredError, } from "../errors.js";
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { useMemoFactoryClient, buildQueryKey, useMemoManagerClient } from '../../chunk-
|
|
2
|
-
export { ClaimLockedError, NoPendingTransferError, NotPendingRecipientError, NotVestingRecipientError, TransferAlreadyPendingError, TransferExpiredError, VestingExpiredError, VestingNotFoundError, VestingNotRevocableError, VestingRevokedError, encryptUint64, encryptUint64Batch, resolveEncryptor } from '../../chunk-
|
|
3
|
-
import '../../chunk-
|
|
4
|
-
export { scaleRatio } from '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import '../../chunk-
|
|
9
|
-
import '../../chunk-
|
|
1
|
+
import { useMemoFactoryClient, buildQueryKey, useMemoManagerClient } from '../../chunk-NTZY6IB7.js';
|
|
2
|
+
export { ClaimLockedError, NoPendingTransferError, NotPendingRecipientError, NotVestingRecipientError, TransferAlreadyPendingError, TransferExpiredError, VestingExpiredError, VestingNotFoundError, VestingNotRevocableError, VestingRevokedError, encryptUint64, encryptUint64Batch, resolveEncryptor } from '../../chunk-IXLO7GO5.js';
|
|
3
|
+
import '../../chunk-WMACINXO.js';
|
|
4
|
+
export { scaleRatio } from '../../chunk-AOP6HMPW.js';
|
|
5
|
+
import '../../chunk-ZWXJTBZO.js';
|
|
6
|
+
import '../../chunk-7VELUOMI.js';
|
|
7
|
+
export { DisclosureType, FeeType } from '../../chunk-OXTLPTO3.js';
|
|
8
|
+
import '../../chunk-SG65XWH7.js';
|
|
9
|
+
import '../../chunk-XGGTQQFH.js';
|
|
10
|
+
import '../../chunk-ZA673I3O.js';
|
|
10
11
|
import '../../chunk-Q2GP5UDC.js';
|
|
11
12
|
import '../../chunk-KWFFIJYX.js';
|
|
12
|
-
import { MissingClientError } from '../../chunk-
|
|
13
|
-
export { AccessDeniedError, AlreadyInitializedError, BatchTooLargeError, ContractRevertError, DecryptionFailedError, DeploymentAddressUnavailableError, EncryptionFailedError, FeatureDisabledError, FheHandleNotAllowedError, InsufficientBalanceError, InsufficientFeeError, InsufficientGasFundsError, InvalidArgumentError, InvalidSignatureError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, NetworkError, PausedError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, ReentrancyError, RelayerUnreachableError, SigningFailedError, TokenOpsSdkError, TransferFailedError, UnknownWriteFailureError, UnsupportedChainError, UserDecryptNotAllowedError, UserRejectedSignatureError, WalletChainMismatchError, WalletRejectedError, isTokenOpsSdkError } from '../../chunk-
|
|
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';
|
|
14
15
|
import { useQuery, useMutation } from '@tanstack/react-query';
|
|
15
16
|
|
|
16
17
|
function useConfidentialVestingFactoryImplementation(options = {}) {
|
|
@@ -327,6 +328,22 @@ function useIsRecipient(args) {
|
|
|
327
328
|
staleTime: 0
|
|
328
329
|
});
|
|
329
330
|
}
|
|
331
|
+
function usePreflightCreateVesting(args) {
|
|
332
|
+
const { params, creator, ...base } = args;
|
|
333
|
+
const { client, chainId } = useMemoManagerClient(base);
|
|
334
|
+
return useQuery({
|
|
335
|
+
queryKey: buildQueryKey(
|
|
336
|
+
"manager:preflightCreateVesting",
|
|
337
|
+
chainId,
|
|
338
|
+
base.address,
|
|
339
|
+
creator,
|
|
340
|
+
params
|
|
341
|
+
),
|
|
342
|
+
queryFn: () => client.preflightCreateVesting({ params, creator }),
|
|
343
|
+
enabled: !!client && !!params && !!creator,
|
|
344
|
+
staleTime: 0
|
|
345
|
+
});
|
|
346
|
+
}
|
|
330
347
|
function useRecipientVestings(args) {
|
|
331
348
|
const { recipient, ...base } = args;
|
|
332
349
|
const { client, chainId } = useMemoManagerClient(base);
|
|
@@ -768,4 +785,4 @@ function useRenounceRole(options) {
|
|
|
768
785
|
});
|
|
769
786
|
}
|
|
770
787
|
|
|
771
|
-
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, 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 };
|
|
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 };
|
|
@@ -5,5 +5,7 @@ import { type ManagerHookOptions } from "./_shared.js";
|
|
|
5
5
|
/**
|
|
6
6
|
* Admin variant of {@link useClaim} — caller must hold `CLAIMER_ROLE`. Useful
|
|
7
7
|
* for sweep / forced-claim flows initiated by a treasury.
|
|
8
|
+
*
|
|
9
|
+
* **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
10
|
*/
|
|
9
11
|
export declare function useAdminClaim(options: ManagerHookOptions): UseMutationResult<Hex, Error, ClaimArgs>;
|
|
@@ -4,5 +4,7 @@ import type { PartialClaimArgs } from "../manager.js";
|
|
|
4
4
|
import { type ManagerHookOptions } from "./_shared.js";
|
|
5
5
|
/**
|
|
6
6
|
* Admin variant of {@link usePartialClaim} — caller must hold `CLAIMER_ROLE`.
|
|
7
|
+
*
|
|
8
|
+
* **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.
|
|
7
9
|
*/
|
|
8
10
|
export declare function useAdminPartialClaim(options: ManagerHookOptions): UseMutationResult<Hex, Error, PartialClaimArgs>;
|
|
@@ -9,6 +9,14 @@ import { type ManagerHookOptions } from "./_shared.js";
|
|
|
9
9
|
*
|
|
10
10
|
* Respect `useManagerMaxBatchSize` before submitting large lists.
|
|
11
11
|
*
|
|
12
|
+
* **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.
|
|
13
|
+
*
|
|
14
|
+
* **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
|
|
15
|
+
* convention (1 token = 1_000_000 base units), not the 18 decimals typical of
|
|
16
|
+
* ERC-20. Amount parameters are base units of the token's actual decimals:
|
|
17
|
+
* for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
|
|
18
|
+
* transparent TTT test token uses 18 decimals.
|
|
19
|
+
*
|
|
12
20
|
* After success, invalidate `["tokenops-sdk", "fhe-vesting"]` (broad) or the
|
|
13
21
|
* narrower recipient/vesting query keys.
|
|
14
22
|
*
|
|
@@ -12,6 +12,8 @@ import { type ManagerHookOptions } from "./_shared.js";
|
|
|
12
12
|
* After success, invalidate `useGetClaimableAmount` (the encrypted view) and
|
|
13
13
|
* any UI counts you computed off it.
|
|
14
14
|
*
|
|
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.
|
|
16
|
+
*
|
|
15
17
|
* @example
|
|
16
18
|
* const claim = useClaim({ address: managerAddress });
|
|
17
19
|
* claim.mutate({ vestingId, value: gasFee });
|
|
@@ -7,12 +7,20 @@ import { type ManagerHookOptions } from "./_shared.js";
|
|
|
7
7
|
* plaintext `amount` into an `externalEuint64` and submits it with an input
|
|
8
8
|
* proof — callers never handle ciphertext.
|
|
9
9
|
*
|
|
10
|
+
* **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
|
|
11
|
+
* convention (1 token = 1_000_000 base units), not the 18 decimals typical of
|
|
12
|
+
* ERC-20. Amount parameters are base units of the token's actual decimals:
|
|
13
|
+
* for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
|
|
14
|
+
* transparent TTT test token uses 18 decimals.
|
|
15
|
+
*
|
|
10
16
|
* **Encryptor resolution.** The hook-level `encryptor` (from
|
|
11
17
|
* `ManagerHookOptions`) is forwarded lazily to the SDK client. You can also
|
|
12
18
|
* pass `encryptor` per-mutation via `args.encryptor` to override it. If
|
|
13
19
|
* neither is present, the SDK throws `Missing encryptor — pass encryptor…`
|
|
14
20
|
* verbatim.
|
|
15
21
|
*
|
|
22
|
+
* **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.
|
|
23
|
+
*
|
|
16
24
|
* After a successful create, invalidate read queries that depend on
|
|
17
25
|
* recipient/vesting state:
|
|
18
26
|
*
|
|
@@ -6,6 +6,12 @@ import { type ManagerHookOptions } from "./_shared.js";
|
|
|
6
6
|
* Fee collector: withdraw collected distribution-token fees
|
|
7
7
|
* (`FeeType.DistributionToken` managers). Pass `encryptor` (SDK encrypts
|
|
8
8
|
* `amount`) XOR `encryptedInput` (pre-built) — discriminated union enforced
|
|
9
|
-
* by TS
|
|
9
|
+
* by TS. Caller must hold `FEE_COLLECTOR_ROLE`.
|
|
10
|
+
*
|
|
11
|
+
* **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
|
|
12
|
+
* convention (1 token = 1_000_000 base units), not the 18 decimals typical of
|
|
13
|
+
* ERC-20. Amount parameters are base units of the token's actual decimals:
|
|
14
|
+
* for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
|
|
15
|
+
* transparent TTT test token uses 18 decimals.
|
|
10
16
|
*/
|
|
11
17
|
export declare function useManagerWithdrawTokenFee(options: ManagerHookOptions): UseMutationResult<TxHash, Error, WithdrawTokenFeeArgs>;
|
|
@@ -6,8 +6,16 @@ import { type ManagerHookOptions } from "./_shared.js";
|
|
|
6
6
|
* Partial-claim a specific encrypted amount from a vesting. The SDK encrypts
|
|
7
7
|
* the plaintext `amount` (or use `args.encryptedInput` to bypass).
|
|
8
8
|
*
|
|
9
|
+
* **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
|
|
10
|
+
* convention (1 token = 1_000_000 base units), not the 18 decimals typical of
|
|
11
|
+
* ERC-20. Amount parameters are base units of the token's actual decimals:
|
|
12
|
+
* for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
|
|
13
|
+
* transparent TTT test token uses 18 decimals.
|
|
14
|
+
*
|
|
9
15
|
* After success, invalidate `useGetClaimableAmount` and `useGetSettledAmount`.
|
|
10
16
|
*
|
|
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
|
+
*
|
|
11
19
|
* @example
|
|
12
20
|
* const partial = usePartialClaim({ address: managerAddress, encryptor: () => useZamaSDK() });
|
|
13
21
|
* partial.mutate({ vestingId, amount: 50_000n, value: gasFee });
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type UseQueryResult } from "@tanstack/react-query";
|
|
2
|
+
import type { Address } from "viem";
|
|
3
|
+
import type { CreateVestingPreflightReport, VestingParams } from "../types.js";
|
|
4
|
+
import { type ManagerHookOptions } from "./_shared.js";
|
|
5
|
+
export interface UsePreflightCreateVestingArgs extends ManagerHookOptions {
|
|
6
|
+
/** The vesting schedule parameters to validate. */
|
|
7
|
+
params?: VestingParams;
|
|
8
|
+
/** The address that will send the create transaction. */
|
|
9
|
+
creator?: Address;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Read-only preflight for `useCreateVesting` / `useBatchCreateVesting` —
|
|
13
|
+
* wraps {@link ConfidentialVestingManagerClient.preflightCreateVesting} as a
|
|
14
|
+
* TanStack query.
|
|
15
|
+
*
|
|
16
|
+
* The report carries `token`, `hasCreatorRole`, `isOperatorSet`, `ready`,
|
|
17
|
+
* `blockers` (human-readable strings) and `blockerErrors` (typed
|
|
18
|
+
* `TokenOpsSdkError`s, index-aligned with `blockers` — branch on
|
|
19
|
+
* `error.code`).
|
|
20
|
+
*
|
|
21
|
+
* Checks: structural `params` validation, `VESTING_CREATOR_ROLE` membership,
|
|
22
|
+
* and ERC-7984 operator approval of the manager on the distribution token.
|
|
23
|
+
* The creator's confidential token balance is NOT checked (encrypted; an
|
|
24
|
+
* underfunded create silently zeroes amounts instead of reverting) — see the
|
|
25
|
+
* headless method's TSDoc.
|
|
26
|
+
*
|
|
27
|
+
* Hook is disabled until `params` and `creator` are both set. Refetch after
|
|
28
|
+
* the user grants the role or calls `setOperator` (e.g. via
|
|
29
|
+
* `queryClient.invalidateQueries` or a `refetchInterval`).
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* const { data: report } = usePreflightCreateVesting({
|
|
33
|
+
* address: managerAddress, params, creator,
|
|
34
|
+
* });
|
|
35
|
+
* if (report?.ready) { /* enable submit *\/ }
|
|
36
|
+
*/
|
|
37
|
+
export declare function usePreflightCreateVesting(args: UsePreflightCreateVestingArgs): UseQueryResult<CreateVestingPreflightReport, Error>;
|
|
@@ -12,6 +12,8 @@ import { type ManagerHookOptions } from "./_shared.js";
|
|
|
12
12
|
* After success, invalidate `useAccessClaimableAmount` (the encrypted view) and
|
|
13
13
|
* any UI counts you computed off it.
|
|
14
14
|
*
|
|
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.
|
|
16
|
+
*
|
|
15
17
|
* @example
|
|
16
18
|
* const claim = useVestingClaim({ address: managerAddress });
|
|
17
19
|
* claim.mutate({ vestingId, value: gasFee });
|
|
@@ -13,5 +13,11 @@ export interface UseWithdrawAdminArgs {
|
|
|
13
13
|
* Admin: withdraw an encrypted amount of the manager's distribution token to
|
|
14
14
|
* `msg.sender`. Caller must hold `WITHDRAWER_ROLE`. The SDK encrypts `amount`
|
|
15
15
|
* (or pass `encryptedInput` to bypass).
|
|
16
|
+
*
|
|
17
|
+
* **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
|
|
18
|
+
* convention (1 token = 1_000_000 base units), not the 18 decimals typical of
|
|
19
|
+
* ERC-20. Amount parameters are base units of the token's actual decimals:
|
|
20
|
+
* for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
|
|
21
|
+
* transparent TTT test token uses 18 decimals.
|
|
16
22
|
*/
|
|
17
23
|
export declare function useWithdrawAdmin(options: ManagerHookOptions): UseMutationResult<Hex, Error, UseWithdrawAdminArgs>;
|
|
@@ -14,5 +14,11 @@ export interface UseWithdrawTokenFeeArgs {
|
|
|
14
14
|
* Fee collector: withdraw collected distribution-token fees
|
|
15
15
|
* (`FeeType.DistributionToken` managers). SDK encrypts `amount` (or pass
|
|
16
16
|
* `encryptedInput`). Caller must hold `FEE_COLLECTOR_ROLE`.
|
|
17
|
+
*
|
|
18
|
+
* **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
|
|
19
|
+
* convention (1 token = 1_000_000 base units), not the 18 decimals typical of
|
|
20
|
+
* ERC-20. Amount parameters are base units of the token's actual decimals:
|
|
21
|
+
* for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
|
|
22
|
+
* transparent TTT test token uses 18 decimals.
|
|
17
23
|
*/
|
|
18
24
|
export declare function useWithdrawTokenFee(options: ManagerHookOptions): UseMutationResult<Hex, Error, UseWithdrawTokenFeeArgs>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Address } from "viem";
|
|
2
|
+
import type { TokenOpsSdkError } from "../core/errors.js";
|
|
2
3
|
export type { EncryptedInput, EncryptedInputs, EncryptedViewResult } from "../fhe/types.js";
|
|
3
4
|
/**
|
|
4
5
|
* Plaintext mirror of `IConfidentialVestingManagerTypes.VestingParams`. Field
|
|
@@ -44,8 +45,6 @@ export declare enum FeeType {
|
|
|
44
45
|
* (which is also less type-safe — the reverse lookup returns
|
|
45
46
|
* `string | undefined`).
|
|
46
47
|
*
|
|
47
|
-
* R22 devops-integrator MINOR-2; R25 close.
|
|
48
|
-
*
|
|
49
48
|
* @example
|
|
50
49
|
* const { feeType, fee } = await manager.getFeeInfo();
|
|
51
50
|
* const summary = { fee: fee.toString(), feeType, feeTypeName: feeTypeName(feeType) };
|
|
@@ -70,3 +69,36 @@ export interface PendingTransfer {
|
|
|
70
69
|
initiatedAt: number;
|
|
71
70
|
expiresAt: number;
|
|
72
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* Report returned by `ConfidentialVestingManagerClient.preflightCreateVesting`.
|
|
74
|
+
*
|
|
75
|
+
* Fields:
|
|
76
|
+
* - `token` — the ERC-7984 distribution token this manager clone is bound to.
|
|
77
|
+
* - `hasCreatorRole` — `true` when the creator holds `VESTING_CREATOR_ROLE` on
|
|
78
|
+
* the manager.
|
|
79
|
+
* - `isOperatorSet` — `true` when the creator has approved the manager as an
|
|
80
|
+
* ERC-7984 operator on `token` (required for the manager's
|
|
81
|
+
* `confidentialTransferFrom` pull).
|
|
82
|
+
* - `ready` — `true` when no blockers were detected.
|
|
83
|
+
* - `blockers` — human-readable blocker descriptions. Empty when
|
|
84
|
+
* `ready === true`.
|
|
85
|
+
* - `blockerErrors` — the same blockers as typed `TokenOpsSdkError`s, index-
|
|
86
|
+
* aligned with `blockers`. Branch on `error.code` to render UI.
|
|
87
|
+
*/
|
|
88
|
+
export interface CreateVestingPreflightReport {
|
|
89
|
+
/** The ERC-7984 distribution token the manager clone is bound to. */
|
|
90
|
+
token: Address;
|
|
91
|
+
/** `true` when the creator holds `VESTING_CREATOR_ROLE` on the manager. */
|
|
92
|
+
hasCreatorRole: boolean;
|
|
93
|
+
/** `true` when the creator has approved the manager as operator on `token`. */
|
|
94
|
+
isOperatorSet: boolean;
|
|
95
|
+
/** `true` when no blockers were detected — green light to submit the write. */
|
|
96
|
+
ready: boolean;
|
|
97
|
+
/** Human-readable blocker descriptions. Empty when `ready === true`. */
|
|
98
|
+
blockers: string[];
|
|
99
|
+
/**
|
|
100
|
+
* Typed errors that would otherwise surface at write time, index-aligned
|
|
101
|
+
* with `blockers`. Empty when `ready === true`.
|
|
102
|
+
*/
|
|
103
|
+
blockerErrors: TokenOpsSdkError[];
|
|
104
|
+
}
|
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkPUPKNW3R_cjs = require('./chunk-PUPKNW3R.cjs');
|
|
4
4
|
var chunk66IHPTOK_cjs = require('./chunk-66IHPTOK.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunk67OV5CX2_cjs = require('./chunk-67OV5CX2.cjs');
|
|
6
6
|
var chains = require('viem/chains');
|
|
7
7
|
|
|
8
8
|
var SUPPORTED_CHAINS = {
|
|
@@ -15,43 +15,59 @@ function isSupportedChainId(chainId) {
|
|
|
15
15
|
|
|
16
16
|
Object.defineProperty(exports, "DEPLOYED_ADDRESSES", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkPUPKNW3R_cjs.DEPLOYED_ADDRESSES; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "chainsWithDeployment", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkPUPKNW3R_cjs.chainsWithDeployment; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "chainsWithKnownRegistryEntry", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkPUPKNW3R_cjs.chainsWithKnownRegistryEntry; }
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports, "getConfidentialTestTokenAddress", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function () { return chunkPUPKNW3R_cjs.getConfidentialTestTokenAddress; }
|
|
27
31
|
});
|
|
28
32
|
Object.defineProperty(exports, "getDeployedAddress", {
|
|
29
33
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkPUPKNW3R_cjs.getDeployedAddress; }
|
|
31
35
|
});
|
|
32
36
|
Object.defineProperty(exports, "getFheAirdropFactoryAddress", {
|
|
33
37
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkPUPKNW3R_cjs.getFheAirdropFactoryAddress; }
|
|
35
39
|
});
|
|
36
40
|
Object.defineProperty(exports, "getFheDisperseSingletonAddress", {
|
|
37
41
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkPUPKNW3R_cjs.getFheDisperseSingletonAddress; }
|
|
39
43
|
});
|
|
40
44
|
Object.defineProperty(exports, "getFheVestingFactoryAddress", {
|
|
41
45
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkPUPKNW3R_cjs.getFheVestingFactoryAddress; }
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "getTestTokenAddress", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () { return chunkPUPKNW3R_cjs.getTestTokenAddress; }
|
|
51
|
+
});
|
|
52
|
+
Object.defineProperty(exports, "requireConfidentialTestTokenAddress", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
get: function () { return chunkPUPKNW3R_cjs.requireConfidentialTestTokenAddress; }
|
|
43
55
|
});
|
|
44
56
|
Object.defineProperty(exports, "requireFheAirdropFactoryAddress", {
|
|
45
57
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkPUPKNW3R_cjs.requireFheAirdropFactoryAddress; }
|
|
47
59
|
});
|
|
48
60
|
Object.defineProperty(exports, "requireFheDisperseSingletonAddress", {
|
|
49
61
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunkPUPKNW3R_cjs.requireFheDisperseSingletonAddress; }
|
|
51
63
|
});
|
|
52
64
|
Object.defineProperty(exports, "requireFheVestingFactoryAddress", {
|
|
53
65
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunkPUPKNW3R_cjs.requireFheVestingFactoryAddress; }
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(exports, "requireTestTokenAddress", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: function () { return chunkPUPKNW3R_cjs.requireTestTokenAddress; }
|
|
55
71
|
});
|
|
56
72
|
Object.defineProperty(exports, "asAirdropId", {
|
|
57
73
|
enumerable: true,
|
|
@@ -87,151 +103,159 @@ Object.defineProperty(exports, "asVestingId", {
|
|
|
87
103
|
});
|
|
88
104
|
Object.defineProperty(exports, "AccessDeniedError", {
|
|
89
105
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
106
|
+
get: function () { return chunk67OV5CX2_cjs.AccessDeniedError; }
|
|
91
107
|
});
|
|
92
108
|
Object.defineProperty(exports, "AlreadyInitializedError", {
|
|
93
109
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
110
|
+
get: function () { return chunk67OV5CX2_cjs.AlreadyInitializedError; }
|
|
95
111
|
});
|
|
96
112
|
Object.defineProperty(exports, "BatchTooLargeError", {
|
|
97
113
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
114
|
+
get: function () { return chunk67OV5CX2_cjs.BatchTooLargeError; }
|
|
99
115
|
});
|
|
100
116
|
Object.defineProperty(exports, "ContractRevertError", {
|
|
101
117
|
enumerable: true,
|
|
102
|
-
get: function () { return
|
|
118
|
+
get: function () { return chunk67OV5CX2_cjs.ContractRevertError; }
|
|
103
119
|
});
|
|
104
120
|
Object.defineProperty(exports, "DecryptionFailedError", {
|
|
105
121
|
enumerable: true,
|
|
106
|
-
get: function () { return
|
|
122
|
+
get: function () { return chunk67OV5CX2_cjs.DecryptionFailedError; }
|
|
107
123
|
});
|
|
108
124
|
Object.defineProperty(exports, "DeploymentAddressUnavailableError", {
|
|
109
125
|
enumerable: true,
|
|
110
|
-
get: function () { return
|
|
126
|
+
get: function () { return chunk67OV5CX2_cjs.DeploymentAddressUnavailableError; }
|
|
111
127
|
});
|
|
112
128
|
Object.defineProperty(exports, "EncryptionFailedError", {
|
|
113
129
|
enumerable: true,
|
|
114
|
-
get: function () { return
|
|
130
|
+
get: function () { return chunk67OV5CX2_cjs.EncryptionFailedError; }
|
|
115
131
|
});
|
|
116
132
|
Object.defineProperty(exports, "FeatureDisabledError", {
|
|
117
133
|
enumerable: true,
|
|
118
|
-
get: function () { return
|
|
134
|
+
get: function () { return chunk67OV5CX2_cjs.FeatureDisabledError; }
|
|
119
135
|
});
|
|
120
136
|
Object.defineProperty(exports, "FheHandleNotAllowedError", {
|
|
121
137
|
enumerable: true,
|
|
122
|
-
get: function () { return
|
|
138
|
+
get: function () { return chunk67OV5CX2_cjs.FheHandleNotAllowedError; }
|
|
123
139
|
});
|
|
124
140
|
Object.defineProperty(exports, "InsufficientBalanceError", {
|
|
125
141
|
enumerable: true,
|
|
126
|
-
get: function () { return
|
|
142
|
+
get: function () { return chunk67OV5CX2_cjs.InsufficientBalanceError; }
|
|
127
143
|
});
|
|
128
144
|
Object.defineProperty(exports, "InsufficientFeeError", {
|
|
129
145
|
enumerable: true,
|
|
130
|
-
get: function () { return
|
|
146
|
+
get: function () { return chunk67OV5CX2_cjs.InsufficientFeeError; }
|
|
131
147
|
});
|
|
132
148
|
Object.defineProperty(exports, "InsufficientGasFundsError", {
|
|
133
149
|
enumerable: true,
|
|
134
|
-
get: function () { return
|
|
150
|
+
get: function () { return chunk67OV5CX2_cjs.InsufficientGasFundsError; }
|
|
135
151
|
});
|
|
136
152
|
Object.defineProperty(exports, "InvalidArgumentError", {
|
|
137
153
|
enumerable: true,
|
|
138
|
-
get: function () { return
|
|
154
|
+
get: function () { return chunk67OV5CX2_cjs.InvalidArgumentError; }
|
|
139
155
|
});
|
|
140
156
|
Object.defineProperty(exports, "InvalidSignatureError", {
|
|
141
157
|
enumerable: true,
|
|
142
|
-
get: function () { return
|
|
158
|
+
get: function () { return chunk67OV5CX2_cjs.InvalidSignatureError; }
|
|
143
159
|
});
|
|
144
160
|
Object.defineProperty(exports, "MissingAccountError", {
|
|
145
161
|
enumerable: true,
|
|
146
|
-
get: function () { return
|
|
162
|
+
get: function () { return chunk67OV5CX2_cjs.MissingAccountError; }
|
|
147
163
|
});
|
|
148
164
|
Object.defineProperty(exports, "MissingClientError", {
|
|
149
165
|
enumerable: true,
|
|
150
|
-
get: function () { return
|
|
166
|
+
get: function () { return chunk67OV5CX2_cjs.MissingClientError; }
|
|
151
167
|
});
|
|
152
168
|
Object.defineProperty(exports, "MissingEncryptorError", {
|
|
153
169
|
enumerable: true,
|
|
154
|
-
get: function () { return
|
|
170
|
+
get: function () { return chunk67OV5CX2_cjs.MissingEncryptorError; }
|
|
155
171
|
});
|
|
156
172
|
Object.defineProperty(exports, "MissingPublicClientError", {
|
|
157
173
|
enumerable: true,
|
|
158
|
-
get: function () { return
|
|
174
|
+
get: function () { return chunk67OV5CX2_cjs.MissingPublicClientError; }
|
|
159
175
|
});
|
|
160
176
|
Object.defineProperty(exports, "MissingWalletClientError", {
|
|
161
177
|
enumerable: true,
|
|
162
|
-
get: function () { return
|
|
178
|
+
get: function () { return chunk67OV5CX2_cjs.MissingWalletClientError; }
|
|
163
179
|
});
|
|
164
180
|
Object.defineProperty(exports, "NetworkError", {
|
|
165
181
|
enumerable: true,
|
|
166
|
-
get: function () { return
|
|
182
|
+
get: function () { return chunk67OV5CX2_cjs.NetworkError; }
|
|
183
|
+
});
|
|
184
|
+
Object.defineProperty(exports, "OPERATOR_NOT_APPROVED_REMEDIATION", {
|
|
185
|
+
enumerable: true,
|
|
186
|
+
get: function () { return chunk67OV5CX2_cjs.OPERATOR_NOT_APPROVED_REMEDIATION; }
|
|
187
|
+
});
|
|
188
|
+
Object.defineProperty(exports, "OperatorNotApprovedError", {
|
|
189
|
+
enumerable: true,
|
|
190
|
+
get: function () { return chunk67OV5CX2_cjs.OperatorNotApprovedError; }
|
|
167
191
|
});
|
|
168
192
|
Object.defineProperty(exports, "PausedError", {
|
|
169
193
|
enumerable: true,
|
|
170
|
-
get: function () { return
|
|
194
|
+
get: function () { return chunk67OV5CX2_cjs.PausedError; }
|
|
171
195
|
});
|
|
172
196
|
Object.defineProperty(exports, "ReceiptEventAmbiguousError", {
|
|
173
197
|
enumerable: true,
|
|
174
|
-
get: function () { return
|
|
198
|
+
get: function () { return chunk67OV5CX2_cjs.ReceiptEventAmbiguousError; }
|
|
175
199
|
});
|
|
176
200
|
Object.defineProperty(exports, "ReceiptEventNotFoundError", {
|
|
177
201
|
enumerable: true,
|
|
178
|
-
get: function () { return
|
|
202
|
+
get: function () { return chunk67OV5CX2_cjs.ReceiptEventNotFoundError; }
|
|
179
203
|
});
|
|
180
204
|
Object.defineProperty(exports, "ReentrancyError", {
|
|
181
205
|
enumerable: true,
|
|
182
|
-
get: function () { return
|
|
206
|
+
get: function () { return chunk67OV5CX2_cjs.ReentrancyError; }
|
|
183
207
|
});
|
|
184
208
|
Object.defineProperty(exports, "RelayerUnreachableError", {
|
|
185
209
|
enumerable: true,
|
|
186
|
-
get: function () { return
|
|
210
|
+
get: function () { return chunk67OV5CX2_cjs.RelayerUnreachableError; }
|
|
187
211
|
});
|
|
188
212
|
Object.defineProperty(exports, "SigningFailedError", {
|
|
189
213
|
enumerable: true,
|
|
190
|
-
get: function () { return
|
|
214
|
+
get: function () { return chunk67OV5CX2_cjs.SigningFailedError; }
|
|
191
215
|
});
|
|
192
216
|
Object.defineProperty(exports, "TokenOpsContractError", {
|
|
193
217
|
enumerable: true,
|
|
194
|
-
get: function () { return
|
|
218
|
+
get: function () { return chunk67OV5CX2_cjs.TokenOpsContractError; }
|
|
195
219
|
});
|
|
196
220
|
Object.defineProperty(exports, "TokenOpsSdkError", {
|
|
197
221
|
enumerable: true,
|
|
198
|
-
get: function () { return
|
|
222
|
+
get: function () { return chunk67OV5CX2_cjs.TokenOpsSdkError; }
|
|
199
223
|
});
|
|
200
224
|
Object.defineProperty(exports, "TokenOpsValidationError", {
|
|
201
225
|
enumerable: true,
|
|
202
|
-
get: function () { return
|
|
226
|
+
get: function () { return chunk67OV5CX2_cjs.TokenOpsValidationError; }
|
|
203
227
|
});
|
|
204
228
|
Object.defineProperty(exports, "TransferFailedError", {
|
|
205
229
|
enumerable: true,
|
|
206
|
-
get: function () { return
|
|
230
|
+
get: function () { return chunk67OV5CX2_cjs.TransferFailedError; }
|
|
207
231
|
});
|
|
208
232
|
Object.defineProperty(exports, "UnknownWriteFailureError", {
|
|
209
233
|
enumerable: true,
|
|
210
|
-
get: function () { return
|
|
234
|
+
get: function () { return chunk67OV5CX2_cjs.UnknownWriteFailureError; }
|
|
211
235
|
});
|
|
212
236
|
Object.defineProperty(exports, "UnsupportedChainError", {
|
|
213
237
|
enumerable: true,
|
|
214
|
-
get: function () { return
|
|
238
|
+
get: function () { return chunk67OV5CX2_cjs.UnsupportedChainError; }
|
|
215
239
|
});
|
|
216
240
|
Object.defineProperty(exports, "UserDecryptNotAllowedError", {
|
|
217
241
|
enumerable: true,
|
|
218
|
-
get: function () { return
|
|
242
|
+
get: function () { return chunk67OV5CX2_cjs.UserDecryptNotAllowedError; }
|
|
219
243
|
});
|
|
220
244
|
Object.defineProperty(exports, "UserRejectedSignatureError", {
|
|
221
245
|
enumerable: true,
|
|
222
|
-
get: function () { return
|
|
246
|
+
get: function () { return chunk67OV5CX2_cjs.UserRejectedSignatureError; }
|
|
223
247
|
});
|
|
224
248
|
Object.defineProperty(exports, "WalletChainMismatchError", {
|
|
225
249
|
enumerable: true,
|
|
226
|
-
get: function () { return
|
|
250
|
+
get: function () { return chunk67OV5CX2_cjs.WalletChainMismatchError; }
|
|
227
251
|
});
|
|
228
252
|
Object.defineProperty(exports, "WalletRejectedError", {
|
|
229
253
|
enumerable: true,
|
|
230
|
-
get: function () { return
|
|
254
|
+
get: function () { return chunk67OV5CX2_cjs.WalletRejectedError; }
|
|
231
255
|
});
|
|
232
256
|
Object.defineProperty(exports, "isTokenOpsSdkError", {
|
|
233
257
|
enumerable: true,
|
|
234
|
-
get: function () { return
|
|
258
|
+
get: function () { return chunk67OV5CX2_cjs.isTokenOpsSdkError; }
|
|
235
259
|
});
|
|
236
260
|
exports.SUPPORTED_CHAINS = SUPPORTED_CHAINS;
|
|
237
261
|
exports.isSupportedChainId = isSupportedChainId;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export * from "./core/index.js";
|
|
2
|
-
export { TokenOpsSdkError, isTokenOpsSdkError, DeploymentAddressUnavailableError, UnsupportedChainError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, InvalidArgumentError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, ContractRevertError, PausedError, AccessDeniedError, InsufficientFeeError, InsufficientBalanceError, BatchTooLargeError, FeatureDisabledError, TransferFailedError, FheHandleNotAllowedError, AlreadyInitializedError, ReentrancyError, InvalidSignatureError, WalletRejectedError, WalletChainMismatchError, NetworkError, InsufficientGasFundsError, UnknownWriteFailureError, UserRejectedSignatureError, SigningFailedError, RelayerUnreachableError, EncryptionFailedError, DecryptionFailedError, UserDecryptNotAllowedError, type DeploymentAddressUnavailableReason, type TokenOpsSdkErrorCode, } from "./core/errors.js";
|
|
2
|
+
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";
|
|
3
3
|
export { type PreflightResult } from "./core/preflight.js";
|