@defisaver/sdk 1.2.28 → 1.2.30

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.
Files changed (45) hide show
  1. package/esm/src/actions/fluid/FluidDexOpenAction.d.ts +20 -0
  2. package/esm/src/actions/fluid/FluidDexOpenAction.js +45 -0
  3. package/esm/src/actions/fluid/FluidDexRegularBorrowAction.d.ts +17 -0
  4. package/esm/src/actions/fluid/FluidDexRegularBorrowAction.js +36 -0
  5. package/esm/src/actions/fluid/FluidDexRegularPaybackAction.d.ts +16 -0
  6. package/esm/src/actions/fluid/FluidDexRegularPaybackAction.js +34 -0
  7. package/esm/src/actions/fluid/FluidDexRegularSupplyAction.d.ts +16 -0
  8. package/esm/src/actions/fluid/FluidDexRegularSupplyAction.js +33 -0
  9. package/esm/src/actions/fluid/FluidDexRegularWithdrawAction.d.ts +17 -0
  10. package/esm/src/actions/fluid/FluidDexRegularWithdrawAction.js +37 -0
  11. package/esm/src/actions/fluid/FluidDexSmartCollSupplyAction.d.ts +16 -0
  12. package/esm/src/actions/fluid/FluidDexSmartCollSupplyAction.js +33 -0
  13. package/esm/src/actions/fluid/FluidDexSmartCollWithdrawAction.d.ts +17 -0
  14. package/esm/src/actions/fluid/FluidDexSmartCollWithdrawAction.js +37 -0
  15. package/esm/src/actions/fluid/FluidDexSmartDebtBorrowAction.d.ts +17 -0
  16. package/esm/src/actions/fluid/FluidDexSmartDebtBorrowAction.js +36 -0
  17. package/esm/src/actions/fluid/FluidDexSmartDebtPaybackAction.d.ts +16 -0
  18. package/esm/src/actions/fluid/FluidDexSmartDebtPaybackAction.js +34 -0
  19. package/esm/src/actions/fluid/index.d.ts +9 -0
  20. package/esm/src/actions/fluid/index.js +9 -0
  21. package/esm/src/actions/index.d.ts +2 -1
  22. package/esm/src/actions/index.js +2 -1
  23. package/esm/src/actions/pendle/PendleTokenRedeemAction.d.ts +24 -0
  24. package/esm/src/actions/pendle/PendleTokenRedeemAction.js +44 -0
  25. package/esm/src/actions/pendle/index.d.ts +1 -0
  26. package/esm/src/actions/pendle/index.js +1 -0
  27. package/esm/src/addresses.d.ts +24 -0
  28. package/esm/src/addresses.js +16 -3
  29. package/esm/src/index.d.ts +96 -0
  30. package/package.json +2 -2
  31. package/src/actions/fluid/FluidDexOpenAction.ts +61 -0
  32. package/src/actions/fluid/FluidDexRegularBorrowAction.ts +49 -0
  33. package/src/actions/fluid/FluidDexRegularPaybackAction.ts +46 -0
  34. package/src/actions/fluid/FluidDexRegularSupplyAction.ts +45 -0
  35. package/src/actions/fluid/FluidDexRegularWithdrawAction.ts +50 -0
  36. package/src/actions/fluid/FluidDexSmartCollSupplyAction.ts +45 -0
  37. package/src/actions/fluid/FluidDexSmartCollWithdrawAction.ts +50 -0
  38. package/src/actions/fluid/FluidDexSmartDebtBorrowAction.ts +49 -0
  39. package/src/actions/fluid/FluidDexSmartDebtPaybackAction.ts +46 -0
  40. package/src/actions/fluid/index.ts +11 -1
  41. package/src/actions/index.ts +2 -0
  42. package/src/actions/pendle/PendleTokenRedeemAction.ts +51 -0
  43. package/src/actions/pendle/index.ts +1 -0
  44. package/src/addresses.ts +17 -3
  45. package/umd/index.js +453 -72
