@gearbox-protocol/sdk 8.16.1 → 8.17.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.
@@ -22,6 +22,7 @@ __export(chains_exports, {
22
22
  SUPPORTED_NETWORKS: () => SUPPORTED_NETWORKS,
23
23
  chains: () => chains,
24
24
  getChain: () => getChain,
25
+ getCuratorName: () => getCuratorName,
25
26
  getNetworkType: () => getNetworkType,
26
27
  isPublicNetwork: () => isPublicNetwork,
27
28
  isSupportedNetwork: () => isSupportedNetwork
@@ -254,7 +255,7 @@ const chains = {
254
255
  network: "Etherlink",
255
256
  defaultMarketConfigurators: {},
256
257
  testMarketConfigurators: {
257
- "0x8850dbdac3d249409ce7ae56c74481f8425df32d": "Re7"
258
+ "0x577424f0e6f50db668cc1bc76babb87e36732291": "Re7"
258
259
  },
259
260
  isPublic: false,
260
261
  wellKnownToken: {
@@ -324,12 +325,27 @@ function isPublicNetwork(networkOrChainId) {
324
325
  return c.id === Number(networkOrChainId) && c.isPublic;
325
326
  });
326
327
  }
328
+ function getCuratorName(marketConfigurator, network) {
329
+ const chainz = network ? [chains[network]] : Object.values(chains);
330
+ for (const c of chainz) {
331
+ for (const [a, curator] of Object.entries({
332
+ ...c.defaultMarketConfigurators,
333
+ ...c.testMarketConfigurators
334
+ })) {
335
+ if (a.toLowerCase() === marketConfigurator.toLowerCase()) {
336
+ return curator;
337
+ }
338
+ }
339
+ }
340
+ return void 0;
341
+ }
327
342
  // Annotate the CommonJS export names for ESM import in node:
328
343
  0 && (module.exports = {
329
344
  NetworkType,
330
345
  SUPPORTED_NETWORKS,
331
346
  chains,
332
347
  getChain,
348
+ getCuratorName,
333
349
  getNetworkType,
334
350
  isPublicNetwork,
335
351
  isSupportedNetwork
@@ -27,23 +27,23 @@ const HUMAN_READABLE_SYMBOLS = {
27
27
  dUSDC_eV3: "dUSDC.eV3",
28
28
  sdUSDC_eV3: "sdUSDC.eV3",
29
29
  sdWETHV3_OLD: "sdWETHV3 Old",
30
- PT_rsETH_26SEP2024: "p.rsETH(26.09.24)",
31
- PT_sUSDe_26DEC2024: "p.sUSDe(26.12.24)",
32
- PT_eETH_26DEC2024: "p.eETH(26.12.24)",
33
- PT_ezETH_26DEC2024: "p.ezETH(26.12.24)",
34
- PT_eBTC_26DEC2024: "p.eBTC(26.12.24)",
35
- PT_LBTC_27MAR2025: "p.LBTC(27.03.25)",
36
- PT_cornLBTC_26DEC2024: "p.c.LBTC(26.12.24)",
37
- PT_corn_eBTC_27MAR2025: "p.c.eBTC(27.03.25)",
38
- PT_corn_pumpBTC_26DEC2024: "p.c.pumpBTC(26.12.24)",
39
- PT_sUSDe_27MAR2025: "p.sUSDe(27.03.25)",
40
- PT_sUSDe_29MAY2025: "p.sUSDe(29.05.25)",
41
- PT_beraSTONE_10APR2025: "p.beraSTONE(10.04.25)",
42
- PT_uptBTC_14AUG2025: "p.uptBTC(14.08.25)",
43
- PT_sUSDX_1SEP2025: "p.sUSDX(1.09.25)",
44
- PT_sUSDf_25SEP2025: "p.sUSDf(1.09.25)",
45
- PT_USDf_29JAN2026: "p.USDf(29.01.26)",
46
- ["PT-wstUSR-25SEP2025"]: "p.wstUSR(25.09.25)"
30
+ PT_rsETH_26SEP2024: "pt.rsETH(26.09.24)",
31
+ PT_sUSDe_26DEC2024: "pt.sUSDe(26.12.24)",
32
+ PT_eETH_26DEC2024: "pt.eETH(26.12.24)",
33
+ PT_ezETH_26DEC2024: "pt.ezETH(26.12.24)",
34
+ PT_eBTC_26DEC2024: "pt.eBTC(26.12.24)",
35
+ PT_LBTC_27MAR2025: "pt.LBTC(27.03.25)",
36
+ PT_cornLBTC_26DEC2024: "pt.c.LBTC(26.12.24)",
37
+ PT_corn_eBTC_27MAR2025: "pt.c.eBTC(27.03.25)",
38
+ PT_corn_pumpBTC_26DEC2024: "pt.c.pumpBTC(26.12.24)",
39
+ PT_sUSDe_27MAR2025: "pt.sUSDe(27.03.25)",
40
+ PT_sUSDe_29MAY2025: "pt.sUSDe(29.05.25)",
41
+ PT_beraSTONE_10APR2025: "pt.beraSTONE(10.04.25)",
42
+ PT_uptBTC_14AUG2025: "pt.uptBTC(14.08.25)",
43
+ PT_sUSDX_1SEP2025: "pt.sUSDX(1.09.25)",
44
+ PT_sUSDf_25SEP2025: "pt.sUSDf(1.09.25)",
45
+ PT_USDf_29JAN2026: "pt.USDf(29.01.26)",
46
+ ["PT-wstUSR-25SEP2025"]: "pt.wstUSR(25.09.25)"
47
47
  };
48
48
  class TokenData {
49
49
  address;
@@ -240,7 +240,7 @@ const chains = {
240
240
  network: "Etherlink",
241
241
  defaultMarketConfigurators: {},
242
242
  testMarketConfigurators: {
243
- "0x8850dbdac3d249409ce7ae56c74481f8425df32d": "Re7"
243
+ "0x577424f0e6f50db668cc1bc76babb87e36732291": "Re7"
244
244
  },
245
245
  isPublic: false,
246
246
  wellKnownToken: {
@@ -310,11 +310,26 @@ function isPublicNetwork(networkOrChainId) {
310
310
  return c.id === Number(networkOrChainId) && c.isPublic;
311
311
  });
312
312
  }
313
+ function getCuratorName(marketConfigurator, network) {
314
+ const chainz = network ? [chains[network]] : Object.values(chains);
315
+ for (const c of chainz) {
316
+ for (const [a, curator] of Object.entries({
317
+ ...c.defaultMarketConfigurators,
318
+ ...c.testMarketConfigurators
319
+ })) {
320
+ if (a.toLowerCase() === marketConfigurator.toLowerCase()) {
321
+ return curator;
322
+ }
323
+ }
324
+ }
325
+ return void 0;
326
+ }
313
327
  export {
314
328
  NetworkType,
315
329
  SUPPORTED_NETWORKS,
316
330
  chains,
317
331
  getChain,
332
+ getCuratorName,
318
333
  getNetworkType,
319
334
  isPublicNetwork,
320
335
  isSupportedNetwork
@@ -4,23 +4,23 @@ const HUMAN_READABLE_SYMBOLS = {
4
4
  dUSDC_eV3: "dUSDC.eV3",
5
5
  sdUSDC_eV3: "sdUSDC.eV3",
6
6
  sdWETHV3_OLD: "sdWETHV3 Old",
7
- PT_rsETH_26SEP2024: "p.rsETH(26.09.24)",
8
- PT_sUSDe_26DEC2024: "p.sUSDe(26.12.24)",
9
- PT_eETH_26DEC2024: "p.eETH(26.12.24)",
10
- PT_ezETH_26DEC2024: "p.ezETH(26.12.24)",
11
- PT_eBTC_26DEC2024: "p.eBTC(26.12.24)",
12
- PT_LBTC_27MAR2025: "p.LBTC(27.03.25)",
13
- PT_cornLBTC_26DEC2024: "p.c.LBTC(26.12.24)",
14
- PT_corn_eBTC_27MAR2025: "p.c.eBTC(27.03.25)",
15
- PT_corn_pumpBTC_26DEC2024: "p.c.pumpBTC(26.12.24)",
16
- PT_sUSDe_27MAR2025: "p.sUSDe(27.03.25)",
17
- PT_sUSDe_29MAY2025: "p.sUSDe(29.05.25)",
18
- PT_beraSTONE_10APR2025: "p.beraSTONE(10.04.25)",
19
- PT_uptBTC_14AUG2025: "p.uptBTC(14.08.25)",
20
- PT_sUSDX_1SEP2025: "p.sUSDX(1.09.25)",
21
- PT_sUSDf_25SEP2025: "p.sUSDf(1.09.25)",
22
- PT_USDf_29JAN2026: "p.USDf(29.01.26)",
23
- ["PT-wstUSR-25SEP2025"]: "p.wstUSR(25.09.25)"
7
+ PT_rsETH_26SEP2024: "pt.rsETH(26.09.24)",
8
+ PT_sUSDe_26DEC2024: "pt.sUSDe(26.12.24)",
9
+ PT_eETH_26DEC2024: "pt.eETH(26.12.24)",
10
+ PT_ezETH_26DEC2024: "pt.ezETH(26.12.24)",
11
+ PT_eBTC_26DEC2024: "pt.eBTC(26.12.24)",
12
+ PT_LBTC_27MAR2025: "pt.LBTC(27.03.25)",
13
+ PT_cornLBTC_26DEC2024: "pt.c.LBTC(26.12.24)",
14
+ PT_corn_eBTC_27MAR2025: "pt.c.eBTC(27.03.25)",
15
+ PT_corn_pumpBTC_26DEC2024: "pt.c.pumpBTC(26.12.24)",
16
+ PT_sUSDe_27MAR2025: "pt.sUSDe(27.03.25)",
17
+ PT_sUSDe_29MAY2025: "pt.sUSDe(29.05.25)",
18
+ PT_beraSTONE_10APR2025: "pt.beraSTONE(10.04.25)",
19
+ PT_uptBTC_14AUG2025: "pt.uptBTC(14.08.25)",
20
+ PT_sUSDX_1SEP2025: "pt.sUSDX(1.09.25)",
21
+ PT_sUSDf_25SEP2025: "pt.sUSDf(1.09.25)",
22
+ PT_USDf_29JAN2026: "pt.USDf(29.01.26)",
23
+ ["PT-wstUSR-25SEP2025"]: "pt.wstUSR(25.09.25)"
24
24
  };
25
25
  class TokenData {
26
26
  address;
@@ -50,3 +50,10 @@ export declare function getChain(chainIdOrNetworkType: number | bigint | Network
50
50
  export declare function getNetworkType(chainId: number | bigint): NetworkType;
51
51
  export declare function isSupportedNetwork(chainId: number | undefined): chainId is number;
52
52
  export declare function isPublicNetwork(networkOrChainId: NetworkType | number | bigint): boolean;
53
+ /**
54
+ * Tries to find curator name by market configurator address among all default and test market configurators
55
+ * @param marketConfigurator
56
+ * @param network
57
+ * @returns
58
+ */
59
+ export declare function getCuratorName(marketConfigurator: Address, network?: NetworkType): string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "8.16.1",
3
+ "version": "8.17.0",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/sdk/index.js",