@curvefi/api 1.4.2 → 1.5.0
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/constants/abis/json/busd/swap.json +1 -2
- package/lib/constants/abis/json/compound/swap.json +1 -2
- package/lib/constants/abis/json/iearn/swap.json +1 -2
- package/lib/constants/abis/json/pax/swap.json +1 -2
- package/lib/constants/abis/json/ren/swap.json +1 -2
- package/lib/constants/abis/json/sbtc/swap.json +1 -2
- package/lib/constants/abis/json/susdv2/swap.json +1 -2
- package/lib/constants/abis/json/usdt/swap.json +1 -2
- package/lib/pools.d.ts +41 -1
- package/lib/pools.js +660 -235
- package/package.json +1 -1
package/lib/pools.d.ts
CHANGED
|
@@ -18,47 +18,77 @@ export declare class Pool {
|
|
|
18
18
|
basePool: string;
|
|
19
19
|
isFactory: boolean;
|
|
20
20
|
estimateGas: {
|
|
21
|
+
addLiquidityApprove: (amounts: string[]) => Promise<number>;
|
|
21
22
|
addLiquidity: (amounts: string[]) => Promise<number>;
|
|
23
|
+
addLiquidityWrappedApprove: (amounts: string[]) => Promise<number>;
|
|
22
24
|
addLiquidityWrapped: (amounts: string[]) => Promise<number>;
|
|
25
|
+
gaugeDepositApprove: (lpTokenAmount: string) => Promise<number>;
|
|
23
26
|
gaugeDeposit: (lpTokenAmount: string) => Promise<number>;
|
|
24
27
|
gaugeWithdraw: (lpTokenAmount: string) => Promise<number>;
|
|
28
|
+
removeLiquidityApprove: (lpTokenAmount: string) => Promise<number>;
|
|
25
29
|
removeLiquidity: (lpTokenAmount: string) => Promise<number>;
|
|
26
30
|
removeLiquidityWrapped: (lpTokenAmount: string) => Promise<number>;
|
|
31
|
+
removeLiquidityImbalanceApprove: (amounts: string[]) => Promise<number>;
|
|
27
32
|
removeLiquidityImbalance: (amounts: string[]) => Promise<number>;
|
|
28
33
|
removeLiquidityImbalanceWrapped: (amounts: string[]) => Promise<number>;
|
|
34
|
+
removeLiquidityOneCoinApprove: (lpTokenAmount: string, coin: string | number) => Promise<number>;
|
|
29
35
|
removeLiquidityOneCoin: (lpTokenAmount: string, coin: string | number) => Promise<number>;
|
|
30
36
|
removeLiquidityOneCoinWrapped: (lpTokenAmount: string, coin: string | number) => Promise<number>;
|
|
37
|
+
exchangeApprove: (inputCoin: string | number, amount: string) => Promise<number>;
|
|
31
38
|
exchange: (inputCoin: string | number, outputCoin: string | number, amount: string, maxSlippage: number) => Promise<number>;
|
|
32
|
-
|
|
39
|
+
exchangeTricryptoApprove: (inputCoin: string | number, amount: string, useEth?: boolean) => Promise<number>;
|
|
40
|
+
exchangeTricrypto: (inputCoin: string | number, outputCoin: string | number, amount: string, maxSlippage: number, useEth?: boolean) => Promise<number>;
|
|
41
|
+
exchangeWrappedApprove: (inputCoin: string | number, amount: string) => Promise<number>;
|
|
33
42
|
exchangeWrapped: (inputCoin: string | number, outputCoin: string | number, amount: string, maxSlippage: number) => Promise<number>;
|
|
34
43
|
};
|
|
35
44
|
constructor(name: string);
|
|
36
45
|
calcLpTokenAmount: (amounts: string[], isDeposit?: boolean) => Promise<string>;
|
|
37
46
|
calcLpTokenAmountWrapped: (amounts: string[], isDeposit?: boolean) => Promise<string>;
|
|
47
|
+
getVirtualPrice: () => Promise<string>;
|
|
38
48
|
addLiquidityExpected: (amounts: string[]) => Promise<string>;
|
|
49
|
+
addLiquidityIsApproved: (amounts: string[]) => Promise<boolean>;
|
|
50
|
+
private addLiquidityApproveEstimateGas;
|
|
51
|
+
addLiquidityApprove: (amounts: string[]) => Promise<string[]>;
|
|
39
52
|
private addLiquidityEstimateGas;
|
|
53
|
+
balancedAmounts: () => Promise<string[]>;
|
|
40
54
|
addLiquidity: (amounts: string[]) => Promise<string>;
|
|
55
|
+
balancedWrappedAmounts: (address?: string | undefined) => Promise<string[]>;
|
|
41
56
|
addLiquidityWrappedExpected: (amounts: string[]) => Promise<string>;
|
|
57
|
+
addLiquidityWrappedIsApproved: (amounts: string[]) => Promise<boolean>;
|
|
58
|
+
private addLiquidityWrappedApproveEstimateGas;
|
|
59
|
+
addLiquidityWrappedApprove: (amounts: string[]) => Promise<string[]>;
|
|
42
60
|
private addLiquidityWrappedEstimateGas;
|
|
43
61
|
addLiquidityWrapped: (amounts: string[]) => Promise<string>;
|
|
44
62
|
removeLiquidityExpected: (lpTokenAmount: string) => Promise<string[]>;
|
|
63
|
+
removeLiquidityIsApproved: (lpTokenAmount: string) => Promise<boolean>;
|
|
64
|
+
private removeLiquidityApproveEstimateGas;
|
|
65
|
+
removeLiquidityApprove: (lpTokenAmount: string) => Promise<string[]>;
|
|
45
66
|
private removeLiquidityEstimateGas;
|
|
46
67
|
removeLiquidity: (lpTokenAmount: string) => Promise<string>;
|
|
47
68
|
removeLiquidityWrappedExpected: (lpTokenAmount: string) => Promise<string[]>;
|
|
48
69
|
private removeLiquidityWrappedEstimateGas;
|
|
49
70
|
removeLiquidityWrapped: (lpTokenAmount: string) => Promise<string>;
|
|
50
71
|
removeLiquidityImbalanceExpected: (amounts: string[]) => Promise<string>;
|
|
72
|
+
removeLiquidityImbalanceIsApproved: (amounts: string[]) => Promise<boolean>;
|
|
73
|
+
private removeLiquidityImbalanceApproveEstimateGas;
|
|
74
|
+
removeLiquidityImbalanceApprove: (amounts: string[]) => Promise<string[]>;
|
|
51
75
|
private removeLiquidityImbalanceEstimateGas;
|
|
52
76
|
removeLiquidityImbalance: (amounts: string[]) => Promise<string>;
|
|
53
77
|
removeLiquidityImbalanceWrappedExpected: (amounts: string[]) => Promise<string>;
|
|
54
78
|
private removeLiquidityImbalanceWrappedEstimateGas;
|
|
55
79
|
removeLiquidityImbalanceWrapped: (amounts: string[], estimateGas?: boolean) => Promise<string | number>;
|
|
56
80
|
removeLiquidityOneCoinExpected: (lpTokenAmount: string, coin: string | number) => Promise<string>;
|
|
81
|
+
removeLiquidityOneCoinIsApproved: (lpTokenAmount: string) => Promise<boolean>;
|
|
82
|
+
private removeLiquidityOneCoinApproveEstimateGas;
|
|
83
|
+
removeLiquidityOneCoinApprove: (lpTokenAmount: string) => Promise<string[]>;
|
|
57
84
|
private removeLiquidityOneCoinEstimateGas;
|
|
58
85
|
removeLiquidityOneCoin: (lpTokenAmount: string, coin: string | number) => Promise<string>;
|
|
59
86
|
removeLiquidityOneCoinWrappedExpected: (lpTokenAmount: string, coin: string | number) => Promise<string>;
|
|
60
87
|
private removeLiquidityOneCoinWrappedEstimateGas;
|
|
61
88
|
removeLiquidityOneCoinWrapped: (lpTokenAmount: string, coin: string | number) => Promise<string>;
|
|
89
|
+
gaugeDepositIsApproved: (lpTokenAmount: string) => Promise<boolean>;
|
|
90
|
+
private gaugeDepositApproveEstimateGas;
|
|
91
|
+
gaugeDepositApprove: (lpTokenAmount: string) => Promise<string[]>;
|
|
62
92
|
private gaugeDepositEstimateGas;
|
|
63
93
|
gaugeDeposit: (lpTokenAmount: string) => Promise<string>;
|
|
64
94
|
private gaugeWithdrawEstimateGas;
|
|
@@ -69,11 +99,20 @@ export declare class Pool {
|
|
|
69
99
|
coinBalances: (...addresses: string[] | string[][]) => Promise<DictInterface<DictInterface<string>> | DictInterface<string>>;
|
|
70
100
|
allCoinBalances: (...addresses: string[] | string[][]) => Promise<DictInterface<DictInterface<string>> | DictInterface<string>>;
|
|
71
101
|
exchangeExpected: (inputCoin: string | number, outputCoin: string | number, amount: string) => Promise<string>;
|
|
102
|
+
exchangeIsApproved: (inputCoin: string | number, amount: string) => Promise<boolean>;
|
|
103
|
+
private exchangeApproveEstimateGas;
|
|
104
|
+
exchangeApprove: (inputCoin: string | number, amount: string) => Promise<string[]>;
|
|
72
105
|
private exchangeEstimateGas;
|
|
73
106
|
exchange: (inputCoin: string | number, outputCoin: string | number, amount: string, maxSlippage?: number) => Promise<string>;
|
|
107
|
+
exchangeTricryptoIsApproved: (inputCoin: string | number, amount: string, useEth?: boolean) => Promise<boolean>;
|
|
108
|
+
private exchangeTricryptoApproveEstimateGas;
|
|
109
|
+
exchangeTricryptoApprove: (inputCoin: string | number, amount: string, useEth?: boolean) => Promise<string[]>;
|
|
74
110
|
private exchangeTricryptoEstimateGas;
|
|
75
111
|
exchangeTricrypto: (inputCoin: string | number, outputCoin: string | number, amount: string, maxSlippage?: number, useEth?: boolean) => Promise<string>;
|
|
76
112
|
exchangeWrappedExpected: (inputCoin: string | number, outputCoin: string | number, amount: string) => Promise<string>;
|
|
113
|
+
exchangeWrappedIsApproved: (inputCoin: string | number, amount: string) => Promise<boolean>;
|
|
114
|
+
private exchangeWrappedApproveEstimateGas;
|
|
115
|
+
exchangeWrappedApprove: (inputCoin: string | number, amount: string) => Promise<string[]>;
|
|
77
116
|
private exchangeWrappedEstimateGas;
|
|
78
117
|
exchangeWrapped: (inputCoin: string | number, outputCoin: string | number, amount: string, maxSlippage?: number) => Promise<string>;
|
|
79
118
|
gaugeMaxBoostedDeposit: (...addresses: string[]) => Promise<DictInterface<string>>;
|
|
@@ -83,6 +122,7 @@ export declare class Pool {
|
|
|
83
122
|
private _getCoinIdx;
|
|
84
123
|
private _getRates;
|
|
85
124
|
private _balances;
|
|
125
|
+
private _balancedAmounts;
|
|
86
126
|
private _calcLpTokenAmount;
|
|
87
127
|
private _calcLpTokenAmountZap;
|
|
88
128
|
private _calcLpTokenAmountWithUnderlying;
|