@defisaver/sdk 1.3.29 → 1.3.30-aave-v4-delegate-dev

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 (27) hide show
  1. package/esm/src/actions/aavev4/AaveV4DelegateBorrowAction.d.ts +16 -0
  2. package/esm/src/actions/aavev4/AaveV4DelegateBorrowAction.js +24 -0
  3. package/esm/src/actions/aavev4/AaveV4DelegateSetUsingAsCollateralAction.d.ts +15 -0
  4. package/esm/src/actions/aavev4/AaveV4DelegateSetUsingAsCollateralAction.js +22 -0
  5. package/esm/src/actions/aavev4/AaveV4DelegateWithdrawAction.d.ts +16 -0
  6. package/esm/src/actions/aavev4/AaveV4DelegateWithdrawAction.js +24 -0
  7. package/esm/src/actions/aavev4/AaveV4SetUserManagersAction.d.ts +14 -0
  8. package/esm/src/actions/aavev4/AaveV4SetUserManagersAction.js +16 -0
  9. package/esm/src/actions/aavev4/index.d.ts +4 -0
  10. package/esm/src/actions/aavev4/index.js +4 -0
  11. package/esm/src/actions/checkers/SparkRatioCheckAction.d.ts +4 -2
  12. package/esm/src/actions/checkers/SparkRatioCheckAction.js +6 -2
  13. package/esm/src/actions/checkers/SparkTargetRatioCheck.d.ts +2 -1
  14. package/esm/src/actions/checkers/SparkTargetRatioCheck.js +4 -2
  15. package/esm/src/addresses.d.ts +24 -0
  16. package/esm/src/addresses.js +6 -2
  17. package/esm/src/index.d.ts +96 -0
  18. package/package.json +1 -1
  19. package/src/actions/aavev4/AaveV4DelegateBorrowAction.ts +36 -0
  20. package/src/actions/aavev4/AaveV4DelegateSetUsingAsCollateralAction.ts +33 -0
  21. package/src/actions/aavev4/AaveV4DelegateWithdrawAction.ts +36 -0
  22. package/src/actions/aavev4/AaveV4SetUserManagersAction.ts +26 -0
  23. package/src/actions/aavev4/index.ts +5 -1
  24. package/src/actions/checkers/SparkRatioCheckAction.ts +18 -4
  25. package/src/actions/checkers/SparkTargetRatioCheck.ts +14 -3
  26. package/src/addresses.ts +6 -2
  27. package/umd/index.js +242 -104
