@defisaver/positions-sdk 0.0.98 → 0.0.100

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 (80) hide show
  1. package/README.md +63 -63
  2. package/cjs/config/contracts.d.ts +361 -15
  3. package/cjs/config/contracts.js +37 -15
  4. package/cjs/helpers/morphoBlueHelpers/index.d.ts +9 -2
  5. package/cjs/helpers/morphoBlueHelpers/index.js +66 -1
  6. package/cjs/maker/index.js +1 -1
  7. package/cjs/morphoBlue/index.js +4 -27
  8. package/cjs/types/contracts/generated/AaveV3View.d.ts +29 -2
  9. package/cjs/types/contracts/generated/MorphoBlueView.d.ts +61 -0
  10. package/cjs/types/contracts/generated/SparkView.d.ts +29 -2
  11. package/esm/config/contracts.d.ts +361 -15
  12. package/esm/config/contracts.js +37 -15
  13. package/esm/helpers/morphoBlueHelpers/index.d.ts +9 -2
  14. package/esm/helpers/morphoBlueHelpers/index.js +62 -0
  15. package/esm/maker/index.js +1 -1
  16. package/esm/morphoBlue/index.js +4 -27
  17. package/esm/types/contracts/generated/AaveV3View.d.ts +29 -2
  18. package/esm/types/contracts/generated/MorphoBlueView.d.ts +61 -0
  19. package/esm/types/contracts/generated/SparkView.d.ts +29 -2
  20. package/package.json +41 -40
  21. package/src/aaveV2/index.ts +227 -227
  22. package/src/aaveV3/index.ts +558 -558
  23. package/src/assets/index.ts +60 -60
  24. package/src/chickenBonds/index.ts +123 -123
  25. package/src/compoundV2/index.ts +219 -219
  26. package/src/compoundV3/index.ts +266 -266
  27. package/src/config/contracts.js +871 -848
  28. package/src/constants/index.ts +5 -5
  29. package/src/contracts.ts +128 -128
  30. package/src/curveUsd/index.ts +229 -229
  31. package/src/exchange/index.ts +17 -17
  32. package/src/helpers/aaveHelpers/index.ts +134 -134
  33. package/src/helpers/chickenBondsHelpers/index.ts +23 -23
  34. package/src/helpers/compoundHelpers/index.ts +181 -181
  35. package/src/helpers/curveUsdHelpers/index.ts +40 -40
  36. package/src/helpers/index.ts +7 -7
  37. package/src/helpers/llamaLendHelpers/index.ts +45 -45
  38. package/src/helpers/makerHelpers/index.ts +94 -94
  39. package/src/helpers/morphoBlueHelpers/index.ts +117 -56
  40. package/src/helpers/sparkHelpers/index.ts +106 -106
  41. package/src/index.ts +46 -46
  42. package/src/liquity/index.ts +116 -116
  43. package/src/llamaLend/index.ts +268 -268
  44. package/src/maker/index.ts +117 -117
  45. package/src/markets/aave/index.ts +80 -80
  46. package/src/markets/aave/marketAssets.ts +24 -24
  47. package/src/markets/compound/index.ts +142 -142
  48. package/src/markets/compound/marketsAssets.ts +50 -50
  49. package/src/markets/curveUsd/index.ts +69 -69
  50. package/src/markets/index.ts +5 -5
  51. package/src/markets/llamaLend/contractAddresses.ts +95 -95
  52. package/src/markets/llamaLend/index.ts +150 -150
  53. package/src/markets/morphoBlue/index.ts +611 -611
  54. package/src/markets/spark/index.ts +29 -29
  55. package/src/markets/spark/marketAssets.ts +10 -10
  56. package/src/moneymarket/moneymarketCommonService.ts +76 -76
  57. package/src/morphoAaveV2/index.ts +256 -256
  58. package/src/morphoAaveV3/index.ts +612 -612
  59. package/src/morphoBlue/index.ts +171 -199
  60. package/src/multicall/index.ts +22 -22
  61. package/src/services/dsrService.ts +15 -15
  62. package/src/services/priceService.ts +21 -21
  63. package/src/services/utils.ts +51 -51
  64. package/src/setup.ts +8 -8
  65. package/src/spark/index.ts +424 -424
  66. package/src/staking/staking.ts +187 -187
  67. package/src/types/aave.ts +256 -256
  68. package/src/types/chickenBonds.ts +45 -45
  69. package/src/types/common.ts +84 -84
  70. package/src/types/compound.ts +128 -128
  71. package/src/types/contracts/generated/AaveV3View.ts +43 -3
  72. package/src/types/contracts/generated/MorphoBlueView.ts +87 -0
  73. package/src/types/contracts/generated/SparkView.ts +43 -3
  74. package/src/types/curveUsd.ts +118 -118
  75. package/src/types/index.ts +8 -8
  76. package/src/types/liquity.ts +30 -30
  77. package/src/types/llamaLend.ts +143 -143
  78. package/src/types/maker.ts +50 -50
  79. package/src/types/morphoBlue.ts +139 -139
  80. package/src/types/spark.ts +106 -106
