@dhedge/v2-sdk 2.1.3 → 2.1.5

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
@@ -20,3 +20,11 @@ export declare const flatMoneyContractAddresses: Readonly<Partial<Record<Network
20
20
  StableModule: string;
21
21
  COLLATERAL: string;
22
22
  }>>>;
23
+ export declare const OdosSwapFeeRecipient: {
24
+ polygon: string;
25
+ optimism: string;
26
+ arbitrum: string;
27
+ base: string;
28
+ ethereum: string;
29
+ plasma: string;
30
+ };
@@ -563,4 +563,15 @@ export declare class Pool {
563
563
  * @returns {Promise<any>} Transaction
564
564
  */
565
565
  completeTorosWithdrawal(destinationToken: string, slippage?: number, options?: any, sdkOptions?: SDKOptions): Promise<any>;
566
+ /**
567
+ * Mint PT and YT tokens on Pendle
568
+ * @param {string} assetFrom Asset to mint from (only underlying asset)
569
+ * @param {string} pt PT address
570
+ * @param {BigNumber | string} amountIn Amount underlying asset
571
+ * @param {number} slippage Slippage tolerance in %
572
+ * @param {any} options Transaction options
573
+ * @param {SDKOptions} sdkOptions SDK options including estimateGas
574
+ * @returns {Promise<any>} Transaction
575
+ */
576
+ mintPendle(assetFrom: string, pt: string, amountIn: BigNumber | string, slippage?: number, options?: any, sdkOptions?: SDKOptions): Promise<any>;
566
577
  }
@@ -1,6 +1,20 @@
1
1
  import { ethers } from "../..";
2
2
  import { Pool } from "../../entities";
3
- export declare const odosBaseUrl = "https://api.odos.xyz/sor";
3
+ export declare const odosBaseUrl = "https://enterprise-api.odos.xyz/sor";
4
+ export interface SwapTokenInfo {
5
+ inputToken: string;
6
+ inputAmount: ethers.BigNumber;
7
+ inputReceiver: string;
8
+ outputToken: string;
9
+ outputQuote: ethers.BigNumber;
10
+ outputMin: ethers.BigNumber;
11
+ outputReceiver: string;
12
+ }
13
+ export interface SwapReferralInfo {
14
+ code: ethers.BigNumber;
15
+ fee: ethers.BigNumber;
16
+ feeRecipient: string;
17
+ }
4
18
  export declare function getOdosSwapTxData(pool: Pool, assetFrom: string, assetTo: string, amountIn: ethers.BigNumber | string, slippage: number): Promise<{
5
19
  swapTxData: string;
6
20
  minAmountOut: string;
@@ -4,4 +4,8 @@ export declare function getPendleSwapTxData(pool: Pool, tokenIn: string, tokenOu
4
4
  swapTxData: string;
5
5
  minAmountOut: string | null;
6
6
  }>;
7
+ export declare function getPendleMintTxData(pool: Pool, tokenIn: string, pt: string, amountIn: ethers.BigNumber | string, slippage: number): Promise<{
8
+ swapTxData: string;
9
+ minAmountOut: string | null;
10
+ }>;
7
11
  export declare function getMarket(pool: Pool, tokenIn: string, tokenOut: string): Promise<string>;
@@ -136,6 +136,7 @@ export declare const CONTRACT_ADDRESS: {
136
136
  WETH: string;
137
137
  USDT: string;
138
138
  USDE: string;
139
+ TOROS: string;
139
140
  };
140
141
  };
141
142
  export declare const MAX_AMOUNT: ethers.BigNumber;