@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.
Files changed (160) hide show
  1. package/CHANGELOG.md +92 -3
  2. package/README.md +76 -34
  3. package/SUPPORT.md +1 -1
  4. package/dist/{chunk-PYYSB5ZN.js → chunk-2ND7US2I.js} +1 -1
  5. package/dist/{chunk-EYDA6Q6C.js → chunk-3ZSPRHR3.js} +63 -12
  6. package/dist/{chunk-X7WBPCEU.js → chunk-67Q6KSVV.js} +4578 -3383
  7. package/dist/{chunk-UHHMVBLU.cjs → chunk-6AYJRUGP.cjs} +7 -50
  8. package/dist/{chunk-FEDX7B6T.cjs → chunk-6FUHF73F.cjs} +5 -5
  9. package/dist/{chunk-NWFMBLSQ.js → chunk-7KY4K4PH.js} +1 -1
  10. package/dist/{chunk-FHWSBGWE.cjs → chunk-ARZ5C3FS.cjs} +7 -7
  11. package/dist/{chunk-SPLNGUFF.js → chunk-AX6MQAWU.js} +2 -2
  12. package/dist/{chunk-IGO5XSPS.js → chunk-BSXEX2SH.js} +3 -3
  13. package/dist/{chunk-44YJPMQC.js → chunk-CHGY6B7L.js} +34 -81
  14. package/dist/{chunk-IUKKNJ2R.cjs → chunk-DFK5GCJP.cjs} +55 -72
  15. package/dist/{chunk-PZZK3O3S.cjs → chunk-E4IV4M4E.cjs} +4598 -3403
  16. package/dist/{chunk-A4DCEE33.js → chunk-GHGF65LN.js} +16 -12
  17. package/dist/{chunk-TWT3STIX.js → chunk-K3R27WX4.js} +8 -46
  18. package/dist/{chunk-GADGBQJO.js → chunk-KJUNBOJQ.js} +52 -71
  19. package/dist/{chunk-MM5BV5CS.cjs → chunk-PO3A2AQX.cjs} +4 -4
  20. package/dist/{chunk-EBLBPUPI.cjs → chunk-QHDMPT7I.cjs} +72 -19
  21. package/dist/{chunk-3YHBO2DL.cjs → chunk-S47IBDTA.cjs} +36 -83
  22. package/dist/{chunk-UG5RKLU2.cjs → chunk-SUYBAF27.cjs} +1 -1
  23. package/dist/{chunk-WJMEBBU7.js → chunk-TWU7L5H7.js} +5 -48
  24. package/dist/{chunk-WJLECC22.cjs → chunk-UUSSWOPR.cjs} +9 -47
  25. package/dist/{chunk-AREQJHKA.cjs → chunk-VHKMWWBA.cjs} +428 -22
  26. package/dist/{chunk-FT5H2Q7Y.cjs → chunk-YAL6JSAZ.cjs} +16 -12
  27. package/dist/{chunk-VW356KR3.js → chunk-YMWMIWBP.js} +421 -25
  28. package/dist/core/addresses.d.ts +4 -4
  29. package/dist/core/errors.d.ts +1 -1
  30. package/dist/core/index.d.ts +1 -0
  31. package/dist/core/pending.d.ts +57 -0
  32. package/dist/core/version.d.ts +1 -1
  33. package/dist/fhe/operators.d.ts +6 -5
  34. package/dist/fhe/types.d.ts +1 -1
  35. package/dist/fhe-airdrop/abis/airdrop-base.d.ts +97 -1
  36. package/dist/fhe-airdrop/abis/ecdsa.d.ts +117 -1
  37. package/dist/fhe-airdrop/abis/factory.d.ts +332 -1
  38. package/dist/fhe-airdrop/abis/merkle.d.ts +116 -1
  39. package/dist/fhe-airdrop/advanced/index.cjs +8 -4
  40. package/dist/fhe-airdrop/advanced/index.d.cts +1 -0
  41. package/dist/fhe-airdrop/advanced/index.d.ts +1 -0
  42. package/dist/fhe-airdrop/advanced/index.js +1 -1
  43. package/dist/fhe-airdrop/advanced/react/index.cjs +145 -137
  44. package/dist/fhe-airdrop/advanced/react/index.d.cts +1 -0
  45. package/dist/fhe-airdrop/advanced/react/index.d.ts +1 -0
  46. package/dist/fhe-airdrop/advanced/react/index.js +85 -78
  47. package/dist/fhe-airdrop/advanced/react/useClearCompliancePolicy.d.ts +3 -1
  48. package/dist/fhe-airdrop/advanced/react/useDisableCustomFee.d.ts +4 -1
  49. package/dist/fhe-airdrop/advanced/react/useFactoryComplianceDelegate.d.ts +2 -4
  50. package/dist/fhe-airdrop/advanced/react/useFactoryRenounceRole.d.ts +4 -3
  51. package/dist/fhe-airdrop/advanced/react/useFactoryRevokeRole.d.ts +9 -7
  52. package/dist/fhe-airdrop/advanced/react/useFactoryRoleMembers.d.ts +6 -5
  53. package/dist/fhe-airdrop/advanced/react/useSetComplianceDelegate.d.ts +7 -7
  54. package/dist/fhe-airdrop/advanced/react/useSetComplianceManagerImpl.d.ts +3 -1
  55. package/dist/fhe-airdrop/advanced/react/useSetCompliancePolicy.d.ts +2 -1
  56. package/dist/fhe-airdrop/advanced/react/useSetCustomFee.d.ts +4 -1
  57. package/dist/fhe-airdrop/advanced/react/useSetDefaultDelegateToCompliance.d.ts +5 -4
  58. package/dist/fhe-airdrop/advanced/react/useSetDefaultGasFee.d.ts +7 -3
  59. package/dist/fhe-airdrop/advanced/react/useSetMaxGasFee.d.ts +37 -0
  60. package/dist/fhe-airdrop/airdrop-base.d.ts +142 -18
  61. package/dist/fhe-airdrop/campaign.d.ts +37 -73
  62. package/dist/fhe-airdrop/compliance-clone.d.ts +21 -0
  63. package/dist/fhe-airdrop/constants.d.ts +11 -1
  64. package/dist/fhe-airdrop/ecdsa.d.ts +79 -26
  65. package/dist/fhe-airdrop/encryption.d.ts +19 -6
  66. package/dist/fhe-airdrop/errors.d.ts +136 -2
  67. package/dist/fhe-airdrop/factory-params.d.ts +2361 -0
  68. package/dist/fhe-airdrop/factory.d.ts +189 -75
  69. package/dist/fhe-airdrop/guards.d.ts +183 -19
  70. package/dist/fhe-airdrop/index.cjs +88 -56
  71. package/dist/fhe-airdrop/index.d.cts +12 -10
  72. package/dist/fhe-airdrop/index.d.ts +12 -10
  73. package/dist/fhe-airdrop/index.js +5 -5
  74. package/dist/fhe-airdrop/merkle-tree.d.ts +9 -9
  75. package/dist/fhe-airdrop/merkle.d.ts +32 -11
  76. package/dist/fhe-airdrop/react/_shared.d.ts +12 -6
  77. package/dist/fhe-airdrop/react/index.cjs +336 -240
  78. package/dist/fhe-airdrop/react/index.d.cts +19 -9
  79. package/dist/fhe-airdrop/react/index.d.ts +19 -9
  80. package/dist/fhe-airdrop/react/index.js +158 -97
  81. package/dist/fhe-airdrop/react/keys.d.ts +54 -7
  82. package/dist/fhe-airdrop/react/useAccessEcdsaClaimAmount.d.ts +6 -3
  83. package/dist/fhe-airdrop/react/useAccessMerkleClaimAmount.d.ts +2 -2
  84. package/dist/fhe-airdrop/react/useAirdropConfig.d.ts +8 -3
  85. package/dist/fhe-airdrop/react/useAirdropPause.d.ts +5 -0
  86. package/dist/fhe-airdrop/react/useBuildMerkleCampaign.d.ts +4 -6
  87. package/dist/fhe-airdrop/react/useComplianceManager.d.ts +2 -2
  88. package/dist/fhe-airdrop/react/useComplianceManagerOf.d.ts +1 -2
  89. package/dist/fhe-airdrop/react/useCreateAndFundEcdsaAirdrop.d.ts +16 -11
  90. package/dist/fhe-airdrop/react/useCreateAndFundMerkleAirdrop.d.ts +23 -7
  91. package/dist/fhe-airdrop/react/useCreateEcdsaAirdrop.d.ts +13 -8
  92. package/dist/fhe-airdrop/react/useCreateMerkleAirdrop.d.ts +27 -7
  93. package/dist/fhe-airdrop/react/useDedupMode.d.ts +16 -0
  94. package/dist/fhe-airdrop/react/useDiscloseHandleToParty.d.ts +4 -3
  95. package/dist/fhe-airdrop/react/useEcdsaClaim.d.ts +6 -4
  96. package/dist/fhe-airdrop/react/useEcdsaClaimAndUnwrap.d.ts +15 -8
  97. package/dist/fhe-airdrop/react/useEcdsaDomain.d.ts +1 -1
  98. package/dist/fhe-airdrop/react/useEncryptCampaignAmounts.d.ts +5 -7
  99. package/dist/fhe-airdrop/react/useExtendClaimWindow.d.ts +4 -1
  100. package/dist/fhe-airdrop/react/useFactoryFees.d.ts +11 -4
  101. package/dist/fhe-airdrop/react/useFundAirdrop.d.ts +3 -4
  102. package/dist/fhe-airdrop/react/useGrantInstanceRoles.d.ts +2 -1
  103. package/dist/fhe-airdrop/react/useIsAirdrop.d.ts +44 -0
  104. package/dist/fhe-airdrop/react/useIsSignatureValid.d.ts +5 -4
  105. package/dist/fhe-airdrop/react/useMerkleClaim.d.ts +4 -1
  106. package/dist/fhe-airdrop/react/useMerkleClaimAndUnwrap.d.ts +14 -3
  107. package/dist/fhe-airdrop/react/usePlanMerkleCampaign.d.ts +18 -3
  108. package/dist/fhe-airdrop/react/usePreflightClaim.d.ts +1 -1
  109. package/dist/fhe-airdrop/react/usePreflightCreateAirdrop.d.ts +34 -13
  110. package/dist/fhe-airdrop/react/useRefreshComplianceBalance.d.ts +36 -0
  111. package/dist/fhe-airdrop/react/useRescueERC20.d.ts +3 -3
  112. package/dist/fhe-airdrop/react/useRescueNativeToken.d.ts +23 -0
  113. package/dist/fhe-airdrop/react/useResolveGasFee.d.ts +30 -0
  114. package/dist/fhe-airdrop/react/useRotateMerkleRoot.d.ts +5 -2
  115. package/dist/fhe-airdrop/react/useSignClaimAuthorization.d.ts +4 -0
  116. package/dist/fhe-airdrop/react/useTokenOf.d.ts +29 -0
  117. package/dist/fhe-airdrop/react/useUnwrapRequest.d.ts +25 -0
  118. package/dist/fhe-airdrop/react/useWithdrawConfidential.d.ts +4 -0
  119. package/dist/fhe-airdrop/roles.d.ts +82 -7
  120. package/dist/fhe-airdrop/types.d.ts +122 -14
  121. package/dist/fhe-disperse/errors.d.ts +3 -3
  122. package/dist/fhe-disperse/index.cjs +22 -22
  123. package/dist/fhe-disperse/index.d.cts +2 -1
  124. package/dist/fhe-disperse/index.d.ts +2 -1
  125. package/dist/fhe-disperse/index.js +3 -3
  126. package/dist/fhe-disperse/react/index.cjs +27 -25
  127. package/dist/fhe-disperse/react/index.d.cts +2 -1
  128. package/dist/fhe-disperse/react/index.d.ts +2 -1
  129. package/dist/fhe-disperse/react/index.js +8 -6
  130. package/dist/fhe-disperse/react/useDisperse.d.ts +6 -2
  131. package/dist/fhe-disperse/react/useRegister.d.ts +9 -3
  132. package/dist/fhe-disperse/react/useSingletonWithdrawTokenFee.d.ts +7 -2
  133. package/dist/fhe-disperse/react/useWithdrawTokenFee.d.ts +7 -2
  134. package/dist/fhe-disperse/singleton.d.ts +33 -19
  135. package/dist/fhe-disperse/types.d.ts +48 -8
  136. package/dist/fhe-vesting/advanced/index.cjs +6 -6
  137. package/dist/fhe-vesting/advanced/index.js +4 -4
  138. package/dist/fhe-vesting/advanced/react/index.cjs +9 -9
  139. package/dist/fhe-vesting/advanced/react/index.js +6 -6
  140. package/dist/fhe-vesting/factory.d.ts +31 -8
  141. package/dist/fhe-vesting/index.cjs +23 -23
  142. package/dist/fhe-vesting/index.d.cts +3 -2
  143. package/dist/fhe-vesting/index.d.ts +3 -2
  144. package/dist/fhe-vesting/index.js +4 -4
  145. package/dist/fhe-vesting/manager.d.ts +27 -2
  146. package/dist/fhe-vesting/react/index.cjs +126 -126
  147. package/dist/fhe-vesting/react/index.d.cts +3 -2
  148. package/dist/fhe-vesting/react/index.d.ts +3 -2
  149. package/dist/fhe-vesting/react/index.js +5 -5
  150. package/dist/fhe-vesting/react/useCreateManager.d.ts +16 -9
  151. package/dist/fhe-vesting/react/useCreateManagerAndGetAddress.d.ts +9 -5
  152. package/dist/fhe-vesting/react/useSplitVesting.d.ts +9 -3
  153. package/dist/index.cjs +18 -18
  154. package/dist/index.js +1 -1
  155. package/dist/testnet-faucet/faucet.d.ts +3 -0
  156. package/dist/testnet-faucet/index.cjs +15 -15
  157. package/dist/testnet-faucet/index.js +3 -3
  158. package/dist/testnet-faucet/react/index.cjs +9 -9
  159. package/dist/testnet-faucet/react/index.js +4 -4
  160. package/package.json +1 -1
