@dhedge/v2-sdk 2.2.1 → 2.2.2

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/config.d.ts CHANGED
@@ -42,3 +42,6 @@ export declare const OdosSwapFeeRecipient: {
42
42
  plasma: string;
43
43
  hyperliquid: string;
44
44
  };
45
+ export declare const dytmContractAddresses: Readonly<Partial<Record<Network, {
46
+ Periphery?: string;
47
+ }>>>;
@@ -1,6 +1,7 @@
1
1
  import { Contract, ethers, Wallet, BigNumber, BigNumberish } from "ethers";
2
2
  import { Dapp, FundComposition, AssetEnabled, Network, LyraOptionMarket, LyraOptionType, LyraTradeType, LyraPosition, SDKOptions, LimitOrderInfo } from "../types";
3
3
  import { Utils } from "./utils";
4
+ import { TrackedAsset } from "../services/toros/completeWithdrawal";
4
5
  export declare class Pool {
5
6
  readonly poolLogic: Contract;
6
7
  readonly managerLogic: Contract;
@@ -499,9 +500,10 @@ export declare class Pool {
499
500
  * @param {number} slippage Slippage tolerance in %
500
501
  * @param {any} options Transaction options
501
502
  * @param {SDKOptions} sdkOptions SDK options including estimateGas
503
+ * @param {any} trackedAssets Tracked assets information (only for tx data generation)
502
504
  * @returns {Promise<any>} Transaction
503
505
  */
504
- completeTorosWithdrawal(destinationToken: string, slippage?: number, options?: any, sdkOptions?: SDKOptions): Promise<any>;
506
+ completeTorosWithdrawal(destinationToken: string, slippage?: number, options?: any, sdkOptions?: SDKOptions, trackedAssets?: TrackedAsset[]): Promise<any>;
505
507
  /**
506
508
  * Mint PT and YT tokens on Pendle
507
509
  * @param {string} assetFrom Asset to mint from (only underlying asset)
@@ -0,0 +1,7 @@
1
+ import { ethers } from "ethers";
2
+ import { Pool } from "../../entities";
3
+ export declare function toDebtId(key: ethers.BigNumber): ethers.BigNumber;
4
+ export declare const getDytmDepositTxData: (pool: Pool, asset: string, amount: ethers.BigNumber | string) => string;
5
+ export declare const getDytmBorrowTxData: (pool: Pool, asset: string, amount: ethers.BigNumber | string) => string;
6
+ export declare const getDytmRepayTxData: (pool: Pool, asset: string, amount: ethers.BigNumber | string) => Promise<string>;
7
+ export declare const getDytmWithdrawTxData: (pool: Pool, asset: string, amount: ethers.BigNumber | string) => Promise<string>;
@@ -3,5 +3,5 @@ export interface TrackedAsset {
3
3
  token: string;
4
4
  balance: ethers.BigNumber;
5
5
  }
6
- export declare const createCompleteWithdrawalTxArguments: (pool: Pool, receiveToken: string, slippage: number) => Promise<any>;
7
- export declare const getCompleteWithdrawalTxData: (pool: Pool, receiveToken: string, slippage: number, useOnChainSwap: boolean) => Promise<string>;
6
+ export declare const createCompleteWithdrawalTxArguments: (pool: Pool, receiveToken: string, slippage: number, _trackedAssets: TrackedAsset[]) => Promise<any>;
7
+ export declare const getCompleteWithdrawalTxData: (pool: Pool, receiveToken: string, slippage: number, useOnChainSwap: boolean, trackedAssets: TrackedAsset[]) => Promise<string>;
@@ -19,4 +19,7 @@ export declare function getEasySwapperDepositQuote(pool: Pool, torosAsset: strin
19
19
  * If `assetFrom` is a Toros pool, this is treated as a withdrawal and routes through
20
20
  * `getInitWithdrawalTxData`. Otherwise it builds a `depositWithCustomCooldown` call.
21
21
  */
22
- export declare function getEasySwapperTxData(pool: Pool, assetFrom: string, assetTo: string, amountIn: ethers.BigNumber, slippage: number): Promise<any>;
22
+ export declare function getEasySwapperTxData(pool: Pool, assetFrom: string, assetTo: string, amountIn: ethers.BigNumber, slippage: number): Promise<{
23
+ swapTxData: string;
24
+ minAmountOut?: any;
25
+ }>;
@@ -1,3 +1,6 @@
1
1
  import { Pool } from "../..";
2
2
  export declare const createWithdrawTxArguments: (pool: Pool, torosAsset: string, amountIn: string, slippage: number, useOnChainSwap: boolean) => Promise<any>;
3
- export declare const getInitWithdrawalTxData: (pool: Pool, torosAsset: string, amountIn: string, slippage: number, useOnChainSwap: boolean) => Promise<string>;
3
+ export declare const getInitWithdrawalTxData: (pool: Pool, torosAsset: string, amountIn: string, slippage: number, useOnChainSwap: boolean) => Promise<{
4
+ swapTxData: string;
5
+ minAmountOut?: any;
6
+ }>;
package/dist/types.d.ts CHANGED
@@ -34,6 +34,7 @@ export declare enum Dapp {
34
34
  ODOS = "odos",
35
35
  PENDLE = "pendle",
36
36
  KYBERSWAP = "kyberswap",
37
+ DYTM = "dytm",
37
38
  HYPERLIQUID = "hyperliquid",
38
39
  COWSWAP = "cowswap",
39
40
  ONDO = "ondo"