@dhedge/v2-sdk 1.5.3 → 1.5.4
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 +23 -1
- package/dist/services/velodrome/liquidity.d.ts +4 -0
- package/dist/services/velodrome/staking.d.ts +4 -0
- package/dist/test/constants.d.ts +2 -0
- package/dist/types.d.ts +2 -1
- package/dist/v2-sdk.cjs.development.js +2508 -288
- 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 +2506 -286
- package/dist/v2-sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/abi/IVeldodromeRouter.json +438 -0
- package/src/abi/IVelodromeGauge.json +559 -0
- package/src/config.ts +2 -1
- package/src/entities/pool.ts +106 -19
- package/src/services/velodrome/liquidity.ts +48 -0
- package/src/services/velodrome/staking.ts +31 -0
- package/src/test/constants.ts +2 -0
- package/src/test/velodrome.test.ts +141 -0
- package/src/types.ts +2 -1
package/dist/entities/pool.d.ts
CHANGED
|
@@ -118,12 +118,13 @@ export declare class Pool {
|
|
|
118
118
|
stake(dapp: Dapp, asset: string, amount: BigNumber | string, options?: any): Promise<any>;
|
|
119
119
|
/**
|
|
120
120
|
* Stake liquidity pool tokens in gauge contract
|
|
121
|
+
* @param {Dapp} dapp Platform like Balancer or Velodrome
|
|
121
122
|
* @param {string} gauge Gauge contract address
|
|
122
123
|
* @param {BigNumber | string} amount Amount of liquidity pool tokens
|
|
123
124
|
* @param {any} options Transaction options
|
|
124
125
|
* @returns {Promise<any>} Transaction
|
|
125
126
|
*/
|
|
126
|
-
stakeInGauge(gauge: string, amount: BigNumber | string, options?: any): Promise<any>;
|
|
127
|
+
stakeInGauge(dapp: Dapp, gauge: string, amount: BigNumber | string, options?: any): Promise<any>;
|
|
127
128
|
/**
|
|
128
129
|
* Unstake liquidity pool tokens from a yield farm
|
|
129
130
|
* @param {Dapp} dapp Platform like Sushiswap or Uniswap
|
|
@@ -296,4 +297,25 @@ export declare class Pool {
|
|
|
296
297
|
* @returns {Promise<any>} Transaction
|
|
297
298
|
*/
|
|
298
299
|
tradeUniswapV3(assetFrom: string, assetTo: string, amountIn: BigNumber | string, feeAmount: FeeAmount, slippage?: number, options?: any): Promise<any>;
|
|
300
|
+
/**
|
|
301
|
+
* Add liquidity to Velodrome pool
|
|
302
|
+
* @param {string} assetA First asset
|
|
303
|
+
* @param {string} assetB Second asset
|
|
304
|
+
* @param {BigNumber | string} amountA Amount first asset
|
|
305
|
+
* @param {BigNumber | string} amountB Amount second asset
|
|
306
|
+
* @param { boolean } isStable Is stable pool
|
|
307
|
+
* @param {any} options Transaction options
|
|
308
|
+
* @returns {Promise<any>} Transaction
|
|
309
|
+
*/
|
|
310
|
+
addLiquidityVelodrome(assetA: string, assetB: string, amountA: BigNumber | string, amountB: BigNumber | string, isStable: boolean, options?: any): Promise<any>;
|
|
311
|
+
/**
|
|
312
|
+
* Remove liquidity from Velodrome pool
|
|
313
|
+
* @param {string} assetA First asset
|
|
314
|
+
* @param {string} assetB Second asset
|
|
315
|
+
* @param {BigNumber | string} amount Amount of LP tokens
|
|
316
|
+
* @param { boolean } isStable Is stable pool
|
|
317
|
+
* @param {any} options Transaction options
|
|
318
|
+
* @returns {Promise<any>} Transaction
|
|
319
|
+
*/
|
|
320
|
+
removeLiquidityVelodrome(assetA: string, assetB: string, amount: BigNumber | string, isStable: boolean, options?: any): Promise<any>;
|
|
299
321
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { BigNumber } from "ethers";
|
|
2
|
+
import { Pool } from "../../entities";
|
|
3
|
+
export declare function getVelodromeAddLiquidityTxData(pool: Pool, assetA: string, assetB: string, amountA: BigNumber | string, amountB: BigNumber | string, isStable: boolean): any;
|
|
4
|
+
export declare function getVelodromeRemoveLiquidityTxData(pool: Pool, assetA: string, assetB: string, amount: BigNumber | string, isStable: boolean): any;
|
package/dist/test/constants.d.ts
CHANGED
|
@@ -15,4 +15,6 @@ export declare const DAI = "0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1";
|
|
|
15
15
|
export declare const USDy = "0x1ec50880101022c11530a069690f5446d1464592";
|
|
16
16
|
export declare const WBTC = "0x68f180fcCe6836688e9084f035309E29Bf0A2095";
|
|
17
17
|
export declare const OP = "4200000000000000000000000000000000000042";
|
|
18
|
+
export declare const WSTETH = "0x1F32b1c2345538c0c6f582fCB022739c4A194Ebb";
|
|
19
|
+
export declare const VEL = "0x3c8B650257cFb5f272f799F5e2b4e65093a11a05";
|
|
18
20
|
export declare const TEST_POOL = "TEST_POOL";
|
package/dist/types.d.ts
CHANGED