@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.
@@ -664,8 +664,7 @@
664
664
  "name": "arg0"
665
665
  }
666
666
  ],
667
- "constant": true,
668
- "payable": false,
667
+ "stateMutability": "view",
669
668
  "type": "function",
670
669
  "gas": "2220"
671
670
  },
@@ -664,8 +664,7 @@
664
664
  "name": "arg0"
665
665
  }
666
666
  ],
667
- "constant": true,
668
- "payable": false,
667
+ "stateMutability": "view",
669
668
  "type": "function",
670
669
  "gas": "2250"
671
670
  },
@@ -664,8 +664,7 @@
664
664
  "name": "arg0"
665
665
  }
666
666
  ],
667
- "constant": true,
668
- "payable": false,
667
+ "stateMutability": "view",
669
668
  "type": "function",
670
669
  "gas": "2220"
671
670
  },
@@ -685,8 +685,7 @@
685
685
  "name": "arg0"
686
686
  }
687
687
  ],
688
- "constant": true,
689
- "payable": false,
688
+ "stateMutability": "view",
690
689
  "type": "function",
691
690
  "gas": "2280"
692
691
  },
@@ -671,8 +671,7 @@
671
671
  "name": "arg0"
672
672
  }
673
673
  ],
674
- "constant": true,
675
- "payable": false,
674
+ "stateMutability": "view",
676
675
  "type": "function",
677
676
  "gas": "2340"
678
677
  },
@@ -671,8 +671,7 @@
671
671
  "name": "arg0"
672
672
  }
673
673
  ],
674
- "constant": true,
675
- "payable": false,
674
+ "stateMutability": "view",
676
675
  "type": "function",
677
676
  "gas": "2340"
678
677
  },
@@ -610,8 +610,7 @@
610
610
  "name": "arg0"
611
611
  }
612
612
  ],
613
- "constant": true,
614
- "payable": false,
613
+ "stateMutability": "view",
615
614
  "type": "function",
616
615
  "gas": "2190"
617
616
  },
@@ -664,8 +664,7 @@
664
664
  "name": "arg0"
665
665
  }
666
666
  ],
667
- "constant": true,
668
- "payable": false,
667
+ "stateMutability": "view",
669
668
  "type": "function",
670
669
  "gas": "2250"
671
670
  },
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
- exchangeTricrypto: (inputCoin: string | number, outputCoin: string | number, amount: string, maxSlippage: number, useEth: boolean) => Promise<number>;
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;