@tokenops/sdk 1.6.0 → 2.0.0-alpha.2
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 +77 -8
- package/CONTRIBUTING.md +4 -2
- package/README.md +146 -90
- package/SUPPORT.md +47 -0
- package/dist/{chunk-BD4LZBVF.cjs → chunk-3QHNYEQD.cjs} +18 -17
- package/dist/{chunk-YFIWCYHC.cjs → chunk-3YHBO2DL.cjs} +56 -54
- package/dist/{chunk-QET3Q4JP.js → chunk-44YJPMQC.js} +8 -6
- package/dist/{chunk-6WSNS3UV.js → chunk-4RAAATVY.js} +2 -4
- package/dist/{chunk-4KJ66YRH.js → chunk-4TSDNZQ3.js} +2 -2
- 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-WOEETTH7.cjs → chunk-7AFPOE7N.cjs} +6 -6
- package/dist/{chunk-QKKBBH7I.js → chunk-A4DCEE33.js} +34 -7
- package/dist/chunk-AREQJHKA.cjs +713 -0
- package/dist/{chunk-U57COLUE.js → chunk-AXIPOR3C.js} +2 -2
- package/dist/chunk-EBLBPUPI.cjs +255 -0
- package/dist/chunk-EYDA6Q6C.js +245 -0
- package/dist/{chunk-SYHNZSZZ.cjs → chunk-FAXIIH5R.cjs} +3 -3
- package/dist/{chunk-AYGRYDBX.cjs → chunk-FEDX7B6T.cjs} +37 -35
- package/dist/{chunk-CBRL2PJA.cjs → chunk-FHWSBGWE.cjs} +12 -12
- package/dist/{chunk-WUXUWTFW.cjs → chunk-FT5H2Q7Y.cjs} +37 -7
- package/dist/chunk-GADGBQJO.js +423 -0
- package/dist/{chunk-VHSNYUYV.js → chunk-IGO5XSPS.js} +5 -5
- package/dist/chunk-IUKKNJ2R.cjs +433 -0
- package/dist/{chunk-VR3FREBX.cjs → chunk-JK4XMMKM.cjs} +3 -3
- package/dist/{chunk-4ZCXK4VI.cjs → chunk-KFRDLKMA.cjs} +14 -14
- package/dist/chunk-KWFFIJYX.js +11 -0
- package/dist/{chunk-7G7UOQV4.cjs → chunk-MM5BV5CS.cjs} +4 -4
- package/dist/{chunk-43RFBQ73.cjs → chunk-MVDQMV25.cjs} +29 -32
- package/dist/chunk-NWFMBLSQ.js +4 -0
- package/dist/{chunk-HETNKZEE.js → chunk-PYYSB5ZN.js} +1 -1
- package/dist/chunk-PZZK3O3S.cjs +9843 -0
- package/dist/{chunk-DRSPMIZ7.js → chunk-QBJ7O2B4.js} +1 -11
- package/dist/{chunk-WTK6JDSI.js → chunk-SPLNGUFF.js} +6 -4
- 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-EUKPOXWR.cjs → chunk-UHHMVBLU.cjs} +17 -15
- package/dist/chunk-VW356KR3.js +688 -0
- package/dist/{chunk-BK7YIVLK.cjs → chunk-WJLECC22.cjs} +75 -73
- package/dist/{chunk-V5D7BHW3.js → chunk-WJMEBBU7.js} +6 -4
- package/dist/{chunk-NFW7AUEX.js → chunk-WMACINXO.js} +1 -1
- package/dist/chunk-X7WBPCEU.js +9817 -0
- 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 +8 -2
- 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 +1250 -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 +619 -51
- package/dist/fhe-airdrop/advanced/react/index.d.cts +43 -3
- package/dist/fhe-airdrop/advanced/react/index.d.ts +43 -3
- package/dist/fhe-airdrop/advanced/react/index.js +592 -52
- package/dist/fhe-airdrop/advanced/react/useClearCompliancePolicy.d.ts +28 -0
- package/dist/fhe-airdrop/advanced/react/useClearUpgradeabilityPolicy.d.ts +26 -0
- package/dist/fhe-airdrop/advanced/react/useDisableCustomFee.d.ts +25 -0
- package/dist/fhe-airdrop/advanced/react/useEcdsaInitCodeHash.d.ts +30 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryComplianceDelegate.d.ts +25 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryCompliancePolicy.d.ts +38 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryCustomFee.d.ts +24 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryGrantRole.d.ts +32 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryHasRole.d.ts +27 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryImplementations.d.ts +33 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryRenounceRole.d.ts +36 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryRevokeRole.d.ts +35 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryRoleConstants.d.ts +46 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryRoleMembers.d.ts +47 -0
- package/dist/fhe-airdrop/advanced/react/useFactoryUpgradeabilityPolicy.d.ts +39 -0
- package/dist/fhe-airdrop/advanced/react/useMerkleInitCodeHash.d.ts +24 -0
- 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/advanced/react/useSetComplianceDelegate.d.ts +33 -0
- package/dist/fhe-airdrop/advanced/react/useSetComplianceManagerImpl.d.ts +27 -0
- package/dist/fhe-airdrop/advanced/react/useSetCompliancePolicy.d.ts +28 -0
- package/dist/fhe-airdrop/advanced/react/useSetCustomFee.d.ts +28 -0
- package/dist/fhe-airdrop/advanced/react/useSetDefaultDelegateToCompliance.d.ts +31 -0
- package/dist/fhe-airdrop/advanced/react/useSetDefaultGasFee.d.ts +28 -0
- package/dist/fhe-airdrop/advanced/react/useSetDefaultUpgradeable.d.ts +27 -0
- package/dist/fhe-airdrop/advanced/react/useSetEcdsaImplementation.d.ts +34 -0
- package/dist/fhe-airdrop/advanced/react/useSetFeeCollector.d.ts +27 -0
- package/dist/fhe-airdrop/advanced/react/useSetMerkleImplementation.d.ts +30 -0
- package/dist/fhe-airdrop/advanced/react/useSetUpgradeabilityPolicy.d.ts +31 -0
- package/dist/fhe-airdrop/airdrop-base.d.ts +608 -0
- package/dist/fhe-airdrop/campaign.d.ts +338 -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 +273 -15
- package/dist/fhe-airdrop/factory.d.ts +533 -274
- package/dist/fhe-airdrop/guards.d.ts +317 -0
- package/dist/fhe-airdrop/index.cjs +233 -73
- package/dist/fhe-airdrop/index.d.cts +46 -8
- package/dist/fhe-airdrop/index.d.ts +46 -8
- package/dist/fhe-airdrop/index.js +11 -7
- package/dist/fhe-airdrop/merkle-tree.d.ts +97 -0
- package/dist/fhe-airdrop/merkle.d.ts +201 -0
- package/dist/fhe-airdrop/react/_shared.d.ts +156 -70
- package/dist/fhe-airdrop/react/index.cjs +1174 -384
- package/dist/fhe-airdrop/react/index.d.cts +99 -74
- package/dist/fhe-airdrop/react/index.d.ts +99 -74
- package/dist/fhe-airdrop/react/index.js +993 -303
- package/dist/fhe-airdrop/react/keys.d.ts +90 -0
- package/dist/fhe-airdrop/react/useAccessEcdsaClaimAmount.d.ts +26 -0
- package/dist/fhe-airdrop/react/useAccessMerkleClaimAmount.d.ts +27 -0
- package/dist/fhe-airdrop/react/useAddComplianceDelegate.d.ts +37 -0
- package/dist/fhe-airdrop/react/useAdminBatchDiscloseBalanceToParties.d.ts +36 -0
- package/dist/fhe-airdrop/react/useAdminDiscloseBalanceToParty.d.ts +31 -0
- package/dist/fhe-airdrop/react/useAdminGetCurrentBalance.d.ts +27 -0
- package/dist/fhe-airdrop/react/useAirdropConfig.d.ts +49 -0
- package/dist/fhe-airdrop/react/useAirdropDeploymentMode.d.ts +28 -0
- package/dist/fhe-airdrop/react/useAirdropGasFee.d.ts +10 -5
- package/dist/fhe-airdrop/react/useAirdropGrantRole.d.ts +29 -10
- 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/useAirdropRenounceRole.d.ts +36 -0
- package/dist/fhe-airdrop/react/useAirdropRevokeRole.d.ts +27 -9
- package/dist/fhe-airdrop/react/useAirdropRoleAdmin.d.ts +28 -0
- package/dist/fhe-airdrop/react/useAirdropRoleConstants.d.ts +67 -0
- package/dist/fhe-airdrop/react/useAirdropRoleMembers.d.ts +49 -0
- package/dist/fhe-airdrop/react/useAirdropToken.d.ts +11 -4
- package/dist/fhe-airdrop/react/useAirdropUpgradeToAndCall.d.ts +45 -0
- package/dist/fhe-airdrop/react/useAirdropWindow.d.ts +37 -0
- package/dist/fhe-airdrop/react/useBatchDiscloseHandlesToParty.d.ts +32 -0
- package/dist/fhe-airdrop/react/useBuildMerkleCampaign.d.ts +68 -0
- package/dist/fhe-airdrop/react/useClaimedAmount.d.ts +29 -0
- package/dist/fhe-airdrop/react/useComplianceGrantRole.d.ts +32 -0
- package/dist/fhe-airdrop/react/useComplianceHasRole.d.ts +37 -0
- package/dist/fhe-airdrop/react/useComplianceInfo.d.ts +50 -0
- package/dist/fhe-airdrop/react/useComplianceManager.d.ts +16 -0
- package/dist/fhe-airdrop/react/useComplianceManagerOf.d.ts +32 -0
- package/dist/fhe-airdrop/react/useComplianceRenounceRole.d.ts +38 -0
- package/dist/fhe-airdrop/react/useComplianceRevokeRole.d.ts +36 -0
- package/dist/fhe-airdrop/react/useComplianceRoleConstants.d.ts +41 -0
- package/dist/fhe-airdrop/react/useComplianceRoleMembers.d.ts +45 -0
- package/dist/fhe-airdrop/react/useCreateAndFundEcdsaAirdrop.d.ts +55 -0
- package/dist/fhe-airdrop/react/useCreateAndFundMerkleAirdrop.d.ts +52 -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/useDiscloseHandleToParty.d.ts +35 -0
- package/dist/fhe-airdrop/react/useEcdsaClaim.d.ts +24 -0
- package/dist/fhe-airdrop/react/useEcdsaClaimAndUnwrap.d.ts +27 -0
- package/dist/fhe-airdrop/react/useEcdsaDomain.d.ts +41 -0
- package/dist/fhe-airdrop/react/useEffectiveDelegateToCompliance.d.ts +26 -0
- package/dist/fhe-airdrop/react/useEffectiveUpgradeable.d.ts +20 -0
- package/dist/fhe-airdrop/react/useEncryptCampaignAmounts.d.ts +59 -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/useIsActiveDelegate.d.ts +29 -0
- package/dist/fhe-airdrop/react/useIsMerkleRootMutable.d.ts +21 -0
- package/dist/fhe-airdrop/react/useIsSignatureValid.d.ts +46 -0
- package/dist/fhe-airdrop/react/useMerkleClaim.d.ts +22 -0
- package/dist/fhe-airdrop/react/useMerkleClaimAndUnwrap.d.ts +29 -0
- package/dist/fhe-airdrop/react/useMerkleRoot.d.ts +15 -0
- package/dist/fhe-airdrop/react/usePlanMerkleCampaign.d.ts +53 -0
- package/dist/fhe-airdrop/react/usePreflightClaim.d.ts +46 -0
- package/dist/fhe-airdrop/react/usePreflightCreateAirdrop.d.ts +51 -35
- package/dist/fhe-airdrop/react/useRescueERC20.d.ts +30 -0
- package/dist/fhe-airdrop/react/useRescueOtherConfidentialToken.d.ts +34 -0
- package/dist/fhe-airdrop/react/useRevokeComplianceDelegate.d.ts +37 -0
- package/dist/fhe-airdrop/react/useRotateMerkleRoot.d.ts +52 -0
- package/dist/fhe-airdrop/react/useSetMerkleRoot.d.ts +22 -0
- package/dist/fhe-airdrop/react/useSignClaimAuthorization.d.ts +32 -21
- package/dist/fhe-airdrop/react/useWithdrawConfidential.d.ts +23 -0
- package/dist/fhe-airdrop/react/useWithdrawGasFee.d.ts +37 -0
- package/dist/fhe-airdrop/roles.d.ts +147 -0
- package/dist/fhe-airdrop/types.d.ts +78 -63
- 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/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/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/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/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
package/dist/core/addresses.d.ts
CHANGED
|
@@ -14,8 +14,17 @@ export declare const DEPLOYED_ADDRESSES: {
|
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
readonly fheAirdrop: {
|
|
17
|
-
readonly
|
|
18
|
-
readonly 11155111: "
|
|
17
|
+
readonly airdropFactory: {
|
|
18
|
+
readonly 11155111: "0x174A7CB40F64aBC4C95CecB4172A066Cf531e4E9";
|
|
19
|
+
};
|
|
20
|
+
readonly ecdsaImplementation: {
|
|
21
|
+
readonly 11155111: "0xDeD7AB391f87B8F891F89AaEC64C7c9C800C6645";
|
|
22
|
+
};
|
|
23
|
+
readonly merkleImplementation: {
|
|
24
|
+
readonly 11155111: "0x815E65Cdd707F07F09332537b47C530d0E87aAf5";
|
|
25
|
+
};
|
|
26
|
+
readonly complianceManagerImplementation: {
|
|
27
|
+
readonly 11155111: "0x885474FA494748C85410482244a406C6Ad570CCe";
|
|
19
28
|
};
|
|
20
29
|
};
|
|
21
30
|
readonly fheDisperse: {
|
|
@@ -47,6 +56,9 @@ export declare function getFheVestingFactoryAddress(chainId: number): Address |
|
|
|
47
56
|
export declare function requireFheVestingFactoryAddress(chainId: number): Address;
|
|
48
57
|
export declare function getFheAirdropFactoryAddress(chainId: number): Address | undefined;
|
|
49
58
|
export declare function requireFheAirdropFactoryAddress(chainId: number): Address;
|
|
59
|
+
export declare function getFheAirdropEcdsaImplementationAddress(chainId: number): Address | undefined;
|
|
60
|
+
export declare function getFheAirdropMerkleImplementationAddress(chainId: number): Address | undefined;
|
|
61
|
+
export declare function getFheAirdropComplianceImplementationAddress(chainId: number): Address | undefined;
|
|
50
62
|
export declare function getFheDisperseSingletonAddress(chainId: number): Address | undefined;
|
|
51
63
|
export declare function requireFheDisperseSingletonAddress(chainId: number): Address;
|
|
52
64
|
/**
|
package/dist/core/brands.d.ts
CHANGED
|
@@ -44,7 +44,12 @@ export type ExternalInputProof = Hex;
|
|
|
44
44
|
export type TxHash = Hex;
|
|
45
45
|
/** `bytes32` vesting schedule id, emitted in `VestingCreated`. */
|
|
46
46
|
export type VestingId = Hex;
|
|
47
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* `bytes32` campaign id chosen by the consumer. Airdrop v2 identifies an
|
|
49
|
+
* instance by its address (`ConfidentialAirdropCreated(address airdrop, …)`),
|
|
50
|
+
* not by an on-chain id, so this brand exists for consumers that key
|
|
51
|
+
* campaigns by their own `bytes32` identifier.
|
|
52
|
+
*/
|
|
48
53
|
export type AirdropId = Hex;
|
|
49
54
|
/** `bytes32` disperse id, emitted in `DisperseExecuted`. */
|
|
50
55
|
export type DisperseId = Hex;
|
|
@@ -55,7 +60,8 @@ export type Role = Hex;
|
|
|
55
60
|
* or `walletClient.signMessage` (EIP-191). NOT a transaction hash — these
|
|
56
61
|
* bytes are never broadcast directly; they're handed off-chain to a verifier.
|
|
57
62
|
*
|
|
58
|
-
* Canonical producer:
|
|
63
|
+
* Canonical producer: `signClaimAuthorization` in `/fhe-airdrop`, which signs
|
|
64
|
+
* the ECDSA campaign's EIP-712 `Claim` struct.
|
|
59
65
|
*/
|
|
60
66
|
export type Signature = Hex;
|
|
61
67
|
/**
|
package/dist/core/errors.d.ts
CHANGED
|
@@ -11,8 +11,10 @@ declare const TOKENOPS_SDK_ERROR_BRAND: unique symbol;
|
|
|
11
11
|
* Stable, string-literal error codes. Codes are the machine contract — match
|
|
12
12
|
* on `error.code` in `onError` handlers and UI surfaces. Messages stay
|
|
13
13
|
* human-readable and may evolve between versions.
|
|
14
|
+
* @public
|
|
14
15
|
*/
|
|
15
|
-
export type TokenOpsSdkErrorCode = "TOKENOPS_UNSUPPORTED_CHAIN" | "TOKENOPS_DEPLOYMENT_ADDRESS_UNAVAILABLE" | "TOKENOPS_MISSING_PUBLIC_CLIENT" | "TOKENOPS_MISSING_WALLET_CLIENT" | "TOKENOPS_MISSING_ACCOUNT" | "TOKENOPS_MISSING_ENCRYPTOR" | "TOKENOPS_MISSING_CLIENT" | "TOKENOPS_INVALID_ARGUMENT" | "TOKENOPS_RECEIPT_EVENT_NOT_FOUND" | "TOKENOPS_RECEIPT_EVENT_AMBIGUOUS" | "TOKENOPS_CONTRACT_REVERT" | "TOKENOPS_PAUSED" | "TOKENOPS_ACCESS_DENIED" | "TOKENOPS_OPERATOR_NOT_APPROVED" | "TOKENOPS_INSUFFICIENT_FEE" | "TOKENOPS_INSUFFICIENT_BALANCE" | "TOKENOPS_BATCH_TOO_LARGE" | "TOKENOPS_FEATURE_DISABLED" | "TOKENOPS_TRANSFER_FAILED" | "TOKENOPS_FHE_HANDLE_NOT_ALLOWED" | "TOKENOPS_ALREADY_INITIALIZED" | "TOKENOPS_REENTRANCY" | "TOKENOPS_INVALID_SIGNATURE" | "TOKENOPS_WALLET_REJECTED" | "TOKENOPS_WALLET_CHAIN_MISMATCH" | "TOKENOPS_NETWORK_ERROR" | "TOKENOPS_INSUFFICIENT_GAS_FUNDS" | "TOKENOPS_UNKNOWN_WRITE_FAILURE" | "TOKENOPS_USER_REJECTED" | "TOKENOPS_SIGNING_FAILED" | "TOKENOPS_RELAYER_UNREACHABLE" | "TOKENOPS_ENCRYPTION_FAILED" | "TOKENOPS_DECRYPTION_FAILED" | "TOKENOPS_USER_DECRYPT_NOT_ALLOWED" | "TOKENOPS_VESTING_NOT_FOUND" | "TOKENOPS_NOT_RECIPIENT" | "TOKENOPS_CLAIM_LOCKED" | "TOKENOPS_VESTING_REVOKED" | "TOKENOPS_NOT_REVOCABLE" | "TOKENOPS_VESTING_EXPIRED" | "TOKENOPS_TRANSFER_ALREADY_PENDING" | "TOKENOPS_NO_PENDING_TRANSFER" | "TOKENOPS_NOT_PENDING_RECIPIENT" | "TOKENOPS_TRANSFER_EXPIRED" | "TOKENOPS_ALREADY_CLAIMED" | "TOKENOPS_CLAIM_NOT_STARTED" | "TOKENOPS_CLAIM_WINDOW_CLOSED" | "TOKENOPS_NOT_REGISTERED" | "TOKENOPS_ALREADY_REGISTERED" | "TOKENOPS_SUBWALLETS_NOT_APPROVED" | "TOKENOPS_SINGLETON_NOT_APPROVED" | "TOKENOPS_FAUCET_SUPPLY_EXHAUSTED";
|
|
16
|
+
export type TokenOpsSdkErrorCode = "TOKENOPS_UNSUPPORTED_CHAIN" | "TOKENOPS_DEPLOYMENT_ADDRESS_UNAVAILABLE" | "TOKENOPS_MISSING_PUBLIC_CLIENT" | "TOKENOPS_MISSING_WALLET_CLIENT" | "TOKENOPS_MISSING_ACCOUNT" | "TOKENOPS_MISSING_ENCRYPTOR" | "TOKENOPS_MISSING_CLIENT" | "TOKENOPS_INVALID_ARGUMENT" | "TOKENOPS_RECEIPT_EVENT_NOT_FOUND" | "TOKENOPS_RECEIPT_EVENT_AMBIGUOUS" | "TOKENOPS_CONTRACT_REVERT" | "TOKENOPS_PAUSED" | "TOKENOPS_ACCESS_DENIED" | "TOKENOPS_OPERATOR_NOT_APPROVED" | "TOKENOPS_INSUFFICIENT_FEE" | "TOKENOPS_INSUFFICIENT_BALANCE" | "TOKENOPS_BATCH_TOO_LARGE" | "TOKENOPS_FEATURE_DISABLED" | "TOKENOPS_TRANSFER_FAILED" | "TOKENOPS_FHE_HANDLE_NOT_ALLOWED" | "TOKENOPS_ALREADY_INITIALIZED" | "TOKENOPS_REENTRANCY" | "TOKENOPS_INVALID_SIGNATURE" | "TOKENOPS_WALLET_REJECTED" | "TOKENOPS_WALLET_CHAIN_MISMATCH" | "TOKENOPS_NETWORK_ERROR" | "TOKENOPS_INSUFFICIENT_GAS_FUNDS" | "TOKENOPS_UNKNOWN_WRITE_FAILURE" | "TOKENOPS_USER_REJECTED" | "TOKENOPS_SIGNING_FAILED" | "TOKENOPS_RELAYER_UNREACHABLE" | "TOKENOPS_ENCRYPTION_FAILED" | "TOKENOPS_DECRYPTION_FAILED" | "TOKENOPS_USER_DECRYPT_NOT_ALLOWED" | "TOKENOPS_VESTING_NOT_FOUND" | "TOKENOPS_NOT_RECIPIENT" | "TOKENOPS_CLAIM_LOCKED" | "TOKENOPS_VESTING_REVOKED" | "TOKENOPS_NOT_REVOCABLE" | "TOKENOPS_VESTING_EXPIRED" | "TOKENOPS_TRANSFER_ALREADY_PENDING" | "TOKENOPS_NO_PENDING_TRANSFER" | "TOKENOPS_NOT_PENDING_RECIPIENT" | "TOKENOPS_TRANSFER_EXPIRED" | "TOKENOPS_ALREADY_CLAIMED" | "TOKENOPS_CLAIM_NOT_STARTED" | "TOKENOPS_CLAIM_WINDOW_CLOSED" | "TOKENOPS_NOT_REGISTERED" | "TOKENOPS_ALREADY_REGISTERED" | "TOKENOPS_SUBWALLETS_NOT_APPROVED" | "TOKENOPS_SINGLETON_NOT_APPROVED" | "TOKENOPS_FAUCET_SUPPLY_EXHAUSTED" | "TOKENOPS_MERKLE_UUPS_UNSUPPORTED" | "TOKENOPS_NON_STOCK_WRAPPER" | "TOKENOPS_UPGRADEABILITY_NOT_ALLOWED" | "TOKENOPS_FEE_COLLECTOR_SELF_ADMINISTERED" | "TOKENOPS_DEDUP_ID_CONSUMED" | "TOKENOPS_SIGNATURE_EXPIRED" | "TOKENOPS_SALT_COLLISION" | "TOKENOPS_PREDICTION_DRIFT" | "TOKENOPS_UNAUTHORIZED_REDIRECT";
|
|
17
|
+
/** @public */
|
|
16
18
|
export interface TokenOpsSdkErrorInit {
|
|
17
19
|
code: TokenOpsSdkErrorCode;
|
|
18
20
|
cause?: unknown;
|
|
@@ -26,6 +28,7 @@ export interface TokenOpsSdkErrorInit {
|
|
|
26
28
|
*
|
|
27
29
|
* Subclasses narrow `context` to a concrete shape and pin `code` to a single
|
|
28
30
|
* literal — `if (error.code === "TOKENOPS_MISSING_ENCRYPTOR") error.context.method` typechecks.
|
|
31
|
+
* @public
|
|
29
32
|
*/
|
|
30
33
|
export declare class TokenOpsSdkError extends Error {
|
|
31
34
|
readonly name: string;
|
|
@@ -38,8 +41,10 @@ export declare class TokenOpsSdkError extends Error {
|
|
|
38
41
|
* Brand-based predicate. Prefer over `instanceof` when bundling boundaries
|
|
39
42
|
* may have caused duplicate SDK copies — `Symbol.for` is realm-global, so the
|
|
40
43
|
* brand survives.
|
|
44
|
+
* @public
|
|
41
45
|
*/
|
|
42
46
|
export declare function isTokenOpsSdkError(error: unknown): error is TokenOpsSdkError;
|
|
47
|
+
/** @public */
|
|
43
48
|
export declare class UnsupportedChainError extends TokenOpsSdkError {
|
|
44
49
|
readonly name = "UnsupportedChainError";
|
|
45
50
|
readonly context: {
|
|
@@ -49,6 +54,7 @@ export declare class UnsupportedChainError extends TokenOpsSdkError {
|
|
|
49
54
|
cause?: unknown;
|
|
50
55
|
});
|
|
51
56
|
}
|
|
57
|
+
/** @public */
|
|
52
58
|
export type DeploymentAddressUnavailableReason = "chain-id-missing" | "registry-not-deployed" | "registry-unknown-chain";
|
|
53
59
|
/**
|
|
54
60
|
* Thrown when the SDK cannot resolve a deployed contract address for the
|
|
@@ -61,6 +67,7 @@ export type DeploymentAddressUnavailableReason = "chain-id-missing" | "registry-
|
|
|
61
67
|
* to bypass the registry (defaults to `"address"`). Infra contracts whose
|
|
62
68
|
* override lives under a different key — e.g. `aclAddress` on the FHE
|
|
63
69
|
* clients — set this so the error message points users at the right field.
|
|
70
|
+
* @public
|
|
64
71
|
*/
|
|
65
72
|
export declare class DeploymentAddressUnavailableError extends TokenOpsSdkError {
|
|
66
73
|
readonly name = "DeploymentAddressUnavailableError";
|
|
@@ -82,6 +89,7 @@ export declare class DeploymentAddressUnavailableError extends TokenOpsSdkError
|
|
|
82
89
|
cause?: unknown;
|
|
83
90
|
});
|
|
84
91
|
}
|
|
92
|
+
/** @public */
|
|
85
93
|
export declare class MissingPublicClientError extends TokenOpsSdkError {
|
|
86
94
|
readonly name = "MissingPublicClientError";
|
|
87
95
|
readonly context: {
|
|
@@ -91,6 +99,7 @@ export declare class MissingPublicClientError extends TokenOpsSdkError {
|
|
|
91
99
|
cause?: unknown;
|
|
92
100
|
});
|
|
93
101
|
}
|
|
102
|
+
/** @public */
|
|
94
103
|
export declare class MissingWalletClientError extends TokenOpsSdkError {
|
|
95
104
|
readonly name = "MissingWalletClientError";
|
|
96
105
|
readonly context: {
|
|
@@ -100,6 +109,7 @@ export declare class MissingWalletClientError extends TokenOpsSdkError {
|
|
|
100
109
|
cause?: unknown;
|
|
101
110
|
});
|
|
102
111
|
}
|
|
112
|
+
/** @public */
|
|
103
113
|
export declare class MissingAccountError extends TokenOpsSdkError {
|
|
104
114
|
readonly name = "MissingAccountError";
|
|
105
115
|
readonly context: {
|
|
@@ -109,6 +119,7 @@ export declare class MissingAccountError extends TokenOpsSdkError {
|
|
|
109
119
|
cause?: unknown;
|
|
110
120
|
});
|
|
111
121
|
}
|
|
122
|
+
/** @public */
|
|
112
123
|
export declare class MissingEncryptorError extends TokenOpsSdkError {
|
|
113
124
|
readonly name = "MissingEncryptorError";
|
|
114
125
|
readonly context: {
|
|
@@ -125,6 +136,7 @@ export declare class MissingEncryptorError extends TokenOpsSdkError {
|
|
|
125
136
|
* airdrop / disperse) could not be constructed — usually because the wagmi
|
|
126
137
|
* `publicClient` isn't ready yet or the chain id has no resolvable address.
|
|
127
138
|
* Tests gate on `enabled: !!client`, so this fires only on the mutation path.
|
|
139
|
+
* @public
|
|
128
140
|
*/
|
|
129
141
|
export declare class MissingClientError extends TokenOpsSdkError {
|
|
130
142
|
readonly name = "MissingClientError";
|
|
@@ -141,6 +153,7 @@ export declare class MissingClientError extends TokenOpsSdkError {
|
|
|
141
153
|
* uint range, matching lengths, valid address, etc.). `context.argument`
|
|
142
154
|
* names the offending parameter; `context.reason` is the short explanation
|
|
143
155
|
* that's also embedded in the message.
|
|
156
|
+
* @public
|
|
144
157
|
*/
|
|
145
158
|
export declare class InvalidArgumentError extends TokenOpsSdkError {
|
|
146
159
|
readonly name = "InvalidArgumentError";
|
|
@@ -167,6 +180,7 @@ export declare class InvalidArgumentError extends TokenOpsSdkError {
|
|
|
167
180
|
* Wraps the receipt-based handle extraction pattern described in
|
|
168
181
|
* CLAUDE.md Pitfall #1: SDK methods that return an encrypted handle MUST
|
|
169
182
|
* parse the receipt's ACL `Allowed` event, never `simulateContract().result`.
|
|
183
|
+
* @public
|
|
170
184
|
*/
|
|
171
185
|
export declare class ReceiptEventNotFoundError extends TokenOpsSdkError {
|
|
172
186
|
readonly name = "ReceiptEventNotFoundError";
|
|
@@ -197,6 +211,7 @@ export declare class ReceiptEventNotFoundError extends TokenOpsSdkError {
|
|
|
197
211
|
* appear, either a compound view emitted several or two encrypted views
|
|
198
212
|
* landed in the same tx. File a bug with the tx hash so the SDK can add a
|
|
199
213
|
* caller-specific helper rather than picking heuristically.
|
|
214
|
+
* @public
|
|
200
215
|
*/
|
|
201
216
|
export declare class ReceiptEventAmbiguousError extends TokenOpsSdkError {
|
|
202
217
|
readonly name = "ReceiptEventAmbiguousError";
|
|
@@ -227,6 +242,7 @@ export declare class ReceiptEventAmbiguousError extends TokenOpsSdkError {
|
|
|
227
242
|
* in the ABI, raw `revert()` with no data, etc.), all three fields stay
|
|
228
243
|
* `undefined` and `context.rawRevertData` holds the original calldata. Always
|
|
229
244
|
* prefer this over letting viem's `ContractFunctionExecutionError` escape.
|
|
245
|
+
* @public
|
|
230
246
|
*/
|
|
231
247
|
export declare class ContractRevertError extends TokenOpsSdkError {
|
|
232
248
|
readonly name = "ContractRevertError";
|
|
@@ -251,7 +267,11 @@ export declare class ContractRevertError extends TokenOpsSdkError {
|
|
|
251
267
|
cause?: unknown;
|
|
252
268
|
});
|
|
253
269
|
}
|
|
254
|
-
/**
|
|
270
|
+
/**
|
|
271
|
+
* Contract is paused. Read `paused()` before retrying.
|
|
272
|
+
*
|
|
273
|
+
* @public
|
|
274
|
+
*/
|
|
255
275
|
export declare class PausedError extends TokenOpsSdkError {
|
|
256
276
|
readonly name = "PausedError";
|
|
257
277
|
readonly context: {
|
|
@@ -269,6 +289,7 @@ export declare class PausedError extends TokenOpsSdkError {
|
|
|
269
289
|
* role selector when the SDK can decode it (`AccessControlUnauthorizedAccount`
|
|
270
290
|
* carries `(account, role)`); otherwise `undefined`. Callers can map the role
|
|
271
291
|
* selector back to a human name via the client's `roleConstants()` helper.
|
|
292
|
+
* @public
|
|
272
293
|
*/
|
|
273
294
|
export declare class AccessDeniedError extends TokenOpsSdkError {
|
|
274
295
|
readonly name = "AccessDeniedError";
|
|
@@ -291,6 +312,7 @@ export declare class AccessDeniedError extends TokenOpsSdkError {
|
|
|
291
312
|
* a single exported constant so every surface that mentions the prerequisite
|
|
292
313
|
* (this error, operator helpers, docs) reuses the exact same wording.
|
|
293
314
|
* Do NOT reword — the string is shared verbatim with the docs repo.
|
|
315
|
+
* @public
|
|
294
316
|
*/
|
|
295
317
|
export declare const OPERATOR_NOT_APPROVED_REMEDIATION: "The token has not approved this contract as an operator. Call `setOperator()` (see `/fhe` operators) before this transaction.";
|
|
296
318
|
/**
|
|
@@ -299,11 +321,12 @@ export declare const OPERATOR_NOT_APPROVED_REMEDIATION: "The token has not appro
|
|
|
299
321
|
* `0x79f2cb38`). Raised whenever a TokenOps contract tries to pull
|
|
300
322
|
* confidential tokens from a holder that never called `setOperator()` for it
|
|
301
323
|
* (vesting `createVesting`, airdrop funding, disperse pulls). Also surfaced
|
|
302
|
-
* pre-write as a `blockerErrors[]` entry by
|
|
303
|
-
* (`
|
|
324
|
+
* pre-write as a `blockerErrors[]` entry by `preflightCreateVesting`
|
|
325
|
+
* (`/fhe-vesting`) rather than thrown.
|
|
304
326
|
*
|
|
305
327
|
* Remediation: call `setOperator()` on the token (see the `/fhe` operator
|
|
306
328
|
* helpers) with the product contract as operator, then retry.
|
|
329
|
+
* @public
|
|
307
330
|
*/
|
|
308
331
|
export declare class OperatorNotApprovedError extends TokenOpsSdkError {
|
|
309
332
|
readonly name = "OperatorNotApprovedError";
|
|
@@ -333,6 +356,7 @@ export declare class OperatorNotApprovedError extends TokenOpsSdkError {
|
|
|
333
356
|
*
|
|
334
357
|
* The SDK does not echo plaintext FHE values — `provided` and `required` are
|
|
335
358
|
* populated only for the `gas` case where both sides are public.
|
|
359
|
+
* @public
|
|
336
360
|
*/
|
|
337
361
|
export declare class InsufficientFeeError extends TokenOpsSdkError {
|
|
338
362
|
readonly name = "InsufficientFeeError";
|
|
@@ -357,6 +381,7 @@ export declare class InsufficientFeeError extends TokenOpsSdkError {
|
|
|
357
381
|
* asset class. For confidential balances the underlying value is encrypted, so
|
|
358
382
|
* `requested` / `available` stay `undefined` — the SDK never echoes plaintext
|
|
359
383
|
* FHE values into `context`.
|
|
384
|
+
* @public
|
|
360
385
|
*/
|
|
361
386
|
export declare class InsufficientBalanceError extends TokenOpsSdkError {
|
|
362
387
|
readonly name = "InsufficientBalanceError";
|
|
@@ -382,6 +407,7 @@ export declare class InsufficientBalanceError extends TokenOpsSdkError {
|
|
|
382
407
|
* Note: `context.max` is `bigint` (the contract returns `uint256` for batch
|
|
383
408
|
* limits, even though realistic values fit comfortably in `Number`). Call
|
|
384
409
|
* `Number(error.context.max)` or `.toString()` before string-interpolating.
|
|
410
|
+
* @public
|
|
385
411
|
*/
|
|
386
412
|
export declare class BatchTooLargeError extends TokenOpsSdkError {
|
|
387
413
|
readonly name = "BatchTooLargeError";
|
|
@@ -404,6 +430,7 @@ export declare class BatchTooLargeError extends TokenOpsSdkError {
|
|
|
404
430
|
* A feature toggle baked into the contract clone is off. For LibClone
|
|
405
431
|
* deployments these toggles are immutable (set at clone time) — the user
|
|
406
432
|
* cannot enable them after the fact and must deploy a new clone.
|
|
433
|
+
* @public
|
|
407
434
|
*/
|
|
408
435
|
export declare class FeatureDisabledError extends TokenOpsSdkError {
|
|
409
436
|
readonly name = "FeatureDisabledError";
|
|
@@ -423,6 +450,7 @@ export declare class FeatureDisabledError extends TokenOpsSdkError {
|
|
|
423
450
|
* Native ETH or ERC-20 transfer failed at the contract layer (e.g. recipient
|
|
424
451
|
* is a contract that rejects `receive()`, or the underlying ERC-20 returned
|
|
425
452
|
* false from `transfer`).
|
|
453
|
+
* @public
|
|
426
454
|
*/
|
|
427
455
|
export declare class TransferFailedError extends TokenOpsSdkError {
|
|
428
456
|
readonly name = "TransferFailedError";
|
|
@@ -455,6 +483,7 @@ export declare class TransferFailedError extends TokenOpsSdkError {
|
|
|
455
483
|
* `context.handle` is the offending handle (the public 32-byte ciphertext
|
|
456
484
|
* identifier), when extractable from the revert args. The SDK never decodes
|
|
457
485
|
* the underlying plaintext.
|
|
486
|
+
* @public
|
|
458
487
|
*/
|
|
459
488
|
export declare class FheHandleNotAllowedError extends TokenOpsSdkError {
|
|
460
489
|
readonly name = "FheHandleNotAllowedError";
|
|
@@ -472,7 +501,11 @@ export declare class FheHandleNotAllowedError extends TokenOpsSdkError {
|
|
|
472
501
|
cause?: unknown;
|
|
473
502
|
});
|
|
474
503
|
}
|
|
475
|
-
/**
|
|
504
|
+
/**
|
|
505
|
+
* Contract has already been initialized — `initialize()` may only run once.
|
|
506
|
+
*
|
|
507
|
+
* @public
|
|
508
|
+
*/
|
|
476
509
|
export declare class AlreadyInitializedError extends TokenOpsSdkError {
|
|
477
510
|
readonly name = "AlreadyInitializedError";
|
|
478
511
|
readonly context: {
|
|
@@ -485,7 +518,11 @@ export declare class AlreadyInitializedError extends TokenOpsSdkError {
|
|
|
485
518
|
cause?: unknown;
|
|
486
519
|
});
|
|
487
520
|
}
|
|
488
|
-
/**
|
|
521
|
+
/**
|
|
522
|
+
* OpenZeppelin ReentrancyGuardTransient blocked a nested call.
|
|
523
|
+
*
|
|
524
|
+
* @public
|
|
525
|
+
*/
|
|
489
526
|
export declare class ReentrancyError extends TokenOpsSdkError {
|
|
490
527
|
readonly name = "ReentrancyError";
|
|
491
528
|
readonly context: {
|
|
@@ -500,8 +537,10 @@ export declare class ReentrancyError extends TokenOpsSdkError {
|
|
|
500
537
|
}
|
|
501
538
|
/**
|
|
502
539
|
* EIP-712 signature was malformed or did not recover to an authorized signer.
|
|
503
|
-
* Used by airdrop claims where
|
|
540
|
+
* Used by ECDSA airdrop claims, where a `SIGNER_ROLE` holder signs a
|
|
541
|
+
* `Claim(address recipient,bytes32 encryptedAmount,bytes32 dedupId,uint256 deadline)`
|
|
504
542
|
* struct off-chain.
|
|
543
|
+
* @public
|
|
505
544
|
*/
|
|
506
545
|
export declare class InvalidSignatureError extends TokenOpsSdkError {
|
|
507
546
|
readonly name = "InvalidSignatureError";
|
|
@@ -519,6 +558,7 @@ export declare class InvalidSignatureError extends TokenOpsSdkError {
|
|
|
519
558
|
* Wallet UI cancelled the request — e.g. the user clicked "Reject" on the
|
|
520
559
|
* transaction prompt, or the wallet bridge returned EIP-1193 code 4001.
|
|
521
560
|
* Retrying is safe; the underlying tx never reached the network.
|
|
561
|
+
* @public
|
|
522
562
|
*/
|
|
523
563
|
export declare class WalletRejectedError extends TokenOpsSdkError {
|
|
524
564
|
readonly name = "WalletRejectedError";
|
|
@@ -535,6 +575,7 @@ export declare class WalletRejectedError extends TokenOpsSdkError {
|
|
|
535
575
|
/**
|
|
536
576
|
* The connected wallet is on a different chain than the contract we tried to
|
|
537
577
|
* call. The user must switch networks before retrying.
|
|
578
|
+
* @public
|
|
538
579
|
*/
|
|
539
580
|
export declare class WalletChainMismatchError extends TokenOpsSdkError {
|
|
540
581
|
readonly name = "WalletChainMismatchError";
|
|
@@ -552,6 +593,7 @@ export declare class WalletChainMismatchError extends TokenOpsSdkError {
|
|
|
552
593
|
* Network-level failure reaching the RPC endpoint (HTTP non-2xx, timeout,
|
|
553
594
|
* DNS, socket close). `statusCode` is set when the underlying viem
|
|
554
595
|
* `HttpRequestError` exposed an HTTP status. No on-chain state changed.
|
|
596
|
+
* @public
|
|
555
597
|
*/
|
|
556
598
|
export declare class NetworkError extends TokenOpsSdkError {
|
|
557
599
|
readonly name = "NetworkError";
|
|
@@ -571,6 +613,7 @@ export declare class NetworkError extends TokenOpsSdkError {
|
|
|
571
613
|
* Wallet account does not hold enough native balance to cover the
|
|
572
614
|
* transaction's gas estimate. Distinct from {@link InsufficientFeeError},
|
|
573
615
|
* which fires when the contract itself enforces a fee.
|
|
616
|
+
* @public
|
|
574
617
|
*/
|
|
575
618
|
export declare class InsufficientGasFundsError extends TokenOpsSdkError {
|
|
576
619
|
readonly name = "InsufficientGasFundsError";
|
|
@@ -588,6 +631,7 @@ export declare class InsufficientGasFundsError extends TokenOpsSdkError {
|
|
|
588
631
|
* Fallback for write failures the SDK could not classify against either an
|
|
589
632
|
* on-chain revert frame or a known viem non-revert error class. Inspect
|
|
590
633
|
* `error.cause` for diagnostics; this is the case to file a bug for.
|
|
634
|
+
* @public
|
|
591
635
|
*/
|
|
592
636
|
export declare class UnknownWriteFailureError extends TokenOpsSdkError {
|
|
593
637
|
readonly name = "UnknownWriteFailureError";
|
|
@@ -601,7 +645,11 @@ export declare class UnknownWriteFailureError extends TokenOpsSdkError {
|
|
|
601
645
|
cause?: unknown;
|
|
602
646
|
});
|
|
603
647
|
}
|
|
604
|
-
/**
|
|
648
|
+
/**
|
|
649
|
+
* User cancelled the wallet signature prompt.
|
|
650
|
+
*
|
|
651
|
+
* @public
|
|
652
|
+
*/
|
|
605
653
|
export declare class UserRejectedSignatureError extends TokenOpsSdkError {
|
|
606
654
|
readonly name = "UserRejectedSignatureError";
|
|
607
655
|
readonly context: {
|
|
@@ -617,6 +665,7 @@ export declare class UserRejectedSignatureError extends TokenOpsSdkError {
|
|
|
617
665
|
/**
|
|
618
666
|
* Wallet signature failed for a reason other than the user explicitly
|
|
619
667
|
* rejecting it (timeout, wallet crash, malformed request, etc.).
|
|
668
|
+
* @public
|
|
620
669
|
*/
|
|
621
670
|
export declare class SigningFailedError extends TokenOpsSdkError {
|
|
622
671
|
readonly name = "SigningFailedError";
|
|
@@ -633,6 +682,7 @@ export declare class SigningFailedError extends TokenOpsSdkError {
|
|
|
633
682
|
/**
|
|
634
683
|
* Network call to the Zama relayer failed (HTTP non-2xx, timeout, DNS, etc.).
|
|
635
684
|
* `statusCode` is set when the underlying error exposed it.
|
|
685
|
+
* @public
|
|
636
686
|
*/
|
|
637
687
|
export declare class RelayerUnreachableError extends TokenOpsSdkError {
|
|
638
688
|
readonly name = "RelayerUnreachableError";
|
|
@@ -648,7 +698,11 @@ export declare class RelayerUnreachableError extends TokenOpsSdkError {
|
|
|
648
698
|
cause?: unknown;
|
|
649
699
|
});
|
|
650
700
|
}
|
|
651
|
-
/**
|
|
701
|
+
/**
|
|
702
|
+
* Encryption flow (input proof generation) failed.
|
|
703
|
+
*
|
|
704
|
+
* @public
|
|
705
|
+
*/
|
|
652
706
|
export declare class EncryptionFailedError extends TokenOpsSdkError {
|
|
653
707
|
readonly name = "EncryptionFailedError";
|
|
654
708
|
readonly context: {
|
|
@@ -661,7 +715,11 @@ export declare class EncryptionFailedError extends TokenOpsSdkError {
|
|
|
661
715
|
cause?: unknown;
|
|
662
716
|
});
|
|
663
717
|
}
|
|
664
|
-
/**
|
|
718
|
+
/**
|
|
719
|
+
* Decryption flow (user-decrypt, public-decrypt) failed.
|
|
720
|
+
*
|
|
721
|
+
* @public
|
|
722
|
+
*/
|
|
665
723
|
export declare class DecryptionFailedError extends TokenOpsSdkError {
|
|
666
724
|
readonly name = "DecryptionFailedError";
|
|
667
725
|
readonly context: {
|
|
@@ -688,6 +746,7 @@ export declare class DecryptionFailedError extends TokenOpsSdkError {
|
|
|
688
746
|
* - `FheHandleNotAllowedError` fires when a contract entrypoint calls
|
|
689
747
|
* `FHE.isSenderAllowed(handle)` on-chain and reverts. The tx made it to
|
|
690
748
|
* the EVM but the contract refused.
|
|
749
|
+
* @public
|
|
691
750
|
*/
|
|
692
751
|
export declare class UserDecryptNotAllowedError extends TokenOpsSdkError {
|
|
693
752
|
readonly name = "UserDecryptNotAllowedError";
|
|
@@ -709,6 +768,7 @@ export declare class UserDecryptNotAllowedError extends TokenOpsSdkError {
|
|
|
709
768
|
* `context` object so call sites can attach whatever per-throw metadata they
|
|
710
769
|
* need; consumers branch on `error.code === "TOKENOPS_INVALID_ARGUMENT"` (the
|
|
711
770
|
* same code `InvalidArgumentError` uses).
|
|
771
|
+
* @public
|
|
712
772
|
*/
|
|
713
773
|
export declare class TokenOpsValidationError extends TokenOpsSdkError {
|
|
714
774
|
readonly name = "TokenOpsValidationError";
|
|
@@ -719,6 +779,7 @@ export declare class TokenOpsValidationError extends TokenOpsSdkError {
|
|
|
719
779
|
* `writeContract` + receipt-wait (e.g. `setOperator`, `mintMockERC7984`)
|
|
720
780
|
* outside the typed revert-mapper path. Accepts a free-form `context` object;
|
|
721
781
|
* consumers branch on `error.code === "TOKENOPS_CONTRACT_REVERT"`.
|
|
782
|
+
* @public
|
|
722
783
|
*/
|
|
723
784
|
export declare class TokenOpsContractError extends TokenOpsSdkError {
|
|
724
785
|
readonly name = "TokenOpsContractError";
|
package/dist/core/preflight.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import type { TokenOpsSdkError } from "./errors.js";
|
|
|
12
12
|
*
|
|
13
13
|
* Preflight is opt-in. Consumers who have already validated state can skip the
|
|
14
14
|
* preflight and call the write directly.
|
|
15
|
+
* @public
|
|
15
16
|
*/
|
|
16
17
|
export interface PreflightResult {
|
|
17
18
|
/** `true` when no blockers were detected — green light to submit the write. */
|