@gainsnetwork/sdk 1.6.11 → 1.7.0-rc2

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 (40) hide show
  1. package/lib/constants.d.ts +1 -0
  2. package/lib/constants.js +2 -1
  3. package/lib/contracts/utils/pairs.js +1 -0
  4. package/lib/markets/schedules/builders.js +5 -6
  5. package/lib/markets/schedules/holidays.js +0 -3
  6. package/lib/trade/types.d.ts +2 -1
  7. package/lib/trade/types.js +1 -0
  8. package/package.json +1 -1
  9. package/lib/contracts/types/generated/GFarmTradingStorageV5.d.ts +0 -1911
  10. package/lib/contracts/types/generated/GFarmTradingStorageV5.js +0 -2
  11. package/lib/contracts/types/generated/GNSBorrowingFees.d.ts +0 -1067
  12. package/lib/contracts/types/generated/GNSBorrowingFees.js +0 -2
  13. package/lib/contracts/types/generated/GNSNftRewardsV6.d.ts +0 -533
  14. package/lib/contracts/types/generated/GNSNftRewardsV6.js +0 -2
  15. package/lib/contracts/types/generated/GNSNftRewardsV6_3_1.d.ts +0 -613
  16. package/lib/contracts/types/generated/GNSNftRewardsV6_3_1.js +0 -2
  17. package/lib/contracts/types/generated/GNSTrading.d.ts +0 -758
  18. package/lib/contracts/types/generated/GNSTrading.js +0 -2
  19. package/lib/contracts/types/generated/GNSTradingCallbacks.d.ts +0 -875
  20. package/lib/contracts/types/generated/GNSTradingCallbacks.js +0 -2
  21. package/lib/contracts/types/generated/GNSTradingStorage.d.ts +0 -1387
  22. package/lib/contracts/types/generated/GNSTradingStorage.js +0 -2
  23. package/lib/contracts/types/generated/GTokenV6_3_2.d.ts +0 -1838
  24. package/lib/contracts/types/generated/GTokenV6_3_2.js +0 -2
  25. package/lib/contracts/types/generated/factories/GFarmTradingStorageV5__factory.d.ts +0 -83
  26. package/lib/contracts/types/generated/factories/GFarmTradingStorageV5__factory.js +0 -2691
  27. package/lib/contracts/types/generated/factories/GNSBorrowingFees__factory.d.ts +0 -124
  28. package/lib/contracts/types/generated/factories/GNSBorrowingFees__factory.js +0 -1784
  29. package/lib/contracts/types/generated/factories/GNSNftRewardsV6_3_1__factory.d.ts +0 -100
  30. package/lib/contracts/types/generated/factories/GNSNftRewardsV6_3_1__factory.js +0 -1116
  31. package/lib/contracts/types/generated/factories/GNSNftRewardsV6__factory.d.ts +0 -100
  32. package/lib/contracts/types/generated/factories/GNSNftRewardsV6__factory.js +0 -1003
  33. package/lib/contracts/types/generated/factories/GNSTradingCallbacks__factory.d.ts +0 -113
  34. package/lib/contracts/types/generated/factories/GNSTradingCallbacks__factory.js +0 -1428
  35. package/lib/contracts/types/generated/factories/GNSTradingStorage__factory.d.ts +0 -96
  36. package/lib/contracts/types/generated/factories/GNSTradingStorage__factory.js +0 -2241
  37. package/lib/contracts/types/generated/factories/GNSTrading__factory.d.ts +0 -95
  38. package/lib/contracts/types/generated/factories/GNSTrading__factory.js +0 -1071
  39. package/lib/contracts/types/generated/factories/GTokenV6_3_2__factory.d.ts +0 -110
  40. package/lib/contracts/types/generated/factories/GTokenV6_3_2__factory.js +0 -2682
@@ -441,6 +441,7 @@ export declare const pairs: {
441
441
  "NFLX_1/USD": string;
442
442
  "STABLE/USD": string;
443
443
  "VOOI/USD": string;
444
+ "LIT/USD": string;
444
445
  };
445
446
  export declare const syntheticPairs: Set<string>;
446
447
  export declare const parentToSyntheticPairMap: Map<string, string>;
package/lib/constants.js CHANGED
@@ -449,6 +449,7 @@ exports.pairs = {
449
449
  "NFLX_1/USD": STOCKS,
450
450
  "STABLE/USD": CRYPTO,
451
451
  "VOOI/USD": CRYPTO,
452
+ "LIT/USD": CRYPTO,
452
453
  };
