@gainsnetwork/sdk 0.2.41-rc2 → 0.2.42-rc1

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 (44) hide show
  1. package/lib/constants.d.ts +6 -0
  2. package/lib/constants.js +7 -1
  3. package/lib/contracts/types/generated/GNSMultiCollatDiamond.d.ts +3 -0
  4. package/lib/contracts/types/generated/factories/GNSMultiCollatDiamond__factory.js +6 -1
  5. package/lib/contracts/utils/pairs.js +6 -0
  6. package/lib/trade/types.d.ts +7 -1
  7. package/lib/trade/types.js +6 -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
  41. package/lib/contracts/utils/openLimitOrders.d.ts +0 -8
  42. package/lib/contracts/utils/openLimitOrders.js +0 -88
  43. package/lib/trade/openLimitOrder.d.ts +0 -2
  44. package/lib/trade/openLimitOrder.js +0 -23
@@ -299,6 +299,12 @@ export declare const pairs: {
299
299
  "HOT/USD": string;
300
300
  "STORJ/USD": string;
301
301
  "RAY/USD": string;
302
+ "PNUT/USD": string;
303
+ "ACT/USD": string;
304
+ "GRASS/USD": string;
305
+ "ZEN/USD": string;
306
+ "LUMIA/USD": string;
307
+ "ALPH/USD": string;
302
308
  };
303
309
  export declare const getAssetClassFromGroupIndex: (groupIndex: number) => string | undefined;
