@galacticcouncil/sdk 0.0.1-beta.10 → 0.0.1-beta.11
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/README.md +1 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +3 -3
- package/dist/index.js +1 -1
- package/dist/index.js.map +3 -3
- package/dist/types/api/tradeRouter.d.ts +17 -1
- package/dist/types/types.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
import { Router } from './router';
|
|
2
|
-
import { Trade } from '../types';
|
|
2
|
+
import { Trade, Amount } from '../types';
|
|
3
3
|
import { BigNumber } from '../utils/bignumber';
|
|
4
4
|
export declare class TradeRouter extends Router {
|
|
5
|
+
/**
|
|
6
|
+
* Calculate and return best possible spot price for tokenIn>tokenOut
|
|
7
|
+
*
|
|
8
|
+
* @param {string} tokenIn - Storage key of tokenIn
|
|
9
|
+
* @param {string} tokenOut - Storage key of tokenOut
|
|
10
|
+
* @return Best possible spot price of given token pair
|
|
11
|
+
*/
|
|
12
|
+
getBestSpotPrice(tokenIn: string, tokenOut: string): Promise<Amount>;
|
|
13
|
+
/**
|
|
14
|
+
* Calculate and return spot price for given path
|
|
15
|
+
*
|
|
16
|
+
* @param path - current path
|
|
17
|
+
* @param poolsMap - pools map
|
|
18
|
+
* @returns Spot price for given path
|
|
19
|
+
*/
|
|
20
|
+
private getSpotPrice;
|
|
5
21
|
/**
|
|
6
22
|
* Calculate and return best possible sell trade for tokenIn>tokenOut
|
|
7
23
|
*
|
package/dist/types/types.d.ts
CHANGED