@@ -0,0 +1,20 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * FluidDexOpenAction - Open a new position in the Fluid DEX vault.
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export declare class FluidDexOpenAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param from Address to pull the collateral from.
12
+ * @param to Address to send the borrowed assets to.
13
+ * @param supplyAmount Amount of collateral to deposit. Used if vault is T3.
14
+ * @param supplyVariableData Variable data for supply action. Used if vault is T2 or T4.
15
+ * @param borrowAmount Amount of debt to borrow. Used if vault is T2.
16
+ * @param borrowVariableData Variable data for borrow action. Used if vault is T3 or T4.
17
+ * @param wrapBorrowedEth Whether to wrap the borrowed ETH into WETH if one of the borrowed assets is ETH.
18
+ */
19
+ constructor(vault: EthAddress, from: EthAddress, to: EthAddress, supplyAmount: uint256, supplyVariableData: Array<any>, borrowAmount: uint256, borrowVariableData: Array<any>, wrapBorrowedEth: boolean);
20
+ }
@@ -0,0 +1,45 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * FluidDexOpenAction - Open a new position in the Fluid DEX vault.
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export class FluidDexOpenAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param from Address to pull the collateral from.
12
+ * @param to Address to send the borrowed assets to.
13
+ * @param supplyAmount Amount of collateral to deposit. Used if vault is T3.
14
+ * @param supplyVariableData Variable data for supply action. Used if vault is T2 or T4.
15
+ * @param borrowAmount Amount of debt to borrow. Used if vault is T2.
16
+ * @param borrowVariableData Variable data for borrow action. Used if vault is T3 or T4.
17
+ * @param wrapBorrowedEth Whether to wrap the borrowed ETH into WETH if one of the borrowed assets is ETH.
18
+ */
19
+ constructor(vault, from, to, supplyAmount, supplyVariableData, borrowAmount, borrowVariableData, wrapBorrowedEth) {
20
+ super('FluidDexOpen', getAddr('FluidDexOpen'), [
21
+ 'address',
22
+ 'address',
23
+ 'address',
24
+ 'uint256',
25
+ ['uint256', 'uint256', 'uint256'],
26
+ 'uint256',
27
+ ['uint256', 'uint256', 'uint256'],
28
+ 'bool',
29
+ ], [vault, from, to, supplyAmount, supplyVariableData, borrowAmount, borrowVariableData, wrapBorrowedEth]);
30
+ this.mappableArgs = [
31
+ this.args[0],
32
+ this.args[1],
33
+ this.args[2],
34
+ this.args[3],
35
+ this.args[4][0],
36
+ this.args[4][1],
37
+ this.args[4][2],
38
+ this.args[5],
39
+ this.args[6][0],
40
+ this.args[6][1],
41
+ this.args[6][2],
42
+ this.args[7],
43
+ ];
44
+ }
45
+ }
@@ -0,0 +1,17 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * FluidDexRegularBorrowAction - Borrow assets from the Fluid DEX T2 vault.
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export declare class FluidDexRegularBorrowAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param to Address to send the borrowed assets to.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param borrowAmount Amount of debt to borrow
14
+ * @param wrapBorrowedEth Whether to wrap the borrowed ETH into WETH if one of the borrowed assets is ETH.
15
+ */
16
+ constructor(vault: EthAddress, to: EthAddress, nftId: uint256, borrowAmount: uint256, wrapBorrowedEth: boolean);
17
+ }
@@ -0,0 +1,36 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * FluidDexRegularBorrowAction - Borrow assets from the Fluid DEX T2 vault.
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export class FluidDexRegularBorrowAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param to Address to send the borrowed assets to.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param borrowAmount Amount of debt to borrow
14
+ * @param wrapBorrowedEth Whether to wrap the borrowed ETH into WETH if one of the borrowed assets is ETH.
15
+ */
16
+ constructor(vault, to, nftId, borrowAmount, wrapBorrowedEth) {
17
+ super('FluidDexBorrow', getAddr('FluidDexBorrow'), [
18
+ 'address',
19
+ 'address',
20
+ 'uint256',
21
+ 'uint256',
22
+ ['uint256', 'uint256', 'uint256'],
23
+ 'bool',
24
+ ], [vault, to, nftId, borrowAmount, ['0', '0', '0'], wrapBorrowedEth]);
25
+ this.mappableArgs = [
26
+ this.args[0],
27
+ this.args[1],
28
+ this.args[2],
29
+ this.args[3],
30
+ this.args[4][0],
31
+ this.args[4][1],
32
+ this.args[4][2],
33
+ this.args[5],
34
+ ];
35
+ }
36
+ }
@@ -0,0 +1,16 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * FluidDexRegularPaybackAction - Payback debt on the Fluid DEX T2 vault.
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export declare class FluidDexRegularPaybackAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param from Address to pull the debt tokens from.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param paybackAmount The amount of debt to payback.
14
+ */
15
+ constructor(vault: EthAddress, from: EthAddress, nftId: uint256, paybackAmount: uint256);
16
+ }
@@ -0,0 +1,34 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * FluidDexRegularPaybackAction - Payback debt on the Fluid DEX T2 vault.
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export class FluidDexRegularPaybackAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param from Address to pull the debt tokens from.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param paybackAmount The amount of debt to payback.
14
+ */
15
+ constructor(vault, from, nftId, paybackAmount) {
16
+ super('FluidDexPayback', getAddr('FluidDexPayback'), [
17
+ 'address',
18
+ 'address',
19
+ 'uint256',
20
+ 'uint256',
21
+ ['uint256', 'uint256', 'uint256', 'uint256'],
22
+ ], [vault, from, nftId, paybackAmount, ['0', '0', '0', '0']]);
23
+ this.mappableArgs = [
24
+ this.args[0],
25
+ this.args[1],
26
+ this.args[2],
27
+ this.args[3],
28
+ this.args[4][0],
29
+ this.args[4][1],
30
+ this.args[4][2],
31
+ this.args[4][3],
32
+ ];
33
+ }
34
+ }
@@ -0,0 +1,16 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * FluidDexRegularSupplyAction - Supply collateral to the Fluid DEX T3 vault.
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export declare class FluidDexRegularSupplyAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param from Address to pull the collateral from.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param supplyAmount Amount of collateral to deposit.
14
+ */
15
+ constructor(vault: EthAddress, from: EthAddress, nftId: uint256, supplyAmount: uint256);
16
+ }
@@ -0,0 +1,33 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * FluidDexRegularSupplyAction - Supply collateral to the Fluid DEX T3 vault.
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export class FluidDexRegularSupplyAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param from Address to pull the collateral from.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param supplyAmount Amount of collateral to deposit.
14
+ */
15
+ constructor(vault, from, nftId, supplyAmount) {
16
+ super('FluidDexSupply', getAddr('FluidDexSupply'), [
17
+ 'address',
18
+ 'address',
19
+ 'uint256',
20
+ 'uint256',
21
+ ['uint256', 'uint256', 'uint256'],
22
+ ], [vault, from, nftId, supplyAmount, ['0', '0', '0']]);
23
+ this.mappableArgs = [
24
+ this.args[0],
25
+ this.args[1],
26
+ this.args[2],
27
+ this.args[3],
28
+ this.args[4][0],
29
+ this.args[4][1],
30
+ this.args[4][2],
31
+ ];
32
+ }
33
+ }
@@ -0,0 +1,17 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * FluidDexRegularWithdrawAction - Withdraw assets from the Fluid DEX T3 vault.
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export declare class FluidDexRegularWithdrawAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param to Address to send the withdrawn assets to.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param withdrawAmount Amount of collateral to withdraw.
14
+ * @param wrapWithdrawnEth Whether to wrap the withdrawn ETH into WETH if one of the withdrawn assets is ETH.
15
+ */
16
+ constructor(vault: EthAddress, to: EthAddress, nftId: uint256, withdrawAmount: uint256, wrapWithdrawnEth: boolean);
17
+ }
@@ -0,0 +1,37 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * FluidDexRegularWithdrawAction - Withdraw assets from the Fluid DEX T3 vault.
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export class FluidDexRegularWithdrawAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param to Address to send the withdrawn assets to.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param withdrawAmount Amount of collateral to withdraw.
14
+ * @param wrapWithdrawnEth Whether to wrap the withdrawn ETH into WETH if one of the withdrawn assets is ETH.
15
+ */
16
+ constructor(vault, to, nftId, withdrawAmount, wrapWithdrawnEth) {
17
+ super('FluidDexWithdraw', getAddr('FluidDexWithdraw'), [
18
+ 'address',
19
+ 'address',
20
+ 'uint256',
21
+ 'uint256',
22
+ ['uint256', 'uint256', 'uint256', 'uint256'],
23
+ 'bool',
24
+ ], [vault, to, nftId, withdrawAmount, ['0', '0', '0', '0'], wrapWithdrawnEth]);
25
+ this.mappableArgs = [
26
+ this.args[0],
27
+ this.args[1],
28
+ this.args[2],
29
+ this.args[3],
30
+ this.args[4][0],
31
+ this.args[4][1],
32
+ this.args[4][2],
33
+ this.args[4][3],
34
+ this.args[5],
35
+ ];
36
+ }
37
+ }
@@ -0,0 +1,16 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * FluidDexSmartCollSupplyAction - Supply collateral to the Fluid DEX with smart collateral (T2, T4).
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export declare class FluidDexSmartCollSupplyAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param from Address to pull the collateral from.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param supplyVariableData Variable data for supply action
14
+ */
15
+ constructor(vault: EthAddress, from: EthAddress, nftId: uint256, supplyVariableData: Array<any>);
16
+ }
@@ -0,0 +1,33 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * FluidDexSmartCollSupplyAction - Supply collateral to the Fluid DEX with smart collateral (T2, T4).
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export class FluidDexSmartCollSupplyAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param from Address to pull the collateral from.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param supplyVariableData Variable data for supply action
14
+ */
15
+ constructor(vault, from, nftId, supplyVariableData) {
16
+ super('FluidDexSupply', getAddr('FluidDexSupply'), [
17
+ 'address',
18
+ 'address',
19
+ 'uint256',
20
+ 'uint256',
21
+ ['uint256', 'uint256', 'uint256'],
22
+ ], [vault, from, nftId, '0', supplyVariableData]);
23
+ this.mappableArgs = [
24
+ this.args[0],
25
+ this.args[1],
26
+ this.args[2],
27
+ this.args[3],
28
+ this.args[4][0],
29
+ this.args[4][1],
30
+ this.args[4][2],
31
+ ];
32
+ }
33
+ }
@@ -0,0 +1,17 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * FluidDexSmartCollWithdrawAction - Withdraw assets from the Fluid DEX with smart collateral (T2, T4).
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export declare class FluidDexSmartCollWithdrawAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param to Address to send the withdrawn assets to.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param withdrawVariableData Variable data for withdraw action.
14
+ * @param wrapWithdrawnEth Whether to wrap the withdrawn ETH into WETH if one of the withdrawn assets is ETH.
15
+ */
16
+ constructor(vault: EthAddress, to: EthAddress, nftId: uint256, withdrawVariableData: Array<any>, wrapWithdrawnEth: boolean);
17
+ }
@@ -0,0 +1,37 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * FluidDexSmartCollWithdrawAction - Withdraw assets from the Fluid DEX with smart collateral (T2, T4).
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export class FluidDexSmartCollWithdrawAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param to Address to send the withdrawn assets to.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param withdrawVariableData Variable data for withdraw action.
14
+ * @param wrapWithdrawnEth Whether to wrap the withdrawn ETH into WETH if one of the withdrawn assets is ETH.
15
+ */
16
+ constructor(vault, to, nftId, withdrawVariableData, wrapWithdrawnEth) {
17
+ super('FluidDexWithdraw', getAddr('FluidDexWithdraw'), [
18
+ 'address',
19
+ 'address',
20
+ 'uint256',
21
+ 'uint256',
22
+ ['uint256', 'uint256', 'uint256', 'uint256'],
23
+ 'bool',
24
+ ], [vault, to, nftId, '0', withdrawVariableData, wrapWithdrawnEth]);
25
+ this.mappableArgs = [
26
+ this.args[0],
27
+ this.args[1],
28
+ this.args[2],
29
+ this.args[3],
30
+ this.args[4][0],
31
+ this.args[4][1],
32
+ this.args[4][2],
33
+ this.args[4][3],
34
+ this.args[5],
35
+ ];
36
+ }
37
+ }
@@ -0,0 +1,17 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * FluidDexSmartDebtBorrowAction - Borrow assets from the Fluid DEX with smart debt (T3, T4).
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export declare class FluidDexSmartDebtBorrowAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param to Address to send the borrowed assets to.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param borrowVariableData Variable data for borrow action.
14
+ * @param wrapBorrowedEth Whether to wrap the borrowed ETH into WETH if one of the borrowed assets is ETH.
15
+ */
16
+ constructor(vault: EthAddress, to: EthAddress, nftId: uint256, borrowVariableData: Array<any>, wrapBorrowedEth: boolean);
17
+ }
@@ -0,0 +1,36 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * FluidDexSmartDebtBorrowAction - Borrow assets from the Fluid DEX with smart debt (T3, T4).
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export class FluidDexSmartDebtBorrowAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param to Address to send the borrowed assets to.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param borrowVariableData Variable data for borrow action.
14
+ * @param wrapBorrowedEth Whether to wrap the borrowed ETH into WETH if one of the borrowed assets is ETH.
15
+ */
16
+ constructor(vault, to, nftId, borrowVariableData, wrapBorrowedEth) {
17
+ super('FluidDexBorrow', getAddr('FluidDexBorrow'), [
18
+ 'address',
19
+ 'address',
20
+ 'uint256',
21
+ 'uint256',
22
+ ['uint256', 'uint256', 'uint256'],
23
+ 'bool',
24
+ ], [vault, to, nftId, '0', borrowVariableData, wrapBorrowedEth]);
25
+ this.mappableArgs = [
26
+ this.args[0],
27
+ this.args[1],
28
+ this.args[2],
29
+ this.args[3],
30
+ this.args[4][0],
31
+ this.args[4][1],
32
+ this.args[4][2],
33
+ this.args[5],
34
+ ];
35
+ }
36
+ }
@@ -0,0 +1,16 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * FluidDexSmartDebtPaybackAction - Payback debt on the Fluid DEX with smart debt (T3, T4).
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export declare class FluidDexSmartDebtPaybackAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param from Address to pull the debt tokens from.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param paybackVariableData Variable data for payback action.
14
+ */
15
+ constructor(vault: EthAddress, from: EthAddress, nftId: uint256, paybackVariableData: Array<any>);
16
+ }
@@ -0,0 +1,34 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * FluidDexSmartDebtPaybackAction - Payback debt on the Fluid DEX with smart debt (T3, T4).
5
+ *
6
+ * @category Fluid
7
+ */
8
+ export class FluidDexSmartDebtPaybackAction extends Action {
9
+ /**
10
+ * @param vault The address of the Fluid DEX vault.
11
+ * @param from Address to pull the debt tokens from.
12
+ * @param nftId The NFT ID of the position.
13
+ * @param paybackVariableData Variable data for payback action.
14
+ */
15
+ constructor(vault, from, nftId, paybackVariableData) {
16
+ super('FluidDexPayback', getAddr('FluidDexPayback'), [
17
+ 'address',
18
+ 'address',
19
+ 'uint256',
20
+ 'uint256',
21
+ ['uint256', 'uint256', 'uint256', 'uint256'],
22
+ ], [vault, from, nftId, '0', paybackVariableData]);
23
+ this.mappableArgs = [
24
+ this.args[0],
25
+ this.args[1],
26
+ this.args[2],
27
+ this.args[3],
28
+ this.args[4][0],
29
+ this.args[4][1],
30
+ this.args[4][2],
31
+ this.args[4][3],
32
+ ];
33
+ }
34
+ }
@@ -5,3 +5,12 @@ export * from './FluidVaultT1PaybackAction';
5
5
  export * from './FluidVaultT1SupplyAction';