304
310
  export declare const tickerChanges: {
package/lib/constants.js CHANGED
@@ -307,6 +307,12 @@ exports.pairs = {
307
307
  "HOT/USD": CRYPTO,
308
308
  "STORJ/USD": CRYPTO,
309
309
  "RAY/USD": CRYPTO,
310
+ "PNUT/USD": CRYPTO,
311
+ "ACT/USD": CRYPTO,
312
+ "GRASS/USD": CRYPTO,
313
+ "ZEN/USD": CRYPTO,
314
+ "LUMIA/USD": CRYPTO,
315
+ "ALPH/USD": CRYPTO,
310
316
  };
311
317
  const getAssetClassFromGroupIndex = (groupIndex) => {
312
318
  switch (groupIndex) {
@@ -342,7 +348,7 @@ exports.delistedPairIxs = new Set([
342
348
  6, 31, 36, 45, 48, 51, 54, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
343
349
  71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
344
350
  97, 99, 101, 106, 108, 52, 131, 147, 160, 179, 182, 183, 190, 229, 163, 15,
345
- 170, 239, 254, 230, 4, 275, 290, 296,
351
+ 170, 239, 254, 230, 4, 275, 290, 296, 300, 301, 302, 303, 304, 305,
346
352
  ]);
347
353
  exports.delistedGroupsIxs = new Set([6, 7]);
348
354
  exports.DEFAULT_PROTECTION_CLOSE_FACTOR = 1;
@@ -524,6 +524,7 @@ export declare namespace IUpdatePositionSize {
524
524
  newLeverage: PromiseOrValue<BigNumberish>;
525
525
  priceAfterImpact: PromiseOrValue<BigNumberish>;
526
526
  existingPnlCollateral: PromiseOrValue<BigNumberish>;
527
+ oldPosSizePlusPnlCollateral: PromiseOrValue<BigNumberish>;
527
528
  newOpenPrice: PromiseOrValue<BigNumberish>;
528
529
  borrowingFeeCollateral: PromiseOrValue<BigNumberish>;
529
530
  openingFeesCollateral: PromiseOrValue<BigNumberish>;
@@ -542,6 +543,7 @@ export declare namespace IUpdatePositionSize {
542
543
  BigNumber,
543
544
  BigNumber,
544
545
  BigNumber,
546
+ BigNumber,
545
547
  BigNumber
546
548
  ] & {
547
549
  positionSizeCollateralDelta: BigNumber;
@@ -551,6 +553,7 @@ export declare namespace IUpdatePositionSize {
551
553
  newLeverage: BigNumber;
552
554
  priceAfterImpact: BigNumber;
553
555
  existingPnlCollateral: BigNumber;
556
+ oldPosSizePlusPnlCollateral: BigNumber;
554
557
  newOpenPrice: BigNumber;
555
558
  borrowingFeeCollateral: BigNumber;
556
559
  openingFeesCollateral: BigNumber;
@@ -8610,6 +8610,11 @@ const _abi = [
8610
8610
  name: "existingPnlCollateral",
8611
8611
  type: "int256",
8612
8612
  },
8613
+ {
8614
+ internalType: "uint256",
8615
+ name: "oldPosSizePlusPnlCollateral",
8616
+ type: "uint256",
8617
+ },
8613
8618
  {
8614
8619
  internalType: "uint256",
8615
8620
  name: "newOpenPrice",
@@ -8644,7 +8649,7 @@ const _abi = [
8644
8649
  ],
8645
8650
  name: "PositionSizeIncreaseExecuted",
8646
8651
  type: "event",
8647
- signature: "0xf09a9c949c4bd4cbe75b424bea11c683c3ae55e7cdb8321c3ec37e01af72c8d5",
8652
+ signature: "0x4627b6cfd38b837edb1d42b0c6c92e6ba06fded47652e32ce388fcaf3d513477",
8648
8653
  },
8649
8654
  {
8650
8655
  anonymous: false,
@@ -405,4 +405,10 @@ const PAIR_INDEX_TO_DESCRIPTION = {
405
405
  [types_1.PairIndex.HOTUSD]: "Holo to US Dollar",
406
406
  [types_1.PairIndex.STORJUSD]: "Storj to US Dollar",
407
407
  [types_1.PairIndex.RAYUSD]: "Raydium to US Dollar",
408
+ [types_1.PairIndex.PNUTUSD]: "Peanut the Squirrel to US Dollar",
409
+ [types_1.PairIndex.ACTUSD]: "The AI Prophecy to US Dollar",
410
+ [types_1.PairIndex.GRASSUSD]: "Grass to US Dollar",
411
+ [types_1.PairIndex.ZENUSD]: "Horizen to US Dollar",
412
+ [types_1.PairIndex.LUMIAUSD]: "Lumia to US Dollar",
413
+ [types_1.PairIndex.ALPHUSD]: "Alephium to US Dollar",
408
414
  };
@@ -518,5 +518,11 @@ export declare enum PairIndex {
518
518
  DOGUSD = 296,
519
519
  HOTUSD = 297,
520
520
  STORJUSD = 298,
521
- RAYUSD = 299
521
+ RAYUSD = 299,
522
+ PNUTUSD = 300,
523
+ ACTUSD = 301,
524
+ GRASSUSD = 302,
525
+ ZENUSD = 303,
526
+ LUMIAUSD = 304,
527
+ ALPHUSD = 305
522
528
  }
@@ -329,4 +329,10 @@ var PairIndex;
329
329
  PairIndex[PairIndex["HOTUSD"] = 297] = "HOTUSD";
330
330
  PairIndex[PairIndex["STORJUSD"] = 298] = "STORJUSD";
331
331
  PairIndex[PairIndex["RAYUSD"] = 299] = "RAYUSD";
332
+ PairIndex[PairIndex["PNUTUSD"] = 300] = "PNUTUSD";
333
+ PairIndex[PairIndex["ACTUSD"] = 301] = "ACTUSD";
334
+ PairIndex[PairIndex["GRASSUSD"] = 302] = "GRASSUSD";
335
+ PairIndex[PairIndex["ZENUSD"] = 303] = "ZENUSD";
336
+ PairIndex[PairIndex["LUMIAUSD"] = 304] = "LUMIAUSD";
337
+ PairIndex[PairIndex["ALPHUSD"] = 305] = "ALPHUSD";
332
338
  })(PairIndex = exports.PairIndex || (exports.PairIndex = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gainsnetwork/sdk",
3
- "version": "0.2.41-rc2",
3
+ "version": "0.2.42-rc1",
4
4
  "description": "Gains Network SDK",
5
5
  "main": "./lib/index.js",
6
6
  "files": [