@gearbox-protocol/sdk 3.0.0-next.221 → 3.0.0-next.223

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.
@@ -0,0 +1,9 @@
1
+ import { Protocols } from "@gearbox-protocol/sdk-gov";
2
+ interface ProtocolData {
3
+ name: string;
4
+ icon: string;
5
+ }
6
+ export type ExtendedProtocols = keyof typeof Protocols | "Stakewise" | "Etherfi" | "Rocketpool" | "Renzo" | "Coinbase" | "Kelp" | "Swell" | "Puffer" | "Mellow" | "Lombard";
7
+ export declare const isExtendedProtocol: (t: unknown) => t is ExtendedProtocols;
8
+ export declare function getProtocolData(t: string): ProtocolData;
9
+ export {};
@@ -0,0 +1,141 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getProtocolData = exports.isExtendedProtocol = void 0;
4
+ const PROTOCOL_DATA = {
5
+ Uniswap: {
6
+ name: "Uniswap",
7
+ icon: "/protocols/uniswap.png",
8
+ },
9
+ Sushiswap: {
10
+ name: "Sushiswap",
11
+ icon: "/protocols/sushi.svg",
12
+ },
13
+ Curve: {
14
+ name: "Curve",
15
+ icon: "/protocols/curve.svg",
16
+ },
17
+ Yearn: {
18
+ name: "Yearn",
19
+ icon: "/protocols/yearn.svg",
20
+ },
21
+ Convex: {
22
+ name: "Convex",
23
+ icon: "/protocols/convex.svg",
24
+ },
25
+ Lido: {
26
+ name: "Lido",
27
+ icon: "/protocols/lido.svg",
28
+ },
29
+ Gearbox: {
30
+ name: "Gearbox",
31
+ icon: "/protocols/gearbox.svg",
32
+ },
33
+ Balancer: {
34
+ name: "Balancer",
35
+ icon: "/protocols/balancer.svg",
36
+ },
37
+ AaveV2: {
38
+ name: "Aave V2",
39
+ icon: "/protocols/aavev2.svg",
40
+ },
41
+ CompoundV2: {
42
+ name: "Compound V2",
43
+ icon: "/protocols/compoundv2.svg",
44
+ },
45
+ Flux: {
46
+ name: "Flux",
47
+ icon: "/protocols/flux.svg",
48
+ },
49
+ Aura: {
50
+ name: "Aura",
51
+ icon: "/protocols/aura.svg",
52
+ },
53
+ MakerDSR: {
54
+ name: "MakerDSR",
55
+ icon: "/protocols/maker.svg",
56
+ },
57
+ Sommelier: {
58
+ name: "Sommelier",
59
+ icon: "/protocols/sommelier.svg",
60
+ },
61
+ Fraxswap: {
62
+ name: "Fraxswap",
63
+ icon: "/protocols/fraxswap.svg",
64
+ },
65
+ Stakewise: {
66
+ name: "Stakewise",
67
+ icon: "/protocols/stakewise.svg",
68
+ },
69
+ Rocketpool: {
70
+ name: "Rocketpool",
71
+ icon: "/protocols/rocketpool.svg",
72
+ },
73
+ Etherfi: {
74
+ name: "Ether.fi",
75
+ icon: "/protocols/etherfi.svg",
76
+ },
77
+ Renzo: {
78
+ name: "Renzo",
79
+ icon: "/protocols/renzo.svg",
80
+ },
81
+ Coinbase: {
82
+ name: "Coinbase",
83
+ icon: "/protocols/coinbase.svg",
84
+ },
85
+ Camelot: {
86
+ name: "Camelot",
87
+ icon: "/protocols/camelot.svg",
88
+ },
89
+ Ethena: {
90
+ name: "Ethena",
91
+ icon: "/protocols/ethena.svg",
92
+ },
93
+ Velodrome: {
94
+ name: "Velodrome",
95
+ icon: "/protocols/velodrome.svg",
96
+ },
97
+ AaveV3: {
98
+ name: "Aave V3",
99
+ icon: "/protocols/aavev3.svg",
100
+ },
101
+ Kelp: {
102
+ name: "Kelp",
103
+ icon: "/protocols/kelp.svg",
104
+ },
105
+ Pancakeswap: {
106
+ name: "Pancakeswap",
107
+ icon: "/protocols/pancakeswap.svg",
108
+ },
109
+ Swell: {
110
+ name: "Swell",
111
+ icon: "/protocols/swell.svg",
112
+ },
113
+ Puffer: {
114
+ name: "Puffer",
115
+ icon: "/protocols/puffer.svg",
116
+ },
117
+ Zircuit: {
118
+ name: "Zircuit",
119
+ icon: "/protocols/zircuit.svg",
120
+ },
121
+ Mellow: {
122
+ name: "Mellow",
123
+ icon: "/protocols/mellow.svg",
124
+ },
125
+ Pendle: {
126
+ name: "Pendle",
127
+ icon: "/protocols/pendle.svg",
128
+ },
129
+ Lombard: {
130
+ name: "Lombard",
131
+ icon: "/protocols/lombard.svg",
132
+ },
133
+ };
134
+ const isExtendedProtocol = (t) => typeof t === "string" && !!PROTOCOL_DATA[t];
135
+ exports.isExtendedProtocol = isExtendedProtocol;
136
+ function getProtocolData(t) {
137
+ return (0, exports.isExtendedProtocol)(t)
138
+ ? PROTOCOL_DATA[t]
139
+ : { name: "unknown", icon: "" };
140
+ }
141
+ exports.getProtocolData = getProtocolData;
package/lib/index.d.ts CHANGED
@@ -11,6 +11,7 @@ export * from "./core/events";
11
11
  export * from "./core/gauge";
12
12
  export * from "./core/gaugeMath";
13
13
  export * from "./core/pool";
14
+ export * from "./core/protocols";
14
15
  export * from "./core/rewardClaimer";
15
16
  export * from "./core/strategy";
16
17
  export * from "./core/tokenDistributor";
package/lib/index.js CHANGED
@@ -27,6 +27,7 @@ __exportStar(require("./core/events"), exports);
27
27
  __exportStar(require("./core/gauge"), exports);
28
28
  __exportStar(require("./core/gaugeMath"), exports);
29
29
  __exportStar(require("./core/pool"), exports);
30
+ __exportStar(require("./core/protocols"), exports);
30
31
  __exportStar(require("./core/rewardClaimer"), exports);
31
32
  __exportStar(require("./core/strategy"), exports);
32
33
  __exportStar(require("./core/tokenDistributor"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "3.0.0-next.221",
3
+ "version": "3.0.0-next.223",
4
4
  "description": "Gearbox SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@gearbox-protocol/bots-v3": "^1.5.1",
32
- "@gearbox-protocol/sdk-gov": "^2.18.3",
32
+ "@gearbox-protocol/sdk-gov": "^2.18.5",
33
33
  "@wagmi/cli": "^2.1.13",
34
34
  "axios": "^1.2.6",
35
35
  "decimal.js-light": "^2.5.1",