@curvefi/api 2.66.29 → 2.66.31
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/boosting.d.ts +33 -32
- package/lib/boosting.js +320 -252
- package/lib/cached.d.ts +4 -3
- package/lib/cached.js +63 -19
- package/lib/constants/utils.d.ts +14 -1
- package/lib/constants/utils.js +21 -6
- package/lib/curve.d.ts +5 -5
- package/lib/curve.js +21 -38
- package/lib/dao.d.ts +32 -31
- package/lib/dao.js +420 -350
- package/lib/external-api.d.ts +1 -1
- package/lib/external-api.js +2 -2
- package/lib/factory/common.d.ts +2 -1
- package/lib/factory/common.js +1 -1
- package/lib/factory/deploy.d.ts +46 -45
- package/lib/factory/deploy.js +630 -551
- package/lib/factory/factory-api.d.ts +3 -2
- package/lib/factory/factory-api.js +22 -23
- package/lib/factory/factory-crypto.d.ts +1 -1
- package/lib/factory/factory-crypto.js +12 -15
- package/lib/factory/factory-tricrypto.d.ts +1 -1
- package/lib/factory/factory-tricrypto.js +14 -15
- package/lib/factory/factory-twocrypto.d.ts +1 -1
- package/lib/factory/factory-twocrypto.js +12 -13
- package/lib/factory/factory.d.ts +4 -3
- package/lib/factory/factory.js +21 -24
- package/lib/index.d.ts +413 -104
- package/lib/index.js +253 -257
- package/lib/interfaces.d.ts +2 -0
- package/lib/pools/PoolTemplate.d.ts +13 -12
- package/lib/pools/PoolTemplate.js +279 -285
- package/lib/pools/mixins/common.js +2 -2
- package/lib/pools/mixins/depositBalancedAmountsMixins.d.ts +12 -4
- package/lib/pools/mixins/depositBalancedAmountsMixins.js +1 -15
- package/lib/pools/mixins/depositMixins.d.ts +25 -5
- package/lib/pools/mixins/depositMixins.js +38 -76
- package/lib/pools/mixins/depositWrappedMixins.d.ts +10 -2
- package/lib/pools/mixins/depositWrappedMixins.js +17 -33
- package/lib/pools/mixins/poolBalancesMixin.d.ts +6 -2
- package/lib/pools/mixins/poolBalancesMixin.js +3 -5
- package/lib/pools/mixins/swapMixins.d.ts +20 -4
- package/lib/pools/mixins/swapMixins.js +36 -70
- package/lib/pools/mixins/swapWrappedMixins.d.ts +19 -4
- package/lib/pools/mixins/swapWrappedMixins.js +32 -60
- package/lib/pools/mixins/withdrawExpectedMixins.d.ts +12 -4
- package/lib/pools/mixins/withdrawExpectedMixins.js +6 -11
- package/lib/pools/mixins/withdrawImbalanceMixins.d.ts +20 -4
- package/lib/pools/mixins/withdrawImbalanceMixins.js +26 -53
- package/lib/pools/mixins/withdrawImbalanceWrappedMixins.d.ts +10 -2
- package/lib/pools/mixins/withdrawImbalanceWrappedMixins.js +12 -27
- package/lib/pools/mixins/withdrawMixins.d.ts +25 -5
- package/lib/pools/mixins/withdrawMixins.js +33 -67
- package/lib/pools/mixins/withdrawOneCoinExpectedMixins.d.ts +12 -4
- package/lib/pools/mixins/withdrawOneCoinExpectedMixins.js +8 -13
- package/lib/pools/mixins/withdrawOneCoinMixins.d.ts +25 -5
- package/lib/pools/mixins/withdrawOneCoinMixins.js +32 -66
- package/lib/pools/mixins/withdrawOneCoinWrappedExpectedMixins.d.ts +6 -2
- package/lib/pools/mixins/withdrawOneCoinWrappedExpectedMixins.js +4 -7
- package/lib/pools/mixins/withdrawOneCoinWrappedMixins.d.ts +10 -2
- package/lib/pools/mixins/withdrawOneCoinWrappedMixins.js +13 -29
- package/lib/pools/mixins/withdrawWrappedMixins.d.ts +10 -2
- package/lib/pools/mixins/withdrawWrappedMixins.js +14 -28
- package/lib/pools/poolConstructor.d.ts +2 -1
- package/lib/pools/poolConstructor.js +27 -28
- package/lib/pools/subClasses/corePool.d.ts +4 -1
- package/lib/pools/subClasses/corePool.js +5 -7
- package/lib/pools/subClasses/gaugePool.d.ts +5 -3
- package/lib/pools/subClasses/gaugePool.js +19 -18
- package/lib/pools/subClasses/statsPool.d.ts +2 -0
- package/lib/pools/subClasses/statsPool.js +22 -10
- package/lib/pools/subClasses/walletPool.d.ts +2 -1
- package/lib/pools/subClasses/walletPool.js +6 -6
- package/lib/pools/utils.d.ts +7 -6
- package/lib/pools/utils.js +316 -297
- package/lib/route-graph.worker.d.ts +2 -2
- package/lib/route-graph.worker.js +4 -6
- package/lib/router.d.ts +12 -11
- package/lib/router.js +331 -295
- package/lib/utils.d.ts +34 -33
- package/lib/utils.js +481 -435
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import BigNumber from 'bignumber.js';
|
|
2
2
|
import memoize from "memoizee";
|
|
3
3
|
import { IDict, IProfit } from '../interfaces';
|
|
4
|
+
import { Curve } from "../curve.js";
|
|
4
5
|
import { CorePool } from "./subClasses/corePool.js";
|
|
5
6
|
import { StatsPool } from "./subClasses/statsPool.js";
|
|
6
7
|
import { WalletPool } from "./subClasses/walletPool.js";
|
|
@@ -37,12 +38,12 @@ export declare class PoolTemplate extends CorePool {
|
|
|
37
38
|
};
|
|
38
39
|
stats: StatsPool;
|
|
39
40
|
wallet: WalletPool;
|
|
40
|
-
constructor(id: string);
|
|
41
|
+
constructor(id: string, curve: Curve, poolData?: import("../interfaces").IPoolData);
|
|
41
42
|
hasVyperVulnerability(): boolean;
|
|
42
43
|
rewardsOnly(): boolean;
|
|
43
44
|
_calcTokenApy: (futureWorkingSupplyBN?: BigNumber | null) => Promise<[baseApy: number, boostedApy: number]>;
|
|
44
45
|
private _pureCalcLpTokenAmount;
|
|
45
|
-
|
|
46
|
+
_calcLpTokenAmount: ((_amounts: bigint[], isDeposit?: any, useUnderlying?: any) => Promise<bigint>) & memoize.Memoized<(_amounts: bigint[], isDeposit?: any, useUnderlying?: any) => Promise<bigint>>;
|
|
46
47
|
private calcLpTokenAmount;
|
|
47
48
|
private calcLpTokenAmountWrapped;
|
|
48
49
|
getSeedAmounts(amount1: number | string, useUnderlying?: boolean): Promise<string[]>;
|
|
@@ -132,7 +133,7 @@ export declare class PoolTemplate extends CorePool {
|
|
|
132
133
|
withdrawImbalanceWrappedBonus(amounts: (number | string)[]): Promise<string>;
|
|
133
134
|
private withdrawImbalanceWrappedEstimateGas;
|
|
134
135
|
withdrawImbalanceWrapped(amounts: (number | string)[], slippage?: number): Promise<string>;
|
|
135
|
-
|
|
136
|
+
_withdrawOneCoinExpected(_lpTokenAmount: bigint, i: number): Promise<bigint>;
|
|
136
137
|
withdrawOneCoinExpected(lpTokenAmount: number | string, coin: string | number): Promise<string>;
|
|
137
138
|
withdrawOneCoinBonus(lpTokenAmount: number | string, coin: string | number): Promise<string>;
|
|
138
139
|
withdrawOneCoinIsApproved(lpTokenAmount: number | string): Promise<boolean>;
|
|
@@ -140,7 +141,7 @@ export declare class PoolTemplate extends CorePool {
|
|
|
140
141
|
withdrawOneCoinApprove(lpTokenAmount: number | string): Promise<string[]>;
|
|
141
142
|
private withdrawOneCoinEstimateGas;
|
|
142
143
|
withdrawOneCoin(lpTokenAmount: number | string, coin: string | number, slippage?: number): Promise<string>;
|
|
143
|
-
|
|
144
|
+
_withdrawOneCoinWrappedExpected(_lpTokenAmount: bigint, i: number): Promise<bigint>;
|
|
144
145
|
withdrawOneCoinWrappedExpected(lpTokenAmount: number | string, coin: string | number): Promise<string>;
|
|
145
146
|
withdrawOneCoinWrappedBonus(lpTokenAmount: number | string, coin: string | number): Promise<string>;
|
|
146
147
|
private withdrawOneCoinWrappedEstimateGas;
|
|
@@ -163,19 +164,19 @@ export declare class PoolTemplate extends CorePool {
|
|
|
163
164
|
gaugeTotal?: string;
|
|
164
165
|
gaugeShare?: string;
|
|
165
166
|
}>;
|
|
166
|
-
|
|
167
|
+
_swapExpected(i: number, j: number, _amount: bigint): Promise<bigint>;
|
|
167
168
|
swapExpected(inputCoin: string | number, outputCoin: string | number, amount: number | string): Promise<string>;
|
|
168
|
-
|
|
169
|
+
_swapRequired(i: number, j: number, _amount: bigint, isUnderlying: boolean): Promise<any>;
|
|
169
170
|
swapRequired(inputCoin: string | number, outputCoin: string | number, amount: number | string): Promise<string>;
|
|
170
171
|
swapWrappedRequired(inputCoin: string | number, outputCoin: string | number, amount: number | string): Promise<string>;
|
|
171
172
|
swapPriceImpact(inputCoin: string | number, outputCoin: string | number, amount: number | string): Promise<number>;
|
|
172
|
-
|
|
173
|
+
_swapContractAddress(): string;
|
|
173
174
|
swapIsApproved(inputCoin: string | number, amount: number | string): Promise<boolean>;
|
|
174
175
|
private swapApproveEstimateGas;
|
|
175
176
|
swapApprove(inputCoin: string | number, amount: number | string): Promise<string[]>;
|
|
176
177
|
private swapEstimateGas;
|
|
177
178
|
swap(inputCoin: string | number, outputCoin: string | number, amount: number | string, slippage?: number): Promise<string>;
|
|
178
|
-
|
|
179
|
+
_swapWrappedExpected(i: number, j: number, _amount: bigint): Promise<bigint>;
|
|
179
180
|
swapWrappedExpected(inputCoin: string | number, outputCoin: string | number, amount: number | string): Promise<string>;
|
|
180
181
|
swapWrappedPriceImpact(inputCoin: string | number, outputCoin: string | number, amount: number | string): Promise<number>;
|
|
181
182
|
swapWrappedIsApproved(inputCoin: string | number, amount: number | string): Promise<boolean>;
|
|
@@ -184,11 +185,11 @@ export declare class PoolTemplate extends CorePool {
|
|
|
184
185
|
private swapWrappedEstimateGas;
|
|
185
186
|
swapWrapped(inputCoin: string | number, outputCoin: string | number, amount: number | string, slippage?: number): Promise<string>;
|
|
186
187
|
gaugeOptimalDeposits: (...accounts: string[]) => Promise<IDict<string>>;
|
|
187
|
-
|
|
188
|
-
|
|
188
|
+
_getCoinIdx: (coin: string | number, useUnderlying?: boolean) => number;
|
|
189
|
+
_getRates: () => Promise<bigint[]>;
|
|
189
190
|
private _storedRatesBN;
|
|
190
|
-
|
|
191
|
-
|
|
191
|
+
_underlyingPrices: () => Promise<number[]>;
|
|
192
|
+
_wrappedPrices: () => Promise<number[]>;
|
|
192
193
|
private getGaugeStatus;
|
|
193
194
|
private getIsGaugeKilled;
|
|
194
195
|
}
|