@gainsnetwork/sdk 0.1.9 → 0.1.10-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 (137) hide show
  1. package/README.md +11 -11
  2. package/lib/constants.d.ts +229 -229
  3. package/lib/constants.js +246 -246
  4. package/lib/contracts/addresses.d.ts +3 -3
  5. package/lib/contracts/addresses.js +31 -31
  6. package/lib/contracts/addresses.json +89 -89
  7. package/lib/contracts/index.d.ts +8 -8
  8. package/lib/contracts/index.js +40 -40
  9. package/lib/contracts/types/generated/GFarmTradingStorageV5.d.ts +1911 -1911
  10. package/lib/contracts/types/generated/GFarmTradingStorageV5.js +2 -2
  11. package/lib/contracts/types/generated/GNSBorrowingFees.d.ts +1067 -1067
  12. package/lib/contracts/types/generated/GNSBorrowingFees.js +2 -2
  13. package/lib/contracts/types/generated/GNSMultiCollatDiamond.d.ts +1740 -1740
  14. package/lib/contracts/types/generated/GNSMultiCollatDiamond.js +2 -2
  15. package/lib/contracts/types/generated/GNSNftRewardsV6.d.ts +533 -533
  16. package/lib/contracts/types/generated/GNSNftRewardsV6.js +2 -2
  17. package/lib/contracts/types/generated/GNSNftRewardsV6_3_1.d.ts +613 -613
  18. package/lib/contracts/types/generated/GNSNftRewardsV6_3_1.js +2 -2
  19. package/lib/contracts/types/generated/GNSTrading.d.ts +758 -758
  20. package/lib/contracts/types/generated/GNSTrading.js +2 -2
  21. package/lib/contracts/types/generated/GNSTradingCallbacks.d.ts +875 -875
  22. package/lib/contracts/types/generated/GNSTradingCallbacks.js +2 -2
  23. package/lib/contracts/types/generated/GNSTradingStorage.d.ts +1387 -1387
  24. package/lib/contracts/types/generated/GNSTradingStorage.js +2 -2
  25. package/lib/contracts/types/generated/GToken.d.ts +1946 -1946
  26. package/lib/contracts/types/generated/GToken.js +2 -2
  27. package/lib/contracts/types/generated/GTokenOpenPnlFeed.d.ts +557 -557
  28. package/lib/contracts/types/generated/GTokenOpenPnlFeed.js +2 -2
  29. package/lib/contracts/types/generated/common.d.ts +22 -22
  30. package/lib/contracts/types/generated/common.js +2 -2
  31. package/lib/contracts/types/generated/factories/GFarmTradingStorageV5__factory.d.ts +83 -83
  32. package/lib/contracts/types/generated/factories/GFarmTradingStorageV5__factory.js +2691 -2691
  33. package/lib/contracts/types/generated/factories/GNSBorrowingFees__factory.d.ts +124 -124
  34. package/lib/contracts/types/generated/factories/GNSBorrowingFees__factory.js +1784 -1784
  35. package/lib/contracts/types/generated/factories/GNSMultiCollatDiamond__factory.d.ts +144 -144
  36. package/lib/contracts/types/generated/factories/GNSMultiCollatDiamond__factory.js +3094 -3094
  37. package/lib/contracts/types/generated/factories/GNSNftRewardsV6_3_1__factory.d.ts +100 -100
  38. package/lib/contracts/types/generated/factories/GNSNftRewardsV6_3_1__factory.js +1116 -1116
  39. package/lib/contracts/types/generated/factories/GNSNftRewardsV6__factory.d.ts +100 -100
  40. package/lib/contracts/types/generated/factories/GNSNftRewardsV6__factory.js +1003 -1003
  41. package/lib/contracts/types/generated/factories/GNSTradingCallbacks__factory.d.ts +113 -113
  42. package/lib/contracts/types/generated/factories/GNSTradingCallbacks__factory.js +1428 -1428
  43. package/lib/contracts/types/generated/factories/GNSTradingStorage__factory.d.ts +96 -96
  44. package/lib/contracts/types/generated/factories/GNSTradingStorage__factory.js +2241 -2241
  45. package/lib/contracts/types/generated/factories/GNSTrading__factory.d.ts +95 -95
  46. package/lib/contracts/types/generated/factories/GNSTrading__factory.js +1071 -1071
  47. package/lib/contracts/types/generated/factories/GTokenOpenPnlFeed__factory.d.ts +59 -59
  48. package/lib/contracts/types/generated/factories/GTokenOpenPnlFeed__factory.js +765 -765
  49. package/lib/contracts/types/generated/factories/GToken__factory.d.ts +121 -121
  50. package/lib/contracts/types/generated/factories/GToken__factory.js +2944 -2944
  51. package/lib/contracts/types/generated/factories/index.d.ts +10 -10
  52. package/lib/contracts/types/generated/factories/index.js +26 -26
  53. package/lib/contracts/types/generated/index.d.ts +21 -21
  54. package/lib/contracts/types/generated/index.js +47 -47
  55. package/lib/contracts/types/index.d.ts +27 -27
  56. package/lib/contracts/types/index.js +10 -10
  57. package/lib/contracts/utils/borrowingFees.d.ts +8 -8
  58. package/lib/contracts/utils/borrowingFees.js +28 -28
  59. package/lib/contracts/utils/index.d.ts +4 -4
  60. package/lib/contracts/utils/index.js +20 -20
  61. package/lib/contracts/utils/openLimitOrders.d.ts +8 -8
  62. package/lib/contracts/utils/openLimitOrders.js +88 -88
  63. package/lib/contracts/utils/openTrades.d.ts +9 -9
  64. package/lib/contracts/utils/openTrades.js +188 -188
  65. package/lib/contracts/utils/pairs.d.ts +7 -7
  66. package/lib/contracts/utils/pairs.js +297 -297
  67. package/lib/index.d.ts +7 -7
  68. package/lib/index.js +24 -24
  69. package/lib/markets/commodities.d.ts +1 -1
  70. package/lib/markets/commodities.js +31 -31
  71. package/lib/markets/crypto.d.ts +1 -1
  72. package/lib/markets/crypto.js +6 -6
  73. package/lib/markets/forex.d.ts +2 -2
  74. package/lib/markets/forex.js +43 -38
  75. package/lib/markets/index.d.ts +5 -5
  76. package/lib/markets/index.js +21 -21
  77. package/lib/markets/indices.d.ts +1 -1
  78. package/lib/markets/indices.js +6 -6
  79. package/lib/markets/stocks.d.ts +3 -3
  80. package/lib/markets/stocks.js +54 -54
  81. package/lib/trade/fees/borrowing/converter.d.ts +13 -13
  82. package/lib/trade/fees/borrowing/converter.js +41 -41
  83. package/lib/trade/fees/borrowing/index.d.ts +55 -55
  84. package/lib/trade/fees/borrowing/index.js +171 -171
  85. package/lib/trade/fees/borrowing/types.d.ts +36 -36
  86. package/lib/trade/fees/borrowing/types.js +2 -2
  87. package/lib/trade/fees/index.d.ts +3 -3
  88. package/lib/trade/fees/index.js +29 -29
  89. package/lib/trade/index.d.ts +8 -8
  90. package/lib/trade/index.js +24 -24
  91. package/lib/trade/liquidation.d.ts +3 -3
  92. package/lib/trade/liquidation.js +16 -16
  93. package/lib/trade/oiWindows.d.ts +3 -3
  94. package/lib/trade/oiWindows.js +20 -20
  95. package/lib/trade/openLimitOrder.d.ts +2 -2
  96. package/lib/trade/openLimitOrder.js +23 -23
  97. package/lib/trade/pnl.d.ts +7 -7
  98. package/lib/trade/pnl.js +33 -33
  99. package/lib/trade/spread.d.ts +2 -2
  100. package/lib/trade/spread.js +22 -22
  101. package/lib/trade/types.d.ts +376 -376
  102. package/lib/trade/types.js +209 -209
  103. package/lib/utils/index.d.ts +1 -1
  104. package/lib/utils/index.js +17 -17
  105. package/lib/utils/packing.d.ts +2 -2
  106. package/lib/utils/packing.js +39 -39
  107. package/lib/vault/index.d.ts +8 -8
  108. package/lib/vault/index.js +10 -10
  109. package/package.json +105 -105
  110. package/lib/contracts/types/generated/GNSBorrowingFeesV6_3_2.d.ts +0 -979
  111. package/lib/contracts/types/generated/GNSBorrowingFeesV6_3_2.js +0 -2
  112. package/lib/contracts/types/generated/GNSBorrowingFeesV6_4.d.ts +0 -1058
  113. package/lib/contracts/types/generated/GNSBorrowingFeesV6_4.js +0 -2
  114. package/lib/contracts/types/generated/GNSPairInfosV6_1.d.ts +0 -911
  115. package/lib/contracts/types/generated/GNSPairInfosV6_1.js +0 -2
  116. package/lib/contracts/types/generated/GNSPairsStorageV6.d.ts +0 -660
  117. package/lib/contracts/types/generated/GNSPairsStorageV6.js +0 -2
  118. package/lib/contracts/types/generated/GNSTradingCallbacksV6_3_2.d.ts +0 -806
  119. package/lib/contracts/types/generated/GNSTradingCallbacksV6_3_2.js +0 -2
  120. package/lib/contracts/types/generated/GNSTradingCallbacksV6_4.d.ts +0 -821
  121. package/lib/contracts/types/generated/GNSTradingCallbacksV6_4.js +0 -2
  122. package/lib/contracts/types/generated/GTokenV6_3_2.d.ts +0 -1838
  123. package/lib/contracts/types/generated/GTokenV6_3_2.js +0 -2
  124. package/lib/contracts/types/generated/factories/GNSBorrowingFeesV6_3_2__factory.d.ts +0 -88
  125. package/lib/contracts/types/generated/factories/GNSBorrowingFeesV6_3_2__factory.js +0 -1654
  126. package/lib/contracts/types/generated/factories/GNSBorrowingFeesV6_4__factory.d.ts +0 -113
  127. package/lib/contracts/types/generated/factories/GNSBorrowingFeesV6_4__factory.js +0 -1742
  128. package/lib/contracts/types/generated/factories/GNSPairInfosV6_1__factory.d.ts +0 -98
  129. package/lib/contracts/types/generated/factories/GNSPairInfosV6_1__factory.js +0 -1485
  130. package/lib/contracts/types/generated/factories/GNSPairsStorageV6__factory.d.ts +0 -117
  131. package/lib/contracts/types/generated/factories/GNSPairsStorageV6__factory.js +0 -1265
  132. package/lib/contracts/types/generated/factories/GNSTradingCallbacksV6_3_2__factory.d.ts +0 -82
  133. package/lib/contracts/types/generated/factories/GNSTradingCallbacksV6_3_2__factory.js +0 -1273
  134. package/lib/contracts/types/generated/factories/GNSTradingCallbacksV6_4__factory.d.ts +0 -82
  135. package/lib/contracts/types/generated/factories/GNSTradingCallbacksV6_4__factory.js +0 -1326
  136. package/lib/contracts/types/generated/factories/GTokenV6_3_2__factory.d.ts +0 -110
  137. package/lib/contracts/types/generated/factories/GTokenV6_3_2__factory.js +0 -2682