@@ -0,0 +1,16 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * AaveV4DelegateBorrowAction - Approves a spender to borrow from the specified reserve on behalf of the wallet.
5
+ *
6
+ * @category AaveV4DelegateBorrow
7
+ */
8
+ export declare class AaveV4DelegateBorrowAction extends Action {
9
+ /**
10
+ * @param spoke Address of the spoke.
11
+ * @param reserveId Reserve id.
12
+ * @param spender Address that will receive the borrow allowance.
13
+ * @param amount Amount of borrow allowance.
14
+ */
15
+ constructor(spoke: EthAddress, reserveId: uint256, spender: EthAddress, amount: uint256);
16
+ }
@@ -0,0 +1,24 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * AaveV4DelegateBorrowAction - Approves a spender to borrow from the specified reserve on behalf of the wallet.
5
+ *
6
+ * @category AaveV4DelegateBorrow
7
+ */
8
+ export class AaveV4DelegateBorrowAction extends Action {
9
+ /**
10
+ * @param spoke Address of the spoke.
11
+ * @param reserveId Reserve id.
12
+ * @param spender Address that will receive the borrow allowance.
13
+ * @param amount Amount of borrow allowance.
14
+ */
15
+ constructor(spoke, reserveId, spender, amount) {
16
+ super('AaveV4DelegateBorrow', getAddr('AaveV4DelegateBorrow'), ['address', 'uint256', 'address', 'uint256'], [spoke, reserveId, spender, amount]);
17
+ this.mappableArgs = [
18
+ this.args[0],
19
+ this.args[1],
20
+ this.args[2],
21
+ this.args[3],
22
+ ];
23
+ }
24
+ }
@@ -0,0 +1,15 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress } from '../../types';
3
+ /**
4
+ * AaveV4DelegateSetUsingAsCollateralAction - Approves a delegatee to set using as collateral on behalf of the wallet.
5
+ *
6
+ * @category AaveV4DelegateSetUsingAsCollateral
7
+ */
8
+ export declare class AaveV4DelegateSetUsingAsCollateralAction extends Action {
9
+ /**
10
+ * @param spoke Address of the spoke.
11
+ * @param delegatee Address that will receive the permission.
12
+ * @param permission Whether the delegatee can set using as collateral.
13
+ */
14
+ constructor(spoke: EthAddress, delegatee: EthAddress, permission: boolean);
15
+ }
@@ -0,0 +1,22 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * AaveV4DelegateSetUsingAsCollateralAction - Approves a delegatee to set using as collateral on behalf of the wallet.
5
+ *
6
+ * @category AaveV4DelegateSetUsingAsCollateral
7
+ */
8
+ export class AaveV4DelegateSetUsingAsCollateralAction extends Action {
9
+ /**
10
+ * @param spoke Address of the spoke.
11
+ * @param delegatee Address that will receive the permission.
12
+ * @param permission Whether the delegatee can set using as collateral.
13
+ */
14
+ constructor(spoke, delegatee, permission) {
15
+ super('AaveV4DelegateSetUsingAsCollateral', getAddr('AaveV4DelegateSetUsingAsCollateral'), ['address', 'address', 'bool'], [spoke, delegatee, permission]);
16
+ this.mappableArgs = [
17
+ this.args[0],
18
+ this.args[1],
19
+ this.args[2],
20
+ ];
21
+ }
22
+ }
@@ -0,0 +1,16 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress, uint256 } from '../../types';
3
+ /**
4
+ * AaveV4DelegateWithdrawAction - Approves a spender to withdraw from the specified reserve on behalf of the wallet.
5
+ *
6
+ * @category AaveV4DelegateWithdraw
7
+ */
8
+ export declare class AaveV4DelegateWithdrawAction extends Action {
9
+ /**
10
+ * @param spoke Address of the spoke.
11
+ * @param reserveId Reserve id.
12
+ * @param spender Address that will receive the withdraw allowance.
13
+ * @param amount Amount of withdraw allowance.
14
+ */
15
+ constructor(spoke: EthAddress, reserveId: uint256, spender: EthAddress, amount: uint256);
16
+ }
@@ -0,0 +1,24 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * AaveV4DelegateWithdrawAction - Approves a spender to withdraw from the specified reserve on behalf of the wallet.
5
+ *
6
+ * @category AaveV4DelegateWithdraw
7
+ */
8
+ export class AaveV4DelegateWithdrawAction extends Action {
9
+ /**
10
+ * @param spoke Address of the spoke.
11
+ * @param reserveId Reserve id.
12
+ * @param spender Address that will receive the withdraw allowance.
13
+ * @param amount Amount of withdraw allowance.
14
+ */
15
+ constructor(spoke, reserveId, spender, amount) {
16
+ super('AaveV4DelegateWithdraw', getAddr('AaveV4DelegateWithdraw'), ['address', 'uint256', 'address', 'uint256'], [spoke, reserveId, spender, amount]);
17
+ this.mappableArgs = [
18
+ this.args[0],
19
+ this.args[1],
20
+ this.args[2],
21
+ this.args[3],
22
+ ];
23
+ }
24
+ }
@@ -0,0 +1,14 @@
1
+ import { Action } from '../../Action';
2
+ import { EthAddress } from '../../types';
3
+ /**
4
+ * AaveV4SetUserManagersAction - Sets position managers for the user's wallet.
5
+ *
6
+ * @category AaveV4
7
+ */
8
+ export declare class AaveV4SetUserManagersAction extends Action {
9
+ /**
10
+ * @param spoke Address of the spoke.
11
+ * @param updates The array of position manager updates.
12
+ */
13
+ constructor(spoke: EthAddress, updates: Array<[EthAddress, boolean]>);
14
+ }
@@ -0,0 +1,16 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ /**
4
+ * AaveV4SetUserManagersAction - Sets position managers for the user's wallet.
5
+ *
6
+ * @category AaveV4
7
+ */
8
+ export class AaveV4SetUserManagersAction extends Action {
9
+ /**
10
+ * @param spoke Address of the spoke.
11
+ * @param updates The array of position manager updates.
12
+ */
13
+ constructor(spoke, updates) {
14
+ super('AaveV4SetUserManagers', getAddr('AaveV4SetUserManagers'), ['address', 'tuple(address,bool)[]'], [spoke, updates]);
15
+ }
16
+ }
@@ -9,3 +9,7 @@ export * from './AaveV4DelegateBorrowWithSigAction';
9
9
  export * from './AaveV4DelegateWithdrawWithSigAction';
10
10
  export * from './AaveV4SetUserManagersWithSigAction';
11
11
  export * from './AaveV4DelegateSetUsingAsCollateralWithSigAction';
12
+ export * from './AaveV4DelegateBorrowAction';
13
+ export * from './AaveV4DelegateWithdrawAction';
14
+ export * from './AaveV4DelegateSetUsingAsCollateralAction';
15
+ export * from './AaveV4SetUserManagersAction';
@@ -9,3 +9,7 @@ export * from './AaveV4DelegateBorrowWithSigAction';
9
9
  export * from './AaveV4DelegateWithdrawWithSigAction';
10
10
  export * from './AaveV4SetUserManagersWithSigAction';
11
11
  export * from './AaveV4DelegateSetUsingAsCollateralWithSigAction';
12
+ export * from './AaveV4DelegateBorrowAction';
13
+ export * from './AaveV4DelegateWithdrawAction';
14
+ export * from './AaveV4DelegateSetUsingAsCollateralAction';
15
+ export * from './AaveV4SetUserManagersAction';
@@ -1,5 +1,5 @@
1
1
  import { Action } from '../../Action';
