@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,9 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
3
|
+
var chunkUG5RKLU2_cjs = require('./chunk-UG5RKLU2.cjs');
|
|
4
|
+
var chunkMVDQMV25_cjs = require('./chunk-MVDQMV25.cjs');
|
|
5
|
+
var chunk5576FRT3_cjs = require('./chunk-5576FRT3.cjs');
|
|
6
|
+
var chunkJK4XMMKM_cjs = require('./chunk-JK4XMMKM.cjs');
|
|
7
|
+
var chunk66IHPTOK_cjs = require('./chunk-66IHPTOK.cjs');
|
|
8
|
+
var chunk67OV5CX2_cjs = require('./chunk-67OV5CX2.cjs');
|
|
7
9
|
var chunkVJKZWYYJ_cjs = require('./chunk-VJKZWYYJ.cjs');
|
|
8
10
|
var chains = require('viem/chains');
|
|
9
11
|
var viem = require('viem');
|
|
@@ -1700,7 +1702,7 @@ var tokenopsTestTokenAbi = [
|
|
|
1700
1702
|
];
|
|
1701
1703
|
|
|
1702
1704
|
// src/testnet-faucet/errors.ts
|
|
1703
|
-
var FaucetSupplyExhaustedError = class extends
|
|
1705
|
+
var FaucetSupplyExhaustedError = class extends chunk67OV5CX2_cjs.TokenOpsSdkError {
|
|
1704
1706
|
name = "FaucetSupplyExhaustedError";
|
|
1705
1707
|
constructor(args) {
|
|
1706
1708
|
super(
|
|
@@ -1720,14 +1722,14 @@ function isTestnetFaucetChainId(chainId) {
|
|
|
1720
1722
|
function assertTestnetFaucetChain(chainId) {
|
|
1721
1723
|
if (chainId === void 0) return;
|
|
1722
1724
|
if (!isTestnetFaucetChainId(chainId)) {
|
|
1723
|
-
throw new
|
|
1725
|
+
throw new chunk67OV5CX2_cjs.UnsupportedChainError(chainId);
|
|
1724
1726
|
}
|
|
1725
1727
|
}
|
|
1726
1728
|
var UINT64_MAX = (1n << 64n) - 1n;
|
|
1727
1729
|
var UINT256_MAX = (1n << 256n) - 1n;
|
|
1728
1730
|
function assertUint64Amount(value, argument, method) {
|
|
1729
1731
|
if (typeof value !== "bigint") {
|
|
1730
|
-
throw new
|
|
1732
|
+
throw new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
1731
1733
|
method,
|
|
1732
1734
|
argument,
|
|
1733
1735
|
reason: "amount must be a bigint",
|
|
@@ -1735,7 +1737,7 @@ function assertUint64Amount(value, argument, method) {
|
|
|
1735
1737
|
});
|
|
1736
1738
|
}
|
|
1737
1739
|
if (value <= 0n) {
|
|
1738
|
-
throw new
|
|
1740
|
+
throw new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
1739
1741
|
method,
|
|
1740
1742
|
argument,
|
|
1741
1743
|
reason: "amount must be greater than zero",
|
|
@@ -1743,7 +1745,7 @@ function assertUint64Amount(value, argument, method) {
|
|
|
1743
1745
|
});
|
|
1744
1746
|
}
|
|
1745
1747
|
if (value > UINT64_MAX) {
|
|
1746
|
-
throw new
|
|
1748
|
+
throw new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
1747
1749
|
method,
|
|
1748
1750
|
argument,
|
|
1749
1751
|
reason: `amount exceeds uint64 max (${UINT64_MAX.toString()})`,
|
|
@@ -1753,7 +1755,7 @@ function assertUint64Amount(value, argument, method) {
|
|
|
1753
1755
|
}
|
|
1754
1756
|
function assertUint256Amount(value, argument, method) {
|
|
1755
1757
|
if (typeof value !== "bigint") {
|
|
1756
|
-
throw new
|
|
1758
|
+
throw new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
1757
1759
|
method,
|
|
1758
1760
|
argument,
|
|
1759
1761
|
reason: "amount must be a bigint",
|
|
@@ -1761,7 +1763,7 @@ function assertUint256Amount(value, argument, method) {
|
|
|
1761
1763
|
});
|
|
1762
1764
|
}
|
|
1763
1765
|
if (value <= 0n) {
|
|
1764
|
-
throw new
|
|
1766
|
+
throw new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
1765
1767
|
method,
|
|
1766
1768
|
argument,
|
|
1767
1769
|
reason: "amount must be greater than zero",
|
|
@@ -1769,7 +1771,7 @@ function assertUint256Amount(value, argument, method) {
|
|
|
1769
1771
|
});
|
|
1770
1772
|
}
|
|
1771
1773
|
if (value > UINT256_MAX) {
|
|
1772
|
-
throw new
|
|
1774
|
+
throw new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
1773
1775
|
method,
|
|
1774
1776
|
argument,
|
|
1775
1777
|
reason: "amount exceeds uint256 max",
|
|
@@ -1778,9 +1780,9 @@ function assertUint256Amount(value, argument, method) {
|
|
|
1778
1780
|
}
|
|
1779
1781
|
}
|
|
1780
1782
|
function assertNonZeroRecipient(input, argument, method) {
|
|
1781
|
-
const normalised =
|
|
1783
|
+
const normalised = chunkJK4XMMKM_cjs.normaliseAddress(input);
|
|
1782
1784
|
if (/^0x0{40}$/i.test(normalised)) {
|
|
1783
|
-
throw new
|
|
1785
|
+
throw new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
1784
1786
|
method,
|
|
1785
1787
|
argument,
|
|
1786
1788
|
reason: "recipient must not be the zero address",
|
|
@@ -1798,7 +1800,7 @@ var faucetProductMapper = (name, _args, ctx) => {
|
|
|
1798
1800
|
});
|
|
1799
1801
|
case "ERC7984InvalidReceiver":
|
|
1800
1802
|
case "ERC20InvalidReceiver":
|
|
1801
|
-
return new
|
|
1803
|
+
return new chunk67OV5CX2_cjs.InvalidArgumentError({
|
|
1802
1804
|
method: ctx.method,
|
|
1803
1805
|
argument: "to",
|
|
1804
1806
|
reason: "recipient must not be the zero address"
|
|
@@ -1823,10 +1825,10 @@ var TestnetFaucetClient = class {
|
|
|
1823
1825
|
const chainId = config.chainId ?? config.publicClient.chain?.id;
|
|
1824
1826
|
this.#chainId = chainId;
|
|
1825
1827
|
assertTestnetFaucetChain(chainId);
|
|
1826
|
-
const addressOverride = config.address ?
|
|
1827
|
-
const resolved = addressOverride ?? (chainId === void 0 ? void 0 :
|
|
1828
|
+
const addressOverride = config.address ? chunkJK4XMMKM_cjs.normaliseAddress(config.address) : void 0;
|
|
1829
|
+
const resolved = addressOverride ?? (chainId === void 0 ? void 0 : chunk5576FRT3_cjs.getConfidentialTestTokenAddress(chainId));
|
|
1828
1830
|
if (!resolved) {
|
|
1829
|
-
throw new
|
|
1831
|
+
throw new chunk67OV5CX2_cjs.DeploymentAddressUnavailableError({
|
|
1830
1832
|
reason: chainId === void 0 ? "chain-id-missing" : "registry-not-deployed",
|
|
1831
1833
|
product: "testnetFaucet",
|
|
1832
1834
|
contract: "confidentialTestToken",
|
|
@@ -1839,7 +1841,7 @@ var TestnetFaucetClient = class {
|
|
|
1839
1841
|
this.#telemetry?.event("testnet-faucet.client.init", {
|
|
1840
1842
|
chainId: chainId ?? null,
|
|
1841
1843
|
hasWallet: !!this.walletClient,
|
|
1842
|
-
sdkVersion:
|
|
1844
|
+
sdkVersion: chunkUG5RKLU2_cjs.SDK_VERSION
|
|
1843
1845
|
});
|
|
1844
1846
|
}
|
|
1845
1847
|
// ============================================================
|
|
@@ -1862,9 +1864,9 @@ var TestnetFaucetClient = class {
|
|
|
1862
1864
|
*/
|
|
1863
1865
|
async underlyingToken() {
|
|
1864
1866
|
if (this.#cachedUnderlying) return this.#cachedUnderlying;
|
|
1865
|
-
const fromRegistry = this.#cttAddressIsOverride || this.#chainId === void 0 ? void 0 :
|
|
1867
|
+
const fromRegistry = this.#cttAddressIsOverride || this.#chainId === void 0 ? void 0 : chunk5576FRT3_cjs.getTestTokenAddress(this.#chainId);
|
|
1866
1868
|
const resolved = fromRegistry ?? await this.#readCtt("underlying");
|
|
1867
|
-
this.#cachedUnderlying =
|
|
1869
|
+
this.#cachedUnderlying = chunkJK4XMMKM_cjs.normaliseAddress(resolved);
|
|
1868
1870
|
return this.#cachedUnderlying;
|
|
1869
1871
|
}
|
|
1870
1872
|
/**
|
|
@@ -1883,7 +1885,7 @@ var TestnetFaucetClient = class {
|
|
|
1883
1885
|
async confidentialBalanceOf(account) {
|
|
1884
1886
|
const who = this.#resolveReadAddress(account, "confidentialBalanceOf");
|
|
1885
1887
|
const handle = await this.#readCtt("confidentialBalanceOf", [who]);
|
|
1886
|
-
return
|
|
1888
|
+
return chunk66IHPTOK_cjs.asEncryptedHandle(handle);
|
|
1887
1889
|
}
|
|
1888
1890
|
/**
|
|
1889
1891
|
* Read the plaintext underlying `TokenopsTestToken` (TTT) balance for
|
|
@@ -1996,7 +1998,7 @@ var TestnetFaucetClient = class {
|
|
|
1996
1998
|
}
|
|
1997
1999
|
const receipt = await this.publicClient.waitForTransactionReceipt({ hash });
|
|
1998
2000
|
if (receipt.status !== "success") {
|
|
1999
|
-
throw new
|
|
2001
|
+
throw new chunk67OV5CX2_cjs.TokenOpsContractError(`mintConfidential: transaction ${hash} reverted`, {
|
|
2000
2002
|
contract: "ConfidentialTokenopsTestToken",
|
|
2001
2003
|
call: "mint",
|
|
2002
2004
|
tx: hash
|
|
@@ -2009,7 +2011,7 @@ var TestnetFaucetClient = class {
|
|
|
2009
2011
|
});
|
|
2010
2012
|
const ours = events.filter((ev2) => ev2.address.toLowerCase() === this.address.toLowerCase());
|
|
2011
2013
|
if (ours.length === 0) {
|
|
2012
|
-
throw new
|
|
2014
|
+
throw new chunk67OV5CX2_cjs.ReceiptEventNotFoundError({
|
|
2013
2015
|
method: "mintConfidential",
|
|
2014
2016
|
eventName: "ConfidentialMint",
|
|
2015
2017
|
contractAddress: this.address,
|
|
@@ -2017,7 +2019,7 @@ var TestnetFaucetClient = class {
|
|
|
2017
2019
|
});
|
|
2018
2020
|
}
|
|
2019
2021
|
if (ours.length > 1) {
|
|
2020
|
-
throw new
|
|
2022
|
+
throw new chunk67OV5CX2_cjs.ReceiptEventAmbiguousError({
|
|
2021
2023
|
method: "mintConfidential",
|
|
2022
2024
|
eventName: "ConfidentialMint",
|
|
2023
2025
|
contractAddress: this.address,
|
|
@@ -2027,11 +2029,11 @@ var TestnetFaucetClient = class {
|
|
|
2027
2029
|
}
|
|
2028
2030
|
const ev = ours[0];
|
|
2029
2031
|
return {
|
|
2030
|
-
hash:
|
|
2032
|
+
hash: chunk66IHPTOK_cjs.asTxHash(hash),
|
|
2031
2033
|
to: ev.args.to,
|
|
2032
2034
|
amount: args.amount,
|
|
2033
2035
|
underlyingMinted: ev.args.underlyingMinted,
|
|
2034
|
-
handle:
|
|
2036
|
+
handle: chunk66IHPTOK_cjs.asEncryptedHandle(ev.args.encryptedAmount)
|
|
2035
2037
|
};
|
|
2036
2038
|
});
|
|
2037
2039
|
}
|
|
@@ -2070,13 +2072,13 @@ var TestnetFaucetClient = class {
|
|
|
2070
2072
|
}
|
|
2071
2073
|
const receipt = await this.publicClient.waitForTransactionReceipt({ hash });
|
|
2072
2074
|
if (receipt.status !== "success") {
|
|
2073
|
-
throw new
|
|
2075
|
+
throw new chunk67OV5CX2_cjs.TokenOpsContractError(`mintUnderlying: transaction ${hash} reverted`, {
|
|
2074
2076
|
contract: "TokenopsTestToken",
|
|
2075
2077
|
call: "mint",
|
|
2076
2078
|
tx: hash
|
|
2077
2079
|
});
|
|
2078
2080
|
}
|
|
2079
|
-
return { hash:
|
|
2081
|
+
return { hash: chunk66IHPTOK_cjs.asTxHash(hash), to, amount: args.amount };
|
|
2080
2082
|
});
|
|
2081
2083
|
}
|
|
2082
2084
|
// ============================================================
|
|
@@ -2087,14 +2089,14 @@ var TestnetFaucetClient = class {
|
|
|
2087
2089
|
}
|
|
2088
2090
|
#requireWallet(method) {
|
|
2089
2091
|
if (!this.walletClient) {
|
|
2090
|
-
throw new
|
|
2092
|
+
throw new chunk67OV5CX2_cjs.MissingWalletClientError(method);
|
|
2091
2093
|
}
|
|
2092
2094
|
return this.walletClient;
|
|
2093
2095
|
}
|
|
2094
2096
|
#resolveAccount(wallet, override, method) {
|
|
2095
2097
|
const acct = override ?? wallet.account;
|
|
2096
2098
|
if (!acct) {
|
|
2097
|
-
throw new
|
|
2099
|
+
throw new chunk67OV5CX2_cjs.MissingAccountError(method);
|
|
2098
2100
|
}
|
|
2099
2101
|
return acct;
|
|
2100
2102
|
}
|
|
@@ -2104,10 +2106,10 @@ var TestnetFaucetClient = class {
|
|
|
2104
2106
|
* neither is available (a read-only client must be told whose balance to read).
|
|
2105
2107
|
*/
|
|
2106
2108
|
#resolveReadAddress(override, method) {
|
|
2107
|
-
if (override) return
|
|
2109
|
+
if (override) return chunkJK4XMMKM_cjs.normaliseAddress(override);
|
|
2108
2110
|
const acct = this.walletClient?.account?.address;
|
|
2109
2111
|
if (!acct) {
|
|
2110
|
-
throw new
|
|
2112
|
+
throw new chunk67OV5CX2_cjs.MissingAccountError(method);
|
|
2111
2113
|
}
|
|
2112
2114
|
return acct;
|
|
2113
2115
|
}
|
|
@@ -2146,13 +2148,13 @@ var TestnetFaucetClient = class {
|
|
|
2146
2148
|
account
|
|
2147
2149
|
});
|
|
2148
2150
|
} catch (err) {
|
|
2149
|
-
if (
|
|
2151
|
+
if (chunkMVDQMV25_cjs.isContractRevert(err)) {
|
|
2150
2152
|
throw this.#mapRevert(target, method, err, void 0, accountAddress(account));
|
|
2151
2153
|
}
|
|
2152
2154
|
}
|
|
2153
2155
|
}
|
|
2154
2156
|
#mapRevert(target, method, err, productContext, account) {
|
|
2155
|
-
return
|
|
2157
|
+
return chunkMVDQMV25_cjs.mapContractRevert(err, {
|
|
2156
2158
|
method,
|
|
2157
2159
|
contractAddress: target.address,
|
|
2158
2160
|
abi: target.abi,
|
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: "0x383083B6f13a0ee513596A6750B511c5E482d2d1";
|
|
19
|
+
};
|
|
20
|
+
readonly ecdsaImplementation: {
|
|
21
|
+
readonly 11155111: "0xefE40570C1837210f8E4Ae938635e11bd1ae788E";
|
|
22
|
+
};
|
|
23
|
+
readonly merkleImplementation: {
|
|
24
|
+
readonly 11155111: "0x9f3156546744F3ceE98Dc44bed817d98A8b8ae74";
|
|
25
|
+
};
|
|
26
|
+
readonly complianceManagerImplementation: {
|
|
27
|
+
readonly 11155111: "0x6adA841250C048364d1d3027958C662Dd4E62136";
|
|
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
|
/**
|