@@ -2,9 +2,10 @@
2
2
  * `@tokenops/sdk/fhe-airdrop` - confidential airdrop campaigns on the
3
3
  * TokenOps airdrop v2 contracts.
4
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
5
+ * **Alpha software. No stability promise.**
6
+ * This module targets `tokenops-fhe-airdrop-v2` at `AIRDROP_CONTRACTS_COMMIT`, through
7
+ * the Sepolia deployment in `DEPLOYED_ADDRESSES`. It is intended for the `alpha` npm
8
+ * dist-tag only, and must not be published to
8
9
  * `latest`: the release that first ships this module is the one that sets
9
10
  * that tag. Two contract
10
11
  * behaviours would otherwise produce a wrong result rather than a revert,
@@ -27,22 +28,23 @@
27
28
  * Address prediction and its integrity guards live on the
28
29
  * `@tokenops/sdk/fhe-airdrop/advanced` subpath.
29
30
  */
30
- export { AIRDROP_CONTRACTS_COMMIT, DEDUP_MODE, DEPLOYMENT_MODE, type DedupMode, type DeploymentMode, } from "./constants.js";
31
+ export { AIRDROP_CONTRACTS_COMMIT, DEDUP_MODE, DEPLOYMENT_MODE, UINT96_MAX, type DedupMode, type DeploymentMode, } from "./constants.js";
31
32
  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 { AirdropBaseClient, createAirdropBaseClient, type AirdropBaseClientConfig, type UnwrapRequest, type UnwrapRequestSource, type WriteAccountOverride, } from "./airdrop-base.js";
