@nexusmutual/sdk 0.3.12 → 0.3.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.
@@ -1422,7 +1422,7 @@
1422
1422
  "DAI"
1423
1423
  ],
1424
1424
  "isPrivate": true,
1425
- "timestamp": 1704980411
1425
+ "timestamp": 1684312727
1426
1426
  },
1427
1427
  {
1428
1428
  "id": 88,
@@ -1439,7 +1439,7 @@
1439
1439
  "DAI"
1440
1440
  ],
1441
1441
  "isPrivate": true,
1442
- "timestamp": 1704980411
1442
+ "timestamp": 1684312727
1443
1443
  },
1444
1444
  {
1445
1445
  "id": 89,
@@ -1683,7 +1683,7 @@
1683
1683
  "DAI"
1684
1684
  ],
1685
1685
  "isPrivate": true,
1686
- "timestamp": 1689782903
1686
+ "timestamp": 1704981731
1687
1687
  },
1688
1688
  {
1689
1689
  "id": 105,
@@ -1700,7 +1700,7 @@
1700
1700
  "DAI"
1701
1701
  ],
1702
1702
  "isPrivate": true,
1703
- "timestamp": 1689782903
1703
+ "timestamp": 1704980411
1704
1704
  },
1705
1705
  {
1706
1706
  "id": 106,
@@ -1822,7 +1822,7 @@
1822
1822
  "DAI"
1823
1823
  ],
1824
1824
  "isPrivate": true,
1825
- "timestamp": 1691495087
1825
+ "timestamp": 1691493035
1826
1826
  },
1827
1827
  {
1828
1828
  "id": 114,
@@ -2165,7 +2165,7 @@
2165
2165
  "ETH"
2166
2166
  ],
2167
2167
  "isPrivate": false,
2168
- "timestamp": 1709311739
2168
+ "timestamp": 1709310707
2169
2169
  },
2170
2170
  {
2171
2171
  "id": 137,
@@ -2240,7 +2240,7 @@
2240
2240
  "DAI"
2241
2241
  ],
2242
2242
  "isPrivate": false,
2243
- "timestamp": 1710254231
2243
+ "timestamp": 1715349875
2244
2244
  },
2245
2245
  {
2246
2246
  "id": 142,
@@ -2273,7 +2273,7 @@
2273
2273
  "ETH"
2274
2274
  ],
2275
2275
  "isPrivate": false,
2276
- "timestamp": 1710254231
2276
+ "timestamp": 1715349875
2277
2277
  },
2278
2278
  {
2279
2279
  "id": 144,
@@ -2290,7 +2290,7 @@
2290
2290
  "DAI"
2291
2291
  ],
2292
2292
  "isPrivate": false,
2293
- "timestamp": 1715349875
2293
+ "timestamp": 1710254231
2294
2294
  },
2295
2295
  {
2296
2296
  "id": 145,
@@ -2307,7 +2307,7 @@
2307
2307
  "DAI"
2308
2308
  ],
2309
2309
  "isPrivate": false,
2310
- "timestamp": 1715349875
2310
+ "timestamp": 1710254231
2311
2311
  },
2312
2312
  {
2313
2313
  "id": 146,
@@ -2324,7 +2324,7 @@
2324
2324
  "DAI"
2325
2325
  ],
2326
2326
  "isPrivate": false,
2327
- "timestamp": 1710254231
2327
+ "timestamp": 1715349875
2328
2328
  },
2329
2329
  {
2330
2330
  "id": 147,
@@ -2387,7 +2387,7 @@
2387
2387
  "ETH"
2388
2388
  ],
2389
2389
  "isPrivate": false,
2390
- "timestamp": 1711473767
2390
+ "timestamp": 1715349875
2391
2391
  },
2392
2392
  {
2393
2393
  "id": 151,
@@ -2420,7 +2420,7 @@
2420
2420
  "DAI"
2421
2421
  ],
2422
2422
  "isPrivate": false,
2423
- "timestamp": 1711473767
2423
+ "timestamp": 1715349875
2424
2424
  },
2425
2425
  {
2426
2426
  "id": 153,
@@ -2468,7 +2468,7 @@
2468
2468
  "ETH"
2469
2469
  ],
2470
2470
  "isPrivate": false,
2471
- "timestamp": 1711473767
2471
+ "timestamp": 1715349875
2472
2472
  },
2473
2473
  {
2474
2474
  "id": 156,
@@ -2549,7 +2549,7 @@
2549
2549
  "ETH"
2550
2550
  ],
2551
2551
  "isPrivate": false,
2552
- "timestamp": 1715349875
2552
+ "timestamp": 1713185771
2553
2553
  },
