@lidofinance/lido-csm-sdk 2.0.0-alpha.69 → 2.0.0-alpha.70
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/dist/common/constants/index.d.cts +1 -1
- package/dist/common/constants/index.d.mts +1 -1
- package/dist/common/constants/links.cjs +4 -2
- package/dist/common/constants/links.cjs.map +1 -1
- package/dist/common/constants/links.d.cts.map +1 -1
- package/dist/common/constants/links.d.mts.map +1 -1
- package/dist/common/constants/links.mjs +4 -2
- package/dist/common/constants/links.mjs.map +1 -1
- package/dist/common/constants/operator-types.cjs +45 -25
- package/dist/common/constants/operator-types.cjs.map +1 -1
- package/dist/common/constants/operator-types.d.cts +5 -4
- package/dist/common/constants/operator-types.d.cts.map +1 -1
- package/dist/common/constants/operator-types.d.mts +5 -4
- package/dist/common/constants/operator-types.d.mts.map +1 -1
- package/dist/common/constants/operator-types.mjs +45 -26
- package/dist/common/constants/operator-types.mjs.map +1 -1
- package/dist/common/constants/supported-chains.cjs.map +1 -1
- package/dist/common/constants/supported-chains.d.cts +2 -2
- package/dist/common/constants/supported-chains.d.cts.map +1 -1
- package/dist/common/constants/supported-chains.d.mts +2 -2
- package/dist/common/constants/supported-chains.d.mts.map +1 -1
- package/dist/common/constants/supported-chains.mjs.map +1 -1
- package/dist/common/utils/operator-type-utils.cjs +19 -2
- package/dist/common/utils/operator-type-utils.cjs.map +1 -1
- package/dist/common/utils/operator-type-utils.d.cts +1 -1
- package/dist/common/utils/operator-type-utils.d.cts.map +1 -1
- package/dist/common/utils/operator-type-utils.d.mts +1 -1
- package/dist/common/utils/operator-type-utils.d.mts.map +1 -1
- package/dist/common/utils/operator-type-utils.mjs +20 -3
- package/dist/common/utils/operator-type-utils.mjs.map +1 -1
- package/dist/common.cjs +1 -0
- package/dist/common.d.cts +2 -2
- package/dist/common.d.mts +2 -2
- package/dist/common.mjs +2 -2
- package/dist/core-sdk/core-sdk.d.cts +150 -150
- package/dist/core-sdk/core-sdk.d.mts +150 -150
- package/dist/frame-sdk/frame-sdk.d.cts +2 -2
- package/dist/frame-sdk/frame-sdk.d.cts.map +1 -1
- package/dist/frame-sdk/frame-sdk.d.mts +2 -2
- package/dist/frame-sdk/frame-sdk.d.mts.map +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ import { COMMON_ADDRESSES, MODULE_CONFIG, ModuleConfig } from "./module-config.c
|
|
|
7
7
|
import { CONTRACT_BASE_ABI } from "./contract-abi.cjs";
|
|
8
8
|
import { EJECTABLE_EPOCH_COUNT, EJECT_FEE_MIN_LIMIT, EJECT_FEE_MULTIPLIEER, KEY_STATUS, PUBKEY_LENGTH_BYTES, SIGNATURE_LENGTH_BYTES } from "./keys.cjs";
|
|
9
9
|
import { API_NAME, API_URLS, DEFAULT_IPFS_GATEWAYS, MERKLE_TREE_FALLBACKS } from "./links.cjs";
|
|
10
|
-
import { OPERATOR_TYPE, OPERATOR_TYPE_CURVE_ID } from "./operator-types.cjs";
|
|
10
|
+
import { OPERATOR_TYPE, OPERATOR_TYPE_CURVE_ID, OPERATOR_TYPE_MODULE } from "./operator-types.cjs";
|
|
11
11
|
import { ROLES } from "./roles.cjs";
|
|
12
12
|
import { STETH_ROUNDING_THRESHOLD, TOKENS } from "./tokens.cjs";
|
|
13
13
|
import { EMPTY_PERMIT } from "./permit.cjs";
|
|
@@ -7,7 +7,7 @@ import { COMMON_ADDRESSES, MODULE_CONFIG, ModuleConfig } from "./module-config.m
|
|
|
7
7
|
import { CONTRACT_BASE_ABI } from "./contract-abi.mjs";
|
|
8
8
|
import { EJECTABLE_EPOCH_COUNT, EJECT_FEE_MIN_LIMIT, EJECT_FEE_MULTIPLIEER, KEY_STATUS, PUBKEY_LENGTH_BYTES, SIGNATURE_LENGTH_BYTES } from "./keys.mjs";
|
|
9
9
|
import { API_NAME, API_URLS, DEFAULT_IPFS_GATEWAYS, MERKLE_TREE_FALLBACKS } from "./links.mjs";
|
|
10
|
-
import { OPERATOR_TYPE, OPERATOR_TYPE_CURVE_ID } from "./operator-types.mjs";
|
|
10
|
+
import { OPERATOR_TYPE, OPERATOR_TYPE_CURVE_ID, OPERATOR_TYPE_MODULE } from "./operator-types.mjs";
|
|
11
11
|
import { ROLES } from "./roles.mjs";
|
|
12
12
|
import { STETH_ROUNDING_THRESHOLD, TOKENS } from "./tokens.mjs";
|
|
13
13
|
import { EMPTY_PERMIT } from "./permit.mjs";
|
|
@@ -20,7 +20,8 @@ const MERKLE_TREE_FALLBACKS = {
|
|
|
20
20
|
[_lidofinance_lido_ethereum_sdk.CHAINS.Mainnet]: {
|
|
21
21
|
[require_contract_names.CONTRACT_NAMES.curatedGatePTO]: "https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/mainnet/curated/gates/pto/merkle-tree.json",
|
|
22
22
|
[require_contract_names.CONTRACT_NAMES.curatedGatePGO]: "https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/mainnet/curated/gates/pgo/merkle-tree.json",
|
|
23
|
-
[require_contract_names.CONTRACT_NAMES.curatedGateIODC]: "https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/mainnet/curated/gates/iodvtc/merkle-tree.json"
|
|
23
|
+
[require_contract_names.CONTRACT_NAMES.curatedGateIODC]: "https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/mainnet/curated/gates/iodvtc/merkle-tree.json",
|
|
24
|
+
[require_contract_names.CONTRACT_NAMES.feeDistributor]: "https://raw.githubusercontent.com/lidofinance/cm-v2-rewards/mainnet/tree.json"
|
|
24
25
|
},
|
|
25
26
|
[_lidofinance_lido_ethereum_sdk.CHAINS.Hoodi]: {
|
|
26
27
|
[require_contract_names.CONTRACT_NAMES.curatedGatePTO]: "https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/PTO/merkle-tree.json",
|
|
@@ -28,7 +29,8 @@ const MERKLE_TREE_FALLBACKS = {
|
|
|
28
29
|
[require_contract_names.CONTRACT_NAMES.curatedGateDO]: "https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/DO/merkle-tree.json",
|
|
29
30
|
[require_contract_names.CONTRACT_NAMES.curatedGateEEO]: "https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/EE/merkle-tree.json",
|
|
30
31
|
[require_contract_names.CONTRACT_NAMES.curatedGateIODC]: "https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/IDVC/merkle-tree.json",
|
|
31
|
-
[require_contract_names.CONTRACT_NAMES.curatedGateIODCP]: "https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/IDVC%2B/merkle-tree.json"
|
|
32
|
+
[require_contract_names.CONTRACT_NAMES.curatedGateIODCP]: "https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/IDVC%2B/merkle-tree.json",
|
|
33
|
+
[require_contract_names.CONTRACT_NAMES.feeDistributor]: "https://raw.githubusercontent.com/lidofinance/cm-v2-rewards/hoodi/tree.json"
|
|
32
34
|
}
|
|
33
35
|
}
|
|
34
36
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"links.cjs","names":["API_NAME"],"sources":["../../../src/common/constants/links.ts"],"sourcesContent":["import { CHAINS } from '@lidofinance/lido-ethereum-sdk';\nimport { CONTRACT_NAMES } from './contract-names';\nimport { MODULE_NAME, PerModule } from './module-name';\nimport { PerSupportedChain } from './supported-chains';\n\nexport const DEFAULT_IPFS_GATEWAYS = [\n 'https://ipfs.io/ipfs/{cid}',\n 'https://gateway.pinata.cloud/ipfs/{cid}',\n];\n\n// Fallback tree URLs are resolved per module: gate contracts are\n// module-specific by nature, and feeDistributor is a distinct contract (with a\n// distinct rewards tree) in each module. Mainnet artifacts for idvtc/curated\n// gates live on the `develop` branch of staking-modules until released; switch\n// to `main` once merged.\nexport const MERKLE_TREE_FALLBACKS: PerModule<\n PerSupportedChain<Partial<Record<CONTRACT_NAMES, string>>>\n> = {\n [MODULE_NAME.CSM]: {\n [CHAINS.Mainnet]: {\n [CONTRACT_NAMES.icsGate]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/main/artifacts/mainnet/ics/merkle-tree.json',\n [CONTRACT_NAMES.idvtcGate]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/mainnet/idvtc/merkle-tree.json',\n [CONTRACT_NAMES.feeDistributor]:\n 'https://raw.githubusercontent.com/lidofinance/csm-rewards/mainnet/tree.json',\n },\n [CHAINS.Hoodi]: {\n [CONTRACT_NAMES.icsGate]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/main/artifacts/hoodi/ics/merkle-tree.json',\n [CONTRACT_NAMES.feeDistributor]:\n 'https://raw.githubusercontent.com/lidofinance/csm-rewards/hoodi/tree.json',\n },\n },\n [MODULE_NAME.CM]: {\n [CHAINS.Mainnet]: {\n [CONTRACT_NAMES.curatedGatePTO]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/mainnet/curated/gates/pto/merkle-tree.json',\n [CONTRACT_NAMES.curatedGatePGO]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/mainnet/curated/gates/pgo/merkle-tree.json',\n [CONTRACT_NAMES.curatedGateIODC]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/mainnet/curated/gates/iodvtc/merkle-tree.json',\n },\n [CHAINS.Hoodi]: {\n [CONTRACT_NAMES.curatedGatePTO]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/PTO/merkle-tree.json',\n [CONTRACT_NAMES.curatedGatePGO]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/PGO/merkle-tree.json',\n [CONTRACT_NAMES.curatedGateDO]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/DO/merkle-tree.json',\n [CONTRACT_NAMES.curatedGateEEO]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/EE/merkle-tree.json',\n [CONTRACT_NAMES.curatedGateIODC]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/IDVC/merkle-tree.json',\n [CONTRACT_NAMES.curatedGateIODCP]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/IDVC%2B/merkle-tree.json',\n },\n },\n};\n\nexport enum API_NAME {\n keys = 'keys',\n feesMonitoring = 'feesMonitoring',\n}\n\nexport const API_URLS: PerSupportedChain<Partial<Record<API_NAME, string>>> = {\n [CHAINS.Mainnet]: {\n [API_NAME.keys]: 'https://keys-api.lido.fi',\n [API_NAME.feesMonitoring]: 'https://api-fees-monitoring.lido.fi',\n },\n [CHAINS.Hoodi]: {\n [API_NAME.keys]: 'https://keys-api-hoodi.testnet.fi',\n [API_NAME.feesMonitoring]: 'https://api-fees-monitoring-hoodi.testnet.fi',\n },\n};\n"],"mappings":";;;;;AAKO,MAAM,wBAAwB,CACnC,8BACA,0CACF;AAOO,MAAM,wBAET;EACD,oBAAA,YAAY,MAAM;GAChB,+BAAA,OAAO,UAAU;IACf,uBAAA,eAAe,UACd;IACD,uBAAA,eAAe,YACd;IACD,uBAAA,eAAe,iBACd;GACJ;GACC,+BAAA,OAAO,QAAQ;IACb,uBAAA,eAAe,UACd;IACD,uBAAA,eAAe,iBACd;GACJ;EACF;EACC,oBAAA,YAAY,KAAK;GACf,+BAAA,OAAO,UAAU;IACf,uBAAA,eAAe,iBACd;IACD,uBAAA,eAAe,iBACd;IACD,uBAAA,eAAe,kBACd;GACJ;GACC,+BAAA,OAAO,QAAQ;IACb,uBAAA,eAAe,iBACd;IACD,uBAAA,eAAe,iBACd;IACD,uBAAA,eAAe,gBACd;IACD,uBAAA,eAAe,iBACd;IACD,uBAAA,eAAe,kBACd;IACD,uBAAA,eAAe,mBACd;GACJ;EACF;CACF;AAEO,IAAK,WAAL,kBAAKA,cAAL;AACLA,WAAA,UAAO;AACPA,WAAA,oBAAiB;AAFP,QAAAA;GAAA,YAAA,EAAA,CAAA;AAKL,MAAM,WAAiE;EAC3E,+BAAA,OAAO,UAAU;GACf,SAAgB;GAChB,mBAA0B;EAC7B;EACC,+BAAA,OAAO,QAAQ;GACb,SAAgB;GAChB,mBAA0B;EAC7B;CACF"}
|
|
1
|
+
{"version":3,"file":"links.cjs","names":["API_NAME"],"sources":["../../../src/common/constants/links.ts"],"sourcesContent":["import { CHAINS } from '@lidofinance/lido-ethereum-sdk';\nimport { CONTRACT_NAMES } from './contract-names';\nimport { MODULE_NAME, PerModule } from './module-name';\nimport { PerSupportedChain } from './supported-chains';\n\nexport const DEFAULT_IPFS_GATEWAYS = [\n 'https://ipfs.io/ipfs/{cid}',\n 'https://gateway.pinata.cloud/ipfs/{cid}',\n];\n\n// Fallback tree URLs are resolved per module: gate contracts are\n// module-specific by nature, and feeDistributor is a distinct contract (with a\n// distinct rewards tree) in each module. Mainnet artifacts for idvtc/curated\n// gates live on the `develop` branch of staking-modules until released; switch\n// to `main` once merged.\nexport const MERKLE_TREE_FALLBACKS: PerModule<\n PerSupportedChain<Partial<Record<CONTRACT_NAMES, string>>>\n> = {\n [MODULE_NAME.CSM]: {\n [CHAINS.Mainnet]: {\n [CONTRACT_NAMES.icsGate]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/main/artifacts/mainnet/ics/merkle-tree.json',\n [CONTRACT_NAMES.idvtcGate]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/mainnet/idvtc/merkle-tree.json',\n [CONTRACT_NAMES.feeDistributor]:\n 'https://raw.githubusercontent.com/lidofinance/csm-rewards/mainnet/tree.json',\n },\n [CHAINS.Hoodi]: {\n [CONTRACT_NAMES.icsGate]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/main/artifacts/hoodi/ics/merkle-tree.json',\n [CONTRACT_NAMES.feeDistributor]:\n 'https://raw.githubusercontent.com/lidofinance/csm-rewards/hoodi/tree.json',\n },\n },\n [MODULE_NAME.CM]: {\n [CHAINS.Mainnet]: {\n [CONTRACT_NAMES.curatedGatePTO]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/mainnet/curated/gates/pto/merkle-tree.json',\n [CONTRACT_NAMES.curatedGatePGO]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/mainnet/curated/gates/pgo/merkle-tree.json',\n [CONTRACT_NAMES.curatedGateIODC]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/mainnet/curated/gates/iodvtc/merkle-tree.json',\n [CONTRACT_NAMES.feeDistributor]:\n 'https://raw.githubusercontent.com/lidofinance/cm-v2-rewards/mainnet/tree.json',\n },\n [CHAINS.Hoodi]: {\n [CONTRACT_NAMES.curatedGatePTO]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/PTO/merkle-tree.json',\n [CONTRACT_NAMES.curatedGatePGO]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/PGO/merkle-tree.json',\n [CONTRACT_NAMES.curatedGateDO]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/DO/merkle-tree.json',\n [CONTRACT_NAMES.curatedGateEEO]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/EE/merkle-tree.json',\n [CONTRACT_NAMES.curatedGateIODC]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/IDVC/merkle-tree.json',\n [CONTRACT_NAMES.curatedGateIODCP]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/IDVC%2B/merkle-tree.json',\n [CONTRACT_NAMES.feeDistributor]:\n 'https://raw.githubusercontent.com/lidofinance/cm-v2-rewards/hoodi/tree.json',\n },\n },\n};\n\nexport enum API_NAME {\n keys = 'keys',\n feesMonitoring = 'feesMonitoring',\n}\n\nexport const API_URLS: PerSupportedChain<Partial<Record<API_NAME, string>>> = {\n [CHAINS.Mainnet]: {\n [API_NAME.keys]: 'https://keys-api.lido.fi',\n [API_NAME.feesMonitoring]: 'https://api-fees-monitoring.lido.fi',\n },\n [CHAINS.Hoodi]: {\n [API_NAME.keys]: 'https://keys-api-hoodi.testnet.fi',\n [API_NAME.feesMonitoring]: 'https://api-fees-monitoring-hoodi.testnet.fi',\n },\n};\n"],"mappings":";;;;;AAKO,MAAM,wBAAwB,CACnC,8BACA,0CACF;AAOO,MAAM,wBAET;EACD,oBAAA,YAAY,MAAM;GAChB,+BAAA,OAAO,UAAU;IACf,uBAAA,eAAe,UACd;IACD,uBAAA,eAAe,YACd;IACD,uBAAA,eAAe,iBACd;GACJ;GACC,+BAAA,OAAO,QAAQ;IACb,uBAAA,eAAe,UACd;IACD,uBAAA,eAAe,iBACd;GACJ;EACF;EACC,oBAAA,YAAY,KAAK;GACf,+BAAA,OAAO,UAAU;IACf,uBAAA,eAAe,iBACd;IACD,uBAAA,eAAe,iBACd;IACD,uBAAA,eAAe,kBACd;IACD,uBAAA,eAAe,iBACd;GACJ;GACC,+BAAA,OAAO,QAAQ;IACb,uBAAA,eAAe,iBACd;IACD,uBAAA,eAAe,iBACd;IACD,uBAAA,eAAe,gBACd;IACD,uBAAA,eAAe,iBACd;IACD,uBAAA,eAAe,kBACd;IACD,uBAAA,eAAe,mBACd;IACD,uBAAA,eAAe,iBACd;GACJ;EACF;CACF;AAEO,IAAK,WAAL,kBAAKA,cAAL;AACLA,WAAA,UAAO;AACPA,WAAA,oBAAiB;AAFP,QAAAA;GAAA,YAAA,EAAA,CAAA;AAKL,MAAM,WAAiE;EAC3E,+BAAA,OAAO,UAAU;GACf,SAAgB;GAChB,mBAA0B;EAC7B;EACC,+BAAA,OAAO,QAAQ;GACb,SAAgB;GAChB,mBAA0B;EAC7B;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"links.d.cts","names":[],"sources":["../../../src/common/constants/links.ts"],"mappings":";;;;;cAKa,qBAAA;AAAA,cAUA,qBAAA,EAAuB,SAAA,CAClC,iBAAA,CAAkB,OAAA,CAAQ,MAAA,CAAO,cAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"links.d.cts","names":[],"sources":["../../../src/common/constants/links.ts"],"mappings":";;;;;cAKa,qBAAA;AAAA,cAUA,qBAAA,EAAuB,SAAA,CAClC,iBAAA,CAAkB,OAAA,CAAQ,MAAA,CAAO,cAAA;AAAA,aAgDvB,QAAA;EACV,IAAA;EACA,cAAA;AAAA;AAAA,cAGW,QAAA,EAAU,iBAAA,CAAkB,OAAA,CAAQ,MAAA,CAAO,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"links.d.mts","names":[],"sources":["../../../src/common/constants/links.ts"],"mappings":";;;;;cAKa,qBAAA;AAAA,cAUA,qBAAA,EAAuB,SAAA,CAClC,iBAAA,CAAkB,OAAA,CAAQ,MAAA,CAAO,cAAA;AAAA,
|
|
1
|
+
{"version":3,"file":"links.d.mts","names":[],"sources":["../../../src/common/constants/links.ts"],"mappings":";;;;;cAKa,qBAAA;AAAA,cAUA,qBAAA,EAAuB,SAAA,CAClC,iBAAA,CAAkB,OAAA,CAAQ,MAAA,CAAO,cAAA;AAAA,aAgDvB,QAAA;EACV,IAAA;EACA,cAAA;AAAA;AAAA,cAGW,QAAA,EAAU,iBAAA,CAAkB,OAAA,CAAQ,MAAA,CAAO,QAAA"}
|
|
@@ -19,7 +19,8 @@ const MERKLE_TREE_FALLBACKS = {
|
|
|
19
19
|
[CHAINS.Mainnet]: {
|
|
20
20
|
[CONTRACT_NAMES.curatedGatePTO]: "https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/mainnet/curated/gates/pto/merkle-tree.json",
|
|
21
21
|
[CONTRACT_NAMES.curatedGatePGO]: "https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/mainnet/curated/gates/pgo/merkle-tree.json",
|
|
22
|
-
[CONTRACT_NAMES.curatedGateIODC]: "https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/mainnet/curated/gates/iodvtc/merkle-tree.json"
|
|
22
|
+
[CONTRACT_NAMES.curatedGateIODC]: "https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/mainnet/curated/gates/iodvtc/merkle-tree.json",
|
|
23
|
+
[CONTRACT_NAMES.feeDistributor]: "https://raw.githubusercontent.com/lidofinance/cm-v2-rewards/mainnet/tree.json"
|
|
23
24
|
},
|
|
24
25
|
[CHAINS.Hoodi]: {
|
|
25
26
|
[CONTRACT_NAMES.curatedGatePTO]: "https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/PTO/merkle-tree.json",
|
|
@@ -27,7 +28,8 @@ const MERKLE_TREE_FALLBACKS = {
|
|
|
27
28
|
[CONTRACT_NAMES.curatedGateDO]: "https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/DO/merkle-tree.json",
|
|
28
29
|
[CONTRACT_NAMES.curatedGateEEO]: "https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/EE/merkle-tree.json",
|
|
29
30
|
[CONTRACT_NAMES.curatedGateIODC]: "https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/IDVC/merkle-tree.json",
|
|
30
|
-
[CONTRACT_NAMES.curatedGateIODCP]: "https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/IDVC%2B/merkle-tree.json"
|
|
31
|
+
[CONTRACT_NAMES.curatedGateIODCP]: "https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/IDVC%2B/merkle-tree.json",
|
|
32
|
+
[CONTRACT_NAMES.feeDistributor]: "https://raw.githubusercontent.com/lidofinance/cm-v2-rewards/hoodi/tree.json"
|
|
31
33
|
}
|
|
32
34
|
}
|
|
33
35
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"links.mjs","names":["API_NAME"],"sources":["../../../src/common/constants/links.ts"],"sourcesContent":["import { CHAINS } from '@lidofinance/lido-ethereum-sdk';\nimport { CONTRACT_NAMES } from './contract-names';\nimport { MODULE_NAME, PerModule } from './module-name';\nimport { PerSupportedChain } from './supported-chains';\n\nexport const DEFAULT_IPFS_GATEWAYS = [\n 'https://ipfs.io/ipfs/{cid}',\n 'https://gateway.pinata.cloud/ipfs/{cid}',\n];\n\n// Fallback tree URLs are resolved per module: gate contracts are\n// module-specific by nature, and feeDistributor is a distinct contract (with a\n// distinct rewards tree) in each module. Mainnet artifacts for idvtc/curated\n// gates live on the `develop` branch of staking-modules until released; switch\n// to `main` once merged.\nexport const MERKLE_TREE_FALLBACKS: PerModule<\n PerSupportedChain<Partial<Record<CONTRACT_NAMES, string>>>\n> = {\n [MODULE_NAME.CSM]: {\n [CHAINS.Mainnet]: {\n [CONTRACT_NAMES.icsGate]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/main/artifacts/mainnet/ics/merkle-tree.json',\n [CONTRACT_NAMES.idvtcGate]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/mainnet/idvtc/merkle-tree.json',\n [CONTRACT_NAMES.feeDistributor]:\n 'https://raw.githubusercontent.com/lidofinance/csm-rewards/mainnet/tree.json',\n },\n [CHAINS.Hoodi]: {\n [CONTRACT_NAMES.icsGate]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/main/artifacts/hoodi/ics/merkle-tree.json',\n [CONTRACT_NAMES.feeDistributor]:\n 'https://raw.githubusercontent.com/lidofinance/csm-rewards/hoodi/tree.json',\n },\n },\n [MODULE_NAME.CM]: {\n [CHAINS.Mainnet]: {\n [CONTRACT_NAMES.curatedGatePTO]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/mainnet/curated/gates/pto/merkle-tree.json',\n [CONTRACT_NAMES.curatedGatePGO]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/mainnet/curated/gates/pgo/merkle-tree.json',\n [CONTRACT_NAMES.curatedGateIODC]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/mainnet/curated/gates/iodvtc/merkle-tree.json',\n },\n [CHAINS.Hoodi]: {\n [CONTRACT_NAMES.curatedGatePTO]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/PTO/merkle-tree.json',\n [CONTRACT_NAMES.curatedGatePGO]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/PGO/merkle-tree.json',\n [CONTRACT_NAMES.curatedGateDO]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/DO/merkle-tree.json',\n [CONTRACT_NAMES.curatedGateEEO]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/EE/merkle-tree.json',\n [CONTRACT_NAMES.curatedGateIODC]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/IDVC/merkle-tree.json',\n [CONTRACT_NAMES.curatedGateIODCP]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/IDVC%2B/merkle-tree.json',\n },\n },\n};\n\nexport enum API_NAME {\n keys = 'keys',\n feesMonitoring = 'feesMonitoring',\n}\n\nexport const API_URLS: PerSupportedChain<Partial<Record<API_NAME, string>>> = {\n [CHAINS.Mainnet]: {\n [API_NAME.keys]: 'https://keys-api.lido.fi',\n [API_NAME.feesMonitoring]: 'https://api-fees-monitoring.lido.fi',\n },\n [CHAINS.Hoodi]: {\n [API_NAME.keys]: 'https://keys-api-hoodi.testnet.fi',\n [API_NAME.feesMonitoring]: 'https://api-fees-monitoring-hoodi.testnet.fi',\n },\n};\n"],"mappings":";;;;AAKO,MAAM,wBAAwB,CACnC,8BACA,0CACF;AAOO,MAAM,wBAET;EACD,YAAY,MAAM;GAChB,OAAO,UAAU;IACf,eAAe,UACd;IACD,eAAe,YACd;IACD,eAAe,iBACd;GACJ;GACC,OAAO,QAAQ;IACb,eAAe,UACd;IACD,eAAe,iBACd;GACJ;EACF;EACC,YAAY,KAAK;GACf,OAAO,UAAU;IACf,eAAe,iBACd;IACD,eAAe,iBACd;IACD,eAAe,kBACd;GACJ;GACC,OAAO,QAAQ;IACb,eAAe,iBACd;IACD,eAAe,iBACd;IACD,eAAe,gBACd;IACD,eAAe,iBACd;IACD,eAAe,kBACd;IACD,eAAe,mBACd;GACJ;EACF;CACF;AAEO,IAAK,WAAL,kBAAKA,cAAL;AACLA,WAAA,UAAO;AACPA,WAAA,oBAAiB;AAFP,QAAAA;GAAA,YAAA,EAAA,CAAA;AAKL,MAAM,WAAiE;EAC3E,OAAO,UAAU;GACf,SAAgB;GAChB,mBAA0B;EAC7B;EACC,OAAO,QAAQ;GACb,SAAgB;GAChB,mBAA0B;EAC7B;CACF"}
|
|
1
|
+
{"version":3,"file":"links.mjs","names":["API_NAME"],"sources":["../../../src/common/constants/links.ts"],"sourcesContent":["import { CHAINS } from '@lidofinance/lido-ethereum-sdk';\nimport { CONTRACT_NAMES } from './contract-names';\nimport { MODULE_NAME, PerModule } from './module-name';\nimport { PerSupportedChain } from './supported-chains';\n\nexport const DEFAULT_IPFS_GATEWAYS = [\n 'https://ipfs.io/ipfs/{cid}',\n 'https://gateway.pinata.cloud/ipfs/{cid}',\n];\n\n// Fallback tree URLs are resolved per module: gate contracts are\n// module-specific by nature, and feeDistributor is a distinct contract (with a\n// distinct rewards tree) in each module. Mainnet artifacts for idvtc/curated\n// gates live on the `develop` branch of staking-modules until released; switch\n// to `main` once merged.\nexport const MERKLE_TREE_FALLBACKS: PerModule<\n PerSupportedChain<Partial<Record<CONTRACT_NAMES, string>>>\n> = {\n [MODULE_NAME.CSM]: {\n [CHAINS.Mainnet]: {\n [CONTRACT_NAMES.icsGate]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/main/artifacts/mainnet/ics/merkle-tree.json',\n [CONTRACT_NAMES.idvtcGate]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/mainnet/idvtc/merkle-tree.json',\n [CONTRACT_NAMES.feeDistributor]:\n 'https://raw.githubusercontent.com/lidofinance/csm-rewards/mainnet/tree.json',\n },\n [CHAINS.Hoodi]: {\n [CONTRACT_NAMES.icsGate]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/main/artifacts/hoodi/ics/merkle-tree.json',\n [CONTRACT_NAMES.feeDistributor]:\n 'https://raw.githubusercontent.com/lidofinance/csm-rewards/hoodi/tree.json',\n },\n },\n [MODULE_NAME.CM]: {\n [CHAINS.Mainnet]: {\n [CONTRACT_NAMES.curatedGatePTO]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/mainnet/curated/gates/pto/merkle-tree.json',\n [CONTRACT_NAMES.curatedGatePGO]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/mainnet/curated/gates/pgo/merkle-tree.json',\n [CONTRACT_NAMES.curatedGateIODC]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/mainnet/curated/gates/iodvtc/merkle-tree.json',\n [CONTRACT_NAMES.feeDistributor]:\n 'https://raw.githubusercontent.com/lidofinance/cm-v2-rewards/mainnet/tree.json',\n },\n [CHAINS.Hoodi]: {\n [CONTRACT_NAMES.curatedGatePTO]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/PTO/merkle-tree.json',\n [CONTRACT_NAMES.curatedGatePGO]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/PGO/merkle-tree.json',\n [CONTRACT_NAMES.curatedGateDO]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/DO/merkle-tree.json',\n [CONTRACT_NAMES.curatedGateEEO]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/EE/merkle-tree.json',\n [CONTRACT_NAMES.curatedGateIODC]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/IDVC/merkle-tree.json',\n [CONTRACT_NAMES.curatedGateIODCP]:\n 'https://raw.githubusercontent.com/lidofinance/staking-modules/refs/heads/develop/artifacts/hoodi/curated/gates/IDVC%2B/merkle-tree.json',\n [CONTRACT_NAMES.feeDistributor]:\n 'https://raw.githubusercontent.com/lidofinance/cm-v2-rewards/hoodi/tree.json',\n },\n },\n};\n\nexport enum API_NAME {\n keys = 'keys',\n feesMonitoring = 'feesMonitoring',\n}\n\nexport const API_URLS: PerSupportedChain<Partial<Record<API_NAME, string>>> = {\n [CHAINS.Mainnet]: {\n [API_NAME.keys]: 'https://keys-api.lido.fi',\n [API_NAME.feesMonitoring]: 'https://api-fees-monitoring.lido.fi',\n },\n [CHAINS.Hoodi]: {\n [API_NAME.keys]: 'https://keys-api-hoodi.testnet.fi',\n [API_NAME.feesMonitoring]: 'https://api-fees-monitoring-hoodi.testnet.fi',\n },\n};\n"],"mappings":";;;;AAKO,MAAM,wBAAwB,CACnC,8BACA,0CACF;AAOO,MAAM,wBAET;EACD,YAAY,MAAM;GAChB,OAAO,UAAU;IACf,eAAe,UACd;IACD,eAAe,YACd;IACD,eAAe,iBACd;GACJ;GACC,OAAO,QAAQ;IACb,eAAe,UACd;IACD,eAAe,iBACd;GACJ;EACF;EACC,YAAY,KAAK;GACf,OAAO,UAAU;IACf,eAAe,iBACd;IACD,eAAe,iBACd;IACD,eAAe,kBACd;IACD,eAAe,iBACd;GACJ;GACC,OAAO,QAAQ;IACb,eAAe,iBACd;IACD,eAAe,iBACd;IACD,eAAe,gBACd;IACD,eAAe,iBACd;IACD,eAAe,kBACd;IACD,eAAe,mBACd;IACD,eAAe,iBACd;GACJ;EACF;CACF;AAEO,IAAK,WAAL,kBAAKA,cAAL;AACLA,WAAA,UAAO;AACPA,WAAA,oBAAiB;AAFP,QAAAA;GAAA,YAAA,EAAA,CAAA;AAKL,MAAM,WAAiE;EAC3E,OAAO,UAAU;GACf,SAAgB;GAChB,mBAA0B;EAC7B;EACC,OAAO,QAAQ;GACb,SAAgB;GAChB,mBAA0B;EAC7B;CACF"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
require("../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_module_name = require("./module-name.cjs");
|
|
2
3
|
let _lidofinance_lido_ethereum_sdk = require("@lidofinance/lido-ethereum-sdk");
|
|
3
4
|
//#region src/common/constants/operator-types.ts
|
|
4
5
|
var OPERATOR_TYPE = /* @__PURE__ */ ((OPERATOR_TYPE2) => {
|
|
@@ -13,41 +14,60 @@ var OPERATOR_TYPE = /* @__PURE__ */ ((OPERATOR_TYPE2) => {
|
|
|
13
14
|
OPERATOR_TYPE2["CM_EEO"] = "CM_EEO";
|
|
14
15
|
OPERATOR_TYPE2["CM_IODC"] = "CM_IODC";
|
|
15
16
|
OPERATOR_TYPE2["CM_IODCP"] = "CM_IODCP";
|
|
16
|
-
OPERATOR_TYPE2["CC"] = "CC";
|
|
17
17
|
return OPERATOR_TYPE2;
|
|
18
18
|
})(OPERATOR_TYPE || {});
|
|
19
|
+
const OPERATOR_TYPE_MODULE = {
|
|
20
|
+
["CSM_DEF"]: require_module_name.MODULE_NAME.CSM,
|
|
21
|
+
["CSM_LEA"]: require_module_name.MODULE_NAME.CSM,
|
|
22
|
+
["CSM_ICS"]: require_module_name.MODULE_NAME.CSM,
|
|
23
|
+
["CSM_IDVTC"]: require_module_name.MODULE_NAME.CSM,
|
|
24
|
+
["CM_PO"]: require_module_name.MODULE_NAME.CM,
|
|
25
|
+
["CM_PTO"]: require_module_name.MODULE_NAME.CM,
|
|
26
|
+
["CM_PGO"]: require_module_name.MODULE_NAME.CM,
|
|
27
|
+
["CM_DO"]: require_module_name.MODULE_NAME.CM,
|
|
28
|
+
["CM_EEO"]: require_module_name.MODULE_NAME.CM,
|
|
29
|
+
["CM_IODC"]: require_module_name.MODULE_NAME.CM,
|
|
30
|
+
["CM_IODCP"]: require_module_name.MODULE_NAME.CM
|
|
31
|
+
};
|
|
19
32
|
const OPERATOR_TYPE_CURVE_ID = {
|
|
20
33
|
[_lidofinance_lido_ethereum_sdk.CHAINS.Mainnet]: {
|
|
21
|
-
[
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
[
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
[require_module_name.MODULE_NAME.CSM]: {
|
|
35
|
+
["CSM_DEF"]: 0n,
|
|
36
|
+
["CSM_LEA"]: 1n,
|
|
37
|
+
["CSM_ICS"]: 2n,
|
|
38
|
+
["CSM_IDVTC"]: 3n
|
|
39
|
+
},
|
|
40
|
+
[require_module_name.MODULE_NAME.CM]: {
|
|
41
|
+
["CM_PO"]: 0n,
|
|
42
|
+
["CM_PTO"]: 1n,
|
|
43
|
+
["CM_PGO"]: 2n,
|
|
44
|
+
["CM_DO"]: 3n,
|
|
45
|
+
["CM_EEO"]: 4n,
|
|
46
|
+
["CM_IODC"]: 5n,
|
|
47
|
+
["CM_IODCP"]: 6n
|
|
48
|
+
}
|
|
33
49
|
},
|
|
34
50
|
[_lidofinance_lido_ethereum_sdk.CHAINS.Hoodi]: {
|
|
35
|
-
[
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
[
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
51
|
+
[require_module_name.MODULE_NAME.CSM]: {
|
|
52
|
+
["CSM_DEF"]: 0n,
|
|
53
|
+
["CSM_LEA"]: 1n,
|
|
54
|
+
["CSM_ICS"]: 2n,
|
|
55
|
+
["CSM_IDVTC"]: 4n
|
|
56
|
+
},
|
|
57
|
+
[require_module_name.MODULE_NAME.CM]: {
|
|
58
|
+
["CM_PO"]: 0n,
|
|
59
|
+
["CM_PTO"]: 1n,
|
|
60
|
+
["CM_PGO"]: 2n,
|
|
61
|
+
["CM_DO"]: 3n,
|
|
62
|
+
["CM_EEO"]: 4n,
|
|
63
|
+
["CM_IODC"]: 5n,
|
|
64
|
+
["CM_IODCP"]: 6n
|
|
65
|
+
}
|
|
47
66
|
}
|
|
48
67
|
};
|
|
49
68
|
//#endregion
|
|
50
69
|
exports.OPERATOR_TYPE = OPERATOR_TYPE;
|
|
51
70
|
exports.OPERATOR_TYPE_CURVE_ID = OPERATOR_TYPE_CURVE_ID;
|
|
71
|
+
exports.OPERATOR_TYPE_MODULE = OPERATOR_TYPE_MODULE;
|
|
52
72
|
|
|
53
73
|
//# sourceMappingURL=operator-types.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operator-types.cjs","names":["OPERATOR_TYPE"],"sources":["../../../src/common/constants/operator-types.ts"],"sourcesContent":["import { CHAINS } from '@lidofinance/lido-ethereum-sdk';\nimport { PerSupportedChain } from './supported-chains';\n\nexport enum OPERATOR_TYPE {\n CSM_DEF = 'CSM_DEF',\n CSM_LEA = 'CSM_LEA',\n CSM_ICS = 'CSM_ICS',\n CSM_IDVTC = 'CSM_IDVTC',\n CM_PO = 'CM_PO',\n CM_PTO = 'CM_PTO',\n CM_PGO = 'CM_PGO',\n CM_DO = 'CM_DO',\n CM_EEO = 'CM_EEO',\n CM_IODC = 'CM_IODC',\n CM_IODCP = 'CM_IODCP',\n
|
|
1
|
+
{"version":3,"file":"operator-types.cjs","names":["OPERATOR_TYPE"],"sources":["../../../src/common/constants/operator-types.ts"],"sourcesContent":["import { CHAINS } from '@lidofinance/lido-ethereum-sdk';\nimport { PerSupportedChain } from './supported-chains';\nimport { MODULE_NAME, PerModule } from './module-name';\n\nexport enum OPERATOR_TYPE {\n CSM_DEF = 'CSM_DEF',\n CSM_LEA = 'CSM_LEA',\n CSM_ICS = 'CSM_ICS',\n CSM_IDVTC = 'CSM_IDVTC',\n CM_PO = 'CM_PO',\n CM_PTO = 'CM_PTO',\n CM_PGO = 'CM_PGO',\n CM_DO = 'CM_DO',\n CM_EEO = 'CM_EEO',\n CM_IODC = 'CM_IODC',\n CM_IODCP = 'CM_IODCP',\n}\n\nexport const OPERATOR_TYPE_MODULE: Record<OPERATOR_TYPE, MODULE_NAME> = {\n [OPERATOR_TYPE.CSM_DEF]: MODULE_NAME.CSM,\n [OPERATOR_TYPE.CSM_LEA]: MODULE_NAME.CSM,\n [OPERATOR_TYPE.CSM_ICS]: MODULE_NAME.CSM,\n [OPERATOR_TYPE.CSM_IDVTC]: MODULE_NAME.CSM,\n [OPERATOR_TYPE.CM_PO]: MODULE_NAME.CM,\n [OPERATOR_TYPE.CM_PTO]: MODULE_NAME.CM,\n [OPERATOR_TYPE.CM_PGO]: MODULE_NAME.CM,\n [OPERATOR_TYPE.CM_DO]: MODULE_NAME.CM,\n [OPERATOR_TYPE.CM_EEO]: MODULE_NAME.CM,\n [OPERATOR_TYPE.CM_IODC]: MODULE_NAME.CM,\n [OPERATOR_TYPE.CM_IODCP]: MODULE_NAME.CM,\n};\n\nexport const OPERATOR_TYPE_CURVE_ID: PerSupportedChain<\n PerModule<Partial<Record<OPERATOR_TYPE, bigint>>>\n> = {\n [CHAINS.Mainnet]: {\n [MODULE_NAME.CSM]: {\n [OPERATOR_TYPE.CSM_DEF]: 0n,\n [OPERATOR_TYPE.CSM_LEA]: 1n,\n [OPERATOR_TYPE.CSM_ICS]: 2n,\n [OPERATOR_TYPE.CSM_IDVTC]: 3n,\n },\n [MODULE_NAME.CM]: {\n [OPERATOR_TYPE.CM_PO]: 0n,\n [OPERATOR_TYPE.CM_PTO]: 1n,\n [OPERATOR_TYPE.CM_PGO]: 2n,\n [OPERATOR_TYPE.CM_DO]: 3n,\n [OPERATOR_TYPE.CM_EEO]: 4n,\n [OPERATOR_TYPE.CM_IODC]: 5n,\n [OPERATOR_TYPE.CM_IODCP]: 6n,\n },\n },\n [CHAINS.Hoodi]: {\n [MODULE_NAME.CSM]: {\n [OPERATOR_TYPE.CSM_DEF]: 0n,\n [OPERATOR_TYPE.CSM_LEA]: 1n,\n [OPERATOR_TYPE.CSM_ICS]: 2n,\n [OPERATOR_TYPE.CSM_IDVTC]: 4n,\n },\n [MODULE_NAME.CM]: {\n [OPERATOR_TYPE.CM_PO]: 0n,\n [OPERATOR_TYPE.CM_PTO]: 1n,\n [OPERATOR_TYPE.CM_PGO]: 2n,\n [OPERATOR_TYPE.CM_DO]: 3n,\n [OPERATOR_TYPE.CM_EEO]: 4n,\n [OPERATOR_TYPE.CM_IODC]: 5n,\n [OPERATOR_TYPE.CM_IODCP]: 6n,\n },\n },\n};\n"],"mappings":";;;;AAIO,IAAK,gBAAL,kBAAKA,mBAAL;AACLA,gBAAA,aAAU;AACVA,gBAAA,aAAU;AACVA,gBAAA,aAAU;AACVA,gBAAA,eAAY;AACZA,gBAAA,WAAQ;AACRA,gBAAA,YAAS;AACTA,gBAAA,YAAS;AACTA,gBAAA,WAAQ;AACRA,gBAAA,YAAS;AACTA,gBAAA,aAAU;AACVA,gBAAA,cAAW;AAXD,QAAAA;GAAA,iBAAA,EAAA,CAAA;AAcL,MAAM,uBAA2D;EACrE,YAAwB,oBAAA,YAAY;EACpC,YAAwB,oBAAA,YAAY;EACpC,YAAwB,oBAAA,YAAY;EACpC,cAA0B,oBAAA,YAAY;EACtC,UAAsB,oBAAA,YAAY;EAClC,WAAuB,oBAAA,YAAY;EACnC,WAAuB,oBAAA,YAAY;EACnC,UAAsB,oBAAA,YAAY;EAClC,WAAuB,oBAAA,YAAY;EACnC,YAAwB,oBAAA,YAAY;EACpC,aAAyB,oBAAA,YAAY;CACxC;AAEO,MAAM,yBAET;EACD,+BAAA,OAAO,UAAU;GACf,oBAAA,YAAY,MAAM;IAChB,YAAwB;IACxB,YAAwB;IACxB,YAAwB;IACxB,cAA0B;GAC7B;GACC,oBAAA,YAAY,KAAK;IACf,UAAsB;IACtB,WAAuB;IACvB,WAAuB;IACvB,UAAsB;IACtB,WAAuB;IACvB,YAAwB;IACxB,aAAyB;GAC5B;EACF;EACC,+BAAA,OAAO,QAAQ;GACb,oBAAA,YAAY,MAAM;IAChB,YAAwB;IACxB,YAAwB;IACxB,YAAwB;IACxB,cAA0B;GAC7B;GACC,oBAAA,YAAY,KAAK;IACf,UAAsB;IACtB,WAAuB;IACvB,WAAuB;IACvB,UAAsB;IACtB,WAAuB;IACvB,YAAwB;IACxB,aAAyB;GAC5B;EACF;CACF"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MODULE_NAME, PerModule } from "./module-name.cjs";
|
|
1
2
|
import { PerSupportedChain } from "./supported-chains.cjs";
|
|
2
3
|
|
|
3
4
|
//#region src/common/constants/operator-types.d.ts
|
|
@@ -12,10 +13,10 @@ declare enum OPERATOR_TYPE {
|
|
|
12
13
|
CM_DO = "CM_DO",
|
|
13
14
|
CM_EEO = "CM_EEO",
|
|
14
15
|
CM_IODC = "CM_IODC",
|
|
15
|
-
CM_IODCP = "CM_IODCP"
|
|
16
|
-
CC = "CC"
|
|
16
|
+
CM_IODCP = "CM_IODCP"
|
|
17
17
|
}
|
|
18
|
-
declare const
|
|
18
|
+
declare const OPERATOR_TYPE_MODULE: Record<OPERATOR_TYPE, MODULE_NAME>;
|
|
19
|
+
declare const OPERATOR_TYPE_CURVE_ID: PerSupportedChain<PerModule<Partial<Record<OPERATOR_TYPE, bigint>>>>;
|
|
19
20
|
//#endregion
|
|
20
|
-
export { OPERATOR_TYPE, OPERATOR_TYPE_CURVE_ID };
|
|
21
|
+
export { OPERATOR_TYPE, OPERATOR_TYPE_CURVE_ID, OPERATOR_TYPE_MODULE };
|
|
21
22
|
//# sourceMappingURL=operator-types.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operator-types.d.cts","names":[],"sources":["../../../src/common/constants/operator-types.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"operator-types.d.cts","names":[],"sources":["../../../src/common/constants/operator-types.ts"],"mappings":";;;;aAIY,aAAA;EACV,OAAA;EACA,OAAA;EACA,OAAA;EACA,SAAA;EACA,KAAA;EACA,MAAA;EACA,MAAA;EACA,KAAA;EACA,MAAA;EACA,OAAA;EACA,QAAA;AAAA;AAAA,cAGW,oBAAA,EAAsB,MAAA,CAAO,aAAA,EAAe,WAAA;AAAA,cAc5C,sBAAA,EAAwB,iBAAA,CACnC,SAAA,CAAU,OAAA,CAAQ,MAAA,CAAO,aAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MODULE_NAME, PerModule } from "./module-name.mjs";
|
|
1
2
|
import { PerSupportedChain } from "./supported-chains.mjs";
|
|
2
3
|
|
|
3
4
|
//#region src/common/constants/operator-types.d.ts
|
|
@@ -12,10 +13,10 @@ declare enum OPERATOR_TYPE {
|
|
|
12
13
|
CM_DO = "CM_DO",
|
|
13
14
|
CM_EEO = "CM_EEO",
|
|
14
15
|
CM_IODC = "CM_IODC",
|
|
15
|
-
CM_IODCP = "CM_IODCP"
|
|
16
|
-
CC = "CC"
|
|
16
|
+
CM_IODCP = "CM_IODCP"
|
|
17
17
|
}
|
|
18
|
-
declare const
|
|
18
|
+
declare const OPERATOR_TYPE_MODULE: Record<OPERATOR_TYPE, MODULE_NAME>;
|
|
19
|
+
declare const OPERATOR_TYPE_CURVE_ID: PerSupportedChain<PerModule<Partial<Record<OPERATOR_TYPE, bigint>>>>;
|
|
19
20
|
//#endregion
|
|
20
|
-
export { OPERATOR_TYPE, OPERATOR_TYPE_CURVE_ID };
|
|
21
|
+
export { OPERATOR_TYPE, OPERATOR_TYPE_CURVE_ID, OPERATOR_TYPE_MODULE };
|
|
21
22
|
//# sourceMappingURL=operator-types.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operator-types.d.mts","names":[],"sources":["../../../src/common/constants/operator-types.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"operator-types.d.mts","names":[],"sources":["../../../src/common/constants/operator-types.ts"],"mappings":";;;;aAIY,aAAA;EACV,OAAA;EACA,OAAA;EACA,OAAA;EACA,SAAA;EACA,KAAA;EACA,MAAA;EACA,MAAA;EACA,KAAA;EACA,MAAA;EACA,OAAA;EACA,QAAA;AAAA;AAAA,cAGW,oBAAA,EAAsB,MAAA,CAAO,aAAA,EAAe,WAAA;AAAA,cAc5C,sBAAA,EAAwB,iBAAA,CACnC,SAAA,CAAU,OAAA,CAAQ,MAAA,CAAO,aAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MODULE_NAME } from "./module-name.mjs";
|
|
1
2
|
import { CHAINS } from "@lidofinance/lido-ethereum-sdk";
|
|
2
3
|
//#region src/common/constants/operator-types.ts
|
|
3
4
|
var OPERATOR_TYPE = /* @__PURE__ */ ((OPERATOR_TYPE2) => {
|
|
@@ -12,40 +13,58 @@ var OPERATOR_TYPE = /* @__PURE__ */ ((OPERATOR_TYPE2) => {
|
|
|
12
13
|
OPERATOR_TYPE2["CM_EEO"] = "CM_EEO";
|
|
13
14
|
OPERATOR_TYPE2["CM_IODC"] = "CM_IODC";
|
|
14
15
|
OPERATOR_TYPE2["CM_IODCP"] = "CM_IODCP";
|
|
15
|
-
OPERATOR_TYPE2["CC"] = "CC";
|
|
16
16
|
return OPERATOR_TYPE2;
|
|
17
17
|
})(OPERATOR_TYPE || {});
|
|
18
|
+
const OPERATOR_TYPE_MODULE = {
|
|
19
|
+
["CSM_DEF"]: MODULE_NAME.CSM,
|
|
20
|
+
["CSM_LEA"]: MODULE_NAME.CSM,
|
|
21
|
+
["CSM_ICS"]: MODULE_NAME.CSM,
|
|
22
|
+
["CSM_IDVTC"]: MODULE_NAME.CSM,
|
|
23
|
+
["CM_PO"]: MODULE_NAME.CM,
|
|
24
|
+
["CM_PTO"]: MODULE_NAME.CM,
|
|
25
|
+
["CM_PGO"]: MODULE_NAME.CM,
|
|
26
|
+
["CM_DO"]: MODULE_NAME.CM,
|
|
27
|
+
["CM_EEO"]: MODULE_NAME.CM,
|
|
28
|
+
["CM_IODC"]: MODULE_NAME.CM,
|
|
29
|
+
["CM_IODCP"]: MODULE_NAME.CM
|
|
30
|
+
};
|
|
18
31
|
const OPERATOR_TYPE_CURVE_ID = {
|
|
19
32
|
[CHAINS.Mainnet]: {
|
|
20
|
-
[
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
[
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
[MODULE_NAME.CSM]: {
|
|
34
|
+
["CSM_DEF"]: 0n,
|
|
35
|
+
["CSM_LEA"]: 1n,
|
|
36
|
+
["CSM_ICS"]: 2n,
|
|
37
|
+
["CSM_IDVTC"]: 3n
|
|
38
|
+
},
|
|
39
|
+
[MODULE_NAME.CM]: {
|
|
40
|
+
["CM_PO"]: 0n,
|
|
41
|
+
["CM_PTO"]: 1n,
|
|
42
|
+
["CM_PGO"]: 2n,
|
|
43
|
+
["CM_DO"]: 3n,
|
|
44
|
+
["CM_EEO"]: 4n,
|
|
45
|
+
["CM_IODC"]: 5n,
|
|
46
|
+
["CM_IODCP"]: 6n
|
|
47
|
+
}
|
|
32
48
|
},
|
|
33
49
|
[CHAINS.Hoodi]: {
|
|
34
|
-
[
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
[
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
50
|
+
[MODULE_NAME.CSM]: {
|
|
51
|
+
["CSM_DEF"]: 0n,
|
|
52
|
+
["CSM_LEA"]: 1n,
|
|
53
|
+
["CSM_ICS"]: 2n,
|
|
54
|
+
["CSM_IDVTC"]: 4n
|
|
55
|
+
},
|
|
56
|
+
[MODULE_NAME.CM]: {
|
|
57
|
+
["CM_PO"]: 0n,
|
|
58
|
+
["CM_PTO"]: 1n,
|
|
59
|
+
["CM_PGO"]: 2n,
|
|
60
|
+
["CM_DO"]: 3n,
|
|
61
|
+
["CM_EEO"]: 4n,
|
|
62
|
+
["CM_IODC"]: 5n,
|
|
63
|
+
["CM_IODCP"]: 6n
|
|
64
|
+
}
|
|
46
65
|
}
|
|
47
66
|
};
|
|
48
67
|
//#endregion
|
|
49
|
-
export { OPERATOR_TYPE, OPERATOR_TYPE_CURVE_ID };
|
|
68
|
+
export { OPERATOR_TYPE, OPERATOR_TYPE_CURVE_ID, OPERATOR_TYPE_MODULE };
|
|
50
69
|
|
|
51
70
|
//# sourceMappingURL=operator-types.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operator-types.mjs","names":["OPERATOR_TYPE"],"sources":["../../../src/common/constants/operator-types.ts"],"sourcesContent":["import { CHAINS } from '@lidofinance/lido-ethereum-sdk';\nimport { PerSupportedChain } from './supported-chains';\n\nexport enum OPERATOR_TYPE {\n CSM_DEF = 'CSM_DEF',\n CSM_LEA = 'CSM_LEA',\n CSM_ICS = 'CSM_ICS',\n CSM_IDVTC = 'CSM_IDVTC',\n CM_PO = 'CM_PO',\n CM_PTO = 'CM_PTO',\n CM_PGO = 'CM_PGO',\n CM_DO = 'CM_DO',\n CM_EEO = 'CM_EEO',\n CM_IODC = 'CM_IODC',\n CM_IODCP = 'CM_IODCP',\n
|
|
1
|
+
{"version":3,"file":"operator-types.mjs","names":["OPERATOR_TYPE"],"sources":["../../../src/common/constants/operator-types.ts"],"sourcesContent":["import { CHAINS } from '@lidofinance/lido-ethereum-sdk';\nimport { PerSupportedChain } from './supported-chains';\nimport { MODULE_NAME, PerModule } from './module-name';\n\nexport enum OPERATOR_TYPE {\n CSM_DEF = 'CSM_DEF',\n CSM_LEA = 'CSM_LEA',\n CSM_ICS = 'CSM_ICS',\n CSM_IDVTC = 'CSM_IDVTC',\n CM_PO = 'CM_PO',\n CM_PTO = 'CM_PTO',\n CM_PGO = 'CM_PGO',\n CM_DO = 'CM_DO',\n CM_EEO = 'CM_EEO',\n CM_IODC = 'CM_IODC',\n CM_IODCP = 'CM_IODCP',\n}\n\nexport const OPERATOR_TYPE_MODULE: Record<OPERATOR_TYPE, MODULE_NAME> = {\n [OPERATOR_TYPE.CSM_DEF]: MODULE_NAME.CSM,\n [OPERATOR_TYPE.CSM_LEA]: MODULE_NAME.CSM,\n [OPERATOR_TYPE.CSM_ICS]: MODULE_NAME.CSM,\n [OPERATOR_TYPE.CSM_IDVTC]: MODULE_NAME.CSM,\n [OPERATOR_TYPE.CM_PO]: MODULE_NAME.CM,\n [OPERATOR_TYPE.CM_PTO]: MODULE_NAME.CM,\n [OPERATOR_TYPE.CM_PGO]: MODULE_NAME.CM,\n [OPERATOR_TYPE.CM_DO]: MODULE_NAME.CM,\n [OPERATOR_TYPE.CM_EEO]: MODULE_NAME.CM,\n [OPERATOR_TYPE.CM_IODC]: MODULE_NAME.CM,\n [OPERATOR_TYPE.CM_IODCP]: MODULE_NAME.CM,\n};\n\nexport const OPERATOR_TYPE_CURVE_ID: PerSupportedChain<\n PerModule<Partial<Record<OPERATOR_TYPE, bigint>>>\n> = {\n [CHAINS.Mainnet]: {\n [MODULE_NAME.CSM]: {\n [OPERATOR_TYPE.CSM_DEF]: 0n,\n [OPERATOR_TYPE.CSM_LEA]: 1n,\n [OPERATOR_TYPE.CSM_ICS]: 2n,\n [OPERATOR_TYPE.CSM_IDVTC]: 3n,\n },\n [MODULE_NAME.CM]: {\n [OPERATOR_TYPE.CM_PO]: 0n,\n [OPERATOR_TYPE.CM_PTO]: 1n,\n [OPERATOR_TYPE.CM_PGO]: 2n,\n [OPERATOR_TYPE.CM_DO]: 3n,\n [OPERATOR_TYPE.CM_EEO]: 4n,\n [OPERATOR_TYPE.CM_IODC]: 5n,\n [OPERATOR_TYPE.CM_IODCP]: 6n,\n },\n },\n [CHAINS.Hoodi]: {\n [MODULE_NAME.CSM]: {\n [OPERATOR_TYPE.CSM_DEF]: 0n,\n [OPERATOR_TYPE.CSM_LEA]: 1n,\n [OPERATOR_TYPE.CSM_ICS]: 2n,\n [OPERATOR_TYPE.CSM_IDVTC]: 4n,\n },\n [MODULE_NAME.CM]: {\n [OPERATOR_TYPE.CM_PO]: 0n,\n [OPERATOR_TYPE.CM_PTO]: 1n,\n [OPERATOR_TYPE.CM_PGO]: 2n,\n [OPERATOR_TYPE.CM_DO]: 3n,\n [OPERATOR_TYPE.CM_EEO]: 4n,\n [OPERATOR_TYPE.CM_IODC]: 5n,\n [OPERATOR_TYPE.CM_IODCP]: 6n,\n },\n },\n};\n"],"mappings":";;;AAIO,IAAK,gBAAL,kBAAKA,mBAAL;AACLA,gBAAA,aAAU;AACVA,gBAAA,aAAU;AACVA,gBAAA,aAAU;AACVA,gBAAA,eAAY;AACZA,gBAAA,WAAQ;AACRA,gBAAA,YAAS;AACTA,gBAAA,YAAS;AACTA,gBAAA,WAAQ;AACRA,gBAAA,YAAS;AACTA,gBAAA,aAAU;AACVA,gBAAA,cAAW;AAXD,QAAAA;GAAA,iBAAA,EAAA,CAAA;AAcL,MAAM,uBAA2D;EACrE,YAAwB,YAAY;EACpC,YAAwB,YAAY;EACpC,YAAwB,YAAY;EACpC,cAA0B,YAAY;EACtC,UAAsB,YAAY;EAClC,WAAuB,YAAY;EACnC,WAAuB,YAAY;EACnC,UAAsB,YAAY;EAClC,WAAuB,YAAY;EACnC,YAAwB,YAAY;EACpC,aAAyB,YAAY;CACxC;AAEO,MAAM,yBAET;EACD,OAAO,UAAU;GACf,YAAY,MAAM;IAChB,YAAwB;IACxB,YAAwB;IACxB,YAAwB;IACxB,cAA0B;GAC7B;GACC,YAAY,KAAK;IACf,UAAsB;IACtB,WAAuB;IACvB,WAAuB;IACvB,UAAsB;IACtB,WAAuB;IACvB,YAAwB;IACxB,aAAyB;GAC5B;EACF;EACC,OAAO,QAAQ;GACb,YAAY,MAAM;IAChB,YAAwB;IACxB,YAAwB;IACxB,YAAwB;IACxB,cAA0B;GAC7B;GACC,YAAY,KAAK;IACf,UAAsB;IACtB,WAAuB;IACvB,WAAuB;IACvB,UAAsB;IACtB,WAAuB;IACvB,YAAwB;IACxB,aAAyB;GAC5B;EACF;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supported-chains.cjs","names":[],"sources":["../../../src/common/constants/supported-chains.ts"],"sourcesContent":["import { CHAINS } from '@lidofinance/lido-ethereum-sdk';\n\nexport const SUPPORTED_CHAINS = [CHAINS.Mainnet, CHAINS.Hoodi];\nexport type SUPPORTED_CHAINS =
|
|
1
|
+
{"version":3,"file":"supported-chains.cjs","names":[],"sources":["../../../src/common/constants/supported-chains.ts"],"sourcesContent":["import { CHAINS } from '@lidofinance/lido-ethereum-sdk';\n\nexport const SUPPORTED_CHAINS = [CHAINS.Mainnet, CHAINS.Hoodi] as const;\nexport type SUPPORTED_CHAINS = (typeof SUPPORTED_CHAINS)[number];\n\nexport type PerSupportedChain<T> = {\n [key in SUPPORTED_CHAINS]: T;\n};\n"],"mappings":";;;AAEO,MAAM,mBAAmB,CAAC,+BAAA,OAAO,SAAS,+BAAA,OAAO,MAAK"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CHAINS } from "@lidofinance/lido-ethereum-sdk";
|
|
2
2
|
|
|
3
3
|
//#region src/common/constants/supported-chains.d.ts
|
|
4
|
-
declare const SUPPORTED_CHAINS: CHAINS
|
|
5
|
-
type SUPPORTED_CHAINS =
|
|
4
|
+
declare const SUPPORTED_CHAINS: readonly [CHAINS.Mainnet, CHAINS.Hoodi];
|
|
5
|
+
type SUPPORTED_CHAINS = (typeof SUPPORTED_CHAINS)[number];
|
|
6
6
|
type PerSupportedChain<T> = { [key in SUPPORTED_CHAINS]: T };
|
|
7
7
|
//#endregion
|
|
8
8
|
export { PerSupportedChain, SUPPORTED_CHAINS };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supported-chains.d.cts","names":[],"sources":["../../../src/common/constants/supported-chains.ts"],"mappings":";;;cAEa,gBAAA,
|
|
1
|
+
{"version":3,"file":"supported-chains.d.cts","names":[],"sources":["../../../src/common/constants/supported-chains.ts"],"mappings":";;;cAEa,gBAAA,YAAgB,MAAA,CAAA,OAAA,EAAA,MAAA,CAAA,KAAA;AAAA,KACjB,gBAAA,WAA2B,gBAAA;AAAA,KAE3B,iBAAA,gBACF,gBAAA,GAAmB,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CHAINS } from "@lidofinance/lido-ethereum-sdk";
|
|
2
2
|
|
|
3
3
|
//#region src/common/constants/supported-chains.d.ts
|
|
4
|
-
declare const SUPPORTED_CHAINS: CHAINS
|
|
5
|
-
type SUPPORTED_CHAINS =
|
|
4
|
+
declare const SUPPORTED_CHAINS: readonly [CHAINS.Mainnet, CHAINS.Hoodi];
|
|
5
|
+
type SUPPORTED_CHAINS = (typeof SUPPORTED_CHAINS)[number];
|
|
6
6
|
type PerSupportedChain<T> = { [key in SUPPORTED_CHAINS]: T };
|
|
7
7
|
//#endregion
|
|
8
8
|
export { PerSupportedChain, SUPPORTED_CHAINS };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supported-chains.d.mts","names":[],"sources":["../../../src/common/constants/supported-chains.ts"],"mappings":";;;cAEa,gBAAA,
|
|
1
|
+
{"version":3,"file":"supported-chains.d.mts","names":[],"sources":["../../../src/common/constants/supported-chains.ts"],"mappings":";;;cAEa,gBAAA,YAAgB,MAAA,CAAA,OAAA,EAAA,MAAA,CAAA,KAAA;AAAA,KACjB,gBAAA,WAA2B,gBAAA;AAAA,KAE3B,iBAAA,gBACF,gBAAA,GAAmB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supported-chains.mjs","names":[],"sources":["../../../src/common/constants/supported-chains.ts"],"sourcesContent":["import { CHAINS } from '@lidofinance/lido-ethereum-sdk';\n\nexport const SUPPORTED_CHAINS = [CHAINS.Mainnet, CHAINS.Hoodi];\nexport type SUPPORTED_CHAINS =
|
|
1
|
+
{"version":3,"file":"supported-chains.mjs","names":[],"sources":["../../../src/common/constants/supported-chains.ts"],"sourcesContent":["import { CHAINS } from '@lidofinance/lido-ethereum-sdk';\n\nexport const SUPPORTED_CHAINS = [CHAINS.Mainnet, CHAINS.Hoodi] as const;\nexport type SUPPORTED_CHAINS = (typeof SUPPORTED_CHAINS)[number];\n\nexport type PerSupportedChain<T> = {\n [key in SUPPORTED_CHAINS]: T;\n};\n"],"mappings":";;AAEO,MAAM,mBAAmB,CAAC,OAAO,SAAS,OAAO,MAAK"}
|
|
@@ -1,11 +1,28 @@
|
|
|
1
|
+
const require_module_name = require("../constants/module-name.cjs");
|
|
1
2
|
const require_operator_types = require("../constants/operator-types.cjs");
|
|
3
|
+
const require_supported_chains = require("../constants/supported-chains.cjs");
|
|
2
4
|
//#region src/common/utils/operator-type-utils.ts
|
|
5
|
+
const invertCurveIds = (curveIds) => {
|
|
6
|
+
const inverse = /* @__PURE__ */ new Map();
|
|
7
|
+
for (const operatorType of Object.values(require_operator_types.OPERATOR_TYPE)) {
|
|
8
|
+
const curveId = curveIds[operatorType];
|
|
9
|
+
if (curveId !== void 0) inverse.set(curveId, operatorType);
|
|
10
|
+
}
|
|
11
|
+
return inverse;
|
|
12
|
+
};
|
|
13
|
+
const CURVE_ID_OPERATOR_TYPE = require_supported_chains.SUPPORTED_CHAINS.reduce((byChain, chainId) => {
|
|
14
|
+
byChain[chainId] = Object.values(require_module_name.MODULE_NAME).reduce((byModule, moduleName) => {
|
|
15
|
+
byModule[moduleName] = invertCurveIds(require_operator_types.OPERATOR_TYPE_CURVE_ID[chainId][moduleName]);
|
|
16
|
+
return byModule;
|
|
17
|
+
}, {});
|
|
18
|
+
return byChain;
|
|
19
|
+
}, {});
|
|
3
20
|
const getCurveIdByOperatorType = (chainId, operatorType) => {
|
|
4
|
-
return require_operator_types.OPERATOR_TYPE_CURVE_ID[chainId][operatorType];
|
|
21
|
+
return require_operator_types.OPERATOR_TYPE_CURVE_ID[chainId][require_operator_types.OPERATOR_TYPE_MODULE[operatorType]][operatorType];
|
|
5
22
|
};
|
|
6
23
|
const getOperatorTypeByCurveId = (chainId, moduleName, curveId) => {
|
|
7
24
|
if (curveId === void 0) return void 0;
|
|
8
|
-
return
|
|
25
|
+
return CURVE_ID_OPERATOR_TYPE[chainId][moduleName].get(curveId);
|
|
9
26
|
};
|
|
10
27
|
//#endregion
|
|
11
28
|
exports.getCurveIdByOperatorType = getCurveIdByOperatorType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operator-type-utils.cjs","names":[],"sources":["../../../src/common/utils/operator-type-utils.ts"],"sourcesContent":["import {\n MODULE_NAME,\n OPERATOR_TYPE_CURVE_ID,\n
|
|
1
|
+
{"version":3,"file":"operator-type-utils.cjs","names":[],"sources":["../../../src/common/utils/operator-type-utils.ts"],"sourcesContent":["import {\n MODULE_NAME,\n OPERATOR_TYPE,\n OPERATOR_TYPE_CURVE_ID,\n OPERATOR_TYPE_MODULE,\n PerModule,\n PerSupportedChain,\n SUPPORTED_CHAINS,\n} from '../constants/index';\n\nconst invertCurveIds = (\n curveIds: Partial<Record<OPERATOR_TYPE, bigint>>,\n): ReadonlyMap<bigint, OPERATOR_TYPE> => {\n const inverse = new Map<bigint, OPERATOR_TYPE>();\n for (const operatorType of Object.values(OPERATOR_TYPE)) {\n const curveId = curveIds[operatorType];\n if (curveId !== undefined) {\n inverse.set(curveId, operatorType);\n }\n }\n return inverse;\n};\n\nconst CURVE_ID_OPERATOR_TYPE: PerSupportedChain<\n PerModule<ReadonlyMap<bigint, OPERATOR_TYPE>>\n> = SUPPORTED_CHAINS.reduce(\n (byChain, chainId) => {\n byChain[chainId] = Object.values(MODULE_NAME).reduce(\n (byModule, moduleName) => {\n byModule[moduleName] = invertCurveIds(\n OPERATOR_TYPE_CURVE_ID[chainId][moduleName],\n );\n return byModule;\n },\n {} as PerModule<ReadonlyMap<bigint, OPERATOR_TYPE>>,\n );\n return byChain;\n },\n {} as PerSupportedChain<PerModule<ReadonlyMap<bigint, OPERATOR_TYPE>>>,\n);\n\nexport const getCurveIdByOperatorType = (\n chainId: SUPPORTED_CHAINS,\n operatorType: OPERATOR_TYPE,\n): bigint | undefined => {\n return OPERATOR_TYPE_CURVE_ID[chainId][OPERATOR_TYPE_MODULE[operatorType]][\n operatorType\n ];\n};\n\nexport const getOperatorTypeByCurveId = (\n chainId: SUPPORTED_CHAINS,\n moduleName: MODULE_NAME,\n curveId: bigint | undefined,\n): OPERATOR_TYPE | undefined => {\n if (curveId === undefined) return undefined;\n return CURVE_ID_OPERATOR_TYPE[chainId][moduleName].get(curveId);\n};\n"],"mappings":";;;;AAUA,MAAM,kBACJ,aACuC;CACvC,MAAM,0BAAU,IAAI,KAA2B;AAC/C,MAAA,MAAW,gBAAgB,OAAO,OAAO,uBAAA,cAAa,EAAG;EACvD,MAAM,UAAU,SAAS;AACzB,MAAI,YAAY,KAAA,EACd,SAAQ,IAAI,SAAS,aAAY;;AAGrC,QAAO;;AAGT,MAAM,yBAEF,yBAAA,iBAAiB,QAClB,SAAS,YAAY;AACpB,SAAQ,WAAW,OAAO,OAAO,oBAAA,YAAW,CAAE,QAC3C,UAAU,eAAe;AACxB,WAAS,cAAc,eACrB,uBAAA,uBAAuB,SAAS,YAClC;AACA,SAAO;IAET,EAAC,CACH;AACA,QAAO;GAET,EAAC,CACH;AAEO,MAAM,4BACX,SACA,iBACuB;AACvB,QAAO,uBAAA,uBAAuB,SAAS,uBAAA,qBAAqB,eAC1D;;AAIG,MAAM,4BACX,SACA,YACA,YAC8B;AAC9B,KAAI,YAAY,KAAA,EAAW,QAAO,KAAA;AAClC,QAAO,uBAAuB,SAAS,YAAY,IAAI,QAAO"}
|
|
@@ -3,7 +3,7 @@ import { SUPPORTED_CHAINS } from "../constants/supported-chains.cjs";
|
|
|
3
3
|
import { OPERATOR_TYPE } from "../constants/operator-types.cjs";
|
|
4
4
|
//#region src/common/utils/operator-type-utils.d.ts
|
|
5
5
|
declare const getCurveIdByOperatorType: (chainId: SUPPORTED_CHAINS, operatorType: OPERATOR_TYPE) => bigint | undefined;
|
|
6
|
-
declare const getOperatorTypeByCurveId: (chainId: SUPPORTED_CHAINS, moduleName:
|
|
6
|
+
declare const getOperatorTypeByCurveId: (chainId: SUPPORTED_CHAINS, moduleName: MODULE_NAME, curveId: bigint | undefined) => OPERATOR_TYPE | undefined;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { getCurveIdByOperatorType, getOperatorTypeByCurveId };
|
|
9
9
|
//# sourceMappingURL=operator-type-utils.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operator-type-utils.d.cts","names":[],"sources":["../../../src/common/utils/operator-type-utils.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"operator-type-utils.d.cts","names":[],"sources":["../../../src/common/utils/operator-type-utils.ts"],"mappings":";;;;cAyCa,wBAAA,GACX,OAAA,EAAS,gBAAA,EACT,YAAA,EAAc,aAAA;AAAA,cAOH,wBAAA,GACX,OAAA,EAAS,gBAAA,EACT,UAAA,EAAY,WAAA,EACZ,OAAA,yBACC,aAAA"}
|
|
@@ -3,7 +3,7 @@ import { SUPPORTED_CHAINS } from "../constants/supported-chains.mjs";
|
|
|
3
3
|
import { OPERATOR_TYPE } from "../constants/operator-types.mjs";
|
|
4
4
|
//#region src/common/utils/operator-type-utils.d.ts
|
|
5
5
|
declare const getCurveIdByOperatorType: (chainId: SUPPORTED_CHAINS, operatorType: OPERATOR_TYPE) => bigint | undefined;
|
|
6
|
-
declare const getOperatorTypeByCurveId: (chainId: SUPPORTED_CHAINS, moduleName:
|
|
6
|
+
declare const getOperatorTypeByCurveId: (chainId: SUPPORTED_CHAINS, moduleName: MODULE_NAME, curveId: bigint | undefined) => OPERATOR_TYPE | undefined;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { getCurveIdByOperatorType, getOperatorTypeByCurveId };
|
|
9
9
|
//# sourceMappingURL=operator-type-utils.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operator-type-utils.d.mts","names":[],"sources":["../../../src/common/utils/operator-type-utils.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"operator-type-utils.d.mts","names":[],"sources":["../../../src/common/utils/operator-type-utils.ts"],"mappings":";;;;cAyCa,wBAAA,GACX,OAAA,EAAS,gBAAA,EACT,YAAA,EAAc,aAAA;AAAA,cAOH,wBAAA,GACX,OAAA,EAAS,gBAAA,EACT,UAAA,EAAY,WAAA,EACZ,OAAA,yBACC,aAAA"}
|
|
@@ -1,11 +1,28 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MODULE_NAME } from "../constants/module-name.mjs";
|
|
2
|
+
import { OPERATOR_TYPE, OPERATOR_TYPE_CURVE_ID, OPERATOR_TYPE_MODULE } from "../constants/operator-types.mjs";
|
|
3
|
+
import { SUPPORTED_CHAINS } from "../constants/supported-chains.mjs";
|
|
2
4
|
//#region src/common/utils/operator-type-utils.ts
|
|
5
|
+
const invertCurveIds = (curveIds) => {
|
|
6
|
+
const inverse = /* @__PURE__ */ new Map();
|
|
7
|
+
for (const operatorType of Object.values(OPERATOR_TYPE)) {
|
|
8
|
+
const curveId = curveIds[operatorType];
|
|
9
|
+
if (curveId !== void 0) inverse.set(curveId, operatorType);
|
|
10
|
+
}
|
|
11
|
+
return inverse;
|
|
12
|
+
};
|
|
13
|
+
const CURVE_ID_OPERATOR_TYPE = SUPPORTED_CHAINS.reduce((byChain, chainId) => {
|
|
14
|
+
byChain[chainId] = Object.values(MODULE_NAME).reduce((byModule, moduleName) => {
|
|
15
|
+
byModule[moduleName] = invertCurveIds(OPERATOR_TYPE_CURVE_ID[chainId][moduleName]);
|
|
16
|
+
return byModule;
|
|
17
|
+
}, {});
|
|
18
|
+
return byChain;
|
|
19
|
+
}, {});
|
|
3
20
|
const getCurveIdByOperatorType = (chainId, operatorType) => {
|
|
4
|
-
return OPERATOR_TYPE_CURVE_ID[chainId][operatorType];
|
|
21
|
+
return OPERATOR_TYPE_CURVE_ID[chainId][OPERATOR_TYPE_MODULE[operatorType]][operatorType];
|
|
5
22
|
};
|
|
6
23
|
const getOperatorTypeByCurveId = (chainId, moduleName, curveId) => {
|
|
7
24
|
if (curveId === void 0) return void 0;
|
|
8
|
-
return
|
|
25
|
+
return CURVE_ID_OPERATOR_TYPE[chainId][moduleName].get(curveId);
|
|
9
26
|
};
|
|
10
27
|
//#endregion
|
|
11
28
|
export { getCurveIdByOperatorType, getOperatorTypeByCurveId };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operator-type-utils.mjs","names":[],"sources":["../../../src/common/utils/operator-type-utils.ts"],"sourcesContent":["import {\n MODULE_NAME,\n OPERATOR_TYPE_CURVE_ID,\n
|
|
1
|
+
{"version":3,"file":"operator-type-utils.mjs","names":[],"sources":["../../../src/common/utils/operator-type-utils.ts"],"sourcesContent":["import {\n MODULE_NAME,\n OPERATOR_TYPE,\n OPERATOR_TYPE_CURVE_ID,\n OPERATOR_TYPE_MODULE,\n PerModule,\n PerSupportedChain,\n SUPPORTED_CHAINS,\n} from '../constants/index';\n\nconst invertCurveIds = (\n curveIds: Partial<Record<OPERATOR_TYPE, bigint>>,\n): ReadonlyMap<bigint, OPERATOR_TYPE> => {\n const inverse = new Map<bigint, OPERATOR_TYPE>();\n for (const operatorType of Object.values(OPERATOR_TYPE)) {\n const curveId = curveIds[operatorType];\n if (curveId !== undefined) {\n inverse.set(curveId, operatorType);\n }\n }\n return inverse;\n};\n\nconst CURVE_ID_OPERATOR_TYPE: PerSupportedChain<\n PerModule<ReadonlyMap<bigint, OPERATOR_TYPE>>\n> = SUPPORTED_CHAINS.reduce(\n (byChain, chainId) => {\n byChain[chainId] = Object.values(MODULE_NAME).reduce(\n (byModule, moduleName) => {\n byModule[moduleName] = invertCurveIds(\n OPERATOR_TYPE_CURVE_ID[chainId][moduleName],\n );\n return byModule;\n },\n {} as PerModule<ReadonlyMap<bigint, OPERATOR_TYPE>>,\n );\n return byChain;\n },\n {} as PerSupportedChain<PerModule<ReadonlyMap<bigint, OPERATOR_TYPE>>>,\n);\n\nexport const getCurveIdByOperatorType = (\n chainId: SUPPORTED_CHAINS,\n operatorType: OPERATOR_TYPE,\n): bigint | undefined => {\n return OPERATOR_TYPE_CURVE_ID[chainId][OPERATOR_TYPE_MODULE[operatorType]][\n operatorType\n ];\n};\n\nexport const getOperatorTypeByCurveId = (\n chainId: SUPPORTED_CHAINS,\n moduleName: MODULE_NAME,\n curveId: bigint | undefined,\n): OPERATOR_TYPE | undefined => {\n if (curveId === undefined) return undefined;\n return CURVE_ID_OPERATOR_TYPE[chainId][moduleName].get(curveId);\n};\n"],"mappings":";;;;AAUA,MAAM,kBACJ,aACuC;CACvC,MAAM,0BAAU,IAAI,KAA2B;AAC/C,MAAA,MAAW,gBAAgB,OAAO,OAAO,cAAa,EAAG;EACvD,MAAM,UAAU,SAAS;AACzB,MAAI,YAAY,KAAA,EACd,SAAQ,IAAI,SAAS,aAAY;;AAGrC,QAAO;;AAGT,MAAM,yBAEF,iBAAiB,QAClB,SAAS,YAAY;AACpB,SAAQ,WAAW,OAAO,OAAO,YAAW,CAAE,QAC3C,UAAU,eAAe;AACxB,WAAS,cAAc,eACrB,uBAAuB,SAAS,YAClC;AACA,SAAO;IAET,EAAC,CACH;AACA,QAAO;GAET,EAAC,CACH;AAEO,MAAM,4BACX,SACA,iBACuB;AACvB,QAAO,uBAAuB,SAAS,qBAAqB,eAC1D;;AAIG,MAAM,4BACX,SACA,YACA,YAC8B;AAC9B,KAAI,YAAY,KAAA,EAAW,QAAO,KAAA;AAClC,QAAO,uBAAuB,SAAS,YAAY,IAAI,QAAO"}
|
package/dist/common.cjs
CHANGED
|
@@ -70,6 +70,7 @@ exports.MODULE_CONTRACT = require_module_name.MODULE_CONTRACT;
|
|
|
70
70
|
exports.MODULE_NAME = require_module_name.MODULE_NAME;
|
|
71
71
|
exports.OPERATOR_TYPE = require_operator_types.OPERATOR_TYPE;
|
|
72
72
|
exports.OPERATOR_TYPE_CURVE_ID = require_operator_types.OPERATOR_TYPE_CURVE_ID;
|
|
73
|
+
exports.OPERATOR_TYPE_MODULE = require_operator_types.OPERATOR_TYPE_MODULE;
|
|
73
74
|
exports.PERCENT_BASIS = require_base.PERCENT_BASIS;
|
|
74
75
|
exports.PUBKEY_LENGTH_BYTES = require_keys.PUBKEY_LENGTH_BYTES;
|
|
75
76
|
exports.ROLES = require_roles.ROLES;
|