6
6
  export * from './FluidVaultT1WithdrawAction';
7
7
  export * from './FluidClaimAction';
8
+ export * from './FluidDexOpenAction';
9
+ export * from './FluidDexRegularBorrowAction';
10
+ export * from './FluidDexRegularSupplyAction';
11
+ export * from './FluidDexRegularPaybackAction';
12
+ export * from './FluidDexRegularWithdrawAction';
13
+ export * from './FluidDexSmartCollSupplyAction';
14
+ export * from './FluidDexSmartCollWithdrawAction';
15
+ export * from './FluidDexSmartDebtBorrowAction';
16
+ export * from './FluidDexSmartDebtPaybackAction';
@@ -5,3 +5,12 @@ export * from './FluidVaultT1PaybackAction';
5
5
  export * from './FluidVaultT1SupplyAction';
6
6
  export * from './FluidVaultT1WithdrawAction';
7
7
  export * from './FluidClaimAction';
8
+ export * from './FluidDexOpenAction';
9
+ export * from './FluidDexRegularBorrowAction';
10
+ export * from './FluidDexRegularSupplyAction';
11
+ export * from './FluidDexRegularPaybackAction';
12
+ export * from './FluidDexRegularWithdrawAction';
13
+ export * from './FluidDexSmartCollSupplyAction';
14
+ export * from './FluidDexSmartCollWithdrawAction';
15
+ export * from './FluidDexSmartDebtBorrowAction';
16
+ export * from './FluidDexSmartDebtPaybackAction';
@@ -36,4 +36,5 @@ import * as stkgho from './stkgho';
36
36
  import * as renzo from './renzo';
