@curvefi/api 1.21.0 → 1.24.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/README.md +68 -2
- package/lib/constants/abis/json/registry_exchange.json +30 -0
- package/lib/curve.js +128 -109
- package/lib/external-api.d.ts +3 -0
- package/lib/external-api.js +67 -0
- package/lib/index.d.ts +11 -0
- package/lib/index.js +8 -0
- package/lib/interfaces.d.ts +23 -1
- package/lib/pools.d.ts +13 -2
- package/lib/pools.js +603 -22
- package/lib/utils.d.ts +2 -0
- package/lib/utils.js +67 -7
- package/package.json +1 -1
package/lib/pools.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ethers } from "ethers";
|
|
2
2
|
import BigNumber from 'bignumber.js';
|
|
3
|
-
import { DictInterface, RewardsApyInterface } from './interfaces';
|
|
3
|
+
import { DictInterface, IRouteStep, RewardsApyInterface } from './interfaces';
|
|
4
4
|
export declare class Pool {
|
|
5
5
|
id: string;
|
|
6
6
|
name: string;
|
|
@@ -64,7 +64,7 @@ export declare class Pool {
|
|
|
64
64
|
}>;
|
|
65
65
|
getPoolBalances: () => Promise<string[]>;
|
|
66
66
|
getPoolWrappedBalances: () => Promise<string[]>;
|
|
67
|
-
getTotalLiquidity: () => Promise<string>;
|
|
67
|
+
getTotalLiquidity: (useApi?: boolean) => Promise<string>;
|
|
68
68
|
getVolume: () => Promise<string>;
|
|
69
69
|
getBaseApy: () => Promise<{
|
|
70
70
|
day: string;
|
|
@@ -254,3 +254,14 @@ export declare const crossAssetExchangeApprove: (inputCoin: string, amount: stri
|
|
|
254
254
|
export declare const crossAssetExchangeEstimateGas: (inputCoin: string, outputCoin: string, amount: string, maxSlippage?: number) => Promise<number>;
|
|
255
255
|
export declare const crossAssetExchange: (inputCoin: string, outputCoin: string, amount: string, maxSlippage?: number) => Promise<string>;
|
|
256
256
|
export declare const getUserPoolList: (address?: string | undefined) => Promise<string[]>;
|
|
257
|
+
export declare const _findAllRoutes: (inputCoinAddress: string, outputCoinAddress: string) => Promise<IRouteStep[][]>;
|
|
258
|
+
export declare const getBestRouteAndOutput: (inputCoin: string, outputCoin: string, amount: string) => Promise<{
|
|
259
|
+
route: IRouteStep[];
|
|
260
|
+
output: string;
|
|
261
|
+
}>;
|
|
262
|
+
export declare const routerExchangeExpected: (inputCoin: string, outputCoin: string, amount: string) => Promise<string>;
|
|
263
|
+
export declare const routerExchangeIsApproved: (inputCoin: string, amount: string) => Promise<boolean>;
|
|
264
|
+
export declare const routerExchangeApproveEstimateGas: (inputCoin: string, amount: string) => Promise<number>;
|
|
265
|
+
export declare const routerExchangeApprove: (inputCoin: string, amount: string) => Promise<string[]>;
|
|
266
|
+
export declare const routerExchangeEstimateGas: (inputCoin: string, outputCoin: string, amount: string) => Promise<number>;
|
|
267
|
+
export declare const routerExchange: (inputCoin: string, outputCoin: string, amount: string, maxSlippage?: number) => Promise<string>;
|