@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.
- package/lib/core/multicall.d.ts +5 -0
- package/lib/core/multicall.js +2 -0
- package/lib/core/oracles.d.ts +1 -0
- package/lib/core/pathfinder.d.ts +19 -0
- package/lib/core/pathfinder.js +13 -0
- package/package.json +1 -1
- package/src/core/multicall.ts +6 -0
- package/src/core/oracles.ts +1 -0
- package/src/core/pathfinder.ts +26 -0
package/lib/core/oracles.d.ts
CHANGED
|
@@ -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
package/src/core/oracles.ts
CHANGED
|
@@ -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
|
+
}
|