@gearbox-protocol/sdk 0.0.32 → 0.0.35

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,5 @@
1
+ import { BytesLike } from "ethers";
2
+ export interface MultiCall {
3
+ targetContract: string;
4
+ callData: BytesLike;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -18,6 +18,7 @@ export declare type PriceFeedData = {
18
18
  } | {
19
19
  type: OracleType.YEARN_TOKEN_ORACLE;
20
20
  token: SupportedTokens;
21
+ priceFeedKovan?: string;
21
22
  } | {
22
23
  type: OracleType.CURVE_LP_ORACLE;
23
24
  assets: Array<SupportedTokens>;
@@ -0,0 +1,19 @@
1
+ import { BigNumber } from "ethers";
2
+ import { CreditManagerData } from "./creditManager";
3
+ import { MultiCall } from "./multicall";
4
+ import { SupportedTokens } from "./token";
5
+ export interface Path {
6
+ calls: Array<MultiCall>;
7
+ balances: Record<SupportedTokens, BigNumber>;
8
+ usedTokens: Array<SupportedTokens>;
9
+ gasUsed: number;
10
+ pool: SupportedTokens;
11
+ creditManager: CreditManagerData;
12
+ getBestPath(p: Path): Promise<Path>;
13
+ }
14
+ export interface PathAsset {
15
+ getBestPath(p: Path): Promise<Path>;
16
+ }
17
+ export declare class ConnectorPathAsset implements PathAsset {
18
+ getBestPath(p: Path): Promise<Path>;
19
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConnectorPathAsset = void 0;
4
+ var ConnectorPathAsset = /** @class */ (function () {
5
+ function ConnectorPathAsset() {
6
+ }
7
+ ConnectorPathAsset.prototype.getBestPath = function (p) {
8
+ console.log(p);
9
+ throw new Error("Method not implemented.");
10
+ };
11
+ return ConnectorPathAsset;
12
+ }());
13
+ exports.ConnectorPathAsset = ConnectorPathAsset;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "0.0.32",
3
+ "version": "0.0.35",
4
4
  "description": "Gearbox SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -0,0 +1,6 @@
1
+ import { BytesLike } from "ethers";
2
+
3
+ export interface MultiCall {
4
+ targetContract: string,
5
+ callData: BytesLike
6
+ }
@@ -23,6 +23,7 @@ export type PriceFeedData =
23
23
  | {
24
24
  type: OracleType.YEARN_TOKEN_ORACLE;
25
25
  token: SupportedTokens;
26
+ priceFeedKovan?: string;
26
27
  }
27
28
  | {
28
29
  type: OracleType.CURVE_LP_ORACLE;
@@ -0,0 +1,26 @@
1
+ import { BigNumber } from "ethers";
2
+ import { CreditManagerData } from "./creditManager";
3
+ import { MultiCall } from "./multicall";
4
+ import { SupportedTokens } from "./token";
5
+
6
+ export interface Path {
7
+ calls: Array<MultiCall>;
8
+ balances: Record<SupportedTokens, BigNumber>;
9
+ usedTokens: Array<SupportedTokens>;
10
+ gasUsed: number;
11
+ pool: SupportedTokens;
12
+ creditManager: CreditManagerData;
13
+
14
+ getBestPath(p: Path): Promise<Path>;
15
+ }
16
+
17
+ export interface PathAsset {
18
+ getBestPath(p: Path): Promise<Path>;
19
+ }
20
+
21
+ export class ConnectorPathAsset implements PathAsset {
22
+ getBestPath(p: Path): Promise<Path> {
23
+ console.log(p);
24
+ throw new Error("Method not implemented.");
25
+ }
26
+ }