@tokenops/sdk 1.1.1 → 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 +18 -8
- package/dist/{chunk-5SGMJADP.cjs → chunk-2NCLOQ56.cjs} +9 -9
- package/dist/{chunk-FXCW7LVB.js → chunk-2PWNH3UE.js} +35 -6
- package/dist/{chunk-FPQBFIUW.cjs → chunk-4WPGQSNT.cjs} +3 -3
- package/dist/{chunk-OYLZEEHF.cjs → chunk-5X5WL5CU.cjs} +265 -101
- 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-SAGJIEQK.cjs → chunk-C7BRZXJA.cjs} +14 -14
- package/dist/{chunk-OQZAZIAS.js → chunk-DUZIIRPF.js} +174 -5
- package/dist/{chunk-Q7ARQSUH.cjs → chunk-FAXIIH5R.cjs} +3 -3
- package/dist/chunk-FT4LNBOS.js +11 -0
- package/dist/{chunk-QE7ZONJ2.js → chunk-IJFQ5L4I.js} +4 -4
- package/dist/{chunk-X56UVEXS.js → chunk-IXLO7GO5.js} +209 -45
- 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-3PQ2RFPC.js → chunk-NTZY6IB7.js} +4 -4
- package/dist/{chunk-JJ4R5QXF.js → chunk-ODLTEGHB.js} +1 -1
- package/dist/{chunk-XWDVPV42.js → chunk-ORFTDNFZ.js} +4 -4
- package/dist/{chunk-IR5AK5U5.js → chunk-OXTLPTO3.js} +4 -4
- package/dist/{chunk-23F7JIK5.cjs → chunk-PFXURMBZ.cjs} +77 -48
- package/dist/{chunk-3ZRHDTEX.cjs → chunk-PUPKNW3R.cjs} +2 -2
- package/dist/{chunk-IVE3QEGD.js → chunk-QBJ7O2B4.js} +18 -1
- package/dist/{chunk-JFLEEXKP.js → chunk-SG65XWH7.js} +58 -2
- package/dist/{chunk-G7G75C46.cjs → chunk-T46YXSBP.cjs} +11 -11
- package/dist/{chunk-NS44KBV5.cjs → chunk-TEBM66WA.cjs} +12 -12
- package/dist/{chunk-SYHXDHWX.cjs → chunk-TIUKIY5V.cjs} +193 -24
- package/dist/{chunk-W7JHOK7G.cjs → chunk-V2PXZVBF.cjs} +4 -4
- package/dist/{chunk-SEKC7H5Y.cjs → chunk-W7IGCOVL.cjs} +11 -11
- package/dist/{chunk-5KHIQG7Y.cjs → chunk-WENHUPZC.cjs} +31 -31
- package/dist/{chunk-ZXCOJY2Z.js → chunk-WMACINXO.js} +1 -1
- package/dist/{chunk-M7V2EDPB.js → chunk-XGGTQQFH.js} +1 -1
- package/dist/{chunk-ITQBDRWX.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/errors.d.ts +41 -1
- package/dist/core/revert-mapper.d.ts +77 -0
- 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/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/index.cjs +9 -8
- 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.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 +86 -1
- 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 +6 -0
- 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/index.cjs +8 -8
- 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.js +12 -11
- package/dist/fhe-vesting/encryption.d.ts +8 -0
- 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 +100 -1
- 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 +6 -0
- 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 -0
- package/dist/index.cjs +61 -53
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/testnet-faucet/index.cjs +58 -54
- package/dist/testnet-faucet/index.d.cts +1 -1
- package/dist/testnet-faucet/index.d.ts +1 -1
- package/dist/testnet-faucet/index.js +5 -5
- package/dist/testnet-faucet/react/index.cjs +60 -55
- package/dist/testnet-faucet/react/index.d.cts +3 -2
- package/dist/testnet-faucet/react/index.d.ts +3 -2
- package/dist/testnet-faucet/react/index.js +11 -10
- package/dist/testnet-faucet/react/useConfidentialBalance.d.ts +3 -2
- package/dist/testnet-faucet/react/useUnderlyingBalance.d.ts +2 -2
- package/package.json +3 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { ConfidentialVestingFactoryClient, createConfidentialVestingFactoryClient, type ConfidentialVestingFactoryClientConfig, type CreateManagerArgs, type CreateManagerResult, } from "./factory.js";
|
|
2
2
|
export { ConfidentialVestingManagerClient, createConfidentialVestingManagerClient, type BatchCreateVestingArgs, type BatchDiscloseToPartyResult, type ClaimArgs, type ConfidentialVestingManagerClientConfig, type CreateVestingArgs, type DiscloseArgs, type DiscloseToPartyResult, type EncryptedViewResult, type InitiateTransferArgs, type PartialClaimArgs, type SplitVestingArgs, type SplitVestingResult, } from "./manager.js";
|
|
3
3
|
export { encryptUint64, encryptUint64Batch, resolveEncryptor, type Encryptor, type EncryptorSource, type EncryptUint64Args, type EncryptUint64BatchArgs, type FheValueInput, } from "./encryption.js";
|
|
4
|
-
export { DisclosureType, FeeType, feeTypeName, type CustomFee, type EncryptedInput, type EncryptedInputs, type PendingTransfer, type VestingInfo, type VestingParams, } from "./types.js";
|
|
4
|
+
export { DisclosureType, FeeType, feeTypeName, type CreateVestingPreflightReport, type CustomFee, type EncryptedInput, type EncryptedInputs, type PendingTransfer, type VestingInfo, type VestingParams, } from "./types.js";
|
|
5
5
|
export { confidentialVestingFactoryAbi, confidentialVestingManagerAbi, erc7984OperatorAbi, } from "./abis/index.js";
|
|
6
|
-
export { TokenOpsSdkError, isTokenOpsSdkError, DeploymentAddressUnavailableError, UnsupportedChainError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, InvalidArgumentError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, TokenOpsValidationError, ContractRevertError, TokenOpsContractError, 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";
|
|
6
|
+
export { TokenOpsSdkError, isTokenOpsSdkError, DeploymentAddressUnavailableError, UnsupportedChainError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, InvalidArgumentError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, TokenOpsValidationError, ContractRevertError, TokenOpsContractError, 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";
|
|
7
7
|
export { type PreflightResult } from "../core/preflight.js";
|
|
8
8
|
export { VestingNotFoundError, NotVestingRecipientError, ClaimLockedError, VestingRevokedError, VestingNotRevocableError, VestingExpiredError, TransferAlreadyPendingError, NoPendingTransferError, NotPendingRecipientError, TransferExpiredError, } from "./errors.js";
|
|
9
9
|
export { FHE_SPLIT_DENOMINATOR, scaleRatio, share, type ScaleRatioArgs, type ScaleRatioWidth, type ScaledRatio, } from "../fhe/scale-ratio.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
export { ClaimLockedError, ConfidentialVestingManagerClient, NoPendingTransferError, NotPendingRecipientError, NotVestingRecipientError, TransferAlreadyPendingError, TransferExpiredError, VestingExpiredError, VestingNotFoundError, VestingNotRevocableError, VestingRevokedError, confidentialVestingManagerAbi, createConfidentialVestingManagerClient, encryptUint64, encryptUint64Batch, resolveEncryptor } from '../chunk-IXLO7GO5.js';
|
|
2
|
+
import '../chunk-WMACINXO.js';
|
|
3
|
+
export { FHE_SPLIT_DENOMINATOR, scaleRatio, share } from '../chunk-AOP6HMPW.js';
|
|
4
|
+
import '../chunk-ZWXJTBZO.js';
|
|
1
5
|
export { erc7984OperatorAbi } from '../chunk-7VELUOMI.js';
|
|
2
|
-
export {
|
|
3
|
-
import '../chunk-
|
|
4
|
-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
export { ConfidentialVestingFactoryClient, DisclosureType, FeeType, confidentialVestingFactoryAbi, createConfidentialVestingFactoryClient, feeTypeName } from '../chunk-IR5AK5U5.js';
|
|
7
|
-
import '../chunk-JFLEEXKP.js';
|
|
8
|
-
import '../chunk-M7V2EDPB.js';
|
|
9
|
-
import '../chunk-BE2AIZ3K.js';
|
|
6
|
+
export { ConfidentialVestingFactoryClient, DisclosureType, FeeType, confidentialVestingFactoryAbi, createConfidentialVestingFactoryClient, feeTypeName } from '../chunk-OXTLPTO3.js';
|
|
7
|
+
import '../chunk-SG65XWH7.js';
|
|
8
|
+
import '../chunk-XGGTQQFH.js';
|
|
9
|
+
import '../chunk-ZA673I3O.js';
|
|
10
10
|
import '../chunk-Q2GP5UDC.js';
|
|
11
11
|
import '../chunk-KWFFIJYX.js';
|
|
12
|
-
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, TokenOpsContractError, TokenOpsSdkError, TokenOpsValidationError, TransferFailedError, UnknownWriteFailureError, UnsupportedChainError, UserDecryptNotAllowedError, UserRejectedSignatureError, WalletChainMismatchError, WalletRejectedError, isTokenOpsSdkError } from '../chunk-
|
|
12
|
+
export { AccessDeniedError, AlreadyInitializedError, BatchTooLargeError, ContractRevertError, DecryptionFailedError, DeploymentAddressUnavailableError, EncryptionFailedError, FeatureDisabledError, FheHandleNotAllowedError, InsufficientBalanceError, InsufficientFeeError, InsufficientGasFundsError, InvalidArgumentError, InvalidSignatureError, MissingAccountError, MissingClientError, MissingEncryptorError, MissingPublicClientError, MissingWalletClientError, NetworkError, OperatorNotApprovedError, PausedError, ReceiptEventAmbiguousError, ReceiptEventNotFoundError, ReentrancyError, RelayerUnreachableError, SigningFailedError, TokenOpsContractError, TokenOpsSdkError, TokenOpsValidationError, TransferFailedError, UnknownWriteFailureError, UnsupportedChainError, UserDecryptNotAllowedError, UserRejectedSignatureError, WalletChainMismatchError, WalletRejectedError, isTokenOpsSdkError } from '../chunk-QBJ7O2B4.js';
|
|
@@ -3,7 +3,7 @@ import { type PreflightResult } from "../core/preflight.js";
|
|
|
3
3
|
import { type EncryptedHandle, type Role, type TxHash, type VestingId } from "../core/brands.js";
|
|
4
4
|
import { type SdkTelemetry } from "../core/telemetry.js";
|
|
5
5
|
import { type Encryptor, type EncryptorSource } from "./encryption.js";
|
|
6
|
-
import { FeeType, type DisclosureType, type EncryptedInput, type EncryptedViewResult, type PendingTransfer, type VestingInfo, type VestingParams } from "./types.js";
|
|
6
|
+
import { FeeType, type CreateVestingPreflightReport, type DisclosureType, type EncryptedInput, type EncryptedViewResult, type PendingTransfer, type VestingInfo, type VestingParams } from "./types.js";
|
|
7
7
|
export type { EncryptedViewResult } from "./types.js";
|
|
8
8
|
export interface ConfidentialVestingManagerClientConfig {
|
|
9
9
|
publicClient: PublicClient;
|
|
@@ -419,6 +419,51 @@ export declare class ConfidentialVestingManagerClient {
|
|
|
419
419
|
vestingId: Hex;
|
|
420
420
|
caller: Address;
|
|
421
421
|
}): Promise<PreflightResult>;
|
|
422
|
+
/**
|
|
423
|
+
* Read-only preflight for {@link createVesting} / {@link batchCreateVesting}.
|
|
424
|
+
* Runs the deterministic-from-off-chain checks and reports blockers both as
|
|
425
|
+
* human-readable strings (`blockers`) and as typed {@link TokenOpsSdkError}s
|
|
426
|
+
* (`blockerErrors`), index-aligned.
|
|
427
|
+
*
|
|
428
|
+
* Preflight is **opt-in**. Consumers who have already validated state can
|
|
429
|
+
* skip this call and invoke the write directly — they'll receive the same
|
|
430
|
+
* typed errors at write time via the revert mapper.
|
|
431
|
+
*
|
|
432
|
+
* Report fields: `token`, `hasCreatorRole`, `isOperatorSet`, `ready`,
|
|
433
|
+
* `blockers`, `blockerErrors` — see {@link CreateVestingPreflightReport} for
|
|
434
|
+
* the meaning of each.
|
|
435
|
+
*
|
|
436
|
+
* Checks performed (all read-only, no gas):
|
|
437
|
+
* - Structural `params` validation mirroring the contract's
|
|
438
|
+
* `_validateVestingParams` (`InvalidArgumentError` blockers): recipient is
|
|
439
|
+
* a checksummed non-zero address, `startTimestamp < endTimestamp`, cliff
|
|
440
|
+
* within the window, `initialUnlockBps + cliffAmountBps ≤ 10000`.
|
|
441
|
+
* - Role: creator holds `VESTING_CREATOR_ROLE`
|
|
442
|
+
* ({@link AccessDeniedError} blocker).
|
|
443
|
+
* - Operator: creator has approved this manager as an ERC-7984 operator on
|
|
444
|
+
* the distribution token, required for the manager's
|
|
445
|
+
* `confidentialTransferFrom` pull ({@link OperatorNotApprovedError} blocker).
|
|
446
|
+
*
|
|
447
|
+
* **Not preflight-detectable — read before trusting `ready: true`:**
|
|
448
|
+
* - The creator's confidential token balance is an encrypted `euint64` the
|
|
449
|
+
* SDK cannot read in plaintext. An underfunded create does **not** revert:
|
|
450
|
+
* the contract's all-or-nothing `FHE.select` pattern silently zeroes the
|
|
451
|
+
* vesting amounts instead. Confirm the creator's balance covers the total
|
|
452
|
+
* before submitting.
|
|
453
|
+
* - `batchCreateVesting` additionally enforces `items.length ≤ maxBatchSize()`
|
|
454
|
+
* on-chain; check {@link maxBatchSize} for batches.
|
|
455
|
+
*
|
|
456
|
+
* Pausing the manager does NOT block vesting creation (only claims), so
|
|
457
|
+
* paused state is intentionally not a blocker here.
|
|
458
|
+
*
|
|
459
|
+
* @param args.params The vesting schedule parameters to validate.
|
|
460
|
+
* @param args.creator The address that will send the create transaction.
|
|
461
|
+
* @returns A {@link CreateVestingPreflightReport}.
|
|
462
|
+
*/
|
|
463
|
+
preflightCreateVesting(args: {
|
|
464
|
+
params: VestingParams;
|
|
465
|
+
creator: Address;
|
|
466
|
+
}): Promise<CreateVestingPreflightReport>;
|
|
422
467
|
/**
|
|
423
468
|
* Get the vested amount at a given timestamp as an encrypted handle.
|
|
424
469
|
*
|
|
@@ -480,6 +525,14 @@ export declare class ConfidentialVestingManagerClient {
|
|
|
480
525
|
*
|
|
481
526
|
* Pass `encryptedInput` to bypass the encryptor when you manage encryption yourself.
|
|
482
527
|
*
|
|
528
|
+
* **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.
|
|
529
|
+
*
|
|
530
|
+
* **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
|
|
531
|
+
* convention (1 token = 1_000_000 base units), not the 18 decimals typical of
|
|
532
|
+
* ERC-20. Amount parameters are base units of the token's actual decimals:
|
|
533
|
+
* for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
|
|
534
|
+
* transparent TTT test token uses 18 decimals.
|
|
535
|
+
*
|
|
483
536
|
* @returns Transaction hash. Parse the `VestingCreated` event to extract the `vestingId`.
|
|
484
537
|
* @example
|
|
485
538
|
* const hash = await manager.createVesting({
|
|
@@ -496,12 +549,23 @@ export declare class ConfidentialVestingManagerClient {
|
|
|
496
549
|
*
|
|
497
550
|
* Respects `maxBatchSize` — check before calling on large lists.
|
|
498
551
|
*
|
|
552
|
+
* **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.
|
|
553
|
+
*
|
|
554
|
+
* **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
|
|
555
|
+
* convention (1 token = 1_000_000 base units), not the 18 decimals typical of
|
|
556
|
+
* ERC-20. Amount parameters are base units of the token's actual decimals:
|
|
557
|
+
* for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
|
|
558
|
+
* transparent TTT test token uses 18 decimals.
|
|
559
|
+
*
|
|
499
560
|
* @returns Transaction hash.
|
|
500
561
|
*/
|
|
501
562
|
batchCreateVesting(args: BatchCreateVestingArgs): Promise<Hex>;
|
|
502
563
|
/**
|
|
503
564
|
* Claim all currently vested tokens for `vestingId`.
|
|
504
565
|
* For `FeeType.Gas` managers, pass `value` (gas fee in wei from `getFeeInfo()`).
|
|
566
|
+
*
|
|
567
|
+
* **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.
|
|
568
|
+
*
|
|
505
569
|
* @param args Discriminated by `feeType`: pass `{ feeType, vestingId, value }` for Gas, `{ feeType, vestingId }` for DistributionToken.
|
|
506
570
|
* @returns Transaction hash.
|
|
507
571
|
* @example
|
|
@@ -514,6 +578,9 @@ export declare class ConfidentialVestingManagerClient {
|
|
|
514
578
|
/**
|
|
515
579
|
* Admin variant of `claim` — callable by the manager admin on behalf of any recipient.
|
|
516
580
|
* Useful for gas-sponsored claim flows. Same fee rules as `claim`.
|
|
581
|
+
*
|
|
582
|
+
* **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.
|
|
583
|
+
*
|
|
517
584
|
* @param args Same discriminated union as `claim`.
|
|
518
585
|
* @returns Transaction hash.
|
|
519
586
|
*/
|
|
@@ -521,12 +588,30 @@ export declare class ConfidentialVestingManagerClient {
|
|
|
521
588
|
/**
|
|
522
589
|
* Claim a specific encrypted amount from a vesting schedule rather than the full claimable balance.
|
|
523
590
|
* The SDK encrypts `amount` — pass plaintext. Alternatively pass `encryptedInput` to bypass encryption.
|
|
591
|
+
*
|
|
592
|
+
* **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.
|
|
593
|
+
*
|
|
594
|
+
* **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
|
|
595
|
+
* convention (1 token = 1_000_000 base units), not the 18 decimals typical of
|
|
596
|
+
* ERC-20. Amount parameters are base units of the token's actual decimals:
|
|
597
|
+
* for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
|
|
598
|
+
* transparent TTT test token uses 18 decimals.
|
|
599
|
+
*
|
|
524
600
|
* @param args Includes `vestingId`, `amount` or `encryptedInput`, and optional `value` for Gas-fee managers.
|
|
525
601
|
* @returns Transaction hash.
|
|
526
602
|
*/
|
|
527
603
|
partialClaim(args: PartialClaimArgs): Promise<Hex>;
|
|
528
604
|
/**
|
|
529
605
|
* Admin variant of `partialClaim` — callable by the manager admin on behalf of any recipient.
|
|
606
|
+
*
|
|
607
|
+
* **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.
|
|
608
|
+
*
|
|
609
|
+
* **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
|
|
610
|
+
* convention (1 token = 1_000_000 base units), not the 18 decimals typical of
|
|
611
|
+
* ERC-20. Amount parameters are base units of the token's actual decimals:
|
|
612
|
+
* for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
|
|
613
|
+
* transparent TTT test token uses 18 decimals.
|
|
614
|
+
*
|
|
530
615
|
* @param args Same as `partialClaim`.
|
|
531
616
|
* @returns Transaction hash.
|
|
532
617
|
*/
|
|
@@ -673,6 +758,13 @@ export declare class ConfidentialVestingManagerClient {
|
|
|
673
758
|
/**
|
|
674
759
|
* Withdraw a confidential token amount from the manager's balance back to the admin.
|
|
675
760
|
* The SDK encrypts `amount` — pass plaintext. Alternatively pass `encryptedInput`.
|
|
761
|
+
*
|
|
762
|
+
* **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
|
|
763
|
+
* convention (1 token = 1_000_000 base units), not the 18 decimals typical of
|
|
764
|
+
* ERC-20. Amount parameters are base units of the token's actual decimals:
|
|
765
|
+
* for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
|
|
766
|
+
* transparent TTT test token uses 18 decimals.
|
|
767
|
+
*
|
|
676
768
|
* @param args `{ amount }` (plaintext, SDK encrypts) or `{ encryptedInput }` (pre-encrypted).
|
|
677
769
|
* @returns Transaction hash.
|
|
678
770
|
*/
|
|
@@ -708,6 +800,13 @@ export declare class ConfidentialVestingManagerClient {
|
|
|
708
800
|
/**
|
|
709
801
|
* Withdraw accumulated token fees from a `FeeType.DistributionToken` manager. Admin only.
|
|
710
802
|
* The SDK encrypts `amount` — pass plaintext. Alternatively pass `encryptedInput`.
|
|
803
|
+
*
|
|
804
|
+
* **Amount units:** TokenOps confidential (ERC-7984) tokens use a 6-decimals
|
|
805
|
+
* convention (1 token = 1_000_000 base units), not the 18 decimals typical of
|
|
806
|
+
* ERC-20. Amount parameters are base units of the token's actual decimals:
|
|
807
|
+
* for the CTTT test token (6 decimals) `1_000_000n` = 1 CTTT, while the
|
|
808
|
+
* transparent TTT test token uses 18 decimals.
|
|
809
|
+
*
|
|
711
810
|
* @param args `{ to, amount }` (plaintext, SDK encrypts) or `{ to, encryptedInput }` (pre-encrypted).
|
|
712
811
|
* @returns Transaction hash.
|
|
713
812
|
*/
|