@defisaver/positions-sdk 0.0.12 → 0.0.13

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 (75) hide show
  1. package/cjs/config/contracts.d.ts +183 -71
  2. package/cjs/config/contracts.js +16 -0
  3. package/cjs/markets/curveUsd/index.d.ts +2 -0
  4. package/cjs/markets/curveUsd/index.js +14 -1
  5. package/cjs/types/contracts/generated/CrvUSDtBTCAmm.d.ts +139 -0
  6. package/cjs/types/contracts/generated/CrvUSDtBTCAmm.js +5 -0
  7. package/cjs/types/contracts/generated/CrvUSDtBTCController.d.ts +204 -0
  8. package/cjs/types/contracts/generated/CrvUSDtBTCController.js +5 -0
  9. package/cjs/types/contracts/generated/index.d.ts +2 -0
  10. package/cjs/types/curveUsd.d.ts +2 -1
  11. package/cjs/types/curveUsd.js +1 -0
  12. package/esm/config/contracts.d.ts +183 -71
  13. package/esm/config/contracts.js +16 -0
  14. package/esm/markets/curveUsd/index.d.ts +2 -0
  15. package/esm/markets/curveUsd/index.js +12 -0
  16. package/esm/types/contracts/generated/CrvUSDtBTCAmm.d.ts +139 -0
  17. package/esm/types/contracts/generated/CrvUSDtBTCAmm.js +4 -0
  18. package/esm/types/contracts/generated/CrvUSDtBTCController.d.ts +204 -0
  19. package/esm/types/contracts/generated/CrvUSDtBTCController.js +4 -0
  20. package/esm/types/contracts/generated/index.d.ts +2 -0
  21. package/esm/types/curveUsd.d.ts +2 -1
  22. package/esm/types/curveUsd.js +1 -0
  23. package/package.json +40 -40
  24. package/src/aaveV2/index.ts +220 -220
  25. package/src/aaveV3/index.ts +550 -550
  26. package/src/assets/index.ts +60 -60
  27. package/src/chickenBonds/index.ts +123 -123
  28. package/src/compoundV2/index.ts +206 -206
  29. package/src/compoundV3/index.ts +269 -269
  30. package/src/config/contracts.js +635 -619
  31. package/src/constants/index.ts +3 -3
  32. package/src/contracts.ts +100 -100
  33. package/src/curveUsd/index.ts +228 -228
  34. package/src/exchange/index.ts +17 -17
  35. package/src/helpers/aaveHelpers/index.ts +134 -134
  36. package/src/helpers/chickenBondsHelpers/index.ts +23 -23
  37. package/src/helpers/compoundHelpers/index.ts +181 -181
  38. package/src/helpers/curveUsdHelpers/index.ts +32 -32
  39. package/src/helpers/index.ts +5 -5
  40. package/src/helpers/makerHelpers/index.ts +94 -94
  41. package/src/helpers/sparkHelpers/index.ts +106 -106
  42. package/src/index.ts +40 -40
  43. package/src/liquity/index.ts +103 -103
  44. package/src/maker/index.ts +101 -101
  45. package/src/markets/aave/index.ts +80 -80
  46. package/src/markets/aave/marketAssets.ts +32 -32
  47. package/src/markets/compound/index.ts +85 -85
  48. package/src/markets/compound/marketsAssets.ts +35 -35
  49. package/src/markets/curveUsd/index.ts +56 -42
  50. package/src/markets/index.ts +3 -3
  51. package/src/markets/spark/index.ts +29 -29
  52. package/src/markets/spark/marketAssets.ts +9 -9
  53. package/src/moneymarket/moneymarketCommonService.ts +75 -75
  54. package/src/morpho/markets.ts +39 -39
  55. package/src/morphoAaveV2/index.ts +254 -254
  56. package/src/morphoAaveV3/index.ts +614 -614
  57. package/src/multicall/index.ts +22 -22
  58. package/src/services/dsrService.ts +15 -15
  59. package/src/services/priceService.ts +21 -21
  60. package/src/services/utils.ts +34 -34
  61. package/src/spark/index.ts +413 -413
  62. package/src/staking/staking.ts +167 -167
  63. package/src/types/aave.ts +256 -256
  64. package/src/types/chickenBonds.ts +45 -45
  65. package/src/types/common.ts +83 -83
  66. package/src/types/compound.ts +121 -121
  67. package/src/types/contracts/generated/CrvUSDtBTCAmm.ts +286 -0
  68. package/src/types/contracts/generated/CrvUSDtBTCController.ts +397 -0
  69. package/src/types/contracts/generated/index.ts +2 -0
  70. package/src/types/curveUsd.ts +111 -110
  71. package/src/types/index.ts +6 -6
  72. package/src/types/liquity.ts +29 -29
  73. package/src/types/maker.ts +50 -50
  74. package/src/types/spark.ts +106 -106
  75. package/yarn-error.log +64 -0
