@dhedge/v2-sdk 2.1.2 → 2.1.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 +20 -1
- package/dist/services/pendle/index.d.ts +4 -0
- package/dist/v2-sdk.cjs.development.js +614 -394
- 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 +614 -394
- package/dist/v2-sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/abi/PoolManagerLogic.json +27 -1
- package/src/abi/pendle/PT.json +13 -0
- package/src/entities/pool.ts +67 -2
- package/src/services/pendle/index.ts +33 -0
- package/src/test/pendleMint.test.ts +59 -0
- package/src/test/pool.test.ts +35 -24
package/dist/entities/pool.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Contract, ethers, Wallet, BigNumber } from "ethers";
|
|
1
|
+
import { Contract, ethers, Wallet, BigNumber, BigNumberish } from "ethers";
|
|
2
2
|
import { Dapp, FundComposition, AssetEnabled, Network, LyraOptionMarket, LyraOptionType, LyraTradeType, LyraPosition, SDKOptions } from "../types";
|
|
3
3
|
import { Utils } from "./utils";
|
|
4
4
|
export declare class Pool {
|
|
@@ -261,6 +261,14 @@ export declare class Pool {
|
|
|
261
261
|
* @returns {Promise<any>} Transaction
|
|
262
262
|
*/
|
|
263
263
|
setPrivate(_private: boolean, options?: any, estimateGas?: boolean): Promise<any>;
|
|
264
|
+
/**
|
|
265
|
+
* Sets max supply cap for a pool
|
|
266
|
+
* @param {BigNumberish} _maxSupplyCapD18 Max supply cap with 18 decimals
|
|
267
|
+
* @param {any} options Transaction options
|
|
268
|
+
* @param {boolean} estimateGas Simulate/estimate gas
|
|
269
|
+
* @returns {Promise<any>} Transaction
|
|
270
|
+
*/
|
|
271
|
+
setMaxCap(_maxSupplyCapD18: BigNumberish, options?: any, estimateGas?: boolean): Promise<any>;
|
|
264
272
|
/**
|
|
265
273
|
* Invest into a Balancer pool
|
|
266
274
|
* @param {string} poolId Balancer pool id
|
|
@@ -555,4 +563,15 @@ export declare class Pool {
|
|
|
555
563
|
* @returns {Promise<any>} Transaction
|
|
556
564
|
*/
|
|
557
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>;
|
|
558
577
|
}
|
|
@@ -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>;
|