@galacticcouncil/sdk 0.0.1-beta.15 → 0.0.1-beta.17
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 -1
- 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/pool/lbp/lbpPool.d.ts +4 -1
- package/dist/types/pool/xyk/xykPool.d.ts +4 -1
- package/dist/types/types.d.ts +5 -4
- package/package.json +1 -1
|
@@ -12,10 +12,13 @@ export declare class LbpPool implements Pool {
|
|
|
12
12
|
address: string;
|
|
13
13
|
tradeFee: PoolFee;
|
|
14
14
|
tokens: WeightedPoolToken[];
|
|
15
|
+
maxInRatio: number;
|
|
16
|
+
maxOutRatio: number;
|
|
17
|
+
minTradingLimit: number;
|
|
15
18
|
repayFee: PoolFee;
|
|
16
19
|
repayFeeApply: boolean;
|
|
17
20
|
static fromPool(pool: PoolBase): LbpPool;
|
|
18
|
-
constructor(address: string, swapFee: PoolFee, tokens: WeightedPoolToken[], repayFee: PoolFee, repayFeeApply: boolean);
|
|
21
|
+
constructor(address: string, swapFee: PoolFee, tokens: WeightedPoolToken[], maxInRation: number, maxOutRatio: number, minTradeLimit: number, repayFee: PoolFee, repayFeeApply: boolean);
|
|
19
22
|
validPair(_tokenIn: string, _tokenOut: string): boolean;
|
|
20
23
|
parsePoolPair(tokenIn: string, tokenOut: string): WeightedPoolPair;
|
|
21
24
|
/**
|
|
@@ -5,8 +5,11 @@ export declare class XykPool implements Pool {
|
|
|
5
5
|
address: string;
|
|
6
6
|
tradeFee: PoolFee;
|
|
7
7
|
tokens: PoolToken[];
|
|
8
|
+
maxInRatio: number;
|
|
9
|
+
maxOutRatio: number;
|
|
10
|
+
minTradingLimit: number;
|
|
8
11
|
static fromPool(pool: PoolBase): XykPool;
|
|
9
|
-
constructor(address: string, swapFee: PoolFee, tokens: PoolToken[]);
|
|
12
|
+
constructor(address: string, swapFee: PoolFee, tokens: PoolToken[], maxInRation: number, maxOutRatio: number, minTradeLimit: number);
|
|
10
13
|
validPair(_tokenIn: string, _tokenOut: string): boolean;
|
|
11
14
|
parsePoolPair(tokenIn: string, tokenOut: string): PoolPair;
|
|
12
15
|
validateBuy(poolPair: PoolPair, amountOut: BigNumber): BuyTransfer;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -10,12 +10,9 @@ export declare enum PoolType {
|
|
|
10
10
|
Omni = "Omni"
|
|
11
11
|
}
|
|
12
12
|
export declare enum PoolError {
|
|
13
|
-
TradingLimitReached = "TradingLimitReached",
|
|
14
13
|
InsufficientTradingAmount = "InsufficientTradingAmount",
|
|
15
|
-
InsufficientBalance = "InsufficientBalance",
|
|
16
14
|
MaxInRatioExceeded = "MaxInRatioExceeded",
|
|
17
|
-
|
|
18
|
-
AssetAmountExceededLimit = "AssetAmountExceededLimit"
|
|
15
|
+
MaxOutRatioExceeded = "MaxOutRatioExceeded"
|
|
19
16
|
}
|
|
20
17
|
export interface PoolPair {
|
|
21
18
|
assetIn: string;
|
|
@@ -30,6 +27,9 @@ export declare type PoolBase = {
|
|
|
30
27
|
type: PoolType;
|
|
31
28
|
tradeFee: PoolFee;
|
|
32
29
|
tokens: PoolToken[];
|
|
30
|
+
maxInRatio: number;
|
|
31
|
+
maxOutRatio: number;
|
|
32
|
+
minTradingLimit: number;
|
|
33
33
|
repayFee?: PoolFee;
|
|
34
34
|
repayFeeApply?: boolean;
|
|
35
35
|
};
|
|
@@ -87,6 +87,7 @@ export declare type Swap = Hop & Humanizer & {
|
|
|
87
87
|
spotPrice: BigNumber;
|
|
88
88
|
tradeFeePct: number;
|
|
89
89
|
priceImpactPct: number;
|
|
90
|
+
errors: PoolError[];
|
|
90
91
|
};
|
|
91
92
|
export declare type SellSwap = Swap & PoolSell;
|
|
92
93
|
export declare type BuySwap = Swap & PoolBuy;
|