@gearbox-protocol/sdk 3.0.0-next.185 → 3.0.0-next.186
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/lib/apy/index.d.ts +6 -3
- package/lib/apy/index.js +20 -1
- package/package.json +1 -1
package/lib/apy/index.d.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { LPTokens, PartialRecord, SupportedToken } from "@gearbox-protocol/sdk-gov";
|
|
2
2
|
type AdditionalTokensWithAPY = Extract<SupportedToken, "STETH" | "rETH" | "osETH" | "cbETH" | "wstETH" | "sfrxETH">;
|
|
3
3
|
type AdditionalLPTokens = Extract<SupportedToken, "weETH" | "ezETH" | "sfrxETH" | "USDe" | "rsETH" | "rswETH" | "pufETH">;
|
|
4
|
-
|
|
4
|
+
type ExtraFarmTokens = AdditionalTokensWithAPY | AdditionalLPTokens;
|
|
5
|
+
export type LRTAndLSDTokens = Extract<ExtraFarmTokens, "weETH" | "rsETH" | "rswETH" | "pufETH" | "ezETH" | "STETH" | "wstETH" | "sfrxETH" | "osETH" | "cbETH" | "rETH">;
|
|
5
6
|
export type TokensWithAPY = LPTokens | AdditionalTokensWithAPY;
|
|
6
7
|
export type TokensWithApyRecord = PartialRecord<TokensWithAPY, number>;
|
|
8
|
+
export type AllLPTokens = LPTokens | ExtraFarmTokens;
|
|
9
|
+
export declare const isLRT_LSDToken: (t: unknown) => t is LRTAndLSDTokens;
|
|
10
|
+
export declare const isAdditionalLPToken: (t: unknown) => t is AdditionalLPTokens;
|
|
7
11
|
export declare const isAdditionalTokenWithAPY: (t: unknown) => t is AdditionalTokensWithAPY;
|
|
8
|
-
export declare const isExtraFarmToken: (t: unknown) =>
|
|
12
|
+
export declare const isExtraFarmToken: (t: unknown) => t is ExtraFarmTokens;
|
|
9
13
|
export declare const isTokenWithAPY: (t: unknown) => t is TokensWithAPY;
|
|
10
|
-
export type AllLPTokens = LPTokens | AdditionalLPTokens | AdditionalTokensWithAPY;
|
|
11
14
|
export declare const isFarmToken: (t: unknown) => t is AllLPTokens;
|
|
12
15
|
export * from "./convexAPY";
|
|
13
16
|
export * from "./curveAPY";
|
package/lib/apy/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.isFarmToken = exports.isTokenWithAPY = exports.isExtraFarmToken = exports.isAdditionalTokenWithAPY = exports.isAdditionalLPToken = void 0;
|
|
17
|
+
exports.isFarmToken = exports.isTokenWithAPY = exports.isExtraFarmToken = exports.isAdditionalTokenWithAPY = exports.isAdditionalLPToken = exports.isLRT_LSDToken = void 0;
|
|
18
18
|
const sdk_gov_1 = require("@gearbox-protocol/sdk-gov");
|
|
19
19
|
const ADDITIONAL_LP_TOKENS = {
|
|
20
20
|
weETH: true,
|
|
@@ -33,6 +33,25 @@ const TOKENS_WITH_APY = {
|
|
|
33
33
|
cbETH: true,
|
|
34
34
|
sfrxETH: true,
|
|
35
35
|
};
|
|
36
|
+
const LRT_LSD = {
|
|
37
|
+
weETH: true,
|
|
38
|
+
rsETH: true,
|
|
39
|
+
rswETH: true,
|
|
40
|
+
pufETH: true,
|
|
41
|
+
ezETH: true,
|
|
42
|
+
STETH: true,
|
|
43
|
+
wstETH: true,
|
|
44
|
+
sfrxETH: true,
|
|
45
|
+
osETH: true,
|
|
46
|
+
cbETH: true,
|
|
47
|
+
rETH: true,
|
|
48
|
+
};
|
|
49
|
+
const isLRT_LSDToken = (t) => {
|
|
50
|
+
if (typeof t !== "string")
|
|
51
|
+
return false;
|
|
52
|
+
return !!LRT_LSD[t];
|
|
53
|
+
};
|
|
54
|
+
exports.isLRT_LSDToken = isLRT_LSDToken;
|
|
36
55
|
const isAdditionalLPToken = (t) => {
|
|
37
56
|
if (typeof t !== "string")
|
|
38
57
|
return false;
|