2
- import { uint8, uint256 } from '../../types';
2
+ import { uint8, uint256, EthAddress } from '../../types';
3
3
  /**
4
4
  * SparkRatioCheckAction - Checks spark ratio for users proxy position and reverts if faulty
5
5
  *
@@ -9,6 +9,8 @@ export declare class SparkRatioCheckAction extends Action {
9
9
  /**
10
10
  * @param ratioState If it should lower/higher
11
11
  * @param targetRatio The ratio user want to be at
12
+ * @param market Address provider for specific market. This param was added later
13
+ * @param user Address of the user (EOA/SW). This param was added later
12
14
  */
13
- constructor(ratioState: uint8, targetRatio: uint256);
15
+ constructor(ratioState: uint8, targetRatio: uint256, market?: EthAddress, user?: EthAddress);
14
16
  }
@@ -9,12 +9,16 @@ export class SparkRatioCheckAction extends Action {
9
9
  /**
10
10
  * @param ratioState If it should lower/higher
11
11
  * @param targetRatio The ratio user want to be at
12
+ * @param market Address provider for specific market. This param was added later
13
+ * @param user Address of the user (EOA/SW). This param was added later
12
14
  */
13
- constructor(ratioState, targetRatio) {
14
- super('SparkRatioCheck', getAddr('Empty'), ['uint8', 'uint256'], [ratioState, targetRatio]);
15
+ constructor(ratioState, targetRatio, market = getAddr('Empty'), user = getAddr('Empty')) {
16
+ super('SparkRatioCheck', getAddr('Empty'), ['uint8', 'uint256', 'address', 'address'], [ratioState, targetRatio, market, user]);
15
17
  this.mappableArgs = [
16
18
  this.args[0],
17
19
  this.args[1],
20
+ this.args[2],
21
+ this.args[3],
18
22
  ];
19
23
  }
20
24
  }
@@ -9,6 +9,7 @@ export declare class SparkTargetRatioCheck extends Action {
9
9
  /**
10
10
  * @param targetRatio The ratio user want to be at
11
11
  * @param market Address of the market
12
+ * @param user Address of the user (EOA/SW). This param was added later
12
13
  */
13
- constructor(targetRatio: uint256, market: EthAddress);
14
+ constructor(targetRatio: uint256, market: EthAddress, user?: EthAddress);
14
15
  }
@@ -9,12 +9,14 @@ export class SparkTargetRatioCheck extends Action {
9
9
  /**
10
10
  * @param targetRatio The ratio user want to be at
11
11
  * @param market Address of the market
12
+ * @param user Address of the user (EOA/SW). This param was added later
12
13
  */
13
- constructor(targetRatio, market) {
14
- super('SparkTargetRatioCheck', getAddr('Empty'), ['uint256', 'address'], [targetRatio, market]);
14
+ constructor(targetRatio, market, user = getAddr('Empty')) {
15
+ super('SparkTargetRatioCheck', getAddr('Empty'), ['uint256', 'address', 'address'], [targetRatio, market, user]);
15
16
  this.mappableArgs = [
16
17
  this.args[0],
17
18
  this.args[1],
19
+ this.args[2],
18
20
  ];
19
21
  }
20
22
  }
@@ -290,6 +290,10 @@ export declare const actionAddresses: {
290
290
  AaveV4DelegateWithdrawWithSig: string;
291
291
  AaveV4DelegateBorrowWithSig: string;
292
292
  AaveV4DelegateSetUsingAsCollateralWithSig: string;
293
+ AaveV4DelegateBorrow: string;
294
+ AaveV4DelegateWithdraw: string;
295
+ AaveV4DelegateSetUsingAsCollateral: string;
296
+ AaveV4SetUserManagers: string;
293
297
  AaveV3RatioTrigger?: undefined;
294
298
  GasFeeTakerL2?: undefined;
295
299
  AaveV3RatioCheck?: undefined;
@@ -593,6 +597,10 @@ export declare const actionAddresses: {
593
597
  AaveV4DelegateWithdrawWithSig?: undefined;
594
598
  AaveV4DelegateBorrowWithSig?: undefined;
595
599
  AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
600
+ AaveV4DelegateBorrow?: undefined;
601
+ AaveV4DelegateWithdraw?: undefined;
602
+ AaveV4DelegateSetUsingAsCollateral?: undefined;
603
+ AaveV4SetUserManagers?: undefined;
596
604
  MorphoBlueView?: undefined;
597
605
  MidnightPaybackDirect?: undefined;
598
606
  MidnightBorrowFromOrders?: undefined;
@@ -893,6 +901,10 @@ export declare const actionAddresses: {
893
901
  AaveV4DelegateWithdrawWithSig?: undefined;
894
902
  AaveV4DelegateBorrowWithSig?: undefined;
895
903
  AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
904
+ AaveV4DelegateBorrow?: undefined;
905
+ AaveV4DelegateWithdraw?: undefined;
906
+ AaveV4DelegateSetUsingAsCollateral?: undefined;
907
+ AaveV4SetUserManagers?: undefined;
896
908
  AaveV3RatioTrigger?: undefined;
897
909
  MidnightPaybackDirect?: undefined;
898
910
  MidnightBorrowFromOrders?: undefined;
@@ -1198,6 +1210,10 @@ export declare const actionAddresses: {
1198
1210
  AaveV4DelegateWithdrawWithSig?: undefined;
1199
1211
  AaveV4DelegateBorrowWithSig?: undefined;
1200
1212
  AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
1213
+ AaveV4DelegateBorrow?: undefined;
1214
+ AaveV4DelegateWithdraw?: undefined;
1215
+ AaveV4DelegateSetUsingAsCollateral?: undefined;
1216
+ AaveV4SetUserManagers?: undefined;
1201
1217
  AaveV3RatioTrigger?: undefined;
1202
1218
  AaveV3RatioCheck?: undefined;
1203
1219
  } | {
@@ -1490,6 +1506,10 @@ export declare const actionAddresses: {
1490
1506
  AaveV4DelegateWithdrawWithSig?: undefined;
1491
1507
  AaveV4DelegateBorrowWithSig?: undefined;
1492
1508
  AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
1509
+ AaveV4DelegateBorrow?: undefined;
1510
+ AaveV4DelegateWithdraw?: undefined;
1511
+ AaveV4DelegateSetUsingAsCollateral?: undefined;
1512
+ AaveV4SetUserManagers?: undefined;
1493
1513
  AaveV3RatioTrigger?: undefined;
1494
1514
  GasFeeTakerL2?: undefined;
1495
1515
  AaveV3RatioCheck?: undefined;
@@ -1790,6 +1810,10 @@ export declare const actionAddresses: {
1790
1810
  AaveV4DelegateWithdrawWithSig?: undefined;
1791
1811
  AaveV4DelegateBorrowWithSig?: undefined;
1792
1812
  AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
1813
+ AaveV4DelegateBorrow?: undefined;
1814
+ AaveV4DelegateWithdraw?: undefined;
1815
+ AaveV4DelegateSetUsingAsCollateral?: undefined;
1816
+ AaveV4SetUserManagers?: undefined;
1793
1817
  AaveV3RatioTrigger?: undefined;
1794
1818
  GasFeeTakerL2?: undefined;
1795
1819
  AaveV3RatioCheck?: undefined;
@@ -179,8 +179,8 @@ export const actionAddresses = {
179
179
  LiquityV2Claim: '0x1b5a0c2573A1692bB183cC5d6f506e108c0599FC',
180
180
  LiquityV2Adjust: '0x3BbC88f3b75cB898395C9b5AE8D9c2a26744993b',
181
181
  LiquityV2AdjustInterestRate: '0x685f0237D8b85B2018278E975a481b0650dE0b54',
182
- LiquityV2SPDeposit: '0x73FF552646A7D93764Ff8D1F9e7662c422E715ef',
183
- LiquityV2SPWithdraw: '0x8E8a4213745Ed68b3fce9d1500f563d885D02FDf',
182
+ LiquityV2SPDeposit: '0x256e97E7f7B42Cf7De5258C59A2935AdEdDdfC63',
183
+ LiquityV2SPWithdraw: '0x7ab4A43DE2628EA53c88E27755325d090f28D9c9',
184
184
  LiquityV2SPClaimColl: '0x3f783de20C3095bcB999AEA999aF4DF184b6630f',
185
185
  LiquityV2AdjustZombieTrove: '0x45F5CEe8f89AdBCe4f5B20f38a49402b152ba99e',
186
186
  // b.protocol
@@ -332,6 +332,10 @@ export const actionAddresses = {
332
332
  AaveV4DelegateWithdrawWithSig: '0x81864dBd69c46B19463eC7BEC6cE0B271126531a',
333
333
  AaveV4DelegateBorrowWithSig: '0x9D68b41BB9f9e9Ac1E1ee49d3566CAd4624886BA',
334
334
  AaveV4DelegateSetUsingAsCollateralWithSig: '0xF3D7C7e8F5154c669EAA0dE996cdE0575D7d3A00',
335
+ AaveV4DelegateBorrow: '0x4284B4e09c46Ee2b4E703dB8e5A2F892d12638e1',
336
+ AaveV4DelegateWithdraw: '0x5e7c404d46971E7BD3a95570A80Bc37F38bf9E29',
337
+ AaveV4DelegateSetUsingAsCollateral: '0xa97f8E483C147f27aE7370DeaC4E6585A37884A2',
338
+ AaveV4SetUserManagers: '0x61e5d59bD82FFC61B916d2F2114eF671b17d0662',
335
339
  },
336
340
  [NETWORKS.optimism.chainId]: {
337
341
  DFSSell: '0x9f234af5c10c136863a20865ba00b26951ab8269',
@@ -301,6 +301,10 @@ declare const actionAddressesAllChains: {
301
301
  AaveV4DelegateWithdrawWithSig: string;
302
302
  AaveV4DelegateBorrowWithSig: string;
303
303
  AaveV4DelegateSetUsingAsCollateralWithSig: string;
304
+ AaveV4DelegateBorrow: string;
305
+ AaveV4DelegateWithdraw: string;
306
+ AaveV4DelegateSetUsingAsCollateral: string;
307
+ AaveV4SetUserManagers: string;
304
308
  AaveV3RatioTrigger?: undefined;
305
309
  GasFeeTakerL2?: undefined;
306
310
  AaveV3RatioCheck?: undefined;
@@ -604,6 +608,10 @@ declare const actionAddressesAllChains: {
604
608
  AaveV4DelegateWithdrawWithSig?: undefined;
605
609
  AaveV4DelegateBorrowWithSig?: undefined;
606
610
  AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
611
+ AaveV4DelegateBorrow?: undefined;
612
+ AaveV4DelegateWithdraw?: undefined;
613
+ AaveV4DelegateSetUsingAsCollateral?: undefined;
614
+ AaveV4SetUserManagers?: undefined;
607
615
  MorphoBlueView?: undefined;
608
616
  MidnightPaybackDirect?: undefined;
609
617
  MidnightBorrowFromOrders?: undefined;
@@ -904,6 +912,10 @@ declare const actionAddressesAllChains: {
904
912
  AaveV4DelegateWithdrawWithSig?: undefined;
905
913
  AaveV4DelegateBorrowWithSig?: undefined;
906
914
  AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
915
+ AaveV4DelegateBorrow?: undefined;
916
+ AaveV4DelegateWithdraw?: undefined;
917
+ AaveV4DelegateSetUsingAsCollateral?: undefined;
918
+ AaveV4SetUserManagers?: undefined;
907
919
  AaveV3RatioTrigger?: undefined;
908
920
  MidnightPaybackDirect?: undefined;
909
921
  MidnightBorrowFromOrders?: undefined;
@@ -1209,6 +1221,10 @@ declare const actionAddressesAllChains: {
1209
1221
  AaveV4DelegateWithdrawWithSig?: undefined;
1210
1222
  AaveV4DelegateBorrowWithSig?: undefined;
1211
1223
  AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
1224
+ AaveV4DelegateBorrow?: undefined;
1225
+ AaveV4DelegateWithdraw?: undefined;
1226
+ AaveV4DelegateSetUsingAsCollateral?: undefined;
1227
+ AaveV4SetUserManagers?: undefined;
1212
1228
  AaveV3RatioTrigger?: undefined;
1213
1229
  AaveV3RatioCheck?: undefined;
1214
1230
  } | {
@@ -1501,6 +1517,10 @@ declare const actionAddressesAllChains: {
1501
1517
  AaveV4DelegateWithdrawWithSig?: undefined;
1502
1518
  AaveV4DelegateBorrowWithSig?: undefined;
1503
1519
  AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
1520
+ AaveV4DelegateBorrow?: undefined;
1521
+ AaveV4DelegateWithdraw?: undefined;
1522
+ AaveV4DelegateSetUsingAsCollateral?: undefined;
1523
+ AaveV4SetUserManagers?: undefined;
1504
1524
  AaveV3RatioTrigger?: undefined;
1505
1525
  GasFeeTakerL2?: undefined;
1506
1526
  AaveV3RatioCheck?: undefined;
@@ -1801,6 +1821,10 @@ declare const actionAddressesAllChains: {
1801
1821
  AaveV4DelegateWithdrawWithSig?: undefined;
1802
1822
  AaveV4DelegateBorrowWithSig?: undefined;
1803
1823
  AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
1824
+ AaveV4DelegateBorrow?: undefined;
1825
+ AaveV4DelegateWithdraw?: undefined;
1826
+ AaveV4DelegateSetUsingAsCollateral?: undefined;
1827
+ AaveV4SetUserManagers?: undefined;
1804
1828
  AaveV3RatioTrigger?: undefined;
1805
1829
  GasFeeTakerL2?: undefined;
1806
1830
  AaveV3RatioCheck?: undefined;
@@ -2103,6 +2127,10 @@ declare const actionAddresses: (chainId?: null) => {
2103
2127
  AaveV4DelegateWithdrawWithSig: string;
2104
2128
  AaveV4DelegateBorrowWithSig: string;
2105
2129
  AaveV4DelegateSetUsingAsCollateralWithSig: string;
2130
+ AaveV4DelegateBorrow: string;
2131
+ AaveV4DelegateWithdraw: string;
2132
+ AaveV4DelegateSetUsingAsCollateral: string;
2133
+ AaveV4SetUserManagers: string;
2106
2134
  AaveV3RatioTrigger?: undefined;
2107
2135
  GasFeeTakerL2?: undefined;
2108
2136
  AaveV3RatioCheck?: undefined;
@@ -2406,6 +2434,10 @@ declare const actionAddresses: (chainId?: null) => {
2406
2434
  AaveV4DelegateWithdrawWithSig?: undefined;
2407
2435
  AaveV4DelegateBorrowWithSig?: undefined;
2408
2436
  AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
2437
+ AaveV4DelegateBorrow?: undefined;
2438
+ AaveV4DelegateWithdraw?: undefined;
2439
+ AaveV4DelegateSetUsingAsCollateral?: undefined;
2440
+ AaveV4SetUserManagers?: undefined;
2409
2441
  MorphoBlueView?: undefined;
2410
2442
  MidnightPaybackDirect?: undefined;
2411
2443
  MidnightBorrowFromOrders?: undefined;
@@ -2706,6 +2738,10 @@ declare const actionAddresses: (chainId?: null) => {
2706
2738
  AaveV4DelegateWithdrawWithSig?: undefined;
2707
2739
  AaveV4DelegateBorrowWithSig?: undefined;
2708
2740
  AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
2741
+ AaveV4DelegateBorrow?: undefined;
2742
+ AaveV4DelegateWithdraw?: undefined;
2743
+ AaveV4DelegateSetUsingAsCollateral?: undefined;
2744
+ AaveV4SetUserManagers?: undefined;
2709
2745
  AaveV3RatioTrigger?: undefined;
2710
2746
  MidnightPaybackDirect?: undefined;
2711
2747
  MidnightBorrowFromOrders?: undefined;
@@ -3011,6 +3047,10 @@ declare const actionAddresses: (chainId?: null) => {
3011
3047
  AaveV4DelegateWithdrawWithSig?: undefined;
3012
3048
  AaveV4DelegateBorrowWithSig?: undefined;
3013
3049
  AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
3050
+ AaveV4DelegateBorrow?: undefined;
3051
+ AaveV4DelegateWithdraw?: undefined;
3052
+ AaveV4DelegateSetUsingAsCollateral?: undefined;
3053
+ AaveV4SetUserManagers?: undefined;
3014
3054
  AaveV3RatioTrigger?: undefined;
3015
3055
  AaveV3RatioCheck?: undefined;
3016
3056
  } | {
@@ -3303,6 +3343,10 @@ declare const actionAddresses: (chainId?: null) => {
3303
3343
  AaveV4DelegateWithdrawWithSig?: undefined;
3304
3344
  AaveV4DelegateBorrowWithSig?: undefined;
3305
3345
  AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
3346
+ AaveV4DelegateBorrow?: undefined;
3347
+ AaveV4DelegateWithdraw?: undefined;
3348
+ AaveV4DelegateSetUsingAsCollateral?: undefined;
3349
+ AaveV4SetUserManagers?: undefined;
3306
3350
  AaveV3RatioTrigger?: undefined;
3307
3351
  GasFeeTakerL2?: undefined;
3308
3352
  AaveV3RatioCheck?: undefined;
@@ -3603,6 +3647,10 @@ declare const actionAddresses: (chainId?: null) => {
3603
3647
  AaveV4DelegateWithdrawWithSig?: undefined;
3604
3648
  AaveV4DelegateBorrowWithSig?: undefined;
3605
3649
  AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
3650
+ AaveV4DelegateBorrow?: undefined;
3651
+ AaveV4DelegateWithdraw?: undefined;
3652
+ AaveV4DelegateSetUsingAsCollateral?: undefined;
3653
+ AaveV4SetUserManagers?: undefined;
3606
3654
  AaveV3RatioTrigger?: undefined;
3607
3655
  GasFeeTakerL2?: undefined;
3608
3656
  AaveV3RatioCheck?: undefined;
@@ -4142,6 +4190,10 @@ declare const _default: {
4142
4190
  AaveV4DelegateWithdrawWithSig: string;
4143
4191
  AaveV4DelegateBorrowWithSig: string;
4144
4192
  AaveV4DelegateSetUsingAsCollateralWithSig: string;
4193
+ AaveV4DelegateBorrow: string;
4194
+ AaveV4DelegateWithdraw: string;
4195
+ AaveV4DelegateSetUsingAsCollateral: string;
4196
+ AaveV4SetUserManagers: string;
4145
4197
  AaveV3RatioTrigger?: undefined;
4146
4198
  GasFeeTakerL2?: undefined;
4147
4199
  AaveV3RatioCheck?: undefined;
@@ -4445,6 +4497,10 @@ declare const _default: {
4445
4497
  AaveV4DelegateWithdrawWithSig?: undefined;
4446
4498
  AaveV4DelegateBorrowWithSig?: undefined;
4447
4499
  AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
4500
+ AaveV4DelegateBorrow?: undefined;
4501
+ AaveV4DelegateWithdraw?: undefined;
4502
+ AaveV4DelegateSetUsingAsCollateral?: undefined;
4503
+ AaveV4SetUserManagers?: undefined;
4448
4504
  MorphoBlueView?: undefined;
4449
4505
  MidnightPaybackDirect?: undefined;
4450
4506
  MidnightBorrowFromOrders?: undefined;
@@ -4745,6 +4801,10 @@ declare const _default: {
4745
4801
  AaveV4DelegateWithdrawWithSig?: undefined;
4746
4802
  AaveV4DelegateBorrowWithSig?: undefined;
4747
4803
  AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
4804
+ AaveV4DelegateBorrow?: undefined;
4805
+ AaveV4DelegateWithdraw?: undefined;
4806
+ AaveV4DelegateSetUsingAsCollateral?: undefined;
4807
+ AaveV4SetUserManagers?: undefined;
4748
4808
  AaveV3RatioTrigger?: undefined;
4749
4809
  MidnightPaybackDirect?: undefined;
4750
4810
  MidnightBorrowFromOrders?: undefined;
@@ -5050,6 +5110,10 @@ declare const _default: {
5050
5110
  AaveV4DelegateWithdrawWithSig?: undefined;
5051
5111
  AaveV4DelegateBorrowWithSig?: undefined;
5052
5112
  AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
5113
+ AaveV4DelegateBorrow?: undefined;
5114
+ AaveV4DelegateWithdraw?: undefined;
5115
+ AaveV4DelegateSetUsingAsCollateral?: undefined;
5116
+ AaveV4SetUserManagers?: undefined;
5053
5117
  AaveV3RatioTrigger?: undefined;
5054
5118
  AaveV3RatioCheck?: undefined;
5055
5119
  } | {
@@ -5342,6 +5406,10 @@ declare const _default: {
5342
5406
  AaveV4DelegateWithdrawWithSig?: undefined;
5343
5407
  AaveV4DelegateBorrowWithSig?: undefined;
5344
5408
  AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
5409
+ AaveV4DelegateBorrow?: undefined;
5410
+ AaveV4DelegateWithdraw?: undefined;
5411
+ AaveV4DelegateSetUsingAsCollateral?: undefined;
5412
+ AaveV4SetUserManagers?: undefined;
5345
5413
  AaveV3RatioTrigger?: undefined;
5346
5414
  GasFeeTakerL2?: undefined;
5347
5415
  AaveV3RatioCheck?: undefined;
@@ -5642,6 +5710,10 @@ declare const _default: {
5642
5710
  AaveV4DelegateWithdrawWithSig?: undefined;
5643
5711
  AaveV4DelegateBorrowWithSig?: undefined;
5644
5712
  AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
5713
+ AaveV4DelegateBorrow?: undefined;
5714
+ AaveV4DelegateWithdraw?: undefined;
5715
+ AaveV4DelegateSetUsingAsCollateral?: undefined;
5716
+ AaveV4SetUserManagers?: undefined;
5645
5717
  AaveV3RatioTrigger?: undefined;
5646
5718
  GasFeeTakerL2?: undefined;
5647
5719
  AaveV3RatioCheck?: undefined;
@@ -5944,6 +6016,10 @@ declare const _default: {
5944
6016
  AaveV4DelegateWithdrawWithSig: string;
5945
6017
  AaveV4DelegateBorrowWithSig: string;
5946
6018
  AaveV4DelegateSetUsingAsCollateralWithSig: string;
6019
+ AaveV4DelegateBorrow: string;
6020
+ AaveV4DelegateWithdraw: string;
6021
+ AaveV4DelegateSetUsingAsCollateral: string;
6022
+ AaveV4SetUserManagers: string;
5947
6023
  AaveV3RatioTrigger?: undefined;
5948
6024
  GasFeeTakerL2?: undefined;
5949
6025
  AaveV3RatioCheck?: undefined;
@@ -6247,6 +6323,10 @@ declare const _default: {
6247
6323
  AaveV4DelegateWithdrawWithSig?: undefined;
6248
6324
  AaveV4DelegateBorrowWithSig?: undefined;
6249
6325
  AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
6326
+ AaveV4DelegateBorrow?: undefined;
6327
+ AaveV4DelegateWithdraw?: undefined;
6328
+ AaveV4DelegateSetUsingAsCollateral?: undefined;
6329
+ AaveV4SetUserManagers?: undefined;
6250
6330
  MorphoBlueView?: undefined;
6251
6331
  MidnightPaybackDirect?: undefined;
6252
6332
  MidnightBorrowFromOrders?: undefined;
@@ -6547,6 +6627,10 @@ declare const _default: {
6547
6627
  AaveV4DelegateWithdrawWithSig?: undefined;
6548
6628
  AaveV4DelegateBorrowWithSig?: undefined;
6549
6629
  AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
6630
+ AaveV4DelegateBorrow?: undefined;
6631
+ AaveV4DelegateWithdraw?: undefined;
6632
+ AaveV4DelegateSetUsingAsCollateral?: undefined;
6633
+ AaveV4SetUserManagers?: undefined;
6550
6634
  AaveV3RatioTrigger?: undefined;
6551
6635
  MidnightPaybackDirect?: undefined;
6552
6636
  MidnightBorrowFromOrders?: undefined;
@@ -6852,6 +6936,10 @@ declare const _default: {
6852
6936
  AaveV4DelegateWithdrawWithSig?: undefined;
6853
6937
  AaveV4DelegateBorrowWithSig?: undefined;
6854
6938
  AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
6939
+ AaveV4DelegateBorrow?: undefined;
6940
+ AaveV4DelegateWithdraw?: undefined;
6941
+ AaveV4DelegateSetUsingAsCollateral?: undefined;
6942
+ AaveV4SetUserManagers?: undefined;
6855
6943
  AaveV3RatioTrigger?: undefined;
6856
6944
  AaveV3RatioCheck?: undefined;
6857
6945
  } | {
@@ -7144,6 +7232,10 @@ declare const _default: {
7144
7232
  AaveV4DelegateWithdrawWithSig?: undefined;
7145
7233
  AaveV4DelegateBorrowWithSig?: undefined;
7146
7234
  AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
7235
+ AaveV4DelegateBorrow?: undefined;
7236
+ AaveV4DelegateWithdraw?: undefined;
7237
+ AaveV4DelegateSetUsingAsCollateral?: undefined;
7238
+ AaveV4SetUserManagers?: undefined;
7147
7239
  AaveV3RatioTrigger?: undefined;
7148
7240
  GasFeeTakerL2?: undefined;
7149
7241
  AaveV3RatioCheck?: undefined;
@@ -7444,6 +7536,10 @@ declare const _default: {
7444
7536
  AaveV4DelegateWithdrawWithSig?: undefined;
7445
7537
  AaveV4DelegateBorrowWithSig?: undefined;
7446
7538
  AaveV4DelegateSetUsingAsCollateralWithSig?: undefined;
7539
+ AaveV4DelegateBorrow?: undefined;
7540
+ AaveV4DelegateWithdraw?: undefined;
7541
+ AaveV4DelegateSetUsingAsCollateral?: undefined;
7542
+ AaveV4SetUserManagers?: undefined;
7447
7543
  AaveV3RatioTrigger?: undefined;
7448
7544
  GasFeeTakerL2?: undefined;
7449
7545
  AaveV3RatioCheck?: undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defisaver/sdk",
3
- "version": "1.3.29",
3
+ "version": "1.3.30-aave-v4-delegate-dev",
4
4
  "description": "",
5
5
  "main": "./umd/index.js",
6
6
  "module": "./esm/src/index.js",
@@ -0,0 +1,36 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ import { EthAddress, uint256 } from '../../types';
4
+
5
+ /**
6
+ * AaveV4DelegateBorrowAction - Approves a spender to borrow from the specified reserve on behalf of the wallet.
7
+ *
8
+ * @category AaveV4DelegateBorrow
9
+ */
10
+ export class AaveV4DelegateBorrowAction extends Action {
11
+ /**
12
+ * @param spoke Address of the spoke.
13
+ * @param reserveId Reserve id.
14
+ * @param spender Address that will receive the borrow allowance.
15
+ * @param amount Amount of borrow allowance.
16
+ */
17
+ constructor(
18
+ spoke: EthAddress,
19
+ reserveId: uint256,
20
+ spender: EthAddress,
21
+ amount: uint256,
22
+ ) {
23
+ super(
24
+ 'AaveV4DelegateBorrow',
25
+ getAddr('AaveV4DelegateBorrow'),
26
+ ['address', 'uint256', 'address', 'uint256'],
27
+ [spoke, reserveId, spender, amount],
28
+ );
29
+ this.mappableArgs = [
30
+ this.args[0],
31
+ this.args[1],
32
+ this.args[2],
33
+ this.args[3],
34
+ ];
35
+ }
36
+ }
@@ -0,0 +1,33 @@
1
+ import { Action } from '../../Action';
2
+ import { getAddr } from '../../addresses';
3
+ import { EthAddress } from '../../types';
4
+
5
+ /**
6
+ * AaveV4DelegateSetUsingAsCollateralAction - Approves a delegatee to set using as collateral on behalf of the wallet.
7
+ *
8
+ * @category AaveV4DelegateSetUsingAsCollateral
9
+ */
10
+ export class AaveV4DelegateSetUsingAsCollateralAction extends Action {
11
+ /**
12
+ * @param spoke Address of the spoke.
13
+ * @param delegatee Address that will receive the permission.
14
+ * @param permission Whether the delegatee can set using as collateral.
15
+ */
16
+ constructor(
17
+ spoke: EthAddress,
18
+ delegatee: EthAddress,
19
+ permission: boolean,
20
+ ) {
21
+ super(
22
+ 'AaveV4DelegateSetUsingAsCollateral',
23
+ getAddr('AaveV4DelegateSetUsingAsCollateral'),
24
+ ['address', 'address', 'bool'],
25
+ [spoke, delegatee, permission],
26
+ );
27
+ this.mappableArgs = [
28
+ this.args[0],
29
+ this.args[1],
30
+ this.args[2],
31
+ ];
32
+ }
33
+ }