453
454
  exports.syntheticPairs = new Set([
454
455
  "BTCDEGEN/USD",
@@ -505,7 +506,7 @@ exports.delistedPairIxs = new Set([
505
506
  272, 273, 275, 276, 278, 279, 280, 281, 284, 285, 290, 291, 292, 294, 296, 303,
506
507
  305, 306, 311, 312, 322, 323, 330, 333, 335, 336, 337, 342, 343, 344, 346, 347,
507
508
  349, 350, 351, 352, 353, 354, 355, 357, 362, 365, 366, 372, 379, 380, 387, 395,
508
- 396, 400, 401, 408, 423, 427, 428, 430, 435, 436, 437, 438, 441,
509
+ 396, 400, 401, 408, 423, 427, 428, 430, 435, 436, 437, 438, 441, 442,
509
510
  ]);
510
511
  exports.delistedGroupsIxs = new Set([]);
511
512
  exports.DEFAULT_PROTECTION_CLOSE_FACTOR = 1;
@@ -595,4 +595,5 @@ const PAIR_INDEX_TO_DESCRIPTION = {
595
595
  [types_1.PairIndex.NFLXUSD2]: "Netflix to US Dollar",
596
596
  [types_1.PairIndex.STABLEUSD]: "Stable to US Dollar",
597
597
  [types_1.PairIndex.VOOIUSD]: "VOOI to US Dollar",
598
+ [types_1.PairIndex.LITUSD]: "Lighter to US Dollar",
598
599
  };
@@ -24,9 +24,8 @@ const buildForexWeeklySchedule = (currentDate = new Date(), opts) => {
24
24
  const lowLiq = emptyWeekly();
25
25
  const openHour = isInDST ? 16 : 17; // Monday open
26
26
  const closeHour = isInDST ? 16 : 17; // Friday close
27
- // Open windows (ET): Sun 16/17:00 -> 24:00, Mon-Thu 0-24, Fri 0 -> 16/17:00
28
- add(open, types_1.WeekDay.Sunday, { start: { hour: openHour, minute: 0 }, end: { hour: 24, minute: 0 } });
29
- add(open, types_1.WeekDay.Monday, { start: { hour: 0, minute: 0 }, end: { hour: 24, minute: 0 } });
27
+ // Open windows (ET): Mon 16/17:00 -> 24:00, Tue-Thu 0-24, Fri 0 -> 16/17:00
28
+ add(open, types_1.WeekDay.Monday, { start: { hour: openHour, minute: 0 }, end: { hour: 24, minute: 0 } });
30
29
  add(open, types_1.WeekDay.Tuesday, { start: { hour: 0, minute: 0 }, end: { hour: 24, minute: 0 } });
31
30
  add(open, types_1.WeekDay.Wednesday, { start: { hour: 0, minute: 0 }, end: { hour: 24, minute: 0 } });
32
31
  add(open, types_1.WeekDay.Thursday, { start: { hour: 0, minute: 0 }, end: { hour: 24, minute: 0 } });
@@ -38,13 +37,13 @@ const buildForexWeeklySchedule = (currentDate = new Date(), opts) => {
38
37
  const llStartMinute = 45;
39
38
  const llEndHour = isInDST ? (useExtended ? 21 : 19) : (useExtended ? 22 : 20);
40
39
  const llEndMinute = 0;
41
- for (const d of [types_1.WeekDay.Sunday, types_1.WeekDay.Monday, types_1.WeekDay.Tuesday, types_1.WeekDay.Wednesday, types_1.WeekDay.Thursday, types_1.WeekDay.Friday]) {
40
+ for (const d of [types_1.WeekDay.Monday, types_1.WeekDay.Tuesday, types_1.WeekDay.Wednesday, types_1.WeekDay.Thursday, types_1.WeekDay.Friday]) {
42
41
  add(lowLiq, d, { start: { hour: llStartHour, minute: llStartMinute }, end: { hour: llEndHour, minute: llEndMinute } });
43
42
  }
44
43
  const holidays = (0, holidays_1.getHolidaysInCurrentWeek)('forex', currentDate);
45
44
  const summary = isInDST
46
- ? 'Sunday 4:00 pm - Friday 4:00 pm ET (Closed weekends & holidays)'
47
- : 'Sunday 5:00 pm - Friday 5:00 pm ET (Closed weekends & holidays)';
45
+ ? 'Monday 4:00 pm - Friday 4:00 pm ET (Closed weekends & holidays)'
46
+ : 'Monday 5:00 pm - Friday 5:00 pm ET (Closed weekends & holidays)';
48
47
  return { open, lowLiq, holidays, summary };
49
48
  };
50
49
  exports.buildForexWeeklySchedule = buildForexWeeklySchedule;
@@ -29,15 +29,12 @@ const HOLIDAYS_OVERRIDES = {
29
29
  ],
30
30
  indices: [
31
31
  partial(2025, 12, 24, "Christmas Eve", 9, 30, 12, 15),
32
- partial(2025, 12, 31, "New Year's Eve", 0, 0, 16, 0),
33
32
  ],
34
33
  commodities: [
35
34
  partial(2025, 12, 24, "Christmas Eve", 0, 0, 12, 45),
36
- partial(2025, 12, 31, "New Year's Eve", 0, 0, 16, 0),
37
35
  ],
38
36
  forex: [
39
37
  partial(2025, 12, 24, "Christmas Eve", 0, 0, 12, 45),
40
- partial(2025, 12, 31, "New Year's Eve", 0, 0, 16, 0),
41
38
  ],
42
39
  };
43
40
  const getHolidaysForYear = (market, year) => {
@@ -769,5 +769,6 @@ export declare enum PairIndex {
769
769
  USA30USD = 438,
770
770
  NFLXUSD2 = 439,
771
771
  STABLEUSD = 440,
772
- VOOIUSD = 441
772
+ VOOIUSD = 441,
773
+ LITUSD = 442
773
774
  }
@@ -471,4 +471,5 @@ var PairIndex;
471
471
  PairIndex[PairIndex["NFLXUSD2"] = 439] = "NFLXUSD2";
472
472
  PairIndex[PairIndex["STABLEUSD"] = 440] = "STABLEUSD";
473
473
  PairIndex[PairIndex["VOOIUSD"] = 441] = "VOOIUSD";
474
+ PairIndex[PairIndex["LITUSD"] = 442] = "LITUSD";
474
475
  })(PairIndex = exports.PairIndex || (exports.PairIndex = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gainsnetwork/sdk",
3
- "version": "1.6.11",
3
+ "version": "1.7.0-rc2",
4
4
  "description": "Gains Network SDK",
5
5
  "main": "./lib/index.js",
6
6
  "files": [