33
34
  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
35
  export { createMerkleAirdropClient, MerkleAirdropClient, type GetClaimAmountArgs as MerkleGetClaimAmountArgs, type MerkleClaimArgs, } from "./merkle.js";
35
36
  export { buildMerkleTree, leafOf, type BuildMerkleTreeArgs, type BuiltMerkleTree, type LeafOfArgs, type MerkleLeafInput, } from "./merkle-tree.js";
36
37
  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 { AirdropVariantParams, BuiltCampaign, CampaignEntry, CampaignRecipient, CommonAirdropParams, CreateAirdropArgs, CreateAirdropResult, CreateCommitments, CreateMerkleAirdropArgs, EcdsaAirdropParams, MerkleAirdropParams, PendingCreateAirdropResult, } from "./types.js";
39
+ export type { MinedWrite, PendingWrite, ReceiptMode } from "../core/pending.js";
38
40
  export type { EncryptedInput, EncryptedInputs, EncryptedViewResult } from "../fhe/types.js";
39
- export { buildMerkleCampaign, encryptCampaignAmounts, planMerkleCampaign, rotateMerkleRoot, validateCampaignRecipients, type BuildMerkleCampaignArgs, type CampaignSubmitterOption, 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";
41
+ export { buildMerkleCampaign, encryptCampaignAmounts, MERKLE_BATCH_LIMIT, planMerkleCampaign, rotateMerkleRoot, validateCampaignRecipients, type BuildMerkleCampaignArgs, type EncryptCampaignAmountsArgs, type EncryptedCampaignLeaf, type PlanMerkleCampaignArgs, type PlannedCampaign, type RotatedCampaign, type RotateMerkleRootArgs, } from "./campaign.js";
42
+ export { encodeInstanceRoleSplit, grantInstanceRoles, planInstanceRoleSplit, type InstanceRoleAssignment, type InstanceRoleCall, type InstanceRoleConstants, type RoleGrantOutcome, type RoleGrantStep, type RoleName, } from "./roles.js";
41
43
  export { encryptUint64, encryptUint64Batch, resolveEncryptor, signClaimAuthorization, type Encryptor, type EncryptorSource, type EncryptUint64Args, type EncryptUint64BatchArgs, type FheValueInput, } from "./encryption.js";
42
- export { preflightClaim, preflightCreate, type ClaimPreflightTarget, type EcdsaClaimPreflightSignature, type PreflightClaimArgs, type PreflightCreateArgs, } from "./guards.js";
44
+ export { preflightClaim, preflightCreate, type AirdropRegistry, type ClaimPreflightTarget, type EcdsaClaimPreflightSignature, type PreflightClaimArgs, type PreflightCreateArgs, type PreflightCreateResult, } from "./guards.js";
43
45
  export { type PreflightResult } from "../core/preflight.js";
44
46
  export { airdropFactoryAbi, complianceRoleManagerAbi, confidentialAirdropBaseAbi, ecdsaConfidentialAirdropAbi, merkleConfidentialAirdropAbi, } from "./abis/index.js";
45
- export { AlreadyClaimedError, ClaimNotStartedError, ClaimWindowClosedError, DedupIdConsumedError, FeeCollectorSelfAdministeredError, MerkleUupsUnsupportedError, NonStockWrapperError, PredictionDriftError, SaltCollisionError, SignatureExpiredError, UnauthorizedRedirectError, UpgradeabilityNotAllowedError, type AirdropVariant, } from "./errors.js";
47
+ export { AlreadyClaimedError, ClaimNotStartedError, ClaimWindowClosedError, ClawbackRequiresPauseError, CreateCommitmentMismatchError, DedupIdConsumedError, FeeCollectorSelfAdministeredError, GasFeeNotAcceptedError, MerkleUupsUnsupportedError, NativeRescueRequiresZeroFeeError, NonStockWrapperError, PredictionDriftError, SaltCollisionError, SignatureExpiredError, UnauthorizedRedirectError, UnrecognisedAirdropError, UpgradeabilityNotAllowedError, type AirdropVariant, } from "./errors.js";
46
48
  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
49
  export { ERC7984_OPERATOR_MAX_DEADLINE, revokeOperator, setOperator, type RevokeOperatorArgs, type SetOperatorArgs, } from "../fhe/operators.js";
48
50
  export { erc7984OperatorAbi } from "../fhe/erc7984-abi.js";
@@ -1,12 +1,12 @@
1
- export { buildMerkleCampaign, buildMerkleTree, encryptCampaignAmounts, grantInstanceRoles, leafOf, planInstanceRoleSplit, planMerkleCampaign, rotateMerkleRoot, validateCampaignRecipients } from '../chunk-GADGBQJO.js';
2
- export { AirdropBaseClient, CLAIM_TYPEHASH, CLAIM_TYPES, ComplianceManagerClient, ConfidentialAirdropFactoryClient, EIP712_DOMAIN_NAME, EIP712_DOMAIN_VERSION, EcdsaAirdropClient, FACTORY_ROLE_CONCENTRATION_NOTE, MerkleAirdropClient, airdropFactoryAbi, complianceRoleManagerAbi, confidentialAirdropBaseAbi, createAirdropBaseClient, createComplianceManagerClient, createConfidentialAirdropFactoryClient, createEcdsaAirdropClient, createMerkleAirdropClient, ecdsaConfidentialAirdropAbi, encryptUint64, encryptUint64Batch, isAclPropagationError, merkleConfidentialAirdropAbi, resolveEncryptor, signClaimAuthorization } from '../chunk-X7WBPCEU.js';
3
- export { AIRDROP_CONTRACTS_COMMIT, AlreadyClaimedError, ClaimNotStartedError, ClaimWindowClosedError, DEDUP_MODE, DEPLOYMENT_MODE, DedupIdConsumedError, FeeCollectorSelfAdministeredError, MerkleUupsUnsupportedError, NonStockWrapperError, PredictionDriftError, SaltCollisionError, SignatureExpiredError, UnauthorizedRedirectError, UpgradeabilityNotAllowedError, preflightClaim, preflightCreate } from '../chunk-VW356KR3.js';
1
+ export { MERKLE_BATCH_LIMIT, buildMerkleCampaign, buildMerkleTree, encodeInstanceRoleSplit, encryptCampaignAmounts, grantInstanceRoles, leafOf, planInstanceRoleSplit, planMerkleCampaign, rotateMerkleRoot, validateCampaignRecipients } from '../chunk-KJUNBOJQ.js';
2
+ export { AirdropBaseClient, CLAIM_TYPEHASH, CLAIM_TYPES, ComplianceManagerClient, ConfidentialAirdropFactoryClient, EIP712_DOMAIN_NAME, EIP712_DOMAIN_VERSION, EcdsaAirdropClient, FACTORY_ROLE_CONCENTRATION_NOTE, MerkleAirdropClient, airdropFactoryAbi, complianceRoleManagerAbi, confidentialAirdropBaseAbi, createAirdropBaseClient, createComplianceManagerClient, createConfidentialAirdropFactoryClient, createEcdsaAirdropClient, createMerkleAirdropClient, ecdsaConfidentialAirdropAbi, encryptUint64, encryptUint64Batch, isAclPropagationError, merkleConfidentialAirdropAbi, resolveEncryptor, signClaimAuthorization } from '../chunk-67Q6KSVV.js';
3
+ export { AIRDROP_CONTRACTS_COMMIT, AlreadyClaimedError, ClaimNotStartedError, ClaimWindowClosedError, ClawbackRequiresPauseError, CreateCommitmentMismatchError, DEDUP_MODE, DEPLOYMENT_MODE, DedupIdConsumedError, FeeCollectorSelfAdministeredError, GasFeeNotAcceptedError, MerkleUupsUnsupportedError, NativeRescueRequiresZeroFeeError, NonStockWrapperError, PredictionDriftError, SaltCollisionError, SignatureExpiredError, UINT96_MAX, UnauthorizedRedirectError, UnrecognisedAirdropError, UpgradeabilityNotAllowedError, preflightClaim, preflightCreate } from '../chunk-YMWMIWBP.js';
4
4
  export { ERC7984_OPERATOR_MAX_DEADLINE, revokeOperator, setOperator } from '../chunk-4TSDNZQ3.js';
5
5
  import '../chunk-ZWXJTBZO.js';
6
6
  export { erc7984OperatorAbi } from '../chunk-7VELUOMI.js';
7
- import '../chunk-NWFMBLSQ.js';
7
+ import '../chunk-7KY4K4PH.js';
8
8
  import '../chunk-4RAAATVY.js';
9
- import '../chunk-A4DCEE33.js';
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';
@@ -23,9 +23,9 @@ export declare function leafOf(args: LeafOfArgs): Hex;
23
23
  * The minimum a leaf must carry. `buildMerkleTree` is generic over anything wider, so a
24
24
  * caller's own fields ride along onto the entry.
25
25
  *
26
- * Deliberately does NOT include `boundTo`: the tree does not commit the submitter, so it
27
- * is not needed to build one. Pass it anyway (alongside `inputProof`) and it rides through
28
- * to the entry, which is what makes the result assignable to {@link CampaignEntry}.
26
+ * Deliberately does NOT include `inputProof`: the tree does not commit it, so it is not
27
+ * needed to build one. Pass it anyway and it rides through to the entry, which is what
28
+ * makes the result assignable to {@link CampaignEntry}.
29
29
  *
30
30
  * @alpha
31
31
  */
@@ -62,15 +62,15 @@ export interface BuiltMerkleTree<L extends MerkleLeafInput> {
62
62
  *
63
63
  * **Pure.** No relayer, no chain access, no encryptor — same leaves in, same root out.
64
64
  *
65
- * **The tree commits to the handle, not the amount, and not the submitter.** `_leafOf`
66
- * hashes `(instance, account, handle)`, so whoever encrypted must have bound each input
67
- * to `(instance, the intended submitter)`. This function cannot check that: it will
65
+ * **The tree commits to the handle, not the amount.** `_leafOf` hashes
66
+ * `(instance, account, handle)`, so whoever encrypted must have bound each input to
67
+ * `(instance, instance)`. This function cannot check that: it will
68
68
  * happily build a tree over wrongly-bound handles, and the failure surfaces at claim time
69
69
  * inside the coprocessor.
70
70
  *
71
71
  * **Extra fields ride along.** Whatever a leaf carries beyond `account` and `handle` —
72
- * `boundTo`, an `inputProof`, your own row id — comes back on the entry, still aligned
73
- * with its proof. Passing `{ account, boundTo, handle, inputProof }` therefore yields a
72
+ * an `inputProof`, your own row id - comes back on the entry, still aligned with its
73
+ * proof. Passing `{ account, handle, inputProof }` therefore yields a
74
74
  * value structurally assignable to {@link CampaignEntry}.
75
75
  *
76
76
  * @param args The instance the leaves are scoped to, and the leaves.
@@ -80,7 +80,7 @@ export interface BuiltMerkleTree<L extends MerkleLeafInput> {
80
80
  * @example
81
81
  * const { root, entries } = buildMerkleTree({
82
82
  * instance: airdrop,
83
- * leaves: [{ account: alice, boundTo: alice, handle, inputProof }],
83
+ * leaves: [{ account: alice, handle, inputProof }],
84
84
  * });
85
85
  * await merkle.setMerkleRoot({ newRoot: root });
86
86
  *
@@ -23,9 +23,15 @@ export interface MerkleClaimArgs extends WriteAccountOverride {
23
23
  * The proof-bearing claim entry, built by a campaign builder (`campaign.ts`).
24
24
  *
25
25
  * `entry.account` is submitted as the claim identity and selects the leaf.
26
- * `entry.boundTo` must be the sending account, because the coprocessor verifies
27
- * the input proof against the literal caller — the SDK checks this before the
28
- * write rather than letting the transaction revert.
26
+ *
27
+ * Anyone may submit an entry - the input proof is bound to the instance itself, not to a
28
+ * caller. The contract pays `entry.account` (or `to`, when `entry.account` is the sender)
29
+ * and advances `entry.account`'s delivered total. A submission by someone else therefore
30
+ * settles the recipient's leaf on their behalf; the recipient's own later claim pays an
31
+ * encrypted zero and still costs the fee, so check
32
+ * {@link MerkleAirdropClient.getClaimedAmount} first. A stranger who submits first settles
33
+ * the leaf to `entry.account` confidentially, so a redirect or unwrap the recipient
34
+ * intended no longer happens.
29
35
  */
30
36
  entry: CampaignEntry;
31
37
  }
@@ -36,9 +42,9 @@ export interface MerkleClaimArgs extends WriteAccountOverride {
36
42
  */
37
43
  export interface GetClaimAmountArgs extends WriteAccountOverride {
38
44
  /**
39
- * Same binding rule as {@link MerkleClaimArgs.entry}: `entry.boundTo` must be the
40
- * calling account. The preview's result is ACL'd to `entry.account`, so a relayer
41
- * can confirm a leaf verifies without being able to read the amount.
45
+ * Same entry as {@link MerkleClaimArgs.entry}, and any address may submit it. The
46
+ * preview's result is ACL'd to `entry.account`, so a relayer can confirm a leaf verifies
47
+ * without being able to read the amount.
42
48
  */
43
49
  entry: CampaignEntry;
44
50
  }
@@ -80,6 +86,10 @@ export declare class MerkleAirdropClient extends AirdropBaseClient {
80
86
  * Requires `msg.value == gasFee()` exactly — handled for you; see the
81
87
  * class TSDoc.
82
88
  *
89
+ * Anyone may submit an entry, and a stranger who submits first settles the recipient's
90
+ * leaf on their behalf; see {@link MerkleClaimArgs.entry} for what that costs the
91
+ * recipient, and check {@link getClaimedAmount} before offering a claim.
92
+ *
83
93
  * @remarks
84
94
  * There is no per-leaf consumption on this variant — replay safety is the
85
95
  * accounting itself, not a spent-flag. Re-presenting an already-settled
@@ -92,8 +102,7 @@ export declare class MerkleAirdropClient extends AirdropBaseClient {
92
102
  *
93
103
  * @throws {@link ClaimNotStartedError} before `startTime`.
94
104
  * @throws {@link ClaimWindowClosedError} after `endTime`.
95
- * @throws {@link InvalidArgumentError} (`argument: "entry.boundTo"`) when the entry's proof is bound to
96
- * another address, or (`argument: "merkleProof"`) when the proof does not verify against the current root.
105
+ * @throws {@link InvalidArgumentError} (`argument: "merkleProof"`) when the proof does not verify against the current root.
97
106
  * @throws {@link UnauthorizedRedirectError} when a third-party submitter passes a `to` other than `entry.account`.
98
107
  * @returns The transaction hash.
99
108
  */
@@ -115,9 +124,18 @@ export declare class MerkleAirdropClient extends AirdropBaseClient {
115
124
  * refused before the write. A third party can still submit a confidential
116
125
  * {@link claim}.
117
126
  *
118
- * @returns The transaction hash. The underlying ERC-20 is released later by
119
- * a separate, permissionless `finalizeUnwrap` — this hash is only the
120
- * unwrap request.
127
+ * **Discloses the amount immediately.** With the stock wrapper the unwrapped amount is
128
+ * publicly decryptable from this claim transaction (the emitted `unwrapRequestId` is its
129
+ * handle), so anyone can learn it at once; `finalizeUnwrap` only releases the ERC-20.
130
+ *
131
+ * Anyone may still settle this entry first through {@link claim}, after which an unwrap
132
+ * pays an encrypted zero; see {@link MerkleClaimArgs.entry}.
133
+ *
134
+ * @returns The transaction hash. It is only the unwrap request: the underlying
135
+ * ERC-20 is released later by the wrapper's permissionless `finalizeUnwrap`. Read
136
+ * its `unwrapRequestId` with {@link AirdropBaseClient.readUnwrapRequest} (or
137
+ * {@link AirdropBaseClient.parseUnwrapRequest} over a receipt you hold), then
138
+ * finalize with Zama's `sdk.createToken(wrapper).finalizeUnwrap(unwrapRequestId)`.
121
139
  */
122
140
  claimAndUnwrap(args: MerkleClaimArgs): Promise<Hex>;
123
141
  /**
@@ -133,6 +151,9 @@ export declare class MerkleAirdropClient extends AirdropBaseClient {
133
151
  * someone's behalf gets a valid handle it cannot read — that is the contract's intent,
134
152
  * and it is what makes a blind relayed submission possible.
135
153
  *
154
+ * A leaf someone else already settled previews as an encrypted zero; see
155
+ * {@link MerkleClaimArgs.entry}.
156
+ *
136
157
  * @returns `{ handle, hash }` — pass `handle` to the Zama relayer's `userDecrypt`, as `entry.account`.
137
158
  */
138
159
  getClaimAmount(args: GetClaimAmountArgs): Promise<EncryptedViewResult>;
@@ -1,5 +1,5 @@
1
- import type { UseQueryOptions } from "@tanstack/react-query";
2
- import type { Address, PublicClient, WalletClient } from "viem";
1
+ import type { Query, UseQueryOptions } from "@tanstack/react-query";
2
+ import { type Address, type PublicClient, type WalletClient } from "viem";
3
3
  import { DeploymentAddressUnavailableError } from "../../core/errors.js";
4
4
  import type { SdkTelemetry } from "../../core/telemetry.js";
5
5
  import { type AirdropBaseClient } from "../airdrop-base.js";
@@ -56,6 +56,12 @@ export declare function airdropQueryKeyPrefix(params: {
56
56
  address: Address | undefined;
57
57
  fn?: string;
58
58
  }): unknown[];
59
+ /**
60
+ * Per-result `staleTime` for a factory mapping that is written once at create:
61
+ * fresh forever once non-zero, always stale while zero (the address may be created
62
+ * later on a path no hook invalidation reaches). The policy {@link useIsAirdrop} uses.
63
+ */
64
+ export declare function staleUntilNonZeroAddress(query: Query<Address, Error>): number;
59
65
  /**
60
66
  * The client-construction subset of every hook's options — deliberately NOT
61
67
  * generic over `TData`. Client-memo helpers (`useMemoAirdropBaseClient`,
@@ -168,13 +174,13 @@ export declare function useMemoComplianceManagerClient(opts: AirdropInstanceClie
168
174
  chainId: number | undefined;
169
175
  };
170
176
  /**
171
- * Per-hook overrides for {@link useMemoEcdsaAirdropClient} — `dedupMode` has no on-chain getter, so it must be supplied.
177
+ * Per-hook overrides for {@link useMemoEcdsaAirdropClient} - `dedupMode` is optional; read it from the chain with `useDedupMode`.
172
178
  *
173
179
  * @alpha
174
180
  */
175
181
  export type EcdsaAirdropInstanceHookOptions<TData = unknown> = AirdropInstanceHookOptions<TData> & {
176
- /** @see EcdsaAirdropClientConfig.dedupMode */
177
- dedupMode: DedupMode;
182
+ /** @deprecated Read the policy from the chain with `useDedupMode`. */
183
+ dedupMode?: DedupMode | undefined;
178
184
  };
179
185
  /**
180
186
  * Non-generic version of {@link EcdsaAirdropInstanceHookOptions}, for the memo helper.
@@ -182,7 +188,7 @@ export type EcdsaAirdropInstanceHookOptions<TData = unknown> = AirdropInstanceHo
182
188
  * @alpha
183
189
  */
184
190
  export type EcdsaAirdropInstanceClientOptions = AirdropInstanceClientOptions & {
185
- dedupMode: DedupMode;
191
+ dedupMode?: DedupMode | undefined;
186
192
  };
187
193
  /** Memoize an {@link EcdsaAirdropClient} for `opts.address`. */
188
194
  export declare function useMemoEcdsaAirdropClient(opts: EcdsaAirdropInstanceClientOptions): {