@tokenops/sdk 1.6.0 → 2.0.0-alpha.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/CHANGELOG.md +48 -8
- package/CONTRIBUTING.md +4 -2
- package/README.md +146 -90
- package/SUPPORT.md +47 -0
- package/dist/{chunk-HETNKZEE.js → chunk-335Z2W67.js} +1 -1
- package/dist/{chunk-BD4LZBVF.cjs → chunk-3QHNYEQD.cjs} +18 -17
- package/dist/chunk-456VDDA3.js +370 -0
- package/dist/{chunk-6WSNS3UV.js → chunk-4RAAATVY.js} +2 -4
- package/dist/{chunk-4KJ66YRH.js → chunk-4TSDNZQ3.js} +2 -2
- package/dist/{chunk-WUXUWTFW.cjs → chunk-5576FRT3.cjs} +31 -7
- package/dist/chunk-66IHPTOK.cjs +20 -0
- package/dist/{chunk-2RNW4MIJ.cjs → chunk-67OV5CX2.cjs} +0 -18
- package/dist/{chunk-PD7ME2BT.js → chunk-6GNR22OV.js} +2 -1
- package/dist/{chunk-VHSNYUYV.js → chunk-6NAVMWZQ.js} +5 -5
- package/dist/{chunk-EUKPOXWR.cjs → chunk-6PXXGACR.cjs} +17 -15
- package/dist/{chunk-WTK6JDSI.js → chunk-74QFZ5MK.js} +6 -4
- package/dist/{chunk-WOEETTH7.cjs → chunk-7AFPOE7N.cjs} +6 -6
- package/dist/{chunk-U57COLUE.js → chunk-AXIPOR3C.js} +2 -2
- package/dist/chunk-CTED3MTR.cjs +380 -0
- package/dist/{chunk-QKKBBH7I.js → chunk-DZHYSUGY.js} +28 -7
- package/dist/{chunk-V5D7BHW3.js → chunk-EAJ7SYHE.js} +6 -4
- package/dist/{chunk-SYHNZSZZ.cjs → chunk-FAXIIH5R.cjs} +3 -3
- package/dist/{chunk-7G7UOQV4.cjs → chunk-FGEB7RMY.cjs} +4 -4
- package/dist/chunk-GKKDAW44.js +8823 -0
- package/dist/{chunk-QET3Q4JP.js → chunk-H5POPGOZ.js} +8 -6
- package/dist/{chunk-VR3FREBX.cjs → chunk-JK4XMMKM.cjs} +3 -3
- package/dist/{chunk-CBRL2PJA.cjs → chunk-JQYC66TO.cjs} +12 -12
- package/dist/{chunk-YFIWCYHC.cjs → chunk-JZLGCTGK.cjs} +56 -54
- package/dist/{chunk-4ZCXK4VI.cjs → chunk-KFRDLKMA.cjs} +14 -14
- package/dist/chunk-KWFFIJYX.js +11 -0
- package/dist/chunk-M4IT6DNJ.cjs +608 -0
- package/dist/{chunk-43RFBQ73.cjs → chunk-MVDQMV25.cjs} +29 -32
- package/dist/chunk-NCVX3K2N.cjs +161 -0
- package/dist/chunk-NWFMBLSQ.js +4 -0
- package/dist/chunk-O5676ZWY.js +585 -0
- package/dist/chunk-PUX5VXDB.cjs +8845 -0
- package/dist/{chunk-DRSPMIZ7.js → chunk-QBJ7O2B4.js} +1 -11
- package/dist/{chunk-UJS4N2XM.cjs → chunk-TEBM66WA.cjs} +12 -12
- package/dist/{chunk-TN65XNTI.js → chunk-TWT3STIX.js} +8 -6
- package/dist/chunk-UG5RKLU2.cjs +6 -0
- package/dist/chunk-VP2B4WM2.js +154 -0
- package/dist/{chunk-BK7YIVLK.cjs → chunk-WJLECC22.cjs} +75 -73
- package/dist/{chunk-NFW7AUEX.js → chunk-WMACINXO.js} +1 -1
- package/dist/{chunk-AYGRYDBX.cjs → chunk-XAYGD4E4.cjs} +37 -35
- package/dist/{chunk-46T67CE2.js → chunk-ZA673I3O.js} +1 -1
- package/dist/{chunk-YPYCWLYP.js → chunk-ZWXJTBZO.js} +1 -1
- package/dist/core/addresses.d.ts +14 -2
- package/dist/core/brands.d.ts +8 -2
- package/dist/core/errors.d.ts +71 -10
- package/dist/core/preflight.d.ts +1 -0
- package/dist/fhe/erc7984-abi.d.ts +1 -0
- package/dist/fhe/index.cjs +64 -63
- package/dist/fhe/index.js +7 -6
- package/dist/fhe/operators.d.ts +22 -5
- package/dist/fhe/react/index.cjs +13 -12
- package/dist/fhe/react/index.js +6 -5
- package/dist/fhe/types.d.ts +6 -0
- package/dist/fhe-airdrop/abis/{cloneable.d.ts → airdrop-base.d.ts} +254 -396
- package/dist/fhe-airdrop/abis/compliance.d.ts +422 -0
- package/dist/fhe-airdrop/abis/ecdsa.d.ts +1316 -0
- package/dist/fhe-airdrop/abis/factory.d.ts +1319 -190
- package/dist/fhe-airdrop/abis/index.d.ts +5 -2
- package/dist/fhe-airdrop/abis/merkle.d.ts +1238 -0
- package/dist/fhe-airdrop/advanced/index.cjs +11 -12
- package/dist/fhe-airdrop/advanced/index.d.cts +34 -11
- package/dist/fhe-airdrop/advanced/index.d.ts +34 -11
- package/dist/fhe-airdrop/advanced/index.js +3 -8
- package/dist/fhe-airdrop/advanced/react/index.cjs +37 -50
- package/dist/fhe-airdrop/advanced/react/index.d.cts +9 -3
- package/dist/fhe-airdrop/advanced/react/index.d.ts +9 -3
- package/dist/fhe-airdrop/advanced/react/index.js +36 -50
- package/dist/fhe-airdrop/advanced/react/usePredictEcdsaAirdropAddress.d.ts +33 -0
- package/dist/fhe-airdrop/advanced/react/usePredictMerkleAirdropAddress.d.ts +27 -0
- package/dist/fhe-airdrop/airdrop-base.d.ts +600 -0
- package/dist/fhe-airdrop/campaign.d.ts +297 -0
- package/dist/fhe-airdrop/compliance.d.ts +302 -0
- package/dist/fhe-airdrop/constants.d.ts +33 -0
- package/dist/fhe-airdrop/ecdsa.d.ts +263 -0
- package/dist/fhe-airdrop/encryption.d.ts +92 -14
- package/dist/fhe-airdrop/errors.d.ts +245 -15
- package/dist/fhe-airdrop/factory.d.ts +533 -274
- package/dist/fhe-airdrop/guards.d.ts +273 -0
- package/dist/fhe-airdrop/index.cjs +1131 -74
- package/dist/fhe-airdrop/index.d.cts +46 -8
- package/dist/fhe-airdrop/index.d.ts +46 -8
- package/dist/fhe-airdrop/index.js +931 -8
- package/dist/fhe-airdrop/merkle-tree.d.ts +103 -0
- package/dist/fhe-airdrop/merkle.d.ts +180 -0
- package/dist/fhe-airdrop/react/_shared.d.ts +144 -71
- package/dist/fhe-airdrop/react/index.cjs +399 -459
- package/dist/fhe-airdrop/react/index.d.cts +53 -74
- package/dist/fhe-airdrop/react/index.d.ts +53 -74
- package/dist/fhe-airdrop/react/index.js +261 -374
- package/dist/fhe-airdrop/react/useAirdropGasFee.d.ts +10 -5
- package/dist/fhe-airdrop/react/useAirdropHasRole.d.ts +15 -6
- package/dist/fhe-airdrop/react/useAirdropPause.d.ts +30 -0
- package/dist/fhe-airdrop/react/useAirdropPaused.d.ts +17 -0
- package/dist/fhe-airdrop/react/useAirdropToken.d.ts +11 -4
- package/dist/fhe-airdrop/react/useAirdropWindow.d.ts +37 -0
- package/dist/fhe-airdrop/react/useClaimedAmount.d.ts +29 -0
- package/dist/fhe-airdrop/react/useComplianceManager.d.ts +16 -0
- package/dist/fhe-airdrop/react/useCreateEcdsaAirdrop.d.ts +28 -0
- package/dist/fhe-airdrop/react/useCreateMerkleAirdrop.d.ts +25 -0
- package/dist/fhe-airdrop/react/useEcdsaClaim.d.ts +23 -0
- package/dist/fhe-airdrop/react/useEffectiveUpgradeable.d.ts +20 -0
- package/dist/fhe-airdrop/react/useExtendClaimWindow.d.ts +17 -12
- package/dist/fhe-airdrop/react/useFactoryFees.d.ts +28 -0
- package/dist/fhe-airdrop/react/useFactoryRegistry.d.ts +35 -0
- package/dist/fhe-airdrop/react/useFundAirdrop.d.ts +35 -0
- package/dist/fhe-airdrop/react/useGrantInstanceRoles.d.ts +35 -0
- package/dist/fhe-airdrop/react/useMerkleClaim.d.ts +34 -0
- package/dist/fhe-airdrop/react/useMerkleRoot.d.ts +15 -0
- package/dist/fhe-airdrop/react/useSetMerkleRoot.d.ts +22 -0
- package/dist/fhe-airdrop/react/useWithdrawConfidential.d.ts +23 -0
- package/dist/fhe-airdrop/roles.d.ts +147 -0
- package/dist/fhe-airdrop/types.d.ts +67 -65
- package/dist/fhe-disperse/index.cjs +70 -68
- package/dist/fhe-disperse/index.js +10 -8
- package/dist/fhe-disperse/react/index.cjs +94 -92
- package/dist/fhe-disperse/react/index.js +13 -11
- package/dist/fhe-vesting/advanced/index.cjs +10 -8
- package/dist/fhe-vesting/advanced/index.js +8 -6
- package/dist/fhe-vesting/advanced/react/index.cjs +16 -14
- package/dist/fhe-vesting/advanced/react/index.js +13 -11
- package/dist/fhe-vesting/index.cjs +74 -72
- package/dist/fhe-vesting/index.js +11 -9
- package/dist/fhe-vesting/react/index.cjs +228 -226
- package/dist/fhe-vesting/react/index.js +15 -13
- package/dist/index.cjs +100 -87
- package/dist/index.js +3 -2
- package/dist/testnet-faucet/index.cjs +57 -55
- package/dist/testnet-faucet/index.js +7 -5
- package/dist/testnet-faucet/react/index.cjs +55 -53
- package/dist/testnet-faucet/react/index.js +9 -7
- package/package.json +6 -2
- package/dist/chunk-CNP4L3GF.js +0 -105
- package/dist/chunk-KSDSXJ34.js +0 -41
- package/dist/chunk-LBWRFZR3.cjs +0 -1681
- package/dist/chunk-OL6SHN3D.cjs +0 -44
- package/dist/chunk-S2XD75JM.js +0 -1637
- package/dist/chunk-SPGSO5SO.cjs +0 -1644
- package/dist/chunk-UE5XK2SY.js +0 -1673
- package/dist/chunk-WO72UBQD.cjs +0 -109
- package/dist/fhe-airdrop/advanced/factory-advanced.d.ts +0 -53
- package/dist/fhe-airdrop/advanced/react/usePredictAirdropAddress.d.ts +0 -49
- package/dist/fhe-airdrop/airdrop.d.ts +0 -317
- package/dist/fhe-airdrop/react/useAccessClaimAmount.d.ts +0 -37
- package/dist/fhe-airdrop/react/useAirdropCanExtendClaimWindow.d.ts +0 -7
- package/dist/fhe-airdrop/react/useAirdropClaimTypehash.d.ts +0 -10
- package/dist/fhe-airdrop/react/useAirdropClaimedSignatures.d.ts +0 -16
- package/dist/fhe-airdrop/react/useAirdropDeploymentBlockNumber.d.ts +0 -6
- package/dist/fhe-airdrop/react/useAirdropDomainSeparator.d.ts +0 -8
- package/dist/fhe-airdrop/react/useAirdropEndTime.d.ts +0 -10
- package/dist/fhe-airdrop/react/useAirdropFactoryCustomFee.d.ts +0 -17
- package/dist/fhe-airdrop/react/useAirdropFactoryDefaultGasFee.d.ts +0 -10
- package/dist/fhe-airdrop/react/useAirdropFactoryDisableCustomFee.d.ts +0 -15
- package/dist/fhe-airdrop/react/useAirdropFactoryFeeCollector.d.ts +0 -11
- package/dist/fhe-airdrop/react/useAirdropFactoryInitCodeHash.d.ts +0 -17
- package/dist/fhe-airdrop/react/useAirdropFactorySetCustomFee.d.ts +0 -17
- package/dist/fhe-airdrop/react/useAirdropFactorySetDefaultGasFee.d.ts +0 -16
- package/dist/fhe-airdrop/react/useAirdropFactorySetFeeCollector.d.ts +0 -15
- package/dist/fhe-airdrop/react/useAirdropGrantRole.d.ts +0 -16
- package/dist/fhe-airdrop/react/useAirdropHasClaimEnded.d.ts +0 -7
- package/dist/fhe-airdrop/react/useAirdropHasClaimStarted.d.ts +0 -7
- package/dist/fhe-airdrop/react/useAirdropIsClaimWindowActive.d.ts +0 -9
- package/dist/fhe-airdrop/react/useAirdropIsPaused.d.ts +0 -8
- package/dist/fhe-airdrop/react/useAirdropIsSignatureClaimed.d.ts +0 -22
- package/dist/fhe-airdrop/react/useAirdropIsSignatureValid.d.ts +0 -51
- package/dist/fhe-airdrop/react/useAirdropRevokeRole.d.ts +0 -15
- package/dist/fhe-airdrop/react/useAirdropStartTime.d.ts +0 -10
- package/dist/fhe-airdrop/react/useAirdropWithdrawGasFee.d.ts +0 -15
- package/dist/fhe-airdrop/react/useAirdropWithdrawOtherConfidentialToken.d.ts +0 -14
- package/dist/fhe-airdrop/react/useAirdropWithdrawOtherToken.d.ts +0 -14
- package/dist/fhe-airdrop/react/useClaim.d.ts +0 -39
- package/dist/fhe-airdrop/react/useConfidentialAirdropFactoryImplementation.d.ts +0 -11
- package/dist/fhe-airdrop/react/useCreateAndFundConfidentialAirdrop.d.ts +0 -41
- package/dist/fhe-airdrop/react/useCreateAndFundConfidentialAirdropAndGetAddress.d.ts +0 -48
- package/dist/fhe-airdrop/react/useCreateConfidentialAirdrop.d.ts +0 -29
- package/dist/fhe-airdrop/react/useCreateConfidentialAirdropAndGetAddress.d.ts +0 -31
- package/dist/fhe-airdrop/react/useDisableCustomFee.d.ts +0 -14
- package/dist/fhe-airdrop/react/useFactoryCustomFee.d.ts +0 -17
- package/dist/fhe-airdrop/react/useFactoryDefaultGasFee.d.ts +0 -10
- package/dist/fhe-airdrop/react/useFactoryFeeCollector.d.ts +0 -11
- package/dist/fhe-airdrop/react/useFactoryInitCodeHash.d.ts +0 -17
- package/dist/fhe-airdrop/react/useFundConfidentialAirdrop.d.ts +0 -33
- package/dist/fhe-airdrop/react/usePreflightCreateAirdrop.d.ts +0 -51
- package/dist/fhe-airdrop/react/useSetCustomFee.d.ts +0 -16
- package/dist/fhe-airdrop/react/useSetDefaultGasFee.d.ts +0 -15
- package/dist/fhe-airdrop/react/useSetFeeCollector.d.ts +0 -14
- package/dist/fhe-airdrop/react/useSetPaused.d.ts +0 -14
- package/dist/fhe-airdrop/react/useSignClaimAuthorization.d.ts +0 -31
- package/dist/fhe-airdrop/react/useWithdraw.d.ts +0 -12
- package/dist/fhe-airdrop/react/useWithdrawOtherConfidentialToken.d.ts +0 -13
- package/dist/fhe-airdrop/react/useWithdrawOtherToken.d.ts +0 -13
|
@@ -1,10 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* `@tokenops/sdk/fhe-airdrop` - confidential airdrop campaigns on the
|
|
3
|
+
* TokenOps airdrop v2 contracts.
|
|
4
|
+
*
|
|
5
|
+
* **Unaudited contracts. Alpha software. No stability promise.** This module
|
|
6
|
+
* targets `tokenops-fhe-airdrop-v2`, which has not been audited. It is
|
|
7
|
+
* intended for the `alpha` npm dist-tag only, and must not be published to
|
|
8
|
+
* `latest`: the release that first ships this module is the one that sets
|
|
9
|
+
* that tag. Two contract
|
|
10
|
+
* behaviours would otherwise produce a wrong result rather than a revert,
|
|
11
|
+
* and the SDK enforces both as guardrails rather than merely documenting
|
|
12
|
+
* them: `claimAndUnwrap`'s delivered-amount inference is exact only for a
|
|
13
|
+
* stock `ERC7984ERC20Wrapper` (the SDK preflights and blocks non-stock
|
|
14
|
+
* wrappers, see {@link NonStockWrapperError}), and an in-place UUPS upgrade
|
|
15
|
+
* of a Merkle campaign would reset every account's claimed counter (the SDK
|
|
16
|
+
* refuses `mode: "uups"` for Merkle campaigns outright, see
|
|
17
|
+
* {@link MerkleUupsUnsupportedError}). See the module README for the full
|
|
18
|
+
* detail.
|
|
19
|
+
*
|
|
20
|
+
* Every export below is deliberate. There is no `export *`: anything named
|
|
21
|
+
* here is a compatibility promise, so the rule is that a symbol must be
|
|
22
|
+
* something a consumer calls, constructs, catches, or annotates. Internal
|
|
23
|
+
* helpers (receipt parsing, ABI-edge param converters, the OpenZeppelin ABI
|
|
24
|
+
* fragment the base client merges in, the product revert mapper) stay
|
|
25
|
+
* unexported even though the modules export them for their own tests.
|
|
26
|
+
*
|
|
27
|
+
* Address prediction and its integrity guards live on the
|
|
28
|
+
* `@tokenops/sdk/fhe-airdrop/advanced` subpath.
|
|
29
|
+
*/
|
|
30
|
+
export { AIRDROP_CONTRACTS_COMMIT, DEDUP_MODE, DEPLOYMENT_MODE, type DedupMode, type DeploymentMode, } from "./constants.js";
|
|
31
|
+
export { ConfidentialAirdropFactoryClient, createConfidentialAirdropFactoryClient, FACTORY_ROLE_CONCENTRATION_NOTE, type CompliancePolicy, type ConfidentialAirdropFactoryClientConfig, type CustomFee, type FundInput, type UpgradeabilityPolicy, } from "./factory.js";
|
|
32
|
+
export { AirdropBaseClient, createAirdropBaseClient, type AirdropBaseClientConfig, type WriteAccountOverride, } from "./airdrop-base.js";
|
|
33
|
+
export { CLAIM_TYPEHASH, CLAIM_TYPES, createEcdsaAirdropClient, EcdsaAirdropClient, EIP712_DOMAIN_NAME, EIP712_DOMAIN_VERSION, type Eip712Domain, type EcdsaAirdropClientConfig, type EcdsaClaimArgs, type GetClaimAmountArgs as EcdsaGetClaimAmountArgs, type IsSignatureValidArgs, } from "./ecdsa.js";
|
|
34
|
+
export { createMerkleAirdropClient, MerkleAirdropClient, type GetClaimAmountArgs as MerkleGetClaimAmountArgs, type MerkleClaimArgs, } from "./merkle.js";
|
|
35
|
+
export { buildMerkleTree, leafOf, type BuildMerkleTreeArgs, type BuiltMerkleTree, type LeafOfArgs, type MerkleLeafInput, } from "./merkle-tree.js";
|
|
36
|
+
export { ComplianceManagerClient, createComplianceManagerClient, isAclPropagationError, type ComplianceManagerClientConfig, } from "./compliance.js";
|
|
37
|
+
export type { BuiltCampaign, CampaignEntry, CampaignRecipient, CommonAirdropParams, CreateAirdropArgs, CreateAirdropResult, EcdsaAirdropParams, MerkleAirdropParams, } from "./types.js";
|
|
38
|
+
export type { EncryptedInput, EncryptedInputs, EncryptedViewResult } from "../fhe/types.js";
|
|
39
|
+
export { buildMerkleCampaign, encryptCampaignAmounts, planMerkleCampaign, rotateMerkleRoot, validateCampaignRecipients, type BuildMerkleCampaignArgs, type EncryptCampaignAmountsArgs, type EncryptedCampaignLeaf, type PlanMerkleCampaignArgs, type PlannedCampaign, type RotatedCampaign, type RotateMerkleRootArgs, } from "./campaign.js";
|
|
40
|
+
export { grantInstanceRoles, planInstanceRoleSplit, type InstanceRoleAssignment, type RoleGrantOutcome, type RoleGrantStep, type RoleName, } from "./roles.js";
|
|
3
41
|
export { encryptUint64, encryptUint64Batch, resolveEncryptor, signClaimAuthorization, type Encryptor, type EncryptorSource, type EncryptUint64Args, type EncryptUint64BatchArgs, type FheValueInput, } from "./encryption.js";
|
|
4
|
-
export {
|
|
5
|
-
export { asAirdropId, type AirdropId, asEncryptedHandle, type EncryptedHandle, } from "../core/brands.js";
|
|
6
|
-
export { confidentialAirdropFactoryAbi, confidentialAirdropCloneableAbi } from "./abis/index.js";
|
|
7
|
-
export { erc7984OperatorAbi } from "../fhe/erc7984-abi.js";
|
|
8
|
-
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";
|
|
42
|
+
export { preflightClaim, preflightCreate, type ClaimPreflightTarget, type EcdsaClaimPreflightSignature, type PreflightClaimArgs, type PreflightCreateArgs, } from "./guards.js";
|
|
9
43
|
export { type PreflightResult } from "../core/preflight.js";
|
|
10
|
-
export {
|
|
44
|
+
export { airdropFactoryAbi, complianceRoleManagerAbi, confidentialAirdropBaseAbi, ecdsaConfidentialAirdropAbi, merkleConfidentialAirdropAbi, } from "./abis/index.js";
|
|
45
|
+
export { AlreadyClaimedError, ClaimNotStartedError, ClaimWindowClosedError, DedupIdConsumedError, FeeCollectorSelfAdministeredError, MerkleUupsUnsupportedError, NonStockWrapperError, PredictionDriftError, SaltCollisionError, SignatureExpiredError, UpgradeabilityNotAllowedError, type AirdropVariant, } from "./errors.js";
|
|
46
|
+
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";
|
|
47
|
+
export { ERC7984_OPERATOR_MAX_DEADLINE, revokeOperator, setOperator, type RevokeOperatorArgs, type SetOperatorArgs, } from "../fhe/operators.js";
|
|
48
|
+
export { erc7984OperatorAbi } from "../fhe/erc7984-abi.js";
|
|
@@ -1,10 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* `@tokenops/sdk/fhe-airdrop` - confidential airdrop campaigns on the
|
|
3
|
+
* TokenOps airdrop v2 contracts.
|
|
4
|
+
*
|
|
5
|
+
* **Unaudited contracts. Alpha software. No stability promise.** This module
|
|
6
|
+
* targets `tokenops-fhe-airdrop-v2`, which has not been audited. It is
|
|
7
|
+
* intended for the `alpha` npm dist-tag only, and must not be published to
|
|
8
|
+
* `latest`: the release that first ships this module is the one that sets
|
|
9
|
+
* that tag. Two contract
|
|
10
|
+
* behaviours would otherwise produce a wrong result rather than a revert,
|
|
11
|
+
* and the SDK enforces both as guardrails rather than merely documenting
|
|
12
|
+
* them: `claimAndUnwrap`'s delivered-amount inference is exact only for a
|
|
13
|
+
* stock `ERC7984ERC20Wrapper` (the SDK preflights and blocks non-stock
|
|
14
|
+
* wrappers, see {@link NonStockWrapperError}), and an in-place UUPS upgrade
|
|
15
|
+
* of a Merkle campaign would reset every account's claimed counter (the SDK
|
|
16
|
+
* refuses `mode: "uups"` for Merkle campaigns outright, see
|
|
17
|
+
* {@link MerkleUupsUnsupportedError}). See the module README for the full
|
|
18
|
+
* detail.
|
|
19
|
+
*
|
|
20
|
+
* Every export below is deliberate. There is no `export *`: anything named
|
|
21
|
+
* here is a compatibility promise, so the rule is that a symbol must be
|
|
22
|
+
* something a consumer calls, constructs, catches, or annotates. Internal
|
|
23
|
+
* helpers (receipt parsing, ABI-edge param converters, the OpenZeppelin ABI
|
|
24
|
+
* fragment the base client merges in, the product revert mapper) stay
|
|
25
|
+
* unexported even though the modules export them for their own tests.
|
|
26
|
+
*
|
|
27
|
+
* Address prediction and its integrity guards live on the
|
|
28
|
+
* `@tokenops/sdk/fhe-airdrop/advanced` subpath.
|
|
29
|
+
*/
|
|
30
|
+
export { AIRDROP_CONTRACTS_COMMIT, DEDUP_MODE, DEPLOYMENT_MODE, type DedupMode, type DeploymentMode, } from "./constants.js";
|
|
31
|
+
export { ConfidentialAirdropFactoryClient, createConfidentialAirdropFactoryClient, FACTORY_ROLE_CONCENTRATION_NOTE, type CompliancePolicy, type ConfidentialAirdropFactoryClientConfig, type CustomFee, type FundInput, type UpgradeabilityPolicy, } from "./factory.js";
|
|
32
|
+
export { AirdropBaseClient, createAirdropBaseClient, type AirdropBaseClientConfig, type WriteAccountOverride, } from "./airdrop-base.js";
|
|
33
|
+
export { CLAIM_TYPEHASH, CLAIM_TYPES, createEcdsaAirdropClient, EcdsaAirdropClient, EIP712_DOMAIN_NAME, EIP712_DOMAIN_VERSION, type Eip712Domain, type EcdsaAirdropClientConfig, type EcdsaClaimArgs, type GetClaimAmountArgs as EcdsaGetClaimAmountArgs, type IsSignatureValidArgs, } from "./ecdsa.js";
|
|
34
|
+
export { createMerkleAirdropClient, MerkleAirdropClient, type GetClaimAmountArgs as MerkleGetClaimAmountArgs, type MerkleClaimArgs, } from "./merkle.js";
|
|
35
|
+
export { buildMerkleTree, leafOf, type BuildMerkleTreeArgs, type BuiltMerkleTree, type LeafOfArgs, type MerkleLeafInput, } from "./merkle-tree.js";
|
|
36
|
+
export { ComplianceManagerClient, createComplianceManagerClient, isAclPropagationError, type ComplianceManagerClientConfig, } from "./compliance.js";
|
|
37
|
+
export type { BuiltCampaign, CampaignEntry, CampaignRecipient, CommonAirdropParams, CreateAirdropArgs, CreateAirdropResult, EcdsaAirdropParams, MerkleAirdropParams, } from "./types.js";
|
|
38
|
+
export type { EncryptedInput, EncryptedInputs, EncryptedViewResult } from "../fhe/types.js";
|
|
39
|
+
export { buildMerkleCampaign, encryptCampaignAmounts, planMerkleCampaign, rotateMerkleRoot, validateCampaignRecipients, type BuildMerkleCampaignArgs, type EncryptCampaignAmountsArgs, type EncryptedCampaignLeaf, type PlanMerkleCampaignArgs, type PlannedCampaign, type RotatedCampaign, type RotateMerkleRootArgs, } from "./campaign.js";
|
|
40
|
+
export { grantInstanceRoles, planInstanceRoleSplit, type InstanceRoleAssignment, type RoleGrantOutcome, type RoleGrantStep, type RoleName, } from "./roles.js";
|
|
3
41
|
export { encryptUint64, encryptUint64Batch, resolveEncryptor, signClaimAuthorization, type Encryptor, type EncryptorSource, type EncryptUint64Args, type EncryptUint64BatchArgs, type FheValueInput, } from "./encryption.js";
|
|
4
|
-
export {
|
|
5
|
-
export { asAirdropId, type AirdropId, asEncryptedHandle, type EncryptedHandle, } from "../core/brands.js";
|
|
6
|
-
export { confidentialAirdropFactoryAbi, confidentialAirdropCloneableAbi } from "./abis/index.js";
|
|
7
|
-
export { erc7984OperatorAbi } from "../fhe/erc7984-abi.js";
|
|
8
|
-
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";
|
|
42
|
+
export { preflightClaim, preflightCreate, type ClaimPreflightTarget, type EcdsaClaimPreflightSignature, type PreflightClaimArgs, type PreflightCreateArgs, } from "./guards.js";
|
|
9
43
|
export { type PreflightResult } from "../core/preflight.js";
|
|
10
|
-
export {
|
|
44
|
+
export { airdropFactoryAbi, complianceRoleManagerAbi, confidentialAirdropBaseAbi, ecdsaConfidentialAirdropAbi, merkleConfidentialAirdropAbi, } from "./abis/index.js";
|
|
45
|
+
export { AlreadyClaimedError, ClaimNotStartedError, ClaimWindowClosedError, DedupIdConsumedError, FeeCollectorSelfAdministeredError, MerkleUupsUnsupportedError, NonStockWrapperError, PredictionDriftError, SaltCollisionError, SignatureExpiredError, UpgradeabilityNotAllowedError, type AirdropVariant, } from "./errors.js";
|
|
46
|
+
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";
|
|
47
|
+
export { ERC7984_OPERATOR_MAX_DEADLINE, revokeOperator, setOperator, type RevokeOperatorArgs, type SetOperatorArgs, } from "../fhe/operators.js";
|
|
48
|
+
export { erc7984OperatorAbi } from "../fhe/erc7984-abi.js";
|