@@ -2383,7 +2383,7 @@ export namespace crvUSDWBTCController {
2383
2383
  };
2384
2384
  export { networks_40 as networks };
2385
2385
  }
2386
- export namespace crvUSDwstETHAmm {
2386
+ export namespace crvUSDtBTCController {
2387
2387
  let abi_41: ({
2388
2388
  name: string;
2389
2389
  inputs: {
@@ -2405,6 +2405,13 @@ export namespace crvUSDwstETHAmm {
2405
2405
  outputs: never[];
2406
2406
  name?: undefined;
2407
2407
  anonymous?: undefined;
2408
+ } | {
2409
+ stateMutability: string;
2410
+ type: string;
2411
+ name?: undefined;
2412
+ inputs?: undefined;
2413
+ anonymous?: undefined;
2414
+ outputs?: undefined;
2408
2415
  } | {
2409
2416
  stateMutability: string;
2410
2417
  type: string;
@@ -2418,6 +2425,23 @@ export namespace crvUSDwstETHAmm {
2418
2425
  type: string;
2419
2426
  }[];
2420
2427
  anonymous?: undefined;
2428
+ } | {
2429
+ stateMutability: string;
2430
+ type: string;
2431
+ name: string;
2432
+ inputs: {
2433
+ name: string;
2434
+ type: string;
2435
+ }[];
2436
+ outputs: {
2437
+ name: string;
2438
+ type: string;
2439
+ components: {
2440
+ name: string;
2441
+ type: string;
2442
+ }[];
2443
+ }[];
2444
+ anonymous?: undefined;
2421
2445
  })[];
2422
2446
  export { abi_41 as abi };
2423
2447
  let networks_41: {
@@ -2427,7 +2451,7 @@ export namespace crvUSDwstETHAmm {
2427
2451
  };
2428
2452
  export { networks_41 as networks };
2429
2453
  }
2430
- export namespace crvUSDETHAmm {
2454
+ export namespace crvUSDwstETHAmm {
2431
2455
  let abi_42: ({
2432
2456
  name: string;
2433
2457
  inputs: {
@@ -2471,7 +2495,7 @@ export namespace crvUSDETHAmm {
2471
2495
  };
2472
2496
  export { networks_42 as networks };
2473
2497
  }
2474
- export namespace crvUSDWBTCAmm {
2498
+ export namespace crvUSDETHAmm {
2475
2499
  let abi_43: ({
2476
2500
  name: string;
2477
2501
  inputs: {
@@ -2515,8 +2539,96 @@ export namespace crvUSDWBTCAmm {
2515
2539
  };
2516
2540
  export { networks_43 as networks };
2517
2541
  }
2518
- export namespace crvUSDView {
2542
+ export namespace crvUSDWBTCAmm {
2519
2543
  let abi_44: ({
2544
+ name: string;
2545
+ inputs: {
2546
+ name: string;
2547
+ type: string;
2548
+ indexed: boolean;
2549
+ }[];
2550
+ anonymous: boolean;
2551
+ type: string;
2552
+ stateMutability?: undefined;
2553
+ outputs?: undefined;
2554
+ } | {
2555
+ stateMutability: string;
2556
+ type: string;
2557
+ inputs: {
2558
+ name: string;
2559
+ type: string;
2560
+ }[];
2561
+ outputs: never[];
2562
+ name?: undefined;
2563
+ anonymous?: undefined;
2564
+ } | {
2565
+ stateMutability: string;
2566
+ type: string;
2567
+ name: string;
2568
+ inputs: {
2569
+ name: string;
2570
+ type: string;
2571
+ }[];
2572
+ outputs: {
2573
+ name: string;
2574
+ type: string;
2575
+ }[];
2576
+ anonymous?: undefined;
2577
+ })[];
2578
+ export { abi_44 as abi };
2579
+ let networks_44: {
2580
+ "1": {
2581
+ address: string;
2582
+ };
2583
+ };
2584
+ export { networks_44 as networks };
2585
+ }
2586
+ export namespace crvUSDtBTCAmm {
2587
+ let abi_45: ({
2588
+ name: string;
2589
+ inputs: {
2590
+ name: string;
2591
+ type: string;
2592
+ indexed: boolean;
2593
+ }[];
2594
+ anonymous: boolean;
2595
+ type: string;
2596
+ stateMutability?: undefined;
2597
+ outputs?: undefined;
2598
+ } | {
2599
+ stateMutability: string;
2600
+ type: string;
2601
+ inputs: {
2602
+ name: string;
2603
+ type: string;
2604
+ }[];
2605
+ outputs: never[];
2606
+ name?: undefined;
2607
+ anonymous?: undefined;
2608
+ } | {
2609
+ stateMutability: string;
2610
+ type: string;
2611
+ name: string;
2612
+ inputs: {
2613
+ name: string;
2614
+ type: string;
2615
+ }[];
2616
+ outputs: {
2617
+ name: string;
2618
+ type: string;
2619
+ }[];
2620
+ anonymous?: undefined;
2621
+ })[];
2622
+ export { abi_45 as abi };
2623
+ let networks_45: {
2624
+ "1": {
2625
+ address: string;
2626
+ };
2627
+ };
2628
+ export { networks_45 as networks };
2629
+ }
2630
+ export namespace crvUSDView {
2631
+ let abi_46: ({
2520
2632
  inputs: {
2521
2633
  internalType: string;
2522
2634
  name: string;
@@ -2560,8 +2672,8 @@ export namespace crvUSDView {
2560
2672
  stateMutability: string;
2561
2673
  type: string;
2562
2674
  })[];
2563
- export { abi_44 as abi };
2564
- let networks_44: {
2675
+ export { abi_46 as abi };
2676
+ let networks_46: {
2565
2677
  "1": {
2566
2678
  address: string;
2567
2679
  createdBlock: number;
@@ -2570,10 +2682,10 @@ export namespace crvUSDView {
2570
2682
  };
2571
2683
  };
2572
2684
  };
2573
- export { networks_44 as networks };
2685
+ export { networks_46 as networks };
2574
2686
  }
2575
2687
  export namespace crvUSDFactory {
2576
- let abi_45: ({
2688
+ let abi_47: ({
2577
2689
  name: string;
2578
2690
  inputs: {
2579
2691
  name: string;
@@ -2608,16 +2720,16 @@ export namespace crvUSDFactory {
2608
2720
  }[];
2609
2721
  anonymous?: undefined;
2610
2722
  })[];
2611
- export { abi_45 as abi };
2612
- let networks_45: {
2723
+ export { abi_47 as abi };
2724
+ let networks_47: {
2613
2725
  "1": {
2614
2726
  address: string;
2615
2727
  };
2616
2728
  };
2617
- export { networks_45 as networks };
2729
+ export { networks_47 as networks };
2618
2730
  }
2619
2731
  export namespace LiquityView {
2620
- let abi_46: {
2732
+ let abi_48: {
2621
2733
  inputs: {
2622
2734
  internalType: string;
2623
2735
  name: string;
@@ -2632,8 +2744,8 @@ export namespace LiquityView {
2632
2744
  stateMutability: string;
2633
2745
  type: string;
2634
2746
  }[];
2635
- export { abi_46 as abi };
2636
- let networks_46: {
2747
+ export { abi_48 as abi };
2748
+ let networks_48: {
2637
2749
  "1": {
2638
2750
  address: string;
2639
2751
  createdBlock: number;
@@ -2645,10 +2757,10 @@ export namespace LiquityView {
2645
2757
  };
2646
2758
  };
2647
2759
  };
2648
- export { networks_46 as networks };
2760
+ export { networks_48 as networks };
2649
2761
  }
2650
2762
  export namespace CollSurplusPool {
2651
- let abi_47: ({
2763
+ let abi_49: ({
2652
2764
  anonymous: boolean;
2653
2765
  inputs: {
2654
2766
  indexed: boolean;
@@ -2683,16 +2795,16 @@ export namespace CollSurplusPool {
2683
2795
  name?: undefined;
2684
2796
  outputs?: undefined;
2685
2797
  })[];
2686
- export { abi_47 as abi };
2687
- let networks_47: {
2798
+ export { abi_49 as abi };
2799
+ let networks_49: {
2688
2800
  "1": {
2689
2801
  address: string;
2690
2802
  };
2691
2803
  };
2692
- export { networks_47 as networks };
2804
+ export { networks_49 as networks };
2693
2805
  }
2694
2806
  export namespace TroveManager {
2695
- let abi_48: ({
2807
+ let abi_50: ({
2696
2808
  anonymous: boolean;
2697
2809
  inputs: {
2698
2810
  indexed: boolean;
@@ -2720,16 +2832,16 @@ export namespace TroveManager {
2720
2832
  type: string;
2721
2833
  anonymous?: undefined;
2722
2834
  })[];
2723
- export { abi_48 as abi };
2724
- let networks_48: {
2835
+ export { abi_50 as abi };
2836
+ let networks_50: {
2725
2837
  "1": {
2726
2838
  address: string;
2727
2839
  };
2728
2840
  };
2729
- export { networks_48 as networks };
2841
+ export { networks_50 as networks };
2730
2842
  }
2731
2843
  export namespace PriceFeed {
2732
- let abi_49: ({
2844
+ let abi_51: ({
2733
2845
  anonymous: boolean;
2734
2846
  inputs: {
2735
2847
  indexed: boolean;
@@ -2764,16 +2876,16 @@ export namespace PriceFeed {
2764
2876
  type: string;
2765
2877
  anonymous?: undefined;
2766
2878
  })[];
2767
- export { abi_49 as abi };
2768
- let networks_49: {
2879
+ export { abi_51 as abi };
2880
+ let networks_51: {
2769
2881
  "1": {
2770
2882
  address: string;
2771
2883
  };
2772
2884
  };
2773
- export { networks_49 as networks };
2885
+ export { networks_51 as networks };
2774
2886
  }
2775
2887
  export namespace LiquityActivePool {
2776
- let abi_50: {
2888
+ let abi_52: {
2777
2889
  inputs: never[];
2778
2890
  name: string;
2779
2891
  outputs: {
@@ -2784,16 +2896,16 @@ export namespace LiquityActivePool {
2784
2896
  stateMutability: string;
2785
2897
  type: string;
2786
2898
  }[];
2787
- export { abi_50 as abi };
2788
- let networks_50: {
2899
+ export { abi_52 as abi };
2900
+ let networks_52: {
2789
2901
  "1": {
2790
2902
  address: string;
2791
2903
  };
2792
2904
  };
2793
- export { networks_50 as networks };
2905
+ export { networks_52 as networks };
2794
2906
  }
2795
2907
  export namespace McdView {
2796
- let abi_51: {
2908
+ let abi_53: {
2797
2909
  inputs: {
2798
2910
  internalType: string;
2799
2911
  name: string;
@@ -2808,8 +2920,8 @@ export namespace McdView {
2808
2920
  stateMutability: string;
2809
2921
  type: string;
2810
2922
  }[];
2811
- export { abi_51 as abi };
2812
- let networks_51: {
2923
+ export { abi_53 as abi };
2924
+ let networks_53: {
2813
2925
  "1": {
2814
2926
  address: string;
2815
2927
  createdBlock: number;
@@ -2818,10 +2930,10 @@ export namespace McdView {
2818
2930
  };
2819
2931
  };
2820
2932
  };
2821
- export { networks_51 as networks };
2933
+ export { networks_53 as networks };
2822
2934
  }
2823
2935
  export namespace McdSpotter {
2824
- let abi_52: {
2936
+ let abi_54: {
2825
2937
  constant: boolean;
2826
2938
  inputs: {
2827
2939
  name: string;
@@ -2836,16 +2948,16 @@ export namespace McdSpotter {
2836
2948
  stateMutability: string;
2837
2949
  type: string;
2838
2950
  }[];
2839
- export { abi_52 as abi };
2840
- let networks_52: {
2951
+ export { abi_54 as abi };
2952
+ let networks_54: {
2841
2953
  "1": {
2842
2954
  address: string;
2843
2955
  };
2844
2956
  };
2845
- export { networks_52 as networks };
2957
+ export { networks_54 as networks };
2846
2958
  }
2847
2959
  export namespace McdVat {
2848
- let abi_53: ({
2960
+ let abi_55: ({
2849
2961
  inputs: never[];
2850
2962
  payable: boolean;
2851
2963
  stateMutability: string;
@@ -2886,16 +2998,16 @@ export namespace McdVat {
2886
2998
  type: string;
2887
2999
  anonymous?: undefined;
2888
3000
  })[];
2889
- export { abi_53 as abi };
2890
- let networks_53: {
3001
+ export { abi_55 as abi };
3002
+ let networks_55: {
2891
3003
  "1": {
2892
3004
  address: string;
2893
3005
  };
2894
3006
  };
2895
- export { networks_53 as networks };
3007
+ export { networks_55 as networks };
2896
3008
  }
2897
3009
  export namespace McdJug {
2898
- let abi_54: ({
3010
+ let abi_56: ({
2899
3011
  inputs: {
2900
3012
  internalType: string;
2901
3013
  name: string;
@@ -2940,16 +3052,16 @@ export namespace McdJug {
2940
3052
  type: string;
2941
3053
  anonymous?: undefined;
2942
3054
  })[];
2943
- export { abi_54 as abi };
2944
- let networks_54: {
3055
+ export { abi_56 as abi };
3056
+ let networks_56: {
2945
3057
  "1": {
2946
3058
  address: string;
2947
3059
  };
2948
3060
  };
2949
- export { networks_54 as networks };
3061
+ export { networks_56 as networks };
2950
3062
  }
2951
3063
  export namespace McdDog {
2952
- let abi_55: ({
3064
+ let abi_57: ({
2953
3065
  inputs: {
2954
3066
  internalType: string;
2955
3067
  name: string;
@@ -2988,16 +3100,16 @@ export namespace McdDog {
2988
3100
  type: string;
2989
3101
  anonymous?: undefined;
2990
3102
  })[];
2991
- export { abi_55 as abi };
2992
- let networks_55: {
3103
+ export { abi_57 as abi };
3104
+ let networks_57: {
2993
3105
  "1": {
2994
3106
  address: string;
2995
3107
  };
2996
3108
  };
2997
- export { networks_55 as networks };
3109
+ export { networks_57 as networks };
2998
3110
  }
2999
3111
  export namespace ChickenBondsView {
3000
- let abi_56: ({
3112
+ let abi_58: ({
3001
3113
  inputs: never[];
3002
3114
  name: string;
3003
3115
  outputs: {
@@ -3027,17 +3139,17 @@ export namespace ChickenBondsView {
3027
3139
  stateMutability: string;
3028
3140
  type: string;
3029
3141
  })[];
3030
- export { abi_56 as abi };
3031
- let networks_56: {
3142
+ export { abi_58 as abi };
3143
+ let networks_58: {
3032
3144
  "1": {
3033
3145
  address: string;
3034
3146
  createdBlock: number;
3035
3147
  };
3036
3148
  };
3037
- export { networks_56 as networks };
3149
+ export { networks_58 as networks };
3038
3150
  }
3039
3151
  export namespace ChickenBondsManager {
3040
- let abi_57: {
3152
+ let abi_59: {
3041
3153
  inputs: {
3042
3154
  internalType: string;
3043
3155
  name: string;
@@ -3052,16 +3164,16 @@ export namespace ChickenBondsManager {
3052
3164
  stateMutability: string;
3053
3165
  type: string;
3054
3166
  }[];
3055
- export { abi_57 as abi };
3056
- let networks_57: {
3167
+ export { abi_59 as abi };
3168
+ let networks_59: {
3057
3169
  "1": {
3058
3170
  address: string;
3059
3171
  };
3060
3172
  };
3061
- export { networks_57 as networks };
3173
+ export { networks_59 as networks };
3062
3174
  }
3063
3175
  export namespace COMPPriceFeed {
3064
- let abi_58: ({
3176
+ let abi_60: ({
3065
3177
  inputs: {
3066
3178
  internalType: string;
3067
3179
  name: string;
@@ -3100,16 +3212,16 @@ export namespace COMPPriceFeed {
3100
3212
  type: string;
3101
3213
  anonymous?: undefined;
3102
3214
  })[];
3103
- export { abi_58 as abi };
3104
- let networks_58: {
3215
+ export { abi_60 as abi };
3216
+ let networks_60: {
3105
3217
  "1": {
3106
3218
  address: string;
3107
3219
  };
3108
3220
  };
3109
- export { networks_58 as networks };
3221
+ export { networks_60 as networks };
3110
3222
  }
3111
3223
  export namespace ETHPriceFeed {
3112
- let abi_59: ({
3224
+ let abi_61: ({
3113
3225
  inputs: {
3114
3226
  internalType: string;
3115
3227
  name: string;
@@ -3148,16 +3260,16 @@ export namespace ETHPriceFeed {
3148
3260
  type: string;
3149
3261
  anonymous?: undefined;
3150
3262
  })[];
3151
- export { abi_59 as abi };
3152
- let networks_59: {
3263
+ export { abi_61 as abi };
3264
+ let networks_61: {
3153
3265
  "1": {
3154
3266
  address: string;
3155
3267
  };
3156
3268
  };
3157
- export { networks_59 as networks };
3269
+ export { networks_61 as networks };
3158
3270
  }
3159
3271
  export namespace USDCPriceFeed {
3160
- let abi_60: ({
3272
+ let abi_62: ({
3161
3273
  inputs: {
3162
3274
  internalType: string;
3163
3275
  name: string;
@@ -3196,11 +3308,11 @@ export namespace USDCPriceFeed {
3196
3308
  type: string;
3197
3309
  anonymous?: undefined;
3198
3310
  })[];
3199
- export { abi_60 as abi };
3200
- let networks_60: {
3311
+ export { abi_62 as abi };
3312
+ let networks_62: {
3201
3313
  "1": {
3202
3314
  address: string;
3203
3315
  };
3204
3316
  };
3205
- export { networks_60 as networks };
3317
+ export { networks_62 as networks };
3206
3318
  }