@mixerx/config 0.1.0

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/README.md ADDED
@@ -0,0 +1,13 @@
1
+ # @mixerx/config
2
+
3
+ Mainnet-first Tornado-compatible config package.
4
+
5
+ The exported shape follows `tornado-config` conventions (top-level exports like
6
+ `torn`, `miningV2`, `instances`, `tornadoRouter`, `relayerRegistry`, etc.), and
7
+ `instances` uses numeric chain keys (`1`, `5`, `10`, ...).
8
+
9
+ ## Scripts
10
+
11
+ - `yarn typecheck`
12
+ - `yarn build`
13
+ - `yarn check:shape`
@@ -0,0 +1,25 @@
1
+ import type { Address, Instances, Mining, Torn, TornadoTrees, Vesting, Voucher } from './types.js';
2
+ export declare function assertValidConfigShape(input: {
3
+ torn: Torn;
4
+ miningV2: Mining;
5
+ vesting: Vesting;
6
+ instances: Instances;
7
+ voucher: Voucher;
8
+ tornadoTrees: TornadoTrees;
9
+ governance: Address;
10
+ governanceImpl: Address;
11
+ tornadoProxy: Address;
12
+ tornadoProxyLight: Address;
13
+ rewardVerifier: Address;
14
+ treeUpdateVerifier: Address;
15
+ withdrawVerifier: Address;
16
+ poseidonHasher2: Address;
17
+ poseidonHasher3: Address;
18
+ feeManager: Address;
19
+ tornadoStakingRewards: Address;
20
+ relayerRegistry: Address;
21
+ tornadoRouter: Address;
22
+ instanceRegistry: Address;
23
+ deployer: Address;
24
+ }): void;
25
+ //# sourceMappingURL=assertions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertions.d.ts","sourceRoot":"","sources":["../src/assertions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAoB,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAsErH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC5C,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,YAAY,CAAC;IAC3B,UAAU,EAAE,OAAO,CAAC;IACpB,cAAc,EAAE,OAAO,CAAC;IACxB,YAAY,EAAE,OAAO,CAAC;IACtB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,cAAc,EAAE,OAAO,CAAC;IACxB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,eAAe,EAAE,OAAO,CAAC;IACzB,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,eAAe,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;CACnB,GAAG,IAAI,CAuBP"}
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.assertValidConfigShape = assertValidConfigShape;
4
+ function assertAddressLike(value, key) {
5
+ if (!value.address || typeof value.address !== 'string') {
6
+ throw new Error(`Missing ${key}.address`);
7
+ }
8
+ }
9
+ function assertTorn(value) {
10
+ if (!value.address || !value.capitalization) {
11
+ throw new Error('Invalid torn config');
12
+ }
13
+ }
14
+ function assertMining(value) {
15
+ if (!value.address || !value.initialBalance) {
16
+ throw new Error('Invalid miningV2 config');
17
+ }
18
+ }
19
+ function assertVoucher(value) {
20
+ if (!value.address || value.duration <= 0) {
21
+ throw new Error('Invalid voucher config');
22
+ }
23
+ }
24
+ function assertTornadoTrees(value) {
25
+ if (!value.address || value.levels <= 0) {
26
+ throw new Error('Invalid tornadoTrees config');
27
+ }
28
+ }
29
+ function assertVesting(value) {
30
+ const entries = Object.entries(value);
31
+ if (entries.length === 0) {
32
+ throw new Error('Invalid vesting config: empty');
33
+ }
34
+ for (const [key, entry] of entries) {
35
+ if (!entry.address || entry.cliff < 0 || entry.duration <= 0) {
36
+ throw new Error(`Invalid vesting entry: ${key}`);
37
+ }
38
+ }
39
+ }
40
+ function assertCurrency(network, key, value) {
41
+ if (!value.symbol || !Number.isFinite(value.decimals)) {
42
+ throw new Error(`Invalid currency metadata for instances.${network}.${key}`);
43
+ }
44
+ if (!value.instanceAddress || Object.keys(value.instanceAddress).length === 0) {
45
+ throw new Error(`Invalid instanceAddress for instances.${network}.${key}`);
46
+ }
47
+ }
48
+ function assertInstances(instances) {
49
+ const networks = Object.entries(instances);
50
+ if (networks.length === 0) {
51
+ throw new Error('Instances config is empty');
52
+ }
53
+ for (const [network, currencies] of networks) {
54
+ const entries = Object.entries(currencies ?? {});
55
+ if (entries.length === 0) {
56
+ throw new Error(`Network ${network} has no currencies`);
57
+ }
58
+ for (const [currency, config] of entries) {
59
+ assertCurrency(network, currency, config);
60
+ }
61
+ }
62
+ }
63
+ function assertValidConfigShape(input) {
64
+ assertTorn(input.torn);
65
+ assertMining(input.miningV2);
66
+ assertVesting(input.vesting);
67
+ assertInstances(input.instances);
68
+ assertVoucher(input.voucher);
69
+ assertTornadoTrees(input.tornadoTrees);
70
+ assertAddressLike(input.governance, 'governance');
71
+ assertAddressLike(input.governanceImpl, 'governanceImpl');
72
+ assertAddressLike(input.tornadoProxy, 'tornadoProxy');
73
+ assertAddressLike(input.tornadoProxyLight, 'tornadoProxyLight');
74
+ assertAddressLike(input.rewardVerifier, 'rewardVerifier');
75
+ assertAddressLike(input.treeUpdateVerifier, 'treeUpdateVerifier');
76
+ assertAddressLike(input.withdrawVerifier, 'withdrawVerifier');
77
+ assertAddressLike(input.poseidonHasher2, 'poseidonHasher2');
78
+ assertAddressLike(input.poseidonHasher3, 'poseidonHasher3');
79
+ assertAddressLike(input.feeManager, 'feeManager');
80
+ assertAddressLike(input.tornadoStakingRewards, 'tornadoStakingRewards');
81
+ assertAddressLike(input.relayerRegistry, 'relayerRegistry');
82
+ assertAddressLike(input.tornadoRouter, 'tornadoRouter');
83
+ assertAddressLike(input.instanceRegistry, 'instanceRegistry');
84
+ assertAddressLike(input.deployer, 'deployer');
85
+ }
86
+ //# sourceMappingURL=assertions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assertions.js","sourceRoot":"","sources":["../src/assertions.ts"],"names":[],"mappings":";;AAsEA,wDA6CC;AAjHD,SAAS,iBAAiB,CAAC,KAAc,EAAE,GAAW;IACpD,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;QACxD,MAAM,IAAI,KAAK,CAAC,WAAW,GAAG,UAAU,CAAC,CAAC;IAC5C,CAAC;AACH,CAAC;AAED,SAAS,UAAU,CAAC,KAAW;IAC7B,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC;QAC5C,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACzC,CAAC;AACH,CAAC;AAED,SAAS,YAAY,CAAC,KAAa;IACjC,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC;QAC5C,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;AACH,CAAC;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,QAAQ,IAAI,CAAC,EAAE,CAAC;QAC1C,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;IAC5C,CAAC;AACH,CAAC;AAED,SAAS,kBAAkB,CAAC,KAAmB;IAC7C,IAAI,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACjD,CAAC;AAC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,CAAC,KAAK,CAAC,eAAe,EAAE,iBAAiB,CAAC,CAAC;IAC5D,iBAAiB,CAAC,KAAK,CAAC,eAAe,EAAE,iBAAiB,CAAC,CAAC;IAC5D,iBAAiB,CAAC,KAAK,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IAClD,iBAAiB,CAAC,KAAK,CAAC,qBAAqB,EAAE,uBAAuB,CAAC,CAAC;IACxE,iBAAiB,CAAC,KAAK,CAAC,eAAe,EAAE,iBAAiB,CAAC,CAAC;IAC5D,iBAAiB,CAAC,KAAK,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC;IACxD,iBAAiB,CAAC,KAAK,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAAC;IAC9D,iBAAiB,CAAC,KAAK,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;AAChD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=check-shape.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-shape.d.ts","sourceRoot":"","sources":["../src/check-shape.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const config_js_1 = __importDefault(require("./config.js"));
7
+ const assertions_js_1 = require("./assertions.js");
8
+ try {
9
+ (0, assertions_js_1.assertValidConfigShape)(config_js_1.default);
10
+ }
11
+ catch (error) {
12
+ const message = error instanceof Error ? error.message : String(error);
13
+ console.error(`[mixerx-config] shape validation failed: ${message}`);
14
+ process.exit(1);
15
+ }
16
+ //# sourceMappingURL=check-shape.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-shape.js","sourceRoot":"","sources":["../src/check-shape.ts"],"names":[],"mappings":";;;;;AAAA,4DAAiC;AACjC,mDAAyD;AAEzD,IAAI,CAAC;IACH,IAAA,sCAAsB,EAAC,mBAAM,CAAC,CAAC;AACjC,CAAC;AAAC,OAAO,KAAK,EAAE,CAAC;IACf,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvE,OAAO,CAAC,KAAK,CAAC,4CAA4C,OAAO,EAAE,CAAC,CAAC;IACrE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC"}
@@ -0,0 +1,68 @@
1
+ import type { Address, NetworkConfig, InstanceCurrency, Instances, Mining, RewardSwap, Torn, TornadoTrees, TokenConfig, Vesting, Voucher, availableIds } from './types.js';
2
+ export declare const torn: Torn;
3
+ export declare const miningV2: Mining;
4
+ export declare const vesting: Vesting;
5
+ export declare const instances: Instances;
6
+ export declare const voucher: Voucher;
7
+ export declare const rewardSwap: RewardSwap;
8
+ export declare const tornadoTrees: TornadoTrees;
9
+ export declare const governance: Address;
10
+ export declare const governanceImpl: Address;
11
+ export declare const tornadoProxy: Address;
12
+ export declare const tornadoProxyLight: Address;
13
+ export declare const rewardVerifier: Address;
14
+ export declare const treeUpdateVerifier: Address;
15
+ export declare const withdrawVerifier: Address;
16
+ export declare const poseidonHasher2: Address;
17
+ export declare const poseidonHasher3: Address;
18
+ export declare const feeManager: Address;
19
+ export declare const tornadoStakingRewards: Address;
20
+ export declare const relayerRegistry: Address;
21
+ export declare const tornadoRouter: Address;
22
+ export declare const instanceRegistry: Address;
23
+ export declare const deployer: Address;
24
+ export declare const relayerRegistryProxy: Address;
25
+ export declare const aggregator: Address;
26
+ export declare const offchainOracle: Address;
27
+ export declare const governanceProxy: Address;
28
+ export declare const tornadoProxyMainnet: Address;
29
+ export declare const mixerxToken: TokenConfig;
30
+ export declare const wrappedStablecoin: Address;
31
+ export declare const networkConfigByNetId: Partial<Record<availableIds, NetworkConfig>>;
32
+ export declare function getNetworkConfig(netId: availableIds): NetworkConfig | undefined;
33
+ export declare function getInstancesForNetId(netId: availableIds): Record<string, InstanceCurrency> | undefined;
34
+ declare const config: {
35
+ torn: Torn;
36
+ miningV2: Mining;
37
+ vesting: Vesting;
38
+ instances: Partial<Record<1 | 5 | 10 | 56 | 100 | 137 | 42161 | 43114, Record<string, InstanceCurrency>>>;
39
+ voucher: Voucher;
40
+ rewardSwap: RewardSwap;
41
+ tornadoTrees: TornadoTrees;
42
+ governance: Address;
43
+ governanceImpl: Address;
44
+ tornadoProxy: Address;
45
+ tornadoProxyLight: Address;
46
+ rewardVerifier: Address;
47
+ treeUpdateVerifier: Address;
48
+ withdrawVerifier: Address;
49
+ poseidonHasher2: Address;
50
+ poseidonHasher3: Address;
51
+ feeManager: Address;
52
+ tornadoStakingRewards: Address;
53
+ relayerRegistry: Address;
54
+ tornadoRouter: Address;
55
+ instanceRegistry: Address;
56
+ deployer: Address;
57
+ relayerRegistryProxy: Address;
58
+ aggregator: Address;
59
+ offchainOracle: Address;
60
+ governanceProxy: Address;
61
+ tornadoProxyMainnet: Address;
62
+ mixerxToken: TokenConfig;
63
+ wrappedStablecoin: Address;
64
+ networkConfigByNetId: Partial<Record<1 | 5 | 10 | 56 | 100 | 137 | 42161 | 43114, NetworkConfig>>;
65
+ getNetworkConfig: typeof getNetworkConfig;
66
+ };
67
+ export default config;
68
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,MAAM,EACN,UAAU,EACV,IAAI,EACJ,YAAY,EACZ,WAAW,EACX,OAAO,EACP,OAAO,EACP,YAAY,EACb,MAAM,YAAY,CAAC;AAIpB,eAAO,MAAM,IAAI,EAAE,IAclB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,MAStB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,OAoCrB,CAAC;AAEF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CAAC,CAgB7E,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,YAAY,GAAG,aAAa,GAAG,SAAS,CAE/E;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,GAAG,SAAS,CAEtG;AAED,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCX,CAAC;AAEF,eAAe,MAAM,CAAC"}
package/dist/config.js ADDED
@@ -0,0 +1,352 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.networkConfigByNetId = exports.wrappedStablecoin = exports.mixerxToken = exports.tornadoProxyMainnet = exports.governanceProxy = exports.offchainOracle = exports.aggregator = exports.relayerRegistryProxy = exports.deployer = exports.instanceRegistry = exports.tornadoRouter = exports.relayerRegistry = exports.tornadoStakingRewards = exports.feeManager = exports.poseidonHasher3 = exports.poseidonHasher2 = exports.withdrawVerifier = exports.treeUpdateVerifier = exports.rewardVerifier = exports.tornadoProxyLight = exports.tornadoProxy = exports.governanceImpl = exports.governance = exports.tornadoTrees = exports.rewardSwap = exports.voucher = exports.instances = exports.vesting = exports.miningV2 = exports.torn = void 0;
4
+ exports.getNetworkConfig = getNetworkConfig;
5
+ exports.getInstancesForNetId = getInstancesForNetId;
6
+ const etherToWei = (valueInEther) => `${valueInEther}000000000000000000`;
7
+ exports.torn = {
8
+ address: 'torn.contract.tornadocash.eth',
9
+ capitalization: etherToWei('10000000'),
10
+ pausePeriod: 45 * 24 * 3600,
11
+ distribution: {
12
+ airdrop: { to: 'voucher', amount: etherToWei('500000') },
13
+ miningV2: { to: 'rewardSwap', amount: etherToWei('1000000') },
14
+ governance: { to: 'vesting.governance', amount: etherToWei('5500000') },
15
+ team1: { to: 'vesting.team1', amount: etherToWei('822407') },
16
+ team2: { to: 'vesting.team2', amount: etherToWei('822407') },
17
+ team3: { to: 'vesting.team3', amount: etherToWei('822407') },
18
+ team4: { to: 'vesting.team4', amount: etherToWei('500000') },
19
+ team5: { to: 'vesting.team5', amount: etherToWei('32779') },
20
+ },
21
+ };
22
+ exports.miningV2 = {
23
+ address: 'mining-v2.contract.tornadocash.eth',
24
+ initialBalance: etherToWei('25000'),
25
+ rates: [
26
+ { instance: 'eth-01.tornadocash.eth', value: '10' },
27
+ { instance: 'eth-1.tornadocash.eth', value: '20' },
28
+ { instance: 'eth-10.tornadocash.eth', value: '50' },
29
+ { instance: 'eth-100.tornadocash.eth', value: '400' },
30
+ ],
31
+ };
32
+ exports.vesting = {
33
+ team1: {
34
+ address: 'team1.vesting.contract.tornadocash.eth',
35
+ beneficiary: '0x5A7a51bFb49F190e5A6060a5bc6052Ac14a3b59f',
36
+ cliff: 12,
37
+ duration: 36,
38
+ },
39
+ team2: {
40
+ address: 'team2.vesting.contract.tornadocash.eth',
41
+ beneficiary: '0xF50D442e48E11F16e105431a2664141f44F9feD8',
42
+ cliff: 12,
43
+ duration: 36,
44
+ },
45
+ team3: {
46
+ address: 'team3.vesting.contract.tornadocash.eth',
47
+ beneficiary: '0x6D2C515Ff6A40554869C3Da05494b8D6910D075E',
48
+ cliff: 12,
49
+ duration: 36,
50
+ },
51
+ team4: {
52
+ address: 'team4.vesting.contract.tornadocash.eth',
53
+ beneficiary: '0x504a9c37794a2341F4861bF0A44E8d4016DF8cF2',
54
+ cliff: 12,
55
+ duration: 36,
56
+ },
57
+ team5: {
58
+ address: 'team5.vesting.contract.tornadocash.eth',
59
+ beneficiary: '0x2D81713c58452c92C19b2917e1C770eEcF53Fe41',
60
+ cliff: 12,
61
+ duration: 36,
62
+ },
63
+ governance: {
64
+ address: 'governance.vesting.contract.tornadocash.eth',
65
+ cliff: 3,
66
+ duration: 60,
67
+ },
68
+ };
69
+ exports.instances = {
70
+ 1: {
71
+ eth: {
72
+ instanceAddress: {
73
+ 0.1: '0x12D66f87A04A9E220743712cE6d9bB1B5616B8Fc',
74
+ 1: '0x47CE0C6eD5B0Ce3d3A51fdb1C52DC66a7c3c2936',
75
+ 10: '0x910Cbd523D972eb0a6f4cAe4618aD62622b39DbF',
76
+ 100: '0xA160cdAB225685dA1d56aa342Ad8841c3b53f291',
77
+ },
78
+ symbol: 'eth',
79
+ decimals: 18,
80
+ },
81
+ dai: {
82
+ instanceAddress: {
83
+ 100: '0xD4B88Df4D29F5CedD6857912842cff3b20C8Cfa3',
84
+ 1000: '0xFD8610d20aA15b7B2E3Be39B396a1bC3516c7144',
85
+ 10000: '0x07687e702b410Fa43f4cB4Af7FA097918ffD2730',
86
+ 100000: '0x23773E65ed146A459791799d01336DB287f25334',
87
+ },
88
+ tokenAddress: '0x6B175474E89094C44Da98b954EedeAC495271d0F',
89
+ symbol: 'dai',
90
+ decimals: 18,
91
+ },
92
+ cdai: {
93
+ instanceAddress: {
94
+ 5000: '0x22aaA7720ddd5388A3c0A3333430953C68f1849b',
95
+ 50000: '0x03893a7c7463AE47D46bc7f091665f1893656003',
96
+ 500000: '0x2717c5e28cf931547B621a5dddb772Ab6A35B701',
97
+ 5000000: '0xD21be7248e0197Ee08E0c20D4a96DEBdaC3D20Af',
98
+ },
99
+ tokenAddress: '0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643',
100
+ symbol: 'cdai',
101
+ decimals: 8,
102
+ },
103
+ usdc: {
104
+ instanceAddress: {
105
+ 100: '0xd96f2B1c14Db8458374d9Aca76E26c3D18364307',
106
+ 1000: '0x4736dCf1b7A3d580672CcE6E7c65cd5cc9cFBa9D',
107
+ 10000: '0xD691F27f38B395864Ea86CfC7253969B409c362d',
108
+ },
109
+ tokenAddress: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
110
+ symbol: 'usdc',
111
+ decimals: 6,
112
+ },
113
+ usdt: {
114
+ instanceAddress: {
115
+ 100: '0x169AD27A470D064DEDE56a2D3ff727986b15D52B',
116
+ 1000: '0x0836222F2B2B24A3F36f98668Ed8F0B38D1a872f',
117
+ 10000: '0xF67721A2D8F736E75a49FdD7FAd2e31D8676542a',
118
+ 100000: '0x9AD122c22B14202B4490eDAf288FDb3C7cb3ff5E',
119
+ },
120
+ tokenAddress: '0xdAC17F958D2ee523a2206206994597C13D831ec7',
121
+ symbol: 'usdt',
122
+ decimals: 6,
123
+ },
124
+ wbtc: {
125
+ instanceAddress: {
126
+ 0.1: '0x178169B423a011fff22B9e3F3abeA13414dDD0F1',
127
+ 1: '0x610B717796ad172B316836AC95a2ffad065CeaB4',
128
+ 10: '0xbB93e510BbCD0B7beb5A853875f9eC60275CF498',
129
+ },
130
+ tokenAddress: '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599',
131
+ symbol: 'wbtc',
132
+ decimals: 8,
133
+ },
134
+ },
135
+ 5: {
136
+ eth: {
137
+ instanceAddress: {
138
+ 0.1: '0x6Bf694a291DF3FeC1f7e69701E3ab6c592435Ae7',
139
+ 1: '0x3aac1cC67c2ec5Db4eA850957b967Ba153aD6279',
140
+ 10: '0x723B78e67497E85279CB204544566F4dC5d2acA0',
141
+ 100: '0x0E3A09dDA6B20aFbB34aC7cD4A6881493f3E7bf7',
142
+ },
143
+ symbol: 'eth',
144
+ decimals: 18,
145
+ },
146
+ dai: {
147
+ instanceAddress: {
148
+ 100: '0x76D85B4C0Fc497EeCc38902397aC608000A06607',
149
+ 1000: '0xCC84179FFD19A1627E79F8648d09e095252Bc418',
150
+ 10000: '0xD5d6f8D9e784d0e26222ad3834500801a68D027D',
151
+ 100000: '0x407CcEeaA7c95d2FE2250Bf9F2c105aA7AAFB512',
152
+ },
153
+ tokenAddress: '0xdc31Ee1784292379Fbb2964b3B9C4124D8F89C60',
154
+ symbol: 'dai',
155
+ decimals: 18,
156
+ },
157
+ cdai: {
158
+ instanceAddress: {
159
+ 5000: '0x833481186f16Cece3f1Eeea1a694c42034c3a0dB',
160
+ 50000: '0xd8D7DE3349ccaA0Fde6298fe6D7b7d0d34586193',
161
+ 500000: '0x8281Aa6795aDE17C8973e1aedcA380258Bc124F9',
162
+ 5000000: '0x57b2B8c82F065de8Ef5573f9730fC1449B403C9f',
163
+ },
164
+ tokenAddress: '0x822397d9a55d0fefd20F5c4bCaB33C5F65bd28Eb',
165
+ symbol: 'cdai',
166
+ decimals: 8,
167
+ },
168
+ usdc: {
169
+ instanceAddress: {
170
+ 100: '0x05E0b5B40B7b66098C2161A5EE11C5740A3A7C45',
171
+ 1000: '0x23173fE8b96A4Ad8d2E17fB83EA5dcccdCa1Ae52',
172
+ },
173
+ tokenAddress: '0xD87Ba7A50B2E7E660f678A895E4B72E7CB4CCd9C',
174
+ symbol: 'usdc',
175
+ decimals: 6,
176
+ },
177
+ usdt: {
178
+ instanceAddress: {
179
+ 100: '0x538Ab61E8A9fc1b2f93b3dd9011d662d89bE6FE6',
180
+ 1000: '0x94Be88213a387E992Dd87DE56950a9aef34b9448',
181
+ },
182
+ tokenAddress: '0xb7FC2023D96AEa94Ba0254AA5Aeb93141e4aad66',
183
+ symbol: 'usdt',
184
+ decimals: 6,
185
+ },
186
+ wbtc: {
187
+ instanceAddress: {
188
+ 0.1: '0x242654336ca2205714071898f67E254EB49ACdCe',
189
+ 1: '0x776198CCF446DFa168347089d7338879273172cF',
190
+ 10: '0xeDC5d01286f99A066559F60a585406f3878a033e',
191
+ },
192
+ tokenAddress: '0xC04B0d3107736C32e19F1c62b2aF67BE61d63a05',
193
+ symbol: 'wbtc',
194
+ decimals: 8,
195
+ },
196
+ },
197
+ 10: {
198
+ eth: {
199
+ instanceAddress: {
200
+ 0.1: '0x84443CFd09A48AF6eF360C6976C5392aC5023a1F',
201
+ 1: '0xd47438C816c9E7f2E2888E060936a499Af9582b3',
202
+ 10: '0x330bdFADE01eE9bF63C209Ee33102DD334618e0a',
203
+ 100: '0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD',
204
+ },
205
+ symbol: 'eth',
206
+ decimals: 18,
207
+ },
208
+ },
209
+ 56: {
210
+ bnb: {
211
+ instanceAddress: {
212
+ 0.1: '0x84443CFd09A48AF6eF360C6976C5392aC5023a1F',
213
+ 1: '0xd47438C816c9E7f2E2888E060936a499Af9582b3',
214
+ 10: '0x330bdFADE01eE9bF63C209Ee33102DD334618e0a',
215
+ 100: '0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD',
216
+ },
217
+ symbol: 'bnb',
218
+ decimals: 18,
219
+ },
220
+ },
221
+ 100: {
222
+ xdai: {
223
+ instanceAddress: {
224
+ 100: '0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD',
225
+ 1000: '0xdf231d99Ff8b6c6CBF4E9B9a945CBAcEF9339178',
226
+ 10000: '0xaf4c0B70B2Ea9FB7487C7CbB37aDa259579fe040',
227
+ 100000: '0xa5C2254e4253490C54cef0a4347fddb8f75A4998',
228
+ },
229
+ symbol: 'xdai',
230
+ decimals: 18,
231
+ },
232
+ },
233
+ 137: {
234
+ matic: {
235
+ instanceAddress: {
236
+ 100: '0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD',
237
+ 1000: '0xdf231d99Ff8b6c6CBF4E9B9a945CBAcEF9339178',
238
+ 10000: '0xaf4c0B70B2Ea9FB7487C7CbB37aDa259579fe040',
239
+ 100000: '0xa5C2254e4253490C54cef0a4347fddb8f75A4998',
240
+ },
241
+ symbol: 'matic',
242
+ decimals: 18,
243
+ },
244
+ },
245
+ 42161: {
246
+ eth: {
247
+ instanceAddress: {
248
+ 0.1: '0x84443CFd09A48AF6eF360C6976C5392aC5023a1F',
249
+ 1: '0xd47438C816c9E7f2E2888E060936a499Af9582b3',
250
+ 10: '0x330bdFADE01eE9bF63C209Ee33102DD334618e0a',
251
+ 100: '0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD',
252
+ },
253
+ symbol: 'eth',
254
+ decimals: 18,
255
+ },
256
+ },
257
+ 43114: {
258
+ avax: {
259
+ instanceAddress: {
260
+ 10: '0x330bdFADE01eE9bF63C209Ee33102DD334618e0a',
261
+ 100: '0x1E34A77868E19A6647b1f2F47B51ed72dEDE95DD',
262
+ 500: '0xaf8d1839c3c67cf571aa74B5c12398d4901147B3',
263
+ },
264
+ symbol: 'avax',
265
+ decimals: 18,
266
+ },
267
+ },
268
+ };
269
+ exports.voucher = { address: 'voucher.contract.tornadocash.eth', duration: 12 };
270
+ exports.rewardSwap = { address: 'reward-swap.contract.tornadocash.eth', poolWeight: 1e11 };
271
+ exports.tornadoTrees = { address: 'tornado-trees.contract.tornadocash.eth', levels: 20 };
272
+ exports.governance = { address: 'governance.contract.tornadocash.eth' };
273
+ exports.governanceImpl = { address: 'governance-impl.contract.tornadocash.eth' };
274
+ exports.tornadoProxy = { address: 'tornado-proxy.contract.tornadocash.eth' };
275
+ exports.tornadoProxyLight = { address: '0x0D5550d52428E7e3175bfc9550207e4ad3859b17' };
276
+ exports.rewardVerifier = { address: 'reward-verifier.contract.tornadocash.eth' };
277
+ exports.treeUpdateVerifier = { address: 'tree-update-verifier.contract.tornadocash.eth' };
278
+ exports.withdrawVerifier = { address: 'withdraw-verifier.contract.tornadocash.eth' };
279
+ exports.poseidonHasher2 = { address: 'poseidon2.contract.tornadocash.eth' };
280
+ exports.poseidonHasher3 = { address: 'poseidon3.contract.tornadocash.eth' };
281
+ exports.feeManager = { address: 'fee-manager.contract.tornadocash.eth' };
282
+ exports.tornadoStakingRewards = { address: 'staking-rewards.contract.tornadocash.eth' };
283
+ exports.relayerRegistry = { address: 'relayer-registry.contract.tornadocash.eth' };
284
+ exports.tornadoRouter = { address: 'tornado-router.contract.tornadocash.eth' };
285
+ exports.instanceRegistry = { address: 'instance-registry.contract.tornadocash.eth' };
286
+ exports.deployer = { address: 'deployer.contract.tornadocash.eth' };
287
+ // Mainnet deployed addresses used by MixerX services
288
+ exports.relayerRegistryProxy = { address: '0x58E8dCC13BE9780fC42E8723D8EaD4CF46943dF2' };
289
+ exports.aggregator = { address: '0xE8F47A78A6D52D317D0D2FFFac56739fE14D1b49' };
290
+ exports.offchainOracle = { address: '0x07D91f5fb9Bf7798734C3f606dB065549F6893bb' };
291
+ exports.governanceProxy = { address: '0x5efda50f22d34f262c29268506c5fa42cb56a1ce' };
292
+ exports.tornadoProxyMainnet = { address: '0x722122df12d4e14e13ac3b6895a86e84145b6967' };
293
+ exports.mixerxToken = { address: '0x77777feddddffc19ff86db637967013e6c6a116c', symbol: 'torn', decimals: 18 };
294
+ exports.wrappedStablecoin = { address: '0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643' };
295
+ exports.networkConfigByNetId = {
296
+ 1: {
297
+ contracts: {
298
+ relayerRegistryAddress: exports.relayerRegistryProxy.address,
299
+ aggregator: exports.aggregator.address,
300
+ offchainOracleAddress: exports.offchainOracle.address,
301
+ governanceAddress: exports.governanceProxy.address,
302
+ oldMixerXProxy: exports.tornadoProxyMainnet.address,
303
+ },
304
+ tokens: {
305
+ mixerXTokenAddress: exports.mixerxToken.address,
306
+ mixerXTokenSymbol: exports.mixerxToken.symbol,
307
+ mixerXTokenDecimals: exports.mixerxToken.decimals,
308
+ wrappedStablecoinAddress: exports.wrappedStablecoin.address,
309
+ },
310
+ },
311
+ };
312
+ function getNetworkConfig(netId) {
313
+ return exports.networkConfigByNetId[netId];
314
+ }
315
+ function getInstancesForNetId(netId) {
316
+ return exports.instances[netId];
317
+ }
318
+ const config = {
319
+ torn: exports.torn,
320
+ miningV2: exports.miningV2,
321
+ vesting: exports.vesting,
322
+ instances: exports.instances,
323
+ voucher: exports.voucher,
324
+ rewardSwap: exports.rewardSwap,
325
+ tornadoTrees: exports.tornadoTrees,
326
+ governance: exports.governance,
327
+ governanceImpl: exports.governanceImpl,
328
+ tornadoProxy: exports.tornadoProxy,
329
+ tornadoProxyLight: exports.tornadoProxyLight,
330
+ rewardVerifier: exports.rewardVerifier,
331
+ treeUpdateVerifier: exports.treeUpdateVerifier,
332
+ withdrawVerifier: exports.withdrawVerifier,
333
+ poseidonHasher2: exports.poseidonHasher2,
334
+ poseidonHasher3: exports.poseidonHasher3,
335
+ feeManager: exports.feeManager,
336
+ tornadoStakingRewards: exports.tornadoStakingRewards,
337
+ relayerRegistry: exports.relayerRegistry,
338
+ tornadoRouter: exports.tornadoRouter,
339
+ instanceRegistry: exports.instanceRegistry,
340
+ deployer: exports.deployer,
341
+ relayerRegistryProxy: exports.relayerRegistryProxy,
342
+ aggregator: exports.aggregator,
343
+ offchainOracle: exports.offchainOracle,
344
+ governanceProxy: exports.governanceProxy,
345
+ tornadoProxyMainnet: exports.tornadoProxyMainnet,
346
+ mixerxToken: exports.mixerxToken,
347
+ wrappedStablecoin: exports.wrappedStablecoin,
348
+ networkConfigByNetId: exports.networkConfigByNetId,
349
+ getNetworkConfig,
350
+ };
351
+ exports.default = config;
352
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;AAyUA,4CAEC;AAED,oDAEC;AAhUD,MAAM,UAAU,GAAG,CAAC,YAAoB,EAAU,EAAE,CAAC,GAAG,YAAY,oBAAoB,CAAC;AAE5E,QAAA,IAAI,GAAS;IACxB,OAAO,EAAE,+BAA+B;IACxC,cAAc,EAAE,UAAU,CAAC,UAAU,CAAC;IACtC,WAAW,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI;IAC3B,YAAY,EAAE;QACZ,OAAO,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,EAAE;QACxD,QAAQ,EAAE,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,CAAC,SAAS,CAAC,EAAE;QAC7D,UAAU,EAAE,EAAE,EAAE,EAAE,oBAAoB,EAAE,MAAM,EAAE,UAAU,CAAC,SAAS,CAAC,EAAE;QACvE,KAAK,EAAE,EAAE,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,EAAE;QAC5D,KAAK,EAAE,EAAE,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,EAAE;QAC5D,KAA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: number): value is availableIds;
3
+ //# sourceMappingURL=guards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guards.d.ts","sourceRoot":"","sources":["../src/guards.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,YAAY,CAErE"}
package/dist/guards.js ADDED
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isSupportedNetId = isSupportedNetId;
4
+ const types_js_1 = require("./types.js");
5
+ function isSupportedNetId(value) {
6
+ return types_js_1.SUPPORTED_NET_IDS.includes(value);
7
+ }
8
+ //# sourceMappingURL=guards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"guards.js","sourceRoot":"","sources":["../src/guards.ts"],"names":[],"mappings":";;AAGA,4CAEC;AALD,yCAA+C;AAG/C,SAAgB,gBAAgB,CAAC,KAAa;IAC5C,OAAQ,4BAAuC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAClE,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './types.js';
2
+ export { default as config, torn, miningV2, vesting, instances, voucher, rewardSwap, tornadoTrees, governance, governanceImpl, tornadoProxy, tornadoProxyLight, rewardVerifier, treeUpdateVerifier, withdrawVerifier, poseidonHasher2, poseidonHasher3, feeManager, tornadoStakingRewards, relayerRegistry, tornadoRouter, instanceRegistry, deployer, relayerRegistryProxy, aggregator, offchainOracle, governanceProxy, tornadoProxyMainnet, mixerxToken, wrappedStablecoin, networkConfigByNetId, getNetworkConfig, getInstancesForNetId, } from './config.js';
3
+ export { isSupportedNetId } from './guards.js';
4
+ export { assertValidConfigShape } from './assertions.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,EACL,OAAO,IAAI,MAAM,EACjB,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,SAAS,EACT,OAAO,EACP,UAAU,EACV,YAAY,EACZ,UAAU,EACV,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,UAAU,EACV,qBAAqB,EACrB,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,QAAQ,EACR,oBAAoB,EACpB,UAAU,EACV,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,WAAW,EACX,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC"}