@dhedge/v2-sdk 1.3.0 → 1.4.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/dist/entities/pool.d.ts +10 -7
- package/dist/test/constants.d.ts +4 -3
- package/dist/types.d.ts +7 -9
- package/dist/v2-sdk.cjs.development.js +443 -81
- package/dist/v2-sdk.cjs.development.js.map +1 -1
- package/dist/v2-sdk.cjs.production.min.js +1 -1
- package/dist/v2-sdk.cjs.production.min.js.map +1 -1
- package/dist/v2-sdk.esm.js +441 -79
- package/dist/v2-sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/abi/IArrakisV1RouterStaking.json +107 -0
- package/src/abi/ILiquidityGaugeV4.json +153 -0
- package/src/config.ts +6 -2
- package/src/entities/pool.ts +107 -53
- package/src/test/aave.test.ts +53 -25
- package/src/test/arrakis.test.ts +89 -0
- package/src/test/constants.ts +11 -7
- package/src/test/oneInch.test.ts +13 -20
- package/src/test/pool.test.ts +1 -1
- package/src/test/uniswap.test.ts +35 -37
- package/src/test/wallet.ts +5 -5
- package/src/types.ts +7 -9
package/dist/entities/pool.d.ts
CHANGED
|
@@ -224,29 +224,32 @@ export declare class Pool {
|
|
|
224
224
|
*/
|
|
225
225
|
addLiquidityUniswapV3(assetA: string, assetB: string, amountA: BigNumber | string, amountB: BigNumber | string, minPrice: number | null, maxPrice: number | null, minTick: number | null, maxTick: number | null, feeAmount: FeeAmount, options?: any): Promise<any>;
|
|
226
226
|
/**
|
|
227
|
-
* Remove liquidity from an UniswapV3 liquidity pool
|
|
227
|
+
* Remove liquidity from an UniswapV3 or Arrakis liquidity pool
|
|
228
|
+
* @param {Dapp} dapp Platform either UniswapV3 or Arrakis
|
|
228
229
|
* @param {string} tokenId Token Id of UniswapV3 position
|
|
229
230
|
* @param {number} amount Amount in percent of assets to be removed
|
|
230
231
|
* @param {any} options Transaction options
|
|
231
232
|
* @returns {Promise<any>} Transaction
|
|
232
233
|
*/
|
|
233
|
-
|
|
234
|
+
decreaseLiquidity(dapp: Dapp, tokenId: string, amount?: number, options?: any): Promise<any>;
|
|
234
235
|
/**
|
|
235
|
-
* Increase liquidity of an UniswapV3 liquidity pool
|
|
236
|
+
* Increase liquidity of an UniswapV3 or Arrakis liquidity pool
|
|
237
|
+
* @param {Dapp} dapp Platform either UniswapV3 or Arrakis
|
|
236
238
|
* @param {string} tokenId Token Id of UniswapV3 position
|
|
237
239
|
* @param {BigNumber | string} amountA Amount first asset
|
|
238
240
|
* @param {BigNumber | string} amountB Amount second asset
|
|
239
241
|
* @param {any} options Transaction options
|
|
240
242
|
* @returns {Promise<any>} Transaction
|
|
241
243
|
*/
|
|
242
|
-
|
|
244
|
+
increaseLiquidity(dapp: Dapp, tokenId: string, amountA: BigNumber | string, amountB: BigNumber | string, options?: any): Promise<any>;
|
|
243
245
|
/**
|
|
244
|
-
* Claim fees of an UniswapV3 liquidity pool
|
|
245
|
-
* @param {
|
|
246
|
+
* Claim fees of an UniswapV3 liquidity or Arrakis pool
|
|
247
|
+
* @param {Dapp} dapp Platform either UniswapV3 or Arrakis
|
|
248
|
+
* @param {string} tokenId Token Id of UniswapV3 or Arrakis position
|
|
246
249
|
* @param {any} options Transaction options
|
|
247
250
|
* @returns {Promise<any>} Transaction
|
|
248
251
|
*/
|
|
249
|
-
|
|
252
|
+
claimFees(dapp: Dapp, tokenId: string, options?: any): Promise<any>;
|
|
250
253
|
/**
|
|
251
254
|
* Trade an asset into another asset
|
|
252
255
|
* @param {Dapp} dapp Platform like Sushiswap or Uniswap
|
package/dist/test/constants.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
export declare const USDC = "
|
|
1
|
+
export declare const USDC = "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174";
|
|
2
|
+
export declare const WETH = "0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619";
|
|
2
3
|
export declare const USDT = "0xc2132D05D31c914a87C6611C10748AEb04B58e8F";
|
|
3
4
|
export declare const DAI = "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063";
|
|
4
5
|
export declare const TUSD = "0x2e1ad108ff1d8c782fcbbb89aad783ac49586756";
|
|
5
|
-
export declare const WETH = "0x4200000000000000000000000000000000000006";
|
|
6
6
|
export declare const WBTC = "0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6";
|
|
7
7
|
export declare const SUSHI = "0x0b3f868e0be5597d5db7feb59e1cadbb0fdda50a";
|
|
8
8
|
export declare const WMATIC = "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270";
|
|
9
9
|
export declare const BAL = "0x9a71012B13CA4d3D0Cdc72A177DF3ef03b0E76A3";
|
|
10
10
|
export declare const AMUSDC = "0x1a13f4ca1d028320a707d99520abfefca3998b7f";
|
|
11
11
|
export declare const VDEBTWETH = "0xede17e9d79fc6f9ff9250d9eefbdb88cc18038b5";
|
|
12
|
-
export declare const
|
|
12
|
+
export declare const ARRAKIS_USDC_WETH_GAUGE = "0x33d1ad9Cd88A509397CD924C2d7613C285602C20";
|
|
13
|
+
export declare const TEST_POOL = "TEST_POOL_ADDRESS";
|
package/dist/types.d.ts
CHANGED
|
@@ -10,7 +10,9 @@ export declare enum Dapp {
|
|
|
10
10
|
QUICKSWAP = "quickswap",
|
|
11
11
|
BALANCER = "balancer",
|
|
12
12
|
UNISWAPV3 = "uniswapV3",
|
|
13
|
-
SYNTHETIX = "synthetix"
|
|
13
|
+
SYNTHETIX = "synthetix",
|
|
14
|
+
AAVEV3 = "aavev3",
|
|
15
|
+
ARRAKIS = "arrakis"
|
|
14
16
|
}
|
|
15
17
|
export declare enum Transaction {
|
|
16
18
|
SWAP = "swapExactTokensForTokens",
|
|
@@ -29,17 +31,13 @@ export declare enum Transaction {
|
|
|
29
31
|
WITHDRAW = "withdraw",
|
|
30
32
|
MINT = "mint",
|
|
31
33
|
BURN = "burn",
|
|
32
|
-
SWAP_SYNTHS = "exchangeWithTracking"
|
|
34
|
+
SWAP_SYNTHS = "exchangeWithTracking",
|
|
35
|
+
ADD_LIQUIDITY_STAKE = "addLiquidityAndStake",
|
|
36
|
+
REMOVE_LIQUIDITY_UNSTAKE = "removeLiquidityAndUnstake"
|
|
33
37
|
}
|
|
34
38
|
export declare type AddressNetworkMap = Readonly<Record<Network, string>>;
|
|
35
39
|
export declare type AddressDappMap = {
|
|
36
|
-
[Dapp
|
|
37
|
-
[Dapp.AAVE]?: string;
|
|
38
|
-
[Dapp.ONEINCH]?: string;
|
|
39
|
-
[Dapp.QUICKSWAP]?: string;
|
|
40
|
-
[Dapp.BALANCER]?: string;
|
|
41
|
-
[Dapp.UNISWAPV3]?: string;
|
|
42
|
-
[Dapp.SYNTHETIX]?: string;
|
|
40
|
+
[key in Dapp]?: string;
|
|
43
41
|
};
|
|
44
42
|
export declare type AddressDappNetworkMap = Readonly<Record<Network, AddressDappMap>>;
|
|
45
43
|
export declare type SupportedAsset = [string, boolean];
|