@@ -1,12 +1,27 @@
1
1
  export namespace AaveV3View {
2
2
  let abi: ({
3
- inputs: {
3
+ inputs: ({
4
4
  internalType: string;
5
5
  name: string;
6
6
  type: string;
7
- }[];
7
+ components?: undefined;
8
+ } | {
9
+ components: {
10
+ internalType: string;
11
+ name: string;
12
+ type: string;
13
+ }[];
14
+ internalType: string;
15
+ name: string;
16
+ type: string;
17
+ })[];
8
18
  name: string;
9
19
  outputs: {
20
+ components: {
21
+ internalType: string;
22
+ name: string;
23
+ type: string;
24
+ }[];
10
25
  internalType: string;
11
26
  name: string;
12
27
  type: string;
@@ -21,11 +36,6 @@ export namespace AaveV3View {
21
36
  }[];
22
37
  name: string;
23
38
  outputs: {
24
- components: {
25
- internalType: string;
26
- name: string;
27
- type: string;
28
- }[];
29
39
  internalType: string;
30
40
  name: string;
31
41
  type: string;
@@ -57,6 +67,62 @@ export namespace AaveV3View {
57
67
  address: string;
58
68
  createdBlock: number;
59
69
  oldVersions: {
70
+ "17870436": {
71
+ abi: ({
72
+ inputs: {
73
+ internalType: string;
74
+ name: string;
75
+ type: string;
76
+ }[];
77
+ name: string;
78
+ outputs: {
79
+ internalType: string;
80
+ name: string;
81
+ type: string;
82
+ }[];
83
+ stateMutability: string;
84
+ type: string;
85
+ } | {
86
+ inputs: {
87
+ internalType: string;
88
+ name: string;
89
+ type: string;
90
+ }[];
91
+ name: string;
92
+ outputs: {
93
+ components: {
94
+ internalType: string;
95
+ name: string;
96
+ type: string;
97
+ }[];
98
+ internalType: string;
99
+ name: string;
100
+ type: string;
101
+ }[];
102
+ stateMutability: string;
103
+ type: string;
104
+ } | {
105
+ inputs: {
106
+ components: {
107
+ internalType: string;
108
+ name: string;
109
+ type: string;
110
+ }[];
111
+ internalType: string;
112
+ name: string;
113
+ type: string;
114
+ }[];
115
+ name: string;
116
+ outputs: {
117
+ internalType: string;
118
+ name: string;
119
+ type: string;
120
+ }[];
121
+ stateMutability: string;
122
+ type: string;
123
+ })[];
124
+ address: string;
125
+ };
60
126
  "16483408": {
61
127
  abi: {
62
128
  inputs: {
@@ -109,6 +175,62 @@ export namespace AaveV3View {
109
175
  address: string;
110
176
  createdBlock: number;
111
177
  oldVersions: {
178
+ "107950604": {
179
+ address: string;
180
+ abi: ({
181
+ inputs: {
182
+ internalType: string;
183
+ name: string;
184
+ type: string;
185
+ }[];
186
+ name: string;
187
+ outputs: {
188
+ internalType: string;
189
+ name: string;
190
+ type: string;
191
+ }[];
192
+ stateMutability: string;
193
+ type: string;
194
+ } | {
195
+ inputs: {
196
+ internalType: string;
197
+ name: string;
198
+ type: string;
199
+ }[];
200
+ name: string;
201
+ outputs: {
202
+ components: {
203
+ internalType: string;
204
+ name: string;
205
+ type: string;
206
+ }[];
207
+ internalType: string;
208
+ name: string;
209
+ type: string;
210
+ }[];
211
+ stateMutability: string;
212
+ type: string;
213
+ } | {
214
+ inputs: {
215
+ components: {
216
+ internalType: string;
217
+ name: string;
218
+ type: string;
219
+ }[];
220
+ internalType: string;
221
+ name: string;
222
+ type: string;
223
+ }[];
224
+ name: string;
225
+ outputs: {
226
+ internalType: string;
227
+ name: string;
228
+ type: string;
229
+ }[];
230
+ stateMutability: string;
231
+ type: string;
232
+ })[];
233
+ };
112
234
  "6723401": {
113
235
  abi: {
114
236
  inputs: {
@@ -299,6 +421,62 @@ export namespace AaveV3View {
299
421
  address: string;
300
422
  createdBlock: number;
301
423
  oldVersions: {
424
+ "119382184": {
425
+ address: string;
426
+ abi: ({
427
+ inputs: {
428
+ internalType: string;
429
+ name: string;
430
+ type: string;
431
+ }[];
432
+ name: string;
433
+ outputs: {
434
+ internalType: string;
435
+ name: string;
436
+ type: string;
437
+ }[];
438
+ stateMutability: string;
439
+ type: string;
440
+ } | {
441
+ inputs: {
442
+ internalType: string;
443
+ name: string;
444
+ type: string;
445
+ }[];
446
+ name: string;
447
+ outputs: {
448
+ components: {
449
+ internalType: string;
450
+ name: string;
451
+ type: string;
452
+ }[];
453
+ internalType: string;
454
+ name: string;
455
+ type: string;
456
+ }[];
457
+ stateMutability: string;
458
+ type: string;
459
+ } | {
460
+ inputs: {
461
+ components: {
462
+ internalType: string;
463
+ name: string;
464
+ type: string;
465
+ }[];
466
+ internalType: string;
467
+ name: string;
468
+ type: string;
469
+ }[];
470
+ name: string;
471
+ outputs: {
472
+ internalType: string;
473
+ name: string;
474
+ type: string;
475
+ }[];
476
+ stateMutability: string;
477
+ type: string;
478
+ })[];
479
+ };
302
480
  "12855842": {
303
481
  abi: {
304
482
  inputs: {
@@ -465,6 +643,64 @@ export namespace AaveV3View {
465
643
  "8453": {
466
644
  address: string;
467
645
  createdBlock: number;
646
+ oldVersions: {
647
+ "3907180": {
648
+ address: string;
649
+ abi: ({
650
+ inputs: {
651
+ internalType: string;
652
+ name: string;
653
+ type: string;
654
+ }[];
655
+ name: string;
656
+ outputs: {
657
+ internalType: string;
658
+ name: string;
659
+ type: string;
660
+ }[];
661
+ stateMutability: string;
662
+ type: string;
663
+ } | {
664
+ inputs: {
665
+ internalType: string;
666
+ name: string;
667
+ type: string;
668
+ }[];
669
+ name: string;
670
+ outputs: {
671
+ components: {
672
+ internalType: string;
673
+ name: string;
674
+ type: string;
675
+ }[];
676
+ internalType: string;
677
+ name: string;
678
+ type: string;
679
+ }[];
680
+ stateMutability: string;
681
+ type: string;
682
+ } | {
683
+ inputs: {
684
+ components: {
685
+ internalType: string;
686
+ name: string;
687
+ type: string;
688
+ }[];
689
+ internalType: string;
690
+ name: string;
691
+ type: string;
692
+ }[];
693
+ name: string;
694
+ outputs: {
695
+ internalType: string;
696
+ name: string;
697
+ type: string;
698
+ }[];
699
+ stateMutability: string;
700
+ type: string;
701
+ })[];
702
+ };
703
+ };
468
704
  };
469
705
  };
470
706
  }
@@ -2697,13 +2933,28 @@ export namespace MorphoAaveV2View {
2697
2933
  }
2698
2934
  export namespace SparkView {
2699
2935
  let abi_34: ({
2700
- inputs: {
2936
+ inputs: ({
2701
2937
  internalType: string;
2702
2938
  name: string;
2703
2939
  type: string;
2704
- }[];
2940
+ components?: undefined;
2941
+ } | {
2942
+ components: {
2943
+ internalType: string;
2944
+ name: string;
2945
+ type: string;
2946
+ }[];
2947
+ internalType: string;
2948
+ name: string;
2949
+ type: string;
2950
+ })[];
2705
2951
  name: string;
2706
2952
  outputs: {
2953
+ components: {
2954
+ internalType: string;
2955
+ name: string;
2956
+ type: string;
2957
+ }[];
2707
2958
  internalType: string;
2708
2959
  name: string;
2709
2960
  type: string;
@@ -2718,11 +2969,6 @@ export namespace SparkView {
2718
2969
  }[];
2719
2970
  name: string;
2720
2971
  outputs: {
2721
- components: {
2722
- internalType: string;
2723
- name: string;
2724
- type: string;
2725
- }[];
2726
2972
  internalType: string;
2727
2973
  name: string;
2728
2974
  type: string;
@@ -2755,6 +3001,62 @@ export namespace SparkView {
2755
3001
  address: string;
2756
3002
  createdBlock: number;
2757
3003
  oldVersions: {
3004
+ "17870357": {
3005
+ abi: ({
3006
+ inputs: {
3007
+ internalType: string;
3008
+ name: string;
3009
+ type: string;
3010
+ }[];
3011
+ name: string;
3012
+ outputs: {
3013
+ internalType: string;
3014
+ name: string;
3015
+ type: string;
3016
+ }[];
3017
+ stateMutability: string;
3018
+ type: string;
3019
+ } | {
3020
+ inputs: {
3021
+ internalType: string;
3022
+ name: string;
3023
+ type: string;
3024
+ }[];
3025
+ name: string;
3026
+ outputs: {
3027
+ components: {
3028
+ internalType: string;
3029
+ name: string;
3030
+ type: string;
3031
+ }[];
3032
+ internalType: string;
3033
+ name: string;
3034
+ type: string;
3035
+ }[];
3036
+ stateMutability: string;
3037
+ type: string;
3038
+ } | {
3039
+ inputs: {
3040
+ components: {
3041
+ internalType: string;
3042
+ name: string;
3043
+ type: string;
3044
+ }[];
3045
+ internalType: string;
3046
+ name: string;
3047
+ type: string;
3048
+ }[];
3049
+ name: string;
3050
+ outputs: {
3051
+ internalType: string;
3052
+ name: string;
3053
+ type: string;
3054
+ }[];
3055
+ stateMutability: string;
3056
+ type: string;
3057
+ })[];
3058
+ address: string;
3059
+ };
2758
3060
  "17734126": {
2759
3061
  abi: {
2760
3062
  inputs: {
@@ -4457,6 +4759,32 @@ export namespace USDCPriceFeed {
4457
4759
  export namespace MorphoBlueView {
4458
4760
  let abi_66: ({
4459
4761
  inputs: {
4762
+ components: ({
4763
+ components: {
4764
+ internalType: string;
4765
+ name: string;
4766
+ type: string;
4767
+ }[];
4768
+ internalType: string;
4769
+ name: string;
4770
+ type: string;
4771
+ } | {
4772
+ internalType: string;
4773
+ name: string;
4774
+ type: string;
4775
+ components?: undefined;
4776
+ })[];
4777
+ internalType: string;
4778
+ name: string;
4779
+ type: string;
4780
+ }[];
4781
+ name: string;
4782
+ outputs: ({
4783
+ internalType: string;
4784
+ name: string;
4785
+ type: string;
4786
+ components?: undefined;
4787
+ } | {
4460
4788
  components: {
4461
4789
  internalType: string;
4462
4790
  name: string;
@@ -4465,7 +4793,25 @@ export namespace MorphoBlueView {
4465
4793
  internalType: string;
4466
4794
  name: string;
4467
4795
  type: string;
4468
- }[];
4796
+ })[];
4797
+ stateMutability: string;
4798
+ type: string;
4799
+ } | {
4800
+ inputs: ({
4801
+ internalType: string;
4802
+ name: string;
4803
+ type: string;
4804
+ components?: undefined;
4805
+ } | {
4806
+ components: {
4807
+ internalType: string;
4808
+ name: string;
4809
+ type: string;
4810
+ }[];
4811
+ internalType: string;
4812
+ name: string;
4813
+ type: string;
4814
+ })[];
4469
4815
  name: string;
4470
4816
  outputs: {
4471
4817
  internalType: string;