37
37
  import * as etherfi from './etherfi';
38
38
  import * as fluid from './fluid';
39
- export { aave, maker, compound, basic, flashloan, uniswap, reflexer, dydx, uniswapV3, checkers, liquity, yearn, lido, insta, balancer, curve, guni, mstable, rari, aaveV3, convex, chickenBonds, compoundV3, morpho, bprotocol, lsv, spark, curveusd, morphoblue, llamalend, merkl, eulerV2, sky, liquityV2, stkgho, renzo, etherfi, fluid, };
39
+ import * as pendle from './pendle';
40
+ export { aave, maker, compound, basic, flashloan, uniswap, reflexer, dydx, uniswapV3, checkers, liquity, yearn, lido, insta, balancer, curve, guni, mstable, rari, aaveV3, convex, chickenBonds, compoundV3, morpho, bprotocol, lsv, spark, curveusd, morphoblue, llamalend, merkl, eulerV2, sky, liquityV2, stkgho, renzo, etherfi, fluid, pendle, };
@@ -36,4 +36,5 @@ import * as stkgho from './stkgho';
36
36
  import * as renzo from './renzo';
37
37
  import * as etherfi from './etherfi';
38
38
  import * as fluid from './fluid';
39
- export { aave, maker, compound, basic, flashloan, uniswap, reflexer, dydx, uniswapV3, checkers, liquity, yearn, lido, insta, balancer, curve, guni, mstable, rari, aaveV3, convex, chickenBonds, compoundV3, morpho, bprotocol, lsv, spark, curveusd, morphoblue, llamalend, merkl, eulerV2, sky, liquityV2, stkgho, renzo, etherfi, fluid, };
39
+ import * as pendle from './pendle';
40
+ export { aave, maker, compound, basic, flashloan, uniswap, reflexer, dydx, uniswapV3, checkers, liquity, yearn, lido, insta, balancer, curve, guni, mstable, rari, aaveV3, convex, chickenBonds, compoundV3, morpho, bprotocol, lsv, spark, curveusd, morphoblue, llamalend, merkl, eulerV2, sky, liquityV2, stkgho, renzo, etherfi, fluid, pendle, };
@@ -0,0 +1,24 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * PendleTokenRedeemAction - Redeem PT tokens for underlying tokens
5
+ *
6
+ * @category Pendle
7
+ */
8
+ export declare class PendleTokenRedeemAction extends Action {
9
+ tokenForApproval: EthAddress;
10
+ /**
11
+ * @param market The address of the Pendle market
12
+ * @param underlyingToken The address of the underlying token
13
+ * @param ptToken The address of the PT token
14
+ * @param from The address from where the PT tokens will be pulled
15
+ * @param to The address of the recipient to receive the underlying tokens
16
+ * @param ptAmount The amount of PT tokens to redeem
17
+ * @param minAmountOut The minimum amount of underlying tokens to receive
18
+ */
19
+ constructor(market: EthAddress, underlyingToken: EthAddress, ptToken: EthAddress, from: EthAddress, to: EthAddress, ptAmount: uint256, minAmountOut: uint256);
20
+ getAssetsToApprove(): Promise<{
21
+ asset: string;
22
+ owner: any;
23
+ }[]>;
24
+ }
@@ -0,0 +1,44 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { Action } from '../../Action';
11
+ import { getAddr } from '../../addresses';
12
+ /**
13
+ * PendleTokenRedeemAction - Redeem PT tokens for underlying tokens
14
+ *
15
+ * @category Pendle
16
+ */
17
+ export class PendleTokenRedeemAction extends Action {
18
+ /**
19
+ * @param market The address of the Pendle market
20
+ * @param underlyingToken The address of the underlying token
21
+ * @param ptToken The address of the PT token
22
+ * @param from The address from where the PT tokens will be pulled
23
+ * @param to The address of the recipient to receive the underlying tokens
24
+ * @param ptAmount The amount of PT tokens to redeem
25
+ * @param minAmountOut The minimum amount of underlying tokens to receive
26
+ */
27
+ constructor(market, underlyingToken, ptToken, from, to, ptAmount, minAmountOut) {
28
+ super('PendleTokenRedeem', getAddr('PendleTokenRedeem'), ['address', 'address', 'address', 'address', 'uint256', 'uint256'], [market, underlyingToken, from, to, ptAmount, minAmountOut]);
29
+ this.mappableArgs = [
30
+ this.args[0],
31
+ this.args[1],
32
+ this.args[2],
33
+ this.args[3],
34
+ this.args[4],
35
+ this.args[5],
36
+ ];
37
+ this.tokenForApproval = ptToken;
38
+ }
39
+ getAssetsToApprove() {
40
+ return __awaiter(this, void 0, void 0, function* () {
41
+ return [{ asset: this.tokenForApproval, owner: this.args[2] }];
42
+ });
43
+ }
44
+ }
@@ -0,0 +1 @@
1
+ export * from './PendleTokenRedeemAction';
@@ -0,0 +1 @@
1
+ export * from './PendleTokenRedeemAction';