@tokenops/sdk 2.0.0-alpha.2 → 2.0.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +92 -3
- package/README.md +76 -34
- package/SUPPORT.md +1 -1
- package/dist/{chunk-PYYSB5ZN.js → chunk-2ND7US2I.js} +1 -1
- package/dist/{chunk-EYDA6Q6C.js → chunk-3ZSPRHR3.js} +63 -12
- package/dist/{chunk-X7WBPCEU.js → chunk-67Q6KSVV.js} +4578 -3383
- package/dist/{chunk-UHHMVBLU.cjs → chunk-6AYJRUGP.cjs} +7 -50
- package/dist/{chunk-FEDX7B6T.cjs → chunk-6FUHF73F.cjs} +5 -5
- package/dist/{chunk-NWFMBLSQ.js → chunk-7KY4K4PH.js} +1 -1
- package/dist/{chunk-FHWSBGWE.cjs → chunk-ARZ5C3FS.cjs} +7 -7
- package/dist/{chunk-SPLNGUFF.js → chunk-AX6MQAWU.js} +2 -2
- package/dist/{chunk-IGO5XSPS.js → chunk-BSXEX2SH.js} +3 -3
- package/dist/{chunk-44YJPMQC.js → chunk-CHGY6B7L.js} +34 -81
- package/dist/{chunk-IUKKNJ2R.cjs → chunk-DFK5GCJP.cjs} +55 -72
- package/dist/{chunk-PZZK3O3S.cjs → chunk-E4IV4M4E.cjs} +4598 -3403
- package/dist/{chunk-A4DCEE33.js → chunk-GHGF65LN.js} +16 -12
- package/dist/{chunk-TWT3STIX.js → chunk-K3R27WX4.js} +8 -46
- package/dist/{chunk-GADGBQJO.js → chunk-KJUNBOJQ.js} +52 -71
- package/dist/{chunk-MM5BV5CS.cjs → chunk-PO3A2AQX.cjs} +4 -4
- package/dist/{chunk-EBLBPUPI.cjs → chunk-QHDMPT7I.cjs} +72 -19
- package/dist/{chunk-3YHBO2DL.cjs → chunk-S47IBDTA.cjs} +36 -83
- package/dist/{chunk-UG5RKLU2.cjs → chunk-SUYBAF27.cjs} +1 -1
- package/dist/{chunk-WJMEBBU7.js → chunk-TWU7L5H7.js} +5 -48
- package/dist/{chunk-WJLECC22.cjs → chunk-UUSSWOPR.cjs} +9 -47
- package/dist/{chunk-AREQJHKA.cjs → chunk-VHKMWWBA.cjs} +428 -22
- package/dist/{chunk-FT5H2Q7Y.cjs → chunk-YAL6JSAZ.cjs} +16 -12
- package/dist/{chunk-VW356KR3.js → chunk-YMWMIWBP.js} +421 -25
- package/dist/core/addresses.d.ts +4 -4
- package/dist/core/errors.d.ts +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/pending.d.ts +57 -0
- package/dist/core/version.d.ts +1 -1
- package/dist/fhe/operators.d.ts +6 -5
- package/dist/fhe/types.d.ts +1 -1
- package/dist/fhe-airdrop/abis/airdrop-base.d.ts +97 -1
- package/dist/fhe-airdrop/abis/ecdsa.d.ts +117 -1
- package/dist/fhe-airdrop/abis/factory.d.ts +332 -1
- package/dist/fhe-airdrop/abis/merkle.d.ts +116 -1
- package/dist/fhe-airdrop/advanced/index.cjs +8 -4
- package/dist/fhe-airdrop/advanced/index.d.cts +1 -0
- package/dist/fhe-airdrop/advanced/index.d.ts +1 -0
- package/dist/fhe-airdrop/advanced/index.js +1 -1
- package/dist/fhe-airdrop/advanced/react/index.cjs +145 -137
- package/dist/fhe-airdrop/advanced/react/index.d.cts +1 -0
- package/dist/fhe-airdrop/advanced/react/index.d.ts +1 -0
- package/dist/fhe-airdrop/advanced/react/index.js +85 -78
- package/dist/fhe-airdrop/advanced/react/useClearCompliancePolicy.d.ts +3 -1
- package/dist/fhe-airdrop/advanced/react/useDisableCustomFee.d.ts +4 -1
- package/dist/fhe-airdrop/advanced/react/useFactoryComplianceDelegate.d.ts +2 -4
- package/dist/fhe-airdrop/advanced/react/useFactoryRenounceRole.d.ts +4 -3
- package/dist/fhe-airdrop/advanced/react/useFactoryRevokeRole.d.ts +9 -7
- package/dist/fhe-airdrop/advanced/react/useFactoryRoleMembers.d.ts +6 -5
- package/dist/fhe-airdrop/advanced/react/useSetComplianceDelegate.d.ts +7 -7
- package/dist/fhe-airdrop/advanced/react/useSetComplianceManagerImpl.d.ts +3 -1
- package/dist/fhe-airdrop/advanced/react/useSetCompliancePolicy.d.ts +2 -1
- package/dist/fhe-airdrop/advanced/react/useSetCustomFee.d.ts +4 -1
- package/dist/fhe-airdrop/advanced/react/useSetDefaultDelegateToCompliance.d.ts +5 -4
- package/dist/fhe-airdrop/advanced/react/useSetDefaultGasFee.d.ts +7 -3
- package/dist/fhe-airdrop/advanced/react/useSetMaxGasFee.d.ts +37 -0
- package/dist/fhe-airdrop/airdrop-base.d.ts +142 -18
- package/dist/fhe-airdrop/campaign.d.ts +37 -73
- package/dist/fhe-airdrop/compliance-clone.d.ts +21 -0
- package/dist/fhe-airdrop/constants.d.ts +11 -1
- package/dist/fhe-airdrop/ecdsa.d.ts +79 -26
- package/dist/fhe-airdrop/encryption.d.ts +19 -6
- package/dist/fhe-airdrop/errors.d.ts +136 -2
- package/dist/fhe-airdrop/factory-params.d.ts +2361 -0
- package/dist/fhe-airdrop/factory.d.ts +189 -75
- package/dist/fhe-airdrop/guards.d.ts +183 -19
- package/dist/fhe-airdrop/index.cjs +88 -56
- package/dist/fhe-airdrop/index.d.cts +12 -10
- package/dist/fhe-airdrop/index.d.ts +12 -10
- package/dist/fhe-airdrop/index.js +5 -5
- package/dist/fhe-airdrop/merkle-tree.d.ts +9 -9
- package/dist/fhe-airdrop/merkle.d.ts +32 -11
- package/dist/fhe-airdrop/react/_shared.d.ts +12 -6
- package/dist/fhe-airdrop/react/index.cjs +336 -240
- package/dist/fhe-airdrop/react/index.d.cts +19 -9
- package/dist/fhe-airdrop/react/index.d.ts +19 -9
- package/dist/fhe-airdrop/react/index.js +158 -97
- package/dist/fhe-airdrop/react/keys.d.ts +54 -7
- package/dist/fhe-airdrop/react/useAccessEcdsaClaimAmount.d.ts +6 -3
- package/dist/fhe-airdrop/react/useAccessMerkleClaimAmount.d.ts +2 -2
- package/dist/fhe-airdrop/react/useAirdropConfig.d.ts +8 -3
- package/dist/fhe-airdrop/react/useAirdropPause.d.ts +5 -0
- package/dist/fhe-airdrop/react/useBuildMerkleCampaign.d.ts +4 -6
- package/dist/fhe-airdrop/react/useComplianceManager.d.ts +2 -2
- package/dist/fhe-airdrop/react/useComplianceManagerOf.d.ts +1 -2
- package/dist/fhe-airdrop/react/useCreateAndFundEcdsaAirdrop.d.ts +16 -11
- package/dist/fhe-airdrop/react/useCreateAndFundMerkleAirdrop.d.ts +23 -7
- package/dist/fhe-airdrop/react/useCreateEcdsaAirdrop.d.ts +13 -8
- package/dist/fhe-airdrop/react/useCreateMerkleAirdrop.d.ts +27 -7
- package/dist/fhe-airdrop/react/useDedupMode.d.ts +16 -0
- package/dist/fhe-airdrop/react/useDiscloseHandleToParty.d.ts +4 -3
- package/dist/fhe-airdrop/react/useEcdsaClaim.d.ts +6 -4
- package/dist/fhe-airdrop/react/useEcdsaClaimAndUnwrap.d.ts +15 -8
- package/dist/fhe-airdrop/react/useEcdsaDomain.d.ts +1 -1
- package/dist/fhe-airdrop/react/useEncryptCampaignAmounts.d.ts +5 -7
- package/dist/fhe-airdrop/react/useExtendClaimWindow.d.ts +4 -1
- package/dist/fhe-airdrop/react/useFactoryFees.d.ts +11 -4
- package/dist/fhe-airdrop/react/useFundAirdrop.d.ts +3 -4
- package/dist/fhe-airdrop/react/useGrantInstanceRoles.d.ts +2 -1
- package/dist/fhe-airdrop/react/useIsAirdrop.d.ts +44 -0
- package/dist/fhe-airdrop/react/useIsSignatureValid.d.ts +5 -4
- package/dist/fhe-airdrop/react/useMerkleClaim.d.ts +4 -1
- package/dist/fhe-airdrop/react/useMerkleClaimAndUnwrap.d.ts +14 -3
- package/dist/fhe-airdrop/react/usePlanMerkleCampaign.d.ts +18 -3
- package/dist/fhe-airdrop/react/usePreflightClaim.d.ts +1 -1
- package/dist/fhe-airdrop/react/usePreflightCreateAirdrop.d.ts +34 -13
- package/dist/fhe-airdrop/react/useRefreshComplianceBalance.d.ts +36 -0
- package/dist/fhe-airdrop/react/useRescueERC20.d.ts +3 -3
- package/dist/fhe-airdrop/react/useRescueNativeToken.d.ts +23 -0
- package/dist/fhe-airdrop/react/useResolveGasFee.d.ts +30 -0
- package/dist/fhe-airdrop/react/useRotateMerkleRoot.d.ts +5 -2
- package/dist/fhe-airdrop/react/useSignClaimAuthorization.d.ts +4 -0
- package/dist/fhe-airdrop/react/useTokenOf.d.ts +29 -0
- package/dist/fhe-airdrop/react/useUnwrapRequest.d.ts +25 -0
- package/dist/fhe-airdrop/react/useWithdrawConfidential.d.ts +4 -0
- package/dist/fhe-airdrop/roles.d.ts +82 -7
- package/dist/fhe-airdrop/types.d.ts +122 -14
- package/dist/fhe-disperse/errors.d.ts +3 -3
- package/dist/fhe-disperse/index.cjs +22 -22
- package/dist/fhe-disperse/index.d.cts +2 -1
- package/dist/fhe-disperse/index.d.ts +2 -1
- package/dist/fhe-disperse/index.js +3 -3
- package/dist/fhe-disperse/react/index.cjs +27 -25
- package/dist/fhe-disperse/react/index.d.cts +2 -1
- package/dist/fhe-disperse/react/index.d.ts +2 -1
- package/dist/fhe-disperse/react/index.js +8 -6
- package/dist/fhe-disperse/react/useDisperse.d.ts +6 -2
- package/dist/fhe-disperse/react/useRegister.d.ts +9 -3
- package/dist/fhe-disperse/react/useSingletonWithdrawTokenFee.d.ts +7 -2
- package/dist/fhe-disperse/react/useWithdrawTokenFee.d.ts +7 -2
- package/dist/fhe-disperse/singleton.d.ts +33 -19
- package/dist/fhe-disperse/types.d.ts +48 -8
- package/dist/fhe-vesting/advanced/index.cjs +6 -6
- package/dist/fhe-vesting/advanced/index.js +4 -4
- package/dist/fhe-vesting/advanced/react/index.cjs +9 -9
- package/dist/fhe-vesting/advanced/react/index.js +6 -6
- package/dist/fhe-vesting/factory.d.ts +31 -8
- package/dist/fhe-vesting/index.cjs +23 -23
- package/dist/fhe-vesting/index.d.cts +3 -2
- package/dist/fhe-vesting/index.d.ts +3 -2
- package/dist/fhe-vesting/index.js +4 -4
- package/dist/fhe-vesting/manager.d.ts +27 -2
- package/dist/fhe-vesting/react/index.cjs +126 -126
- package/dist/fhe-vesting/react/index.d.cts +3 -2
- package/dist/fhe-vesting/react/index.d.ts +3 -2
- package/dist/fhe-vesting/react/index.js +5 -5
- package/dist/fhe-vesting/react/useCreateManager.d.ts +16 -9
- package/dist/fhe-vesting/react/useCreateManagerAndGetAddress.d.ts +9 -5
- package/dist/fhe-vesting/react/useSplitVesting.d.ts +9 -3
- package/dist/index.cjs +18 -18
- package/dist/index.js +1 -1
- package/dist/testnet-faucet/faucet.d.ts +3 -0
- package/dist/testnet-faucet/index.cjs +15 -15
- package/dist/testnet-faucet/index.js +3 -3
- package/dist/testnet-faucet/react/index.cjs +9 -9
- package/dist/testnet-faucet/react/index.js +4 -4
- package/package.json +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export { ConfidentialVestingFactoryClient, createConfidentialVestingFactoryClient, type ConfidentialVestingFactoryClientConfig, type CreateManagerArgs, type CreateManagerResult, } from "./factory.js";
|
|
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";
|
|
1
|
+
export { ConfidentialVestingFactoryClient, createConfidentialVestingFactoryClient, type ConfidentialVestingFactoryClientConfig, type CreateManagerArgs, type CreateManagerResult, type PendingCreateManagerResult, } from "./factory.js";
|
|
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 PendingSplitVestingResult, 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
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
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
|
+
export type { MinedWrite, PendingWrite, ReceiptMode } from "../core/pending.js";
|
|
8
9
|
export { VestingNotFoundError, NotVestingRecipientError, ClaimLockedError, VestingRevokedError, VestingNotRevocableError, VestingExpiredError, TransferAlreadyPendingError, NoPendingTransferError, NotPendingRecipientError, TransferExpiredError, } from "./errors.js";
|
|
9
10
|
export { FHE_SPLIT_DENOMINATOR, scaleRatio, share, type ScaleRatioArgs, type ScaleRatioWidth, type ScaledRatio, } from "../fhe/scale-ratio.js";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export { ConfidentialVestingFactoryClient, createConfidentialVestingFactoryClient, type ConfidentialVestingFactoryClientConfig, type CreateManagerArgs, type CreateManagerResult, } from "./factory.js";
|
|
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";
|
|
1
|
+
export { ConfidentialVestingFactoryClient, createConfidentialVestingFactoryClient, type ConfidentialVestingFactoryClientConfig, type CreateManagerArgs, type CreateManagerResult, type PendingCreateManagerResult, } from "./factory.js";
|
|
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 PendingSplitVestingResult, 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
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
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
|
+
export type { MinedWrite, PendingWrite, ReceiptMode } from "../core/pending.js";
|
|
8
9
|
export { VestingNotFoundError, NotVestingRecipientError, ClaimLockedError, VestingRevokedError, VestingNotRevocableError, VestingExpiredError, TransferAlreadyPendingError, NoPendingTransferError, NotPendingRecipientError, TransferExpiredError, } from "./errors.js";
|
|
9
10
|
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 } from '../chunk-
|
|
1
|
+
export { ClaimLockedError, ConfidentialVestingManagerClient, NoPendingTransferError, NotPendingRecipientError, NotVestingRecipientError, TransferAlreadyPendingError, TransferExpiredError, VestingExpiredError, VestingNotFoundError, VestingNotRevocableError, VestingRevokedError, confidentialVestingManagerAbi, createConfidentialVestingManagerClient } from '../chunk-K3R27WX4.js';
|
|
2
2
|
import '../chunk-WMACINXO.js';
|
|
3
3
|
export { FHE_SPLIT_DENOMINATOR, encryptUint64, encryptUint64Batch, resolveEncryptor, scaleRatio, share } from '../chunk-6GNR22OV.js';
|
|
4
4
|
import '../chunk-ZWXJTBZO.js';
|
|
5
5
|
export { erc7984OperatorAbi } from '../chunk-7VELUOMI.js';
|
|
6
|
-
export { ConfidentialVestingFactoryClient, DisclosureType, FeeType, confidentialVestingFactoryAbi, createConfidentialVestingFactoryClient, feeTypeName } from '../chunk-
|
|
7
|
-
import '../chunk-
|
|
6
|
+
export { ConfidentialVestingFactoryClient, DisclosureType, FeeType, confidentialVestingFactoryAbi, createConfidentialVestingFactoryClient, feeTypeName } from '../chunk-TWU7L5H7.js';
|
|
7
|
+
import '../chunk-7KY4K4PH.js';
|
|
8
8
|
import '../chunk-4RAAATVY.js';
|
|
9
|
-
import '../chunk-
|
|
9
|
+
import '../chunk-GHGF65LN.js';
|
|
10
10
|
import '../chunk-ZA673I3O.js';
|
|
11
11
|
import '../chunk-KWFFIJYX.js';
|
|
12
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';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Account, Address, Hex, PublicClient, WalletClient } from "viem";
|
|
2
2
|
import { type PreflightResult } from "../core/preflight.js";
|
|
3
3
|
import { type EncryptedHandle, type Role, type TxHash, type VestingId } from "../core/brands.js";
|
|
4
|
+
import type { MinedWrite, PendingWrite, ReceiptMode } from "../core/pending.js";
|
|
4
5
|
import { type SdkTelemetry } from "../core/telemetry.js";
|
|
5
6
|
import { type Encryptor, type EncryptorSource } from "./encryption.js";
|
|
6
7
|
import { FeeType, type CreateVestingPreflightReport, type DisclosureType, type EncryptedInput, type EncryptedViewResult, type PendingTransfer, type VestingInfo, type VestingParams } from "./types.js";
|
|
@@ -214,10 +215,22 @@ export interface DiscloseArgs {
|
|
|
214
215
|
* `(originalVestingId, newRecipient)` indexed args — both supplied at call
|
|
215
216
|
* time, so the filter is exact.
|
|
216
217
|
*/
|
|
217
|
-
export interface SplitVestingResult {
|
|
218
|
+
export interface SplitVestingResult extends MinedWrite {
|
|
218
219
|
hash: Hex;
|
|
220
|
+
/** Id of the split-off vesting, parsed from the `VestingSplit` event. */
|
|
219
221
|
newVestingId: Hex;
|
|
220
222
|
}
|
|
223
|
+
/**
|
|
224
|
+
* What {@link ConfidentialVestingManagerClient.splitVesting} returns with
|
|
225
|
+
* `waitForReceipt: false` ({@link ReceiptMode}): the submission hash only. Resolve the new
|
|
226
|
+
* vesting id from the executed transaction's `VestingSplit` log.
|
|
227
|
+
*/
|
|
228
|
+
export interface PendingSplitVestingResult extends PendingWrite {
|
|
229
|
+
/** What the wallet returned for the submission; from a Safe, the `safeTxHash`. */
|
|
230
|
+
hash: Hex;
|
|
231
|
+
/** Unknown until the split executes; read its `VestingSplit` log. */
|
|
232
|
+
newVestingId: undefined;
|
|
233
|
+
}
|
|
221
234
|
/**
|
|
222
235
|
* Result of {@link ConfidentialVestingManagerClient.discloseToParty} /
|
|
223
236
|
* {@link ConfidentialVestingManagerClient.adminDiscloseToParty}.
|
|
@@ -248,6 +261,10 @@ export interface BatchDiscloseToPartyResult {
|
|
|
248
261
|
* Pass `encryptor` to enable methods that take plaintext `amount` inputs. The SDK
|
|
249
262
|
* encrypts them internally — callers never handle raw ciphertext.
|
|
250
263
|
*
|
|
264
|
+
* Safe / multisig signers: `splitVesting` takes `waitForReceipt: false`.
|
|
265
|
+
* Encrypted views and disclosures do not, because their handle is only useful
|
|
266
|
+
* to an account that can user-decrypt in-session (an EOA or a delegate).
|
|
267
|
+
*
|
|
251
268
|
* @example
|
|
252
269
|
* const manager = createConfidentialVestingManagerClient({
|
|
253
270
|
* publicClient, walletClient,
|
|
@@ -544,6 +561,8 @@ export declare class ConfidentialVestingManagerClient {
|
|
|
544
561
|
* {@link OperatorNotApprovedError} (the SDK's mapping of the on-chain
|
|
545
562
|
* `ERC7984UnauthorizedSpender` revert, whose message is the canonical
|
|
546
563
|
* `OPERATOR_NOT_APPROVED_REMEDIATION` copy).
|
|
564
|
+
* Both helpers wait for their receipt by default; a Safe / multisig signer
|
|
565
|
+
* passes `waitForReceipt: false` to them.
|
|
547
566
|
*
|
|
548
567
|
* @returns Transaction hash. Parse the `VestingCreated` event to extract the `vestingId`.
|
|
549
568
|
* @example
|
|
@@ -575,6 +594,8 @@ export declare class ConfidentialVestingManagerClient {
|
|
|
575
594
|
* {@link OperatorNotApprovedError} (the SDK's mapping of the on-chain
|
|
576
595
|
* `ERC7984UnauthorizedSpender` revert, whose message is the canonical
|
|
577
596
|
* `OPERATOR_NOT_APPROVED_REMEDIATION` copy).
|
|
597
|
+
* Both helpers wait for their receipt by default; a Safe / multisig signer
|
|
598
|
+
* passes `waitForReceipt: false` to them.
|
|
578
599
|
*
|
|
579
600
|
* @returns Transaction hash.
|
|
580
601
|
*/
|
|
@@ -693,7 +714,11 @@ export declare class ConfidentialVestingManagerClient {
|
|
|
693
714
|
* newRecipient: "0xNewRecipient",
|
|
694
715
|
* });
|
|
695
716
|
*/
|
|
696
|
-
splitVesting(args: SplitVestingArgs): Promise<SplitVestingResult>;
|
|
717
|
+
splitVesting(args: SplitVestingArgs & ReceiptMode<true>): Promise<SplitVestingResult>;
|
|
718
|
+
/** With `waitForReceipt: false`: returns on submission, before the receipt exists. */
|
|
719
|
+
splitVesting(args: SplitVestingArgs & ReceiptMode<false>): Promise<PendingSplitVestingResult>;
|
|
720
|
+
/** With a runtime `boolean`: either result, narrowed by `pending`. */
|
|
721
|
+
splitVesting(args: SplitVestingArgs & ReceiptMode): Promise<SplitVestingResult | PendingSplitVestingResult>;
|
|
697
722
|
/**
|
|
698
723
|
* Initiate a vesting schedule transfer to a new recipient.
|
|
699
724
|
* The new recipient has `transferDurationSeconds` to accept before the offer expires.
|