@gainsnetwork/sdk 0.1.7 → 0.1.9

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.
package/lib/constants.js CHANGED
@@ -238,9 +238,9 @@ exports.stockSplits = {
238
238
  "TSLA_1/USD": { date: "8/25/2022", split: 3 },
239
239
  };
240
240
  exports.delistedPairIxs = new Set([
241
- 6, 31, 36, 42, 45, 48, 50, 54, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
242
- 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
243
- 89, 97, 99, 101, 106, 107, 108, 52, 131, 147, 157, 160, 179, 182, 183, 190,
244
- 192, 193, 194, 195, 196, 197, 198, 199,
241
+ 6, 31, 36, 42, 45, 48, 50, 51, 54, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
242
+ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87,
243
+ 88, 89, 97, 99, 101, 106, 107, 108, 52, 131, 147, 157, 160, 179, 182, 183,
244
+ 190, 192, 193, 194, 195, 196, 197, 198, 199,
245
245
  ]);
246
246
  exports.delistedGroupsIxs = new Set([6, 7]);
@@ -98,7 +98,7 @@ const fetchOpenInterest = (contracts, pairIxs) => __awaiter(void 0, void 0, void
98
98
  });
99
99
  exports.fetchOpenInterest = fetchOpenInterest;
100
100
  const getPairDescription = (pairIndex) => {
101
- return PAIR_INDEX_TO_DESCRIPTION[pairIndex];
101
+ return PAIR_INDEX_TO_DESCRIPTION[pairIndex] || '';
102
102
  };
103
103
  exports.getPairDescription = getPairDescription;
104
104
  const PAIR_INDEX_TO_DESCRIPTION = {
@@ -293,4 +293,5 @@ const PAIR_INDEX_TO_DESCRIPTION = {
293
293
  [types_1.PairIndex.XPTUSD]: "Platinum to US Dollar",
294
294
  [types_1.PairIndex.XPDUSD]: "Palladium to US Dollar",
295
295
  [types_1.PairIndex.HGUSD]: "Copper to US Dollar",
296
+ [types_1.PairIndex.JUPUSD]: "Jupiter to US Dollar",
296
297
  };
@@ -2,6 +2,9 @@ import { GFarmTradingStorageV5 } from "../contracts/types/generated";
2
2
  import { IGNSTradingCallbacks } from "../contracts/types/generated/GNSTradingCallbacks";
3
3
  import { BigNumber } from "ethers";
4
4
  import { BorrowingFee } from "./fees/borrowing";
5
+ export type PairIndexes = {
6
+ [key: string]: PairIndex;
7
+ };
5
8
  export type TradeContainer = {
6
9
  trade: Trade;
7
10
  tradeInfo: TradeInfo;
@@ -368,5 +371,6 @@ export declare enum PairIndex {
368
371
  WTIUSD = 187,
369
372
  XPTUSD = 188,
370
373
  XPDUSD = 189,
371
- HGUSD = 190
374
+ HGUSD = 190,
375
+ JUPUSD = 191
372
376
  }
@@ -205,4 +205,5 @@ var PairIndex;
205
205
  PairIndex[PairIndex["XPTUSD"] = 188] = "XPTUSD";
206
206
  PairIndex[PairIndex["XPDUSD"] = 189] = "XPDUSD";
207
207
  PairIndex[PairIndex["HGUSD"] = 190] = "HGUSD";
208
+ PairIndex[PairIndex["JUPUSD"] = 191] = "JUPUSD";
208
209
  })(PairIndex = exports.PairIndex || (exports.PairIndex = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gainsnetwork/sdk",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "Gains Network SDK",
5
5
  "main": "./lib/index.js",
6
6
  "files": [
@@ -16,7 +16,8 @@
16
16
  "test:watch": "jest --watch",
17
17
  "test": "jest --coverage",
18
18
  "typecheck": "tsc --noEmit",
19
- "generate-types": "typechain --target=ethers-v5 --out-dir ./src/contracts/types/generated ./abi/*.json"
19
+ "generate-types": "typechain --target=ethers-v5 --out-dir ./src/contracts/types/generated ./abi/*.json",
20
+ "prepublishOnly": "npm run build"
20
21
  },
21
22
  "repository": {
22
23
  "type": "git",