@@ -1,297 +1,297 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.getPairDescription = exports.fetchOpenInterest = exports.fetchFees = exports.fetchPairDepths = exports.fetchPairs = void 0;
13
- /* eslint-disable @typescript-eslint/no-unsafe-call */
14
- /* eslint-disable @typescript-eslint/no-unsafe-return */
15
- /* eslint-disable @typescript-eslint/no-unsafe-member-access */
16
- const types_1 = require("../../trade/types");
17
- const fetchPairs = (contracts, pairIxs) => __awaiter(void 0, void 0, void 0, function* () {
18
- if (!contracts) {
19
- return [];
20
- }
21
- const { gnsMultiCollatDiamond: multiCollatContract } = contracts;
22
- try {
23
- const pairs = yield Promise.all(pairIxs.map(pairIndex => multiCollatContract.pairs(pairIndex)));
24
- return pairs.map((pair, index) => {
25
- return {
26
- name: pair.from + "/" + pair.to,
27
- from: pair.from,
28
- to: pair.to,
29
- feeIndex: parseInt(pair.feeIndex.toString()),
30
- groupIndex: parseInt(pair.groupIndex.toString()),
31
- pairIndex: pairIxs[index],
32
- spreadP: parseFloat(pair.spreadP.toString()) / 1e12,
33
- description: (0, exports.getPairDescription)(pairIxs[index]),
34
- };
35
- });
36
- }
37
- catch (error) {
38
- console.error(`Unexpected error while fetching pairs!`);
39
- throw error;
40
- }
41
- });
42
- exports.fetchPairs = fetchPairs;
43
- const fetchPairDepths = (contracts, pairIxs) => __awaiter(void 0, void 0, void 0, function* () {
44
- if (!contracts) {
45
- return [];
46
- }
47
- const { gnsMultiCollatDiamond: multiCollatContract } = contracts;
48
- try {
49
- const pairParams = yield multiCollatContract.getPairDepths(pairIxs);
50
- return pairParams.map(pair => {
51
- return {
52
- onePercentDepthAboveUsd: parseFloat(pair.onePercentDepthAboveUsd.toString()),
53
- onePercentDepthBelowUsd: parseFloat(pair.onePercentDepthBelowUsd.toString()),
54
- };
55
- });
56
- }
57
- catch (error) {
58
- console.error(`Unexpected error while fetching pairs!`);
59
- throw error;
60
- }
61
- });
62
- exports.fetchPairDepths = fetchPairDepths;
63
- const fetchFees = (contracts, feeIxs) => __awaiter(void 0, void 0, void 0, function* () {
64
- if (!contracts) {
65
- return [];
66
- }
67
- const { gnsMultiCollatDiamond: multiCollatContract } = contracts;
68
- try {
69
- const fees = yield Promise.all(feeIxs.map(pairIndex => multiCollatContract.fees(pairIndex)));
70
- return fees.map(fee => {
71
- return {
72
- closeFeeP: parseFloat(fee.closeFeeP.toString()) / 1e12,
73
- minLevPosUsd: parseFloat(fee.minLevPosUsd.toString()) / 1e18,
74
- nftLimitOrderFeeP: parseFloat(fee.nftLimitOrderFeeP.toString()) / 1e12,
75
- openFeeP: parseFloat(fee.openFeeP.toString()) / 1e12,
76
- };
77
- });
78
- }
79
- catch (error) {
80
- console.error(`Unexpected error while fetching pairs!`);
81
- throw error;
82
- }
83
- });
84
- exports.fetchFees = fetchFees;
85
- const fetchOpenInterest = (contracts, pairIxs) => __awaiter(void 0, void 0, void 0, function* () {
86
- const { precision: collateralPrecision } = yield contracts.gnsBorrowingFees.collateralConfig();
87
- const openInterests = yield Promise.all(pairIxs.map(pairIndex => Promise.all([
88
- contracts.gfarmTradingStorageV5.openInterestDai(pairIndex, 0),
89
- contracts.gfarmTradingStorageV5.openInterestDai(pairIndex, 1),
90
- contracts.gnsBorrowingFees.getPairMaxOi(pairIndex),
91
- ])));
92
- const precision = parseFloat(collateralPrecision.toString());
93
- return openInterests.map(openInterest => ({
94
- long: parseFloat(openInterest[0].toString()) / precision,
95
- short: parseFloat(openInterest[1].toString()) / precision,
96
- max: parseFloat(openInterest[2].toString()) / 1e10,
97
- }));
98
- });
99
- exports.fetchOpenInterest = fetchOpenInterest;
100
- const getPairDescription = (pairIndex) => {
101
- return PAIR_INDEX_TO_DESCRIPTION[pairIndex] || '';
102
- };
103
- exports.getPairDescription = getPairDescription;
104
- const PAIR_INDEX_TO_DESCRIPTION = {
105
- [types_1.PairIndex.BTCUSD]: "Bitcoin to US Dollar",
106
- [types_1.PairIndex.ETHUSD]: "Ethereum to US Dollar",
107
- [types_1.PairIndex.LINKUSD]: "Chainlink to US Dollar",
108
- [types_1.PairIndex.DOGEUSD]: "Dogecoin to US Dollar",
109
- [types_1.PairIndex.MATICUSD]: "Polygon to US Dollar",
110
- [types_1.PairIndex.ADAUSD]: "Cardano to US Dollar",
111
- [types_1.PairIndex.SUSHIUSD]: "Sushiswap to US Dollar",
112
- [types_1.PairIndex.AAVEUSD]: "Aave to US Dollar",
113
- [types_1.PairIndex.ALGOUSD]: "Algorand to US Dollar",
114
- [types_1.PairIndex.BATUSD]: "Basic Attention Token to US Dollar",
115
- [types_1.PairIndex.COMPUSD]: "Compound to US Dollar",
116
- [types_1.PairIndex.DOTUSD]: "Polkadot to US Dollar",
117
- [types_1.PairIndex.EOSUSD]: "EOS to US Dollar",
118
- [types_1.PairIndex.LTCUSD]: "Litecoin to US Dollar",
119
- [types_1.PairIndex.MANAUSD]: "Decentraland to US Dollar",
120
- [types_1.PairIndex.OMGUSD]: "OMG Network to US Dollar",
121
- [types_1.PairIndex.SNXUSD]: "Synthetix to US Dollar",
122
- [types_1.PairIndex.UNIUSD]: "Uniswap to US Dollar",
123
- [types_1.PairIndex.XLMUSD]: "Stellar to US Dollar",
124
- [types_1.PairIndex.XRPUSD]: "Ripple to US Dollar",
125
- [types_1.PairIndex.ZECUSD]: "Zcash to US Dollar",
126
- [types_1.PairIndex.EURUSD]: "Euro to US Dollar",
127
- [types_1.PairIndex.USDJPY]: "US Dollar to Japanese Yen",
128
- [types_1.PairIndex.GBPUSD]: "British Pound to US Dollar",
129
- [types_1.PairIndex.USDCHF]: "US Dollar to Swiss Franc",
130
- [types_1.PairIndex.AUDUSD]: "Australian Dollar to US Dollar",
131
- [types_1.PairIndex.USDCAD]: "US Dollar to Canadian Dollar",
132
- [types_1.PairIndex.NZDUSD]: "New Zealand Dollar to US Dollar",
133
- [types_1.PairIndex.EURCHF]: "Euro to Swiss Franc",
134
- [types_1.PairIndex.EURJPY]: "Euro to Japanese Yen",
135
- [types_1.PairIndex.EURGBP]: "Euro to British Pound",
136
- [types_1.PairIndex.LUNAUSD]: "Terra to US Dollar",
137
- [types_1.PairIndex.YFIUSD]: "Yearn.finance to US Dollar",
138
- [types_1.PairIndex.SOLUSD]: "Solana to US Dollar",
139
- [types_1.PairIndex.XTZUSD]: "Tezos to US Dollar",
140
- [types_1.PairIndex.BCHUSD]: "Bitcoin Cash to US Dollar",
141
- [types_1.PairIndex.BNTUSD]: "Bancor to US Dollar",
142
- [types_1.PairIndex.CRVUSD]: "Curve DAO Token to US Dollar",
143
- [types_1.PairIndex.DASHUSD]: "Dash to US Dollar",
144
- [types_1.PairIndex.ETCUSD]: "Ethereum Classic to US Dollar",
145
- [types_1.PairIndex.ICPUSD]: "Internet Computer to US Dollar",
146
- [types_1.PairIndex.MKRUSD]: "Maker to US Dollar",
147
- [types_1.PairIndex.NEOUSD]: "NEO to US Dollar",
148
- [types_1.PairIndex.THETAUSD]: "Theta Network to US Dollar",
149
- [types_1.PairIndex.TRXUSD]: "TRON to US Dollar",
150
- [types_1.PairIndex.ZRXUSD]: "0x to US Dollar",
151
- [types_1.PairIndex.SANDUSD]: "The Sandbox to US Dollar",
152
- [types_1.PairIndex.BNBUSD]: "Binance Coin to US Dollar",
153
- [types_1.PairIndex.AXSUSD]: "Axie Infinity to US Dollar",
154
- [types_1.PairIndex.GRTUSD]: "The Graph to US Dollar",
155
- [types_1.PairIndex.HBARUSD]: "Hedera Hashgraph to US Dollar",
156
- [types_1.PairIndex.XMRUSD]: "Monero to US Dollar",
157
- [types_1.PairIndex.ENJUSD]: "Enjin Coin to US Dollar",
158
- [types_1.PairIndex.FTMUSD]: "Fantom to US Dollar",
159
- [types_1.PairIndex.FTTUSD]: "FTX Token to US Dollar",
160
- [types_1.PairIndex.APEUSD]: "ApeCoin to US Dollar",
161
- [types_1.PairIndex.CHZUSD]: "Chiliz to US Dollar",
162
- [types_1.PairIndex.SHIBUSD]: "Shiba Inu to US Dollar",
163
- [types_1.PairIndex.AAPLUSD]: "Apple to US Dollar",
164
- [types_1.PairIndex.FBUSD]: "Facebook to US Dollar",
165
- [types_1.PairIndex.GOOGLUSD]: "Google to US Dollar",
166
- [types_1.PairIndex.AMZNUSD]: "Amazon to US Dollar",
167
- [types_1.PairIndex.MSFTUSD]: "Microsoft to US Dollar",
168
- [types_1.PairIndex.TSLAUSD]: "Tesla to US Dollar",
169
- [types_1.PairIndex.SNAPUSD]: "Snapchat to US Dollar",
170
- [types_1.PairIndex.NVDAUSD]: "Nvidia to US Dollar",
171
- [types_1.PairIndex.VUSD]: "Visa to US Dollar",
172
- [types_1.PairIndex.MAUSD]: "Mastercard to US Dollar",
173
- [types_1.PairIndex.PFEUSD]: "Pfizer to US Dollar",
174
- [types_1.PairIndex.KOUSD]: "Coca-Cola to US Dollar",
175
- [types_1.PairIndex.DISUSD]: "Disney to US Dollar",
176
- [types_1.PairIndex.GMEUSD]: "GameStop to US Dollar",
177
- [types_1.PairIndex.NKEUSD]: "Nike to US Dollar",
178
- [types_1.PairIndex.AMDUSD]: "AMD to US Dollar",
179
- [types_1.PairIndex.PYPLUSD]: "PayPal to US Dollar",
180
- [types_1.PairIndex.ABNBUSD]: "Airbnb to US Dollar",
181
- [types_1.PairIndex.BAUSD]: "Boeing to US Dollar",
182
- [types_1.PairIndex.SBUXUSD]: "Starbucks to US Dollar",
183
- [types_1.PairIndex.WMTUSD]: "Walmart to US Dollar",
184
- [types_1.PairIndex.INTCUSD]: "Intel to US Dollar",
185
- [types_1.PairIndex.MCDUSD]: "McDonald's to US Dollar",
186
- [types_1.PairIndex.METAUSD]: "Meta Platforms to US Dollar",
187
- [types_1.PairIndex.GOOGLUSD2]: "Google to US Dollar",
188
- [types_1.PairIndex.GMEUSD2]: "GameStop to US Dollar",
189
- [types_1.PairIndex.AMZNUSD2]: "Amazon to US Dollar",
190
- [types_1.PairIndex.TSLAUSD2]: "Tesla to US Dollar",
191
- [types_1.PairIndex.SPYUSD]: "SPDR S&P 500 ETF Trust to US Dollar",
192
- [types_1.PairIndex.QQQUSD]: "Invesco QQQ Trust to US Dollar",
193
- [types_1.PairIndex.IWMUSD]: "iShares Russell 2000 ETF to US Dollar",
194
- [types_1.PairIndex.DIAUSD]: "SPDR Dow Jones Industrial Average ETF Trust to US Dollar",
195
- [types_1.PairIndex.XAUUSD]: "Gold to US Dollar",
196
- [types_1.PairIndex.XAGUSD]: "Silver to US Dollar",
197
- [types_1.PairIndex.USDCNH]: "US Dollar to Chinese Yuan Offshore",
198
- [types_1.PairIndex.USDSGD]: "US Dollar to Singapore Dollar",
199
- [types_1.PairIndex.EURSEK]: "Euro to Swedish Krona",
200
- [types_1.PairIndex.USDKRW]: "US Dollar to South Korean Won",
201
- [types_1.PairIndex.EURNOK]: "Euro to Norwegian Krone",
202
- [types_1.PairIndex.USDINR]: "US Dollar to Indian Rupee",
203
- [types_1.PairIndex.USDMXN]: "US Dollar to Mexican Peso",
204
- [types_1.PairIndex.USDTWD]: "US Dollar to Taiwan New Dollar",
205
- [types_1.PairIndex.USDZAR]: "US Dollar to South African Rand",
206
- [types_1.PairIndex.USDBRL]: "US Dollar to Brazilian Real",
207
- [types_1.PairIndex.AVAXUSD]: "Avalanche to US Dollar",
208
- [types_1.PairIndex.ATOMUSD]: "Cosmos to US Dollar",
209
- [types_1.PairIndex.NEARUSD]: "NEAR Protocol to US Dollar",
210
- [types_1.PairIndex.QNTUSD]: "Quant to US Dollar",
211
- [types_1.PairIndex.IOTAUSD]: "IOTA to US Dollar",
212
- [types_1.PairIndex.TONUSD]: "The Open Network to US Dollar",
213
- [types_1.PairIndex.RPLUSD]: "Rocket Pool to US Dollar",
214
- [types_1.PairIndex.ARBUSD]: "Arbitrum to US Dollar",
215
- [types_1.PairIndex.EURAUD]: "Euro to Australian Dollar",
216
- [types_1.PairIndex.EURNZD]: "Euro to New Zealand Dollar",
217
- [types_1.PairIndex.EURCAD]: "Euro to Canadian Dollar",
218
- [types_1.PairIndex.GBPAUD]: "British Pound to Australian Dollar",
219
- [types_1.PairIndex.GBPNZD]: "British Pound to New Zealand Dollar",
220
- [types_1.PairIndex.GBPCAD]: "British Pound to Canadian Dollar",
221
- [types_1.PairIndex.GBPCHF]: "British Pound to Swiss Franc",
222
- [types_1.PairIndex.GBPJPY]: "British Pound to Japanese Yen",
223
- [types_1.PairIndex.AUDNZD]: "Australian Dollar to New Zealand Dollar",
224
- [types_1.PairIndex.AUDCAD]: "Australian Dollar to Canadian Dollar",
225
- [types_1.PairIndex.AUDCHF]: "Australian Dollar to Swiss Franc",
226
- [types_1.PairIndex.AUDJPY]: "Australian Dollar to Japanese Yen",
227
- [types_1.PairIndex.NZDCAD]: "New Zealand Dollar to Canadian Dollar",
228
- [types_1.PairIndex.NZDCHF]: "New Zealand Dollar to Swiss Franc",
229
- [types_1.PairIndex.NZDJPY]: "New Zealand Dollar to Japanese Yen",
230
- [types_1.PairIndex.CADCHF]: "Canadian Dollar to Swiss Franc",
231
- [types_1.PairIndex.CADJPY]: "Canadian Dollar to Japanese Yen",
232
- [types_1.PairIndex.CHFJPY]: "Swiss Franc to Japanese Yen",
233
- [types_1.PairIndex.LDOUSD]: "Lido DAO to US Dollar",
234
- [types_1.PairIndex.INJUSD]: "Injective Protocol to US Dollar",
235
- [types_1.PairIndex.RUNEUSD]: "THORChain to US Dollar",
236
- [types_1.PairIndex.CAKEUSD]: "PancakeSwap to US Dollar",
237
- [types_1.PairIndex.FXSUSD]: "Frax Share to US Dollar",
238
- [types_1.PairIndex.TWTUSD]: "Trust Wallet Token to US Dollar",
239
- [types_1.PairIndex.PEPEUSD]: "Pepe to US Dollar",
240
- [types_1.PairIndex.DYDXUSD]: "dYdX to US Dollar",
241
- [types_1.PairIndex.GMXUSD]: "GMX to US Dollar",
242
- [types_1.PairIndex.FILUSD]: "Filecoin to US Dollar",
243
- [types_1.PairIndex.APTUSD]: "Aptos to US Dollar",
244
- [types_1.PairIndex.IMXUSD]: "Immutable X to US Dollar",
245
- [types_1.PairIndex.VETUSD]: "VeChain to US Dollar",
246
- [types_1.PairIndex.OPUSD]: "Optimism to US Dollar",
247
- [types_1.PairIndex.RNDRUSD]: "Render Token to US Dollar",
248
- [types_1.PairIndex.EGLDUSD]: "Elrond to US Dollar",
249
- [types_1.PairIndex.TIAUSD]: "Tia to US Dollar",
250
- [types_1.PairIndex.STXUSD]: "Stacks to US Dollar",
251
- [types_1.PairIndex.FLOWUSD]: "Flow to US Dollar",
252
- [types_1.PairIndex.KAVAUSD]: "Kava to US Dollar",
253
- [types_1.PairIndex.GALAUSD]: "Gala to US Dollar",
254
- [types_1.PairIndex.MINAUSD]: "Mina to US Dollar",
255
- [types_1.PairIndex.ORDIUSD]: "Ordi to US Dollar",
256
- [types_1.PairIndex.ILVUSD]: "Illuvium to US Dollar",
257
- [types_1.PairIndex.KLAYUSD]: "Klaytn to US Dollar",
258
- [types_1.PairIndex.SUIUSD]: "Sui to US Dollar",
259
- [types_1.PairIndex.BLURUSD]: "Blur to US Dollar",
260
- [types_1.PairIndex.FETUSD]: "Fetch.ai to US Dollar",
261
- [types_1.PairIndex.CFXUSD]: "Conflux to US Dollar",
262
- [types_1.PairIndex.BEAMUSD]: "Beam to US Dollar",
263
- [types_1.PairIndex.ARUSD]: "Arweave to US Dollar",
264
- [types_1.PairIndex.SEIUSD]: "Sei to US Dollar",
265
- [types_1.PairIndex.BTTUSD]: "BitTorrent to US Dollar",
266
- [types_1.PairIndex.ROSEUSD]: "Oasis Network to US Dollar",
267
- [types_1.PairIndex.WOOUSD]: "WOO Network to US Dollar",
268
- [types_1.PairIndex.AGIXUSD]: "SingularityNET to US Dollar",
269
- [types_1.PairIndex.ZILUSD]: "Zilliqa to US Dollar",
270
- [types_1.PairIndex.GMTUSD]: "STEPN to US Dollar",
271
- [types_1.PairIndex.ASTRUSD]: "Astar to US Dollar",
272
- [types_1.PairIndex.ONEINCHUSD]: "1inch to US Dollar",
273
- [types_1.PairIndex.FLOKIUSD]: "Floki Inu to US Dollar",
274
- [types_1.PairIndex.QTUMUSD]: "Qtum to US Dollar",
275
- [types_1.PairIndex.OCEANUSD]: "Ocean Protocol to US Dollar",
276
- [types_1.PairIndex.WLDUSD]: "Worldcoin to US Dollar",
277
- [types_1.PairIndex.MASKUSD]: "Mask Network to US Dollar",
278
- [types_1.PairIndex.CELOUSD]: "Celo to US Dollar",
279
- [types_1.PairIndex.LRCUSD]: "Loopring to US Dollar",
280
- [types_1.PairIndex.ENSUSD]: "Ethereum Name Service to US Dollar",
281
- [types_1.PairIndex.MEMEUSD]: "Meme to US Dollar",
282
- [types_1.PairIndex.ANKRUSD]: "Ankr to US Dollar",
283
- [types_1.PairIndex.IOTXUSD]: "IoTeX to US Dollar",
284
- [types_1.PairIndex.ICXUSD]: "ICON to US Dollar",
285
- [types_1.PairIndex.KSMUSD]: "Kusama to US Dollar",
286
- [types_1.PairIndex.RVNUSD]: "Ravencoin to US Dollar",
287
- [types_1.PairIndex.ANTUSD]: "Aragon to US Dollar",
288
- [types_1.PairIndex.WAVESUSD]: "Waves to US Dollar",
289
- [types_1.PairIndex.SKLUSD]: "SKALE to US Dollar",
290
- [types_1.PairIndex.SUPERUSD]: "SuperFarm to US Dollar",
291
- [types_1.PairIndex.BALUSD]: "Balancer to US Dollar",
292
- [types_1.PairIndex.WTIUSD]: "Oil to US Dollar",
293
- [types_1.PairIndex.XPTUSD]: "Platinum to US Dollar",
294
- [types_1.PairIndex.XPDUSD]: "Palladium to US Dollar",
295
- [types_1.PairIndex.HGUSD]: "Copper to US Dollar",
296
- [types_1.PairIndex.JUPUSD]: "Jupiter to US Dollar",
297
- };
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.getPairDescription = exports.fetchOpenInterest = exports.fetchFees = exports.fetchPairDepths = exports.fetchPairs = void 0;
13
+ /* eslint-disable @typescript-eslint/no-unsafe-call */
14
+ /* eslint-disable @typescript-eslint/no-unsafe-return */
15
+ /* eslint-disable @typescript-eslint/no-unsafe-member-access */
16
+ const types_1 = require("../../trade/types");
17
+ const fetchPairs = (contracts, pairIxs) => __awaiter(void 0, void 0, void 0, function* () {
18
+ if (!contracts) {
19
+ return [];
20
+ }
21
+ const { gnsMultiCollatDiamond: multiCollatContract } = contracts;
22
+ try {
23
+ const pairs = yield Promise.all(pairIxs.map(pairIndex => multiCollatContract.pairs(pairIndex)));
24
+ return pairs.map((pair, index) => {
25
+ return {
26
+ name: pair.from + "/" + pair.to,
27
+ from: pair.from,
28
+ to: pair.to,
29
+ feeIndex: parseInt(pair.feeIndex.toString()),
30
+ groupIndex: parseInt(pair.groupIndex.toString()),
31
+ pairIndex: pairIxs[index],
32
+ spreadP: parseFloat(pair.spreadP.toString()) / 1e12,
33
+ description: (0, exports.getPairDescription)(pairIxs[index]),
34
+ };
35
+ });
36
+ }
37
+ catch (error) {
38
+ console.error(`Unexpected error while fetching pairs!`);
39
+ throw error;
40
+ }
41
+ });
42
+ exports.fetchPairs = fetchPairs;
43
+ const fetchPairDepths = (contracts, pairIxs) => __awaiter(void 0, void 0, void 0, function* () {
44
+ if (!contracts) {
45
+ return [];
46
+ }
47
+ const { gnsMultiCollatDiamond: multiCollatContract } = contracts;
48
+ try {
49
+ const pairParams = yield multiCollatContract.getPairDepths(pairIxs);
50
+ return pairParams.map(pair => {
51
+ return {
52
+ onePercentDepthAboveUsd: parseFloat(pair.onePercentDepthAboveUsd.toString()),
53
+ onePercentDepthBelowUsd: parseFloat(pair.onePercentDepthBelowUsd.toString()),
54
+ };
55
+ });
56
+ }
57
+ catch (error) {
58
+ console.error(`Unexpected error while fetching pairs!`);
59
+ throw error;
60
+ }
61
+ });
62
+ exports.fetchPairDepths = fetchPairDepths;
63
+ const fetchFees = (contracts, feeIxs) => __awaiter(void 0, void 0, void 0, function* () {
64
+ if (!contracts) {
65
+ return [];
66
+ }
67
+ const { gnsMultiCollatDiamond: multiCollatContract } = contracts;
68
+ try {
69
+ const fees = yield Promise.all(feeIxs.map(pairIndex => multiCollatContract.fees(pairIndex)));
70
+ return fees.map(fee => {
71
+ return {
72
+ closeFeeP: parseFloat(fee.closeFeeP.toString()) / 1e12,
73
+ minLevPosUsd: parseFloat(fee.minLevPosUsd.toString()) / 1e18,
74
+ nftLimitOrderFeeP: parseFloat(fee.nftLimitOrderFeeP.toString()) / 1e12,
75
+ openFeeP: parseFloat(fee.openFeeP.toString()) / 1e12,
76
+ };
77
+ });
78
+ }
79
+ catch (error) {
80
+ console.error(`Unexpected error while fetching pairs!`);
81
+ throw error;
82
+ }
83
+ });
84
+ exports.fetchFees = fetchFees;
85
+ const fetchOpenInterest = (contracts, pairIxs) => __awaiter(void 0, void 0, void 0, function* () {
86
+ const { precision: collateralPrecision } = yield contracts.gnsBorrowingFees.collateralConfig();
87
+ const openInterests = yield Promise.all(pairIxs.map(pairIndex => Promise.all([
88
+ contracts.gfarmTradingStorageV5.openInterestDai(pairIndex, 0),
89
+ contracts.gfarmTradingStorageV5.openInterestDai(pairIndex, 1),
90
+ contracts.gnsBorrowingFees.getPairMaxOi(pairIndex),
91
+ ])));
92
+ const precision = parseFloat(collateralPrecision.toString());
93
+ return openInterests.map(openInterest => ({
94
+ long: parseFloat(openInterest[0].toString()) / precision,
95
+ short: parseFloat(openInterest[1].toString()) / precision,
96
+ max: parseFloat(openInterest[2].toString()) / 1e10,
97
+ }));
98
+ });
99
+ exports.fetchOpenInterest = fetchOpenInterest;
100
+ const getPairDescription = (pairIndex) => {
101
+ return PAIR_INDEX_TO_DESCRIPTION[pairIndex] || '';
102
+ };
103
+ exports.getPairDescription = getPairDescription;
104
+ const PAIR_INDEX_TO_DESCRIPTION = {
105
+ [types_1.PairIndex.BTCUSD]: "Bitcoin to US Dollar",
106
+ [types_1.PairIndex.ETHUSD]: "Ethereum to US Dollar",
107
+ [types_1.PairIndex.LINKUSD]: "Chainlink to US Dollar",
108
+ [types_1.PairIndex.DOGEUSD]: "Dogecoin to US Dollar",
109
+ [types_1.PairIndex.MATICUSD]: "Polygon to US Dollar",
110
+ [types_1.PairIndex.ADAUSD]: "Cardano to US Dollar",
111
+ [types_1.PairIndex.SUSHIUSD]: "Sushiswap to US Dollar",
112
+ [types_1.PairIndex.AAVEUSD]: "Aave to US Dollar",
113
+ [types_1.PairIndex.ALGOUSD]: "Algorand to US Dollar",
114
+ [types_1.PairIndex.BATUSD]: "Basic Attention Token to US Dollar",
115
+ [types_1.PairIndex.COMPUSD]: "Compound to US Dollar",
116
+ [types_1.PairIndex.DOTUSD]: "Polkadot to US Dollar",
117
+ [types_1.PairIndex.EOSUSD]: "EOS to US Dollar",
118
+ [types_1.PairIndex.LTCUSD]: "Litecoin to US Dollar",
119
+ [types_1.PairIndex.MANAUSD]: "Decentraland to US Dollar",
120
+ [types_1.PairIndex.OMGUSD]: "OMG Network to US Dollar",
121
+ [types_1.PairIndex.SNXUSD]: "Synthetix to US Dollar",
122
+ [types_1.PairIndex.UNIUSD]: "Uniswap to US Dollar",
123
+ [types_1.PairIndex.XLMUSD]: "Stellar to US Dollar",
124
+ [types_1.PairIndex.XRPUSD]: "Ripple to US Dollar",
125
+ [types_1.PairIndex.ZECUSD]: "Zcash to US Dollar",
126
+ [types_1.PairIndex.EURUSD]: "Euro to US Dollar",
127
+ [types_1.PairIndex.USDJPY]: "US Dollar to Japanese Yen",
128
+ [types_1.PairIndex.GBPUSD]: "British Pound to US Dollar",
129
+ [types_1.PairIndex.USDCHF]: "US Dollar to Swiss Franc",
130
+ [types_1.PairIndex.AUDUSD]: "Australian Dollar to US Dollar",
131
+ [types_1.PairIndex.USDCAD]: "US Dollar to Canadian Dollar",
132
+ [types_1.PairIndex.NZDUSD]: "New Zealand Dollar to US Dollar",
133
+ [types_1.PairIndex.EURCHF]: "Euro to Swiss Franc",
134
+ [types_1.PairIndex.EURJPY]: "Euro to Japanese Yen",
135
+ [types_1.PairIndex.EURGBP]: "Euro to British Pound",
136
+ [types_1.PairIndex.LUNAUSD]: "Terra to US Dollar",
137
+ [types_1.PairIndex.YFIUSD]: "Yearn.finance to US Dollar",
138
+ [types_1.PairIndex.SOLUSD]: "Solana to US Dollar",
139
+ [types_1.PairIndex.XTZUSD]: "Tezos to US Dollar",
140
+ [types_1.PairIndex.BCHUSD]: "Bitcoin Cash to US Dollar",
141
+ [types_1.PairIndex.BNTUSD]: "Bancor to US Dollar",
142
+ [types_1.PairIndex.CRVUSD]: "Curve DAO Token to US Dollar",
143
+ [types_1.PairIndex.DASHUSD]: "Dash to US Dollar",
144
+ [types_1.PairIndex.ETCUSD]: "Ethereum Classic to US Dollar",
145
+ [types_1.PairIndex.ICPUSD]: "Internet Computer to US Dollar",
146
+ [types_1.PairIndex.MKRUSD]: "Maker to US Dollar",
147
+ [types_1.PairIndex.NEOUSD]: "NEO to US Dollar",
148
+ [types_1.PairIndex.THETAUSD]: "Theta Network to US Dollar",
149
+ [types_1.PairIndex.TRXUSD]: "TRON to US Dollar",
150
+ [types_1.PairIndex.ZRXUSD]: "0x to US Dollar",
151
+ [types_1.PairIndex.SANDUSD]: "The Sandbox to US Dollar",
152
+ [types_1.PairIndex.BNBUSD]: "Binance Coin to US Dollar",
153
+ [types_1.PairIndex.AXSUSD]: "Axie Infinity to US Dollar",
154
+ [types_1.PairIndex.GRTUSD]: "The Graph to US Dollar",
155
+ [types_1.PairIndex.HBARUSD]: "Hedera Hashgraph to US Dollar",
156
+ [types_1.PairIndex.XMRUSD]: "Monero to US Dollar",
157
+ [types_1.PairIndex.ENJUSD]: "Enjin Coin to US Dollar",
158
+ [types_1.PairIndex.FTMUSD]: "Fantom to US Dollar",
159
+ [types_1.PairIndex.FTTUSD]: "FTX Token to US Dollar",
160
+ [types_1.PairIndex.APEUSD]: "ApeCoin to US Dollar",
161
+ [types_1.PairIndex.CHZUSD]: "Chiliz to US Dollar",
162
+ [types_1.PairIndex.SHIBUSD]: "Shiba Inu to US Dollar",
163
+ [types_1.PairIndex.AAPLUSD]: "Apple to US Dollar",
164
+ [types_1.PairIndex.FBUSD]: "Facebook to US Dollar",
165
+ [types_1.PairIndex.GOOGLUSD]: "Google to US Dollar",
166
+ [types_1.PairIndex.AMZNUSD]: "Amazon to US Dollar",
167
+ [types_1.PairIndex.MSFTUSD]: "Microsoft to US Dollar",
168
+ [types_1.PairIndex.TSLAUSD]: "Tesla to US Dollar",
169
+ [types_1.PairIndex.SNAPUSD]: "Snapchat to US Dollar",
170
+ [types_1.PairIndex.NVDAUSD]: "Nvidia to US Dollar",
171
+ [types_1.PairIndex.VUSD]: "Visa to US Dollar",
172
+ [types_1.PairIndex.MAUSD]: "Mastercard to US Dollar",
173
+ [types_1.PairIndex.PFEUSD]: "Pfizer to US Dollar",
174
+ [types_1.PairIndex.KOUSD]: "Coca-Cola to US Dollar",
175
+ [types_1.PairIndex.DISUSD]: "Disney to US Dollar",
176
+ [types_1.PairIndex.GMEUSD]: "GameStop to US Dollar",
177
+ [types_1.PairIndex.NKEUSD]: "Nike to US Dollar",
178
+ [types_1.PairIndex.AMDUSD]: "AMD to US Dollar",
179
+ [types_1.PairIndex.PYPLUSD]: "PayPal to US Dollar",
180
+ [types_1.PairIndex.ABNBUSD]: "Airbnb to US Dollar",
181
+ [types_1.PairIndex.BAUSD]: "Boeing to US Dollar",
182
+ [types_1.PairIndex.SBUXUSD]: "Starbucks to US Dollar",
183
+ [types_1.PairIndex.WMTUSD]: "Walmart to US Dollar",
184
+ [types_1.PairIndex.INTCUSD]: "Intel to US Dollar",
185
+ [types_1.PairIndex.MCDUSD]: "McDonald's to US Dollar",
186
+ [types_1.PairIndex.METAUSD]: "Meta Platforms to US Dollar",
187
+ [types_1.PairIndex.GOOGLUSD2]: "Google to US Dollar",
188
+ [types_1.PairIndex.GMEUSD2]: "GameStop to US Dollar",
189
+ [types_1.PairIndex.AMZNUSD2]: "Amazon to US Dollar",
190
+ [types_1.PairIndex.TSLAUSD2]: "Tesla to US Dollar",
191
+ [types_1.PairIndex.SPYUSD]: "SPDR S&P 500 ETF Trust to US Dollar",
192
+ [types_1.PairIndex.QQQUSD]: "Invesco QQQ Trust to US Dollar",
193
+ [types_1.PairIndex.IWMUSD]: "iShares Russell 2000 ETF to US Dollar",
194
+ [types_1.PairIndex.DIAUSD]: "SPDR Dow Jones Industrial Average ETF Trust to US Dollar",
195
+ [types_1.PairIndex.XAUUSD]: "Gold to US Dollar",
196
+ [types_1.PairIndex.XAGUSD]: "Silver to US Dollar",
197
+ [types_1.PairIndex.USDCNH]: "US Dollar to Chinese Yuan Offshore",
198
+ [types_1.PairIndex.USDSGD]: "US Dollar to Singapore Dollar",
199
+ [types_1.PairIndex.EURSEK]: "Euro to Swedish Krona",
200
+ [types_1.PairIndex.USDKRW]: "US Dollar to South Korean Won",
201
+ [types_1.PairIndex.EURNOK]: "Euro to Norwegian Krone",
202
+ [types_1.PairIndex.USDINR]: "US Dollar to Indian Rupee",
203
+ [types_1.PairIndex.USDMXN]: "US Dollar to Mexican Peso",
204
+ [types_1.PairIndex.USDTWD]: "US Dollar to Taiwan New Dollar",
205
+ [types_1.PairIndex.USDZAR]: "US Dollar to South African Rand",
206
+ [types_1.PairIndex.USDBRL]: "US Dollar to Brazilian Real",
207
+ [types_1.PairIndex.AVAXUSD]: "Avalanche to US Dollar",
208
+ [types_1.PairIndex.ATOMUSD]: "Cosmos to US Dollar",
209
+ [types_1.PairIndex.NEARUSD]: "NEAR Protocol to US Dollar",
210
+ [types_1.PairIndex.QNTUSD]: "Quant to US Dollar",
211
+ [types_1.PairIndex.IOTAUSD]: "IOTA to US Dollar",
212
+ [types_1.PairIndex.TONUSD]: "The Open Network to US Dollar",
213
+ [types_1.PairIndex.RPLUSD]: "Rocket Pool to US Dollar",
214
+ [types_1.PairIndex.ARBUSD]: "Arbitrum to US Dollar",
215
+ [types_1.PairIndex.EURAUD]: "Euro to Australian Dollar",
216
+ [types_1.PairIndex.EURNZD]: "Euro to New Zealand Dollar",
217
+ [types_1.PairIndex.EURCAD]: "Euro to Canadian Dollar",
218
+ [types_1.PairIndex.GBPAUD]: "British Pound to Australian Dollar",
219
+ [types_1.PairIndex.GBPNZD]: "British Pound to New Zealand Dollar",
220
+ [types_1.PairIndex.GBPCAD]: "British Pound to Canadian Dollar",
221
+ [types_1.PairIndex.GBPCHF]: "British Pound to Swiss Franc",
222
+ [types_1.PairIndex.GBPJPY]: "British Pound to Japanese Yen",
223
+ [types_1.PairIndex.AUDNZD]: "Australian Dollar to New Zealand Dollar",
224
+ [types_1.PairIndex.AUDCAD]: "Australian Dollar to Canadian Dollar",
225
+ [types_1.PairIndex.AUDCHF]: "Australian Dollar to Swiss Franc",
226
+ [types_1.PairIndex.AUDJPY]: "Australian Dollar to Japanese Yen",
227
+ [types_1.PairIndex.NZDCAD]: "New Zealand Dollar to Canadian Dollar",
228
+ [types_1.PairIndex.NZDCHF]: "New Zealand Dollar to Swiss Franc",
229
+ [types_1.PairIndex.NZDJPY]: "New Zealand Dollar to Japanese Yen",
230
+ [types_1.PairIndex.CADCHF]: "Canadian Dollar to Swiss Franc",
231
+ [types_1.PairIndex.CADJPY]: "Canadian Dollar to Japanese Yen",
232
+ [types_1.PairIndex.CHFJPY]: "Swiss Franc to Japanese Yen",
233
+ [types_1.PairIndex.LDOUSD]: "Lido DAO to US Dollar",
234
+ [types_1.PairIndex.INJUSD]: "Injective Protocol to US Dollar",
235
+ [types_1.PairIndex.RUNEUSD]: "THORChain to US Dollar",
236
+ [types_1.PairIndex.CAKEUSD]: "PancakeSwap to US Dollar",
237
+ [types_1.PairIndex.FXSUSD]: "Frax Share to US Dollar",
238
+ [types_1.PairIndex.TWTUSD]: "Trust Wallet Token to US Dollar",
239
+ [types_1.PairIndex.PEPEUSD]: "Pepe to US Dollar",
240
+ [types_1.PairIndex.DYDXUSD]: "dYdX to US Dollar",
241
+ [types_1.PairIndex.GMXUSD]: "GMX to US Dollar",
242
+ [types_1.PairIndex.FILUSD]: "Filecoin to US Dollar",
243
+ [types_1.PairIndex.APTUSD]: "Aptos to US Dollar",
244
+ [types_1.PairIndex.IMXUSD]: "Immutable X to US Dollar",
245
+ [types_1.PairIndex.VETUSD]: "VeChain to US Dollar",
246
+ [types_1.PairIndex.OPUSD]: "Optimism to US Dollar",
247
+ [types_1.PairIndex.RNDRUSD]: "Render Token to US Dollar",
248
+ [types_1.PairIndex.EGLDUSD]: "Elrond to US Dollar",
249
+ [types_1.PairIndex.TIAUSD]: "Tia to US Dollar",
250
+ [types_1.PairIndex.STXUSD]: "Stacks to US Dollar",
251
+ [types_1.PairIndex.FLOWUSD]: "Flow to US Dollar",
252
+ [types_1.PairIndex.KAVAUSD]: "Kava to US Dollar",
253
+ [types_1.PairIndex.GALAUSD]: "Gala to US Dollar",
254
+ [types_1.PairIndex.MINAUSD]: "Mina to US Dollar",
255
+ [types_1.PairIndex.ORDIUSD]: "Ordi to US Dollar",
256
+ [types_1.PairIndex.ILVUSD]: "Illuvium to US Dollar",
257
+ [types_1.PairIndex.KLAYUSD]: "Klaytn to US Dollar",
258
+ [types_1.PairIndex.SUIUSD]: "Sui to US Dollar",
259
+ [types_1.PairIndex.BLURUSD]: "Blur to US Dollar",
260
+ [types_1.PairIndex.FETUSD]: "Fetch.ai to US Dollar",
261
+ [types_1.PairIndex.CFXUSD]: "Conflux to US Dollar",
262
+ [types_1.PairIndex.BEAMUSD]: "Beam to US Dollar",
263
+ [types_1.PairIndex.ARUSD]: "Arweave to US Dollar",
264
+ [types_1.PairIndex.SEIUSD]: "Sei to US Dollar",
265
+ [types_1.PairIndex.BTTUSD]: "BitTorrent to US Dollar",
266
+ [types_1.PairIndex.ROSEUSD]: "Oasis Network to US Dollar",
267
+ [types_1.PairIndex.WOOUSD]: "WOO Network to US Dollar",
268
+ [types_1.PairIndex.AGIXUSD]: "SingularityNET to US Dollar",
269
+ [types_1.PairIndex.ZILUSD]: "Zilliqa to US Dollar",
270
+ [types_1.PairIndex.GMTUSD]: "STEPN to US Dollar",
271
+ [types_1.PairIndex.ASTRUSD]: "Astar to US Dollar",
272
+ [types_1.PairIndex.ONEINCHUSD]: "1inch to US Dollar",
273
+ [types_1.PairIndex.FLOKIUSD]: "Floki Inu to US Dollar",
274
+ [types_1.PairIndex.QTUMUSD]: "Qtum to US Dollar",
275
+ [types_1.PairIndex.OCEANUSD]: "Ocean Protocol to US Dollar",
276
+ [types_1.PairIndex.WLDUSD]: "Worldcoin to US Dollar",
277
+ [types_1.PairIndex.MASKUSD]: "Mask Network to US Dollar",
278
+ [types_1.PairIndex.CELOUSD]: "Celo to US Dollar",
279
+ [types_1.PairIndex.LRCUSD]: "Loopring to US Dollar",
280
+ [types_1.PairIndex.ENSUSD]: "Ethereum Name Service to US Dollar",
281
+ [types_1.PairIndex.MEMEUSD]: "Meme to US Dollar",
282
+ [types_1.PairIndex.ANKRUSD]: "Ankr to US Dollar",
283
+ [types_1.PairIndex.IOTXUSD]: "IoTeX to US Dollar",
284
+ [types_1.PairIndex.ICXUSD]: "ICON to US Dollar",
285
+ [types_1.PairIndex.KSMUSD]: "Kusama to US Dollar",
286
+ [types_1.PairIndex.RVNUSD]: "Ravencoin to US Dollar",
287
+ [types_1.PairIndex.ANTUSD]: "Aragon to US Dollar",
288
+ [types_1.PairIndex.WAVESUSD]: "Waves to US Dollar",
289
+ [types_1.PairIndex.SKLUSD]: "SKALE to US Dollar",
290
+ [types_1.PairIndex.SUPERUSD]: "SuperFarm to US Dollar",
291
+ [types_1.PairIndex.BALUSD]: "Balancer to US Dollar",
292
+ [types_1.PairIndex.WTIUSD]: "Oil to US Dollar",
293
+ [types_1.PairIndex.XPTUSD]: "Platinum to US Dollar",
294
+ [types_1.PairIndex.XPDUSD]: "Palladium to US Dollar",
295
+ [types_1.PairIndex.HGUSD]: "Copper to US Dollar",
296
+ [types_1.PairIndex.JUPUSD]: "Jupiter to US Dollar",
297
+ };
package/lib/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export * from "./trade";
2
- export * from "./contracts";
3
- export * from "./markets";
4
- export * from "./constants";
5
- export * from "./utils";
6
- export * from "./vault";
7
- export * from "./trade/fees/borrowing/index";
1
+ export * from "./trade";
2
+ export * from "./contracts";
3
+ export * from "./markets";
4
+ export * from "./constants";
5
+ export * from "./utils";
6
+ export * from "./vault";
7
+ export * from "./trade/fees/borrowing/index";