@dhedge/v2-sdk 1.9.0 → 1.9.1

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.
@@ -135,7 +135,7 @@ export declare class Pool {
135
135
  */
136
136
  unStake(dapp: Dapp, asset: string, amount: BigNumber | string, options?: any): Promise<any>;
137
137
  /**
138
- * Unstake liquidity pool tokens from gauge contract
138
+ * Unstake liquidity pool tokens from Velodrome or Balancer gauge
139
139
  * @param {string} gauge Gauge contract address
140
140
  * @param {BigNumber | string} amount Amount of liquidity pool tokens
141
141
  * @param {any} options Transaction options
@@ -311,6 +311,27 @@ export declare class Pool {
311
311
  * @returns {Promise<any>} Transaction
312
312
  */
313
313
  removeLiquidityVelodrome(assetA: string, assetB: string, amount: BigNumber | string, isStable: boolean, options?: any): Promise<any>;
314
+ /**
315
+ * Add liquidity to Velodrome V2 pool
316
+ * @param {string} assetA First asset
317
+ * @param {string} assetB Second asset
318
+ * @param {BigNumber | string} amountA Amount first asset
319
+ * @param {BigNumber | string} amountB Amount second asset
320
+ * @param { boolean } isStable Is stable pool
321
+ * @param {any} options Transaction options
322
+ * @returns {Promise<any>} Transaction
323
+ */
324
+ addLiquidityVelodromeV2(assetA: string, assetB: string, amountA: BigNumber | string, amountB: BigNumber | string, isStable: boolean, options?: any): Promise<any>;
325
+ /**
326
+ * Remove liquidity from Velodrome V2 pool
327
+ * @param {string} assetA First asset
328
+ * @param {string} assetB Second asset
329
+ * @param {BigNumber | string} amount Amount of LP tokens
330
+ * @param { boolean } isStable Is stable pool
331
+ * @param {any} options Transaction options
332
+ * @returns {Promise<any>} Transaction
333
+ */
334
+ removeLiquidityVelodromeV2(assetA: string, assetB: string, amount: BigNumber | string, isStable: boolean, options?: any): Promise<any>;
314
335
  /**
315
336
  * Trade options on lyra
316
337
  * @param {LyraOptionMarket} market Underlying market e.g. eth
@@ -0,0 +1,3 @@
1
+ export declare class ApiError extends Error {
2
+ constructor(message?: string);
3
+ }
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from "./entities";
2
2
  export * from "./types";
3
+ export * from "./errors";
3
4
  export { ethers } from "ethers";
@@ -1,4 +1,4 @@
1
1
  import { BigNumber } from "ethers";
2
2
  import { Pool } from "../../entities";
3
- export declare function getVelodromeStakeTxData(amount: BigNumber | string): any;
4
- export declare function getVelodromeClaimTxData(pool: Pool, gauge: string): Promise<any>;
3
+ export declare function getVelodromeStakeTxData(amount: BigNumber | string, v2: boolean): any;
4
+ export declare function getVelodromeClaimTxData(pool: Pool, gauge: string, v2: boolean): Promise<any>;
@@ -0,0 +1,3 @@
1
+ import { BigNumber } from "ethers";
2
+ import { Network } from "../../types";
3
+ export declare const getZeroExTradeTxData: (network: Network, assetFrom: string, assetTo: string, amountIn: BigNumber | string, slippage: number | undefined, takerAddress: string) => Promise<string>;
package/dist/types.d.ts CHANGED
@@ -17,7 +17,9 @@ export declare enum Dapp {
17
17
  ARRAKIS = "arrakis",
18
18
  TOROS = "toros",
19
19
  VELODROME = "velodrome",
20
- LYRA = "lyra"
20
+ VELODROMEV2 = "velodromeV2",
21
+ LYRA = "lyra",
22
+ ZEROEX = "0x"
21
23
  }
22
24
  export declare enum Transaction {
23
25
  SWAP = "swapExactTokensForTokens",