2554
2554
  {
2555
2555
  "id": 161,
@@ -2565,7 +2565,7 @@
2565
2565
  "ETH"
2566
2566
  ],
2567
2567
  "isPrivate": false,
2568
- "timestamp": 1715349875
2568
+ "timestamp": 1713185771
2569
2569
  },
2570
2570
  {
2571
2571
  "id": 162,
@@ -2581,7 +2581,7 @@
2581
2581
  "ETH"
2582
2582
  ],
2583
2583
  "isPrivate": false,
2584
- "timestamp": 1715349875
2584
+ "timestamp": 1713185771
2585
2585
  },
2586
2586
  {
2587
2587
  "id": 163,
package/dist/index.d.mts CHANGED
@@ -16,6 +16,24 @@ declare const DEFAULT_SLIPPAGE = 10;
16
16
  declare const DEFAULT_COMMISSION_RATIO = 1500;
17
17
  declare const NEXUS_MUTUAL_DAO_TREASURY_ADDRESS = "0x586b9b2F8010b284A0197f392156f1A7Eb5e86e9";
18
18
 
19
+ declare enum ProductCategoryEnum {
20
+ All = "all",
21
+ Lending = "lending",
22
+ Dex = "dex",
23
+ LiquidRestaking = "liquid-restaking",
24
+ YieldOptimizer = "yield-optimizer",
25
+ Perpetuals = "perpetuals",
26
+ SmartWallet = "smart-wallet",
27
+ RWA = "rwa",
28
+ Coverage = "coverage",
29
+ ETHStaking = "eth-staking",
30
+ Unity = "unity"
31
+ }
32
+ declare const categoryLabelByEnum: Record<ProductCategoryEnum, string>;
33
+ declare const productCategoryMap: {
34
+ [productId: number]: ProductCategoryEnum;
35
+ };
36
+
19
37
  type ApiResponse<R, E> = {
20
38
  result: R;
21
39
  error: E;
@@ -105,23 +123,6 @@ type GetQuoteResponse = {
105
123
  buyCoverInput: BuyCoverInput;
106
124
  };
107
125
  type GetQuoteApiResponse = ApiResponse<GetQuoteResponse, undefined>;
108
- declare enum ProductCategoryEnum {
109
- All = "all",
110
- Lending = "lending",
111
- Dex = "dex",
112
- LiquidRestaking = "liquid-restaking",
113
- YieldOptimizer = "yield-optimizer",
114
- Perpetuals = "perpetuals",
115
- SmartWallet = "smart-wallet",
116
- RWA = "rwa",
117
- Coverage = "coverage",
118
- ETHStaking = "eth-staking",
119
- Unity = "unity"
120
- }
121
- declare const categoryLabelByEnum: Record<ProductCategoryEnum, string>;
122
- declare const productCategoryMap: {
123
- [productId: number]: ProductCategoryEnum;
124
- };
125
126
 
126
127
  /**
127
128
  * Retrieves a quote for buying cover and prepares the necessary inputs for CoverBroker.buyCover method
@@ -1666,7 +1667,7 @@ var products = [
1666
1667
  "DAI"
1667
1668
  ],
1668
1669
  isPrivate: true,
1669
- timestamp: 1704980411
1670
+ timestamp: 1684312727
1670
1671
  },
1671
1672
  {
1672
1673
  id: 88,
@@ -1683,7 +1684,7 @@ var products = [
1683
1684
  "DAI"
1684
1685
  ],
1685
1686
  isPrivate: true,
1686
- timestamp: 1704980411
1687
+ timestamp: 1684312727
1687
1688
  },
1688
1689
  {
1689
1690
  id: 89,
@@ -1939,7 +1940,7 @@ var products = [
1939
1940
  "DAI"
1940
1941
  ],
1941
1942
  isPrivate: true,
1942
- timestamp: 1689782903
1943
+ timestamp: 1704981731
1943
1944
  },
1944
1945
  {
1945
1946
  id: 105,
@@ -1956,7 +1957,7 @@ var products = [
1956
1957
  "DAI"
1957
1958
  ],
1958
1959
  isPrivate: true,
1959
- timestamp: 1689782903
1960
+ timestamp: 1704980411
1960
1961
  },
1961
1962
  {
1962
1963
  id: 106,
@@ -2085,7 +2086,7 @@ var products = [
2085
2086
  "DAI"
2086
2087
  ],
2087
2088
  isPrivate: true,
2088
- timestamp: 1691495087
2089
+ timestamp: 1691493035
2089
2090
  },
2090
2091
  {
2091
2092
  id: 114,
@@ -2450,7 +2451,7 @@ var products = [
2450
2451
  "ETH"
2451
2452
  ],
2452
2453
  isPrivate: false,
2453
- timestamp: 1709311739
2454
+ timestamp: 1709310707
2454
2455
  },
2455
2456
  {
2456
2457
  id: 137,
@@ -2529,7 +2530,7 @@ var products = [
2529
2530
  "DAI"
2530
2531
  ],
2531
2532
  isPrivate: false,
2532
- timestamp: 1710254231
2533
+ timestamp: 1715349875
2533
2534
  },
2534
2535
  {
2535
2536
  id: 142,
@@ -2562,7 +2563,7 @@ var products = [
2562
2563
  "ETH"
2563
2564
  ],
2564
2565
  isPrivate: false,
2565
- timestamp: 1710254231
2566
+ timestamp: 1715349875
2566
2567
  },
2567
2568
  {
2568
2569
  id: 144,
@@ -2579,7 +2580,7 @@ var products = [
2579
2580
  "DAI"
2580
2581
  ],
2581
2582
  isPrivate: false,
2582
- timestamp: 1715349875
2583
+ timestamp: 1710254231
2583
2584
  },
2584
2585
  {
2585
2586
  id: 145,
@@ -2596,7 +2597,7 @@ var products = [
2596
2597
  "DAI"
2597
2598
  ],
2598
2599
  isPrivate: false,
2599
- timestamp: 1715349875
2600
+ timestamp: 1710254231
2600
2601
  },
2601
2602
  {
2602
2603
  id: 146,
@@ -2613,7 +2614,7 @@ var products = [
2613
2614
  "DAI"
2614
2615
  ],
2615
2616
  isPrivate: false,
2616
- timestamp: 1710254231
2617
+ timestamp: 1715349875
2617
2618
  },
2618
2619
  {
2619
2620
  id: 147,
@@ -2678,7 +2679,7 @@ var products = [
2678
2679
  "ETH"
2679
2680
  ],
2680
2681
  isPrivate: false,
2681
- timestamp: 1711473767
2682
+ timestamp: 1715349875
2682
2683
  },
2683
2684
  {
2684
2685
  id: 151,
@@ -2711,7 +2712,7 @@ var products = [
2711
2712
  "DAI"
2712
2713
  ],
2713
2714
  isPrivate: false,
2714
- timestamp: 1711473767
2715
+ timestamp: 1715349875
2715
2716
  },
2716
2717
  {
2717
2718
  id: 153,
@@ -2759,7 +2760,7 @@ var products = [
2759
2760
  "ETH"
2760
2761
  ],
2761
2762
  isPrivate: false,
2762
- timestamp: 1711473767
2763
+ timestamp: 1715349875
2763
2764
  },
2764
2765
  {
2765
2766
  id: 156,
@@ -2841,7 +2842,7 @@ var products = [
2841
2842
  "ETH"
2842
2843
  ],
2843
2844
  isPrivate: false,
2844
- timestamp: 1715349875
2845
+ timestamp: 1713185771
2845
2846
  },
2846
2847
  {
2847
2848
  id: 161,
@@ -2857,7 +2858,7 @@ var products = [
2857
2858
  "ETH"
2858
2859
  ],
2859
2860
  isPrivate: false,
2860
- timestamp: 1715349875
2861
+ timestamp: 1713185771
2861
2862
  },
2862
2863
  {
2863
2864
  id: 162,
@@ -2873,7 +2874,7 @@ var products = [
2873
2874
  "ETH"
2874
2875
  ],
2875
2876
  isPrivate: false,
2876
- timestamp: 1715349875
2877
+ timestamp: 1713185771
2877
2878
  },
2878
2879
  {
2879
2880
  id: 163,
@@ -3111,12 +3112,12 @@ declare const nexusSdk: {
3111
3112
  DEFAULT_SLIPPAGE: 10;
3112
3113
  DEFAULT_COMMISSION_RATIO: 1500;
3113
3114
  NEXUS_MUTUAL_DAO_TREASURY_ADDRESS: "0x586b9b2F8010b284A0197f392156f1A7Eb5e86e9";
3114
- getQuoteAndBuyCoverInputs: typeof getQuoteAndBuyCoverInputs;
3115
3115
  ProductCategoryEnum: typeof ProductCategoryEnum;
3116
3116
  categoryLabelByEnum: Record<ProductCategoryEnum, string>;
3117
3117
  productCategoryMap: {
3118
3118
  [productId: number]: ProductCategoryEnum;
3119
3119
  };
3120
+ getQuoteAndBuyCoverInputs: typeof getQuoteAndBuyCoverInputs;
3120
3121
  calculatePremiumWithCommissionAndSlippage: (premium: bigint, commission?: number, slippage?: number) => bigint;
3121
3122
  calculateExactNxmForEth: (ethIn: bigint, reserves: Reserves) => bigint;
3122
3123
  calculateExactEthForNxm: (nxmIn: bigint, reserves: Reserves) => bigint;
package/dist/index.d.ts CHANGED
@@ -16,6 +16,24 @@ declare const DEFAULT_SLIPPAGE = 10;
16
16
  declare const DEFAULT_COMMISSION_RATIO = 1500;
17
17
  declare const NEXUS_MUTUAL_DAO_TREASURY_ADDRESS = "0x586b9b2F8010b284A0197f392156f1A7Eb5e86e9";
18
18
 
19
+ declare enum ProductCategoryEnum {
20
+ All = "all",
21
+ Lending = "lending",
22
+ Dex = "dex",
23
+ LiquidRestaking = "liquid-restaking",
24
+ YieldOptimizer = "yield-optimizer",
25
+ Perpetuals = "perpetuals",
26
+ SmartWallet = "smart-wallet",
27
+ RWA = "rwa",
28
+ Coverage = "coverage",
29
+ ETHStaking = "eth-staking",
30
+ Unity = "unity"
31
+ }
32
+ declare const categoryLabelByEnum: Record<ProductCategoryEnum, string>;
33
+ declare const productCategoryMap: {
34
+ [productId: number]: ProductCategoryEnum;
35
+ };
36
+
19
37
  type ApiResponse<R, E> = {
20
38
  result: R;
21
39
  error: E;
@@ -105,23 +123,6 @@ type GetQuoteResponse = {
105
123
  buyCoverInput: BuyCoverInput;
106
124
  };
107
125
  type GetQuoteApiResponse = ApiResponse<GetQuoteResponse, undefined>;
108
- declare enum ProductCategoryEnum {
109
- All = "all",
110
- Lending = "lending",
111
- Dex = "dex",
112
- LiquidRestaking = "liquid-restaking",
113
- YieldOptimizer = "yield-optimizer",
114
- Perpetuals = "perpetuals",
115
- SmartWallet = "smart-wallet",
116
- RWA = "rwa",
117
- Coverage = "coverage",
118
- ETHStaking = "eth-staking",
119
- Unity = "unity"
120
- }
121
- declare const categoryLabelByEnum: Record<ProductCategoryEnum, string>;
122
- declare const productCategoryMap: {
123
- [productId: number]: ProductCategoryEnum;
124
- };
125
126
 
126
127
  /**
127
128
  * Retrieves a quote for buying cover and prepares the necessary inputs for CoverBroker.buyCover method
@@ -1666,7 +1667,7 @@ var products = [
1666
1667
  "DAI"
1667
1668
  ],
1668
1669
  isPrivate: true,
1669
- timestamp: 1704980411
1670
+ timestamp: 1684312727
1670
1671
  },
1671
1672
  {
1672
1673
  id: 88,
@@ -1683,7 +1684,7 @@ var products = [
1683
1684
  "DAI"
1684
1685
  ],
1685
1686
  isPrivate: true,
1686
- timestamp: 1704980411
1687
+ timestamp: 1684312727
1687
1688
  },
1688
1689
  {
1689
1690
  id: 89,
@@ -1939,7 +1940,7 @@ var products = [
1939
1940
  "DAI"
1940
1941
  ],
1941
1942
  isPrivate: true,
1942
- timestamp: 1689782903
1943
+ timestamp: 1704981731
1943
1944
  },
1944
1945
  {
1945
1946
  id: 105,
@@ -1956,7 +1957,7 @@ var products = [
1956
1957
  "DAI"
1957
1958
  ],
1958
1959
  isPrivate: true,
1959
- timestamp: 1689782903
1960
+ timestamp: 1704980411
1960
1961
  },
1961
1962
  {
1962
1963
  id: 106,
@@ -2085,7 +2086,7 @@ var products = [
2085
2086
  "DAI"
2086
2087
  ],
2087
2088
  isPrivate: true,
2088
- timestamp: 1691495087
2089
+ timestamp: 1691493035
2089
2090
  },
2090
2091
  {
2091
2092
  id: 114,
@@ -2450,7 +2451,7 @@ var products = [
2450
2451
  "ETH"
2451
2452
  ],
2452
2453
  isPrivate: false,
2453
- timestamp: 1709311739
2454
+ timestamp: 1709310707
2454
2455
  },
2455
2456
  {
2456
2457
  id: 137,
@@ -2529,7 +2530,7 @@ var products = [
2529
2530
  "DAI"
2530
2531
  ],
2531
2532
  isPrivate: false,
2532
- timestamp: 1710254231
2533
+ timestamp: 1715349875
2533
2534
  },
2534
2535
  {
2535
2536
  id: 142,
@@ -2562,7 +2563,7 @@ var products = [
2562
2563
  "ETH"
2563
2564
  ],
2564
2565
  isPrivate: false,
2565
- timestamp: 1710254231
2566
+ timestamp: 1715349875
2566
2567
  },
2567
2568
  {
2568
2569
  id: 144,
@@ -2579,7 +2580,7 @@ var products = [
2579
2580
  "DAI"
2580
2581
  ],
2581
2582
  isPrivate: false,
2582
- timestamp: 1715349875
2583
+ timestamp: 1710254231
2583
2584
  },
2584
2585
  {
2585
2586
  id: 145,
@@ -2596,7 +2597,7 @@ var products = [
2596
2597
  "DAI"
2597
2598
  ],
2598
2599
  isPrivate: false,
2599
- timestamp: 1715349875
2600
+ timestamp: 1710254231
2600
2601
  },
2601
2602
  {
2602
2603
  id: 146,
@@ -2613,7 +2614,7 @@ var products = [
2613
2614
  "DAI"
2614
2615
  ],
2615
2616
  isPrivate: false,
2616
- timestamp: 1710254231
2617
+ timestamp: 1715349875
2617
2618
  },
2618
2619
  {
2619
2620
  id: 147,
@@ -2678,7 +2679,7 @@ var products = [
2678
2679
  "ETH"
2679
2680
  ],
2680
2681
  isPrivate: false,
2681
- timestamp: 1711473767
2682
+ timestamp: 1715349875
2682
2683
  },
2683
2684
  {
2684
2685
  id: 151,
@@ -2711,7 +2712,7 @@ var products = [
2711
2712
  "DAI"
2712
2713
  ],
2713
2714
  isPrivate: false,
2714
- timestamp: 1711473767
2715
+ timestamp: 1715349875
2715
2716
  },
2716
2717
  {
2717
2718
  id: 153,
@@ -2759,7 +2760,7 @@ var products = [
2759
2760
  "ETH"
2760
2761
  ],
2761
2762
  isPrivate: false,
2762
- timestamp: 1711473767
2763
+ timestamp: 1715349875
2763
2764
  },
2764
2765
  {
2765
2766
  id: 156,
@@ -2841,7 +2842,7 @@ var products = [
2841
2842
  "ETH"
2842
2843
  ],
2843
2844
  isPrivate: false,
2844
- timestamp: 1715349875
2845
+ timestamp: 1713185771
2845
2846
  },
2846
2847
  {
2847
2848
  id: 161,
@@ -2857,7 +2858,7 @@ var products = [
2857
2858
  "ETH"
2858
2859
  ],
2859
2860
  isPrivate: false,
2860
- timestamp: 1715349875
2861
+ timestamp: 1713185771
2861
2862
  },
2862
2863
  {
2863
2864
  id: 162,
@@ -2873,7 +2874,7 @@ var products = [
2873
2874
  "ETH"
2874
2875
  ],
2875
2876
  isPrivate: false,
2876
- timestamp: 1715349875
2877
+ timestamp: 1713185771
2877
2878
  },
2878
2879
  {
2879
2880
  id: 163,
@@ -3111,12 +3112,12 @@ declare const nexusSdk: {
3111
3112
  DEFAULT_SLIPPAGE: 10;
3112
3113
  DEFAULT_COMMISSION_RATIO: 1500;
3113
3114
  NEXUS_MUTUAL_DAO_TREASURY_ADDRESS: "0x586b9b2F8010b284A0197f392156f1A7Eb5e86e9";
3114
- getQuoteAndBuyCoverInputs: typeof getQuoteAndBuyCoverInputs;
3115
3115
  ProductCategoryEnum: typeof ProductCategoryEnum;
3116
3116
  categoryLabelByEnum: Record<ProductCategoryEnum, string>;
3117
3117
  productCategoryMap: {
3118
3118
  [productId: number]: ProductCategoryEnum;
3119
3119
  };
3120
+ getQuoteAndBuyCoverInputs: typeof getQuoteAndBuyCoverInputs;
3120
3121
  calculatePremiumWithCommissionAndSlippage: (premium: bigint, commission?: number, slippage?: number) => bigint;
3121
3122
  calculateExactNxmForEth: (ethIn: bigint, reserves: Reserves) => bigint;
3122
3123
  calculateExactEthForNxm: (nxmIn: bigint, reserves: Reserves) => bigint;