@gmx-io/sdk 1.4.2 → 1.5.0-alpha-2

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 (442) hide show
  1. package/build/cjs/scripts/generate-platform-tokens.js +200 -0
  2. package/build/cjs/scripts/prebuild/index.js +6 -1
  3. package/build/cjs/scripts/prebuild/prebuildKinkModelMarketRatesKeys.js +2 -28
  4. package/build/cjs/scripts/prebuild/prebuildMarketConfigKeys.js +2 -2
  5. package/build/cjs/scripts/prebuild/prebuildMarketValuesKeys.js +2 -2
  6. package/build/cjs/scripts/subsquid-codegen.js +26 -0
  7. package/build/cjs/src/{utils → clients/v1}/callContract.js +4 -6
  8. package/build/cjs/src/{index.js → clients/v1/index.js} +4 -4
  9. package/build/cjs/src/{modules → clients/v1/modules}/accounts/accounts.js +1 -1
  10. package/build/cjs/src/{modules → clients/v1/modules}/accounts/accounts.spec.js +1 -1
  11. package/build/cjs/src/clients/v1/modules/markets/index.js +227 -0
  12. package/build/cjs/src/{modules → clients/v1/modules}/markets/markets.spec.js +3 -3
  13. package/build/cjs/src/{modules → clients/v1/modules}/oracle.js +1 -1
  14. package/build/cjs/src/{modules → clients/v1/modules}/orders/helpers.js +9 -9
  15. package/build/cjs/src/{modules → clients/v1/modules}/orders/helpers.spec.js +5 -5
  16. package/build/cjs/src/{modules → clients/v1/modules}/orders/orders.js +14 -14
  17. package/build/cjs/src/{modules → clients/v1/modules}/orders/orders.spec.js +1 -1
  18. package/build/cjs/src/{modules → clients/v1/modules}/orders/transactions/cancelOrdersTxn.js +2 -2
  19. package/build/cjs/src/{modules → clients/v1/modules}/orders/transactions/createDecreaseOrderTxn.js +7 -7
  20. package/build/cjs/src/{modules → clients/v1/modules}/orders/transactions/createIncreaseOrderTxn.js +11 -11
  21. package/build/cjs/src/{modules → clients/v1/modules}/orders/transactions/createSwapOrderTxn.js +10 -10
  22. package/build/cjs/src/{modules → clients/v1/modules}/orders/transactions/createWrapOrUnwrapTxn.js +2 -2
  23. package/build/cjs/src/{modules → clients/v1/modules}/orders/transactions/updateOrderTxn.js +3 -3
  24. package/build/cjs/src/{modules → clients/v1/modules}/orders/utils.js +7 -7
  25. package/build/cjs/src/{modules → clients/v1/modules}/positions/positions.js +16 -158
  26. package/build/cjs/src/{modules → clients/v1/modules}/positions/positions.spec.js +1 -1
  27. package/build/cjs/src/{modules → clients/v1/modules}/tokens/tokens.js +3 -3
  28. package/build/cjs/src/{modules → clients/v1/modules}/tokens/tokens.spec.js +3 -3
  29. package/build/cjs/src/{modules → clients/v1/modules}/trades/trades.js +19 -19
  30. package/build/cjs/src/{modules → clients/v1/modules}/trades/trades.spec.js +1 -1
  31. package/build/cjs/src/{modules → clients/v1/modules}/utils/utils.js +8 -8
  32. package/build/cjs/src/{utils → clients/v1}/multicall.js +2 -2
  33. package/build/cjs/src/{utils → clients/v1}/simulateExecuteOrder.js +5 -5
  34. package/build/cjs/src/{utils → clients/v1}/testUtil.js +2 -2
  35. package/build/cjs/src/clients/v2/index.js +29 -0
  36. package/build/cjs/src/codegen/platformTokens.json +134 -0
  37. package/build/cjs/src/{prebuilt → codegen/prebuilt}/hashedKinkModelMarketRatesKeys.json +24 -0
  38. package/build/cjs/src/{prebuilt → codegen/prebuilt}/hashedMarketConfigKeys.json +171 -0
  39. package/build/cjs/src/{prebuilt → codegen/prebuilt}/hashedMarketValuesKeys.json +45 -0
  40. package/build/cjs/src/codegen/prebuilt/index.js +16 -0
  41. package/build/cjs/src/{types → codegen}/subsquid.js +142 -22
  42. package/build/cjs/src/configs/api.js +15 -0
  43. package/build/cjs/src/configs/chains.js +29 -1
  44. package/build/cjs/src/configs/dataStore.js +6 -2
  45. package/build/cjs/src/configs/markets.js +21 -0
  46. package/build/cjs/src/configs/multichain.js +29 -19
  47. package/build/cjs/src/configs/tokens.js +36 -0
  48. package/build/cjs/src/test/mock.js +5 -122
  49. package/build/cjs/src/utils/24h/index.js +17 -0
  50. package/build/cjs/src/utils/LruCache/index.js +17 -0
  51. package/build/cjs/src/utils/__tests__/fees.spec.js +2 -2
  52. package/build/cjs/src/utils/__tests__/numbers.spec.js +1 -1
  53. package/build/cjs/src/utils/__tests__/orderTransactions/batchUtils.spec.js +3 -3
  54. package/build/cjs/src/utils/__tests__/orderTransactions/decreaseOrders.spec.js +34 -34
  55. package/build/cjs/src/utils/__tests__/orderTransactions/exchangeRouterMulticall.spec.js +5 -5
  56. package/build/cjs/src/utils/__tests__/orderTransactions/externalCalls.spec.js +1 -1
  57. package/build/cjs/src/utils/__tests__/orderTransactions/increaseOrders.spec.js +29 -29
  58. package/build/cjs/src/utils/__tests__/orderTransactions/swapOrders.spec.js +21 -21
  59. package/build/cjs/src/utils/__tests__/orderTransactions/updateOrder.spec.js +4 -4
  60. package/build/cjs/src/utils/__tests__/parseError.spec.js +40 -0
  61. package/build/cjs/src/utils/__tests__/positions.spec.js +1 -1
  62. package/build/cjs/src/utils/__tests__/prices.spec.js +18 -18
  63. package/build/cjs/src/utils/__tests__/tokens.spec.js +191 -4
  64. package/build/cjs/src/utils/abort/index.js +17 -0
  65. package/build/cjs/src/utils/bigmath/index.js +17 -0
  66. package/build/cjs/src/utils/buildUrl/index.js +17 -0
  67. package/build/cjs/src/utils/chains/index.js +17 -0
  68. package/build/cjs/src/utils/common/index.js +17 -0
  69. package/build/cjs/src/utils/{common.js → common/utils.js} +1 -2
  70. package/build/cjs/src/utils/errors/parseError.js +67 -25
  71. package/build/cjs/src/utils/fees/executionFee.js +2 -2
  72. package/build/cjs/src/utils/fees/index.js +9 -9
  73. package/build/cjs/src/utils/fees/priceImpact.js +6 -1
  74. package/build/cjs/src/utils/gelatoRelay/index.js +17 -0
  75. package/build/cjs/src/utils/graphqlFetcher/index.js +8 -0
  76. package/build/cjs/src/utils/hash/index.js +17 -0
  77. package/build/cjs/src/utils/{hash.js → hash/utils.js} +1 -1
  78. package/build/cjs/src/utils/http/http.js +33 -0
  79. package/build/cjs/src/utils/indexers/index.js +17 -0
  80. package/build/cjs/src/utils/{indexers.js → indexers/utils.js} +1 -1
  81. package/build/cjs/src/utils/markets/__tests__/mockMarkets.js +129 -0
  82. package/build/cjs/src/utils/markets/api.js +14 -0
  83. package/build/cjs/src/utils/{marketKeysAndConfigs.js → markets/hashKeys.js} +32 -3
  84. package/build/cjs/src/utils/markets/index.js +21 -0
  85. package/build/cjs/src/{modules/markets/query-builders.js → utils/markets/multicall.js} +149 -42
  86. package/build/cjs/src/utils/markets/utils.js +398 -0
  87. package/build/cjs/src/utils/numbers/index.js +17 -0
  88. package/build/cjs/src/utils/{numbers.js → numbers/utils.js} +12 -5
  89. package/build/cjs/src/utils/objects/index.js +17 -0
  90. package/build/cjs/src/utils/{objects.js → objects/utils.js} +9 -1
  91. package/build/cjs/src/utils/orderTransactions/index.js +17 -0
  92. package/build/cjs/src/utils/{orderTransactions.js → orderTransactions/utils.js} +22 -22
  93. package/build/cjs/src/utils/orders/api.js +13 -0
  94. package/build/cjs/src/utils/orders/index.js +19 -0
  95. package/build/cjs/src/utils/{orders.js → orders/utils.js} +22 -22
  96. package/build/cjs/src/utils/positions/api.js +14 -0
  97. package/build/cjs/src/utils/positions/index.js +19 -0
  98. package/build/cjs/src/utils/positions/utils.js +425 -0
  99. package/build/cjs/src/utils/prices/index.js +17 -0
  100. package/build/cjs/src/utils/{prices.js → prices/utils.js} +15 -15
  101. package/build/cjs/src/utils/referrals/index.js +18 -0
  102. package/build/cjs/src/utils/sidecarOrders/index.js +17 -0
  103. package/build/cjs/src/utils/swap/__tests__/mockRouting.spec.js +15 -15
  104. package/build/cjs/src/utils/swap/__tests__/swapRouting.spec.js +6 -6
  105. package/build/cjs/src/utils/swap/__tests__/swapStats.spec.js +10 -10
  106. package/build/cjs/src/utils/swap/botanixStaking.js +3 -3
  107. package/build/cjs/src/utils/swap/buildSwapStrategy.js +2 -2
  108. package/build/cjs/src/utils/swap/externalSwapPath.js +2 -2
  109. package/build/cjs/src/utils/swap/externalSwapQuoteByPath.js +2 -2
  110. package/build/cjs/src/utils/swap/index.js +12 -0
  111. package/build/cjs/src/utils/swap/swapPath.js +3 -3
  112. package/build/cjs/src/utils/swap/swapValues.js +4 -4
  113. package/build/cjs/src/utils/time/index.js +17 -0
  114. package/build/cjs/src/utils/tokens/index.js +18 -0
  115. package/build/cjs/src/utils/{tokens.js → tokens/utils.js} +27 -7
  116. package/build/cjs/src/utils/trade/decrease.js +8 -8
  117. package/build/cjs/src/utils/trade/increase.js +2 -2
  118. package/build/cjs/src/utils/trade/index.js +3 -0
  119. package/build/cjs/src/utils/trade/trade.js +10 -10
  120. package/build/cjs/src/utils/tradeHistory/index.js +18 -0
  121. package/build/cjs/src/utils/{tradeHistory.js → tradeHistory/utils.js} +4 -4
  122. package/build/cjs/src/utils/twap/index.js +15 -0
  123. package/build/cjs/src/utils/types/index.js +7 -0
  124. package/build/esm/scripts/generate-platform-tokens.js +195 -0
  125. package/build/esm/scripts/prebuild/index.js +3 -1
  126. package/build/esm/scripts/prebuild/prebuildKinkModelMarketRatesKeys.js +2 -28
  127. package/build/esm/scripts/prebuild/prebuildMarketConfigKeys.js +1 -1
  128. package/build/esm/scripts/prebuild/prebuildMarketValuesKeys.js +1 -1
  129. package/build/esm/scripts/subsquid-codegen.js +24 -0
  130. package/build/esm/src/{utils → clients/v1}/callContract.js +5 -5
  131. package/build/esm/src/{index.js → clients/v1/index.js} +4 -4
  132. package/build/esm/src/{modules → clients/v1/modules}/accounts/accounts.js +1 -1
  133. package/build/esm/src/{modules → clients/v1/modules}/accounts/accounts.spec.js +1 -1
  134. package/build/esm/src/clients/v1/modules/markets/index.js +220 -0
  135. package/build/esm/src/{modules → clients/v1/modules}/markets/markets.spec.js +2 -2
  136. package/build/esm/src/{modules → clients/v1/modules}/oracle.js +1 -1
  137. package/build/esm/src/{modules → clients/v1/modules}/orders/helpers.js +6 -6
  138. package/build/esm/src/{modules → clients/v1/modules}/orders/helpers.spec.js +5 -5
  139. package/build/esm/src/{modules → clients/v1/modules}/orders/orders.js +7 -7
  140. package/build/esm/src/{modules → clients/v1/modules}/orders/orders.spec.js +1 -1
  141. package/build/esm/src/{modules → clients/v1/modules}/orders/transactions/cancelOrdersTxn.js +2 -2
  142. package/build/esm/src/{modules → clients/v1/modules}/orders/transactions/createDecreaseOrderTxn.js +7 -7
  143. package/build/esm/src/{modules → clients/v1/modules}/orders/transactions/createIncreaseOrderTxn.js +8 -8
  144. package/build/esm/src/{modules → clients/v1/modules}/orders/transactions/createSwapOrderTxn.js +7 -7
  145. package/build/esm/src/{modules → clients/v1/modules}/orders/transactions/createWrapOrUnwrapTxn.js +2 -2
  146. package/build/esm/src/{modules → clients/v1/modules}/orders/transactions/updateOrderTxn.js +3 -3
  147. package/build/esm/src/{modules → clients/v1/modules}/orders/utils.js +7 -7
  148. package/build/esm/src/{modules → clients/v1/modules}/positions/positions.js +16 -158
  149. package/build/esm/src/{modules → clients/v1/modules}/positions/positions.spec.js +1 -1
  150. package/build/esm/src/{modules → clients/v1/modules}/tokens/tokens.js +3 -3
  151. package/build/esm/src/{modules → clients/v1/modules}/tokens/tokens.spec.js +1 -1
  152. package/build/esm/src/{modules → clients/v1/modules}/trades/trades.js +8 -8
  153. package/build/esm/src/{modules → clients/v1/modules}/trades/trades.spec.js +1 -1
  154. package/build/esm/src/{modules → clients/v1/modules}/utils/utils.js +8 -8
  155. package/build/esm/src/{utils → clients/v1}/multicall.js +2 -2
  156. package/build/esm/src/{utils → clients/v1}/simulateExecuteOrder.js +5 -5
  157. package/build/esm/src/{utils → clients/v1}/testUtil.js +2 -2
  158. package/build/esm/src/clients/v2/index.js +25 -0
  159. package/build/esm/src/codegen/platformTokens.json +134 -0
  160. package/build/esm/src/{prebuilt → codegen/prebuilt}/hashedKinkModelMarketRatesKeys.json +24 -0
  161. package/build/esm/src/{prebuilt → codegen/prebuilt}/hashedMarketConfigKeys.json +171 -0
  162. package/build/esm/src/{prebuilt → codegen/prebuilt}/hashedMarketValuesKeys.json +45 -0
  163. package/build/esm/src/codegen/prebuilt/index.js +10 -0
  164. package/build/esm/src/{types → codegen}/subsquid.js +141 -21
  165. package/build/esm/src/configs/api.js +11 -0
  166. package/build/esm/src/configs/chains.js +29 -1
  167. package/build/esm/src/configs/dataStore.js +3 -0
  168. package/build/esm/src/configs/markets.js +21 -0
  169. package/build/esm/src/configs/multichain.js +28 -19
  170. package/build/esm/src/configs/tokens.js +36 -0
  171. package/build/esm/src/test/mock.js +3 -120
  172. package/build/esm/src/utils/24h/index.js +1 -0
  173. package/build/esm/src/utils/LruCache/index.js +1 -0
  174. package/build/esm/src/utils/__tests__/fees.spec.js +2 -2
  175. package/build/esm/src/utils/__tests__/numbers.spec.js +1 -1
  176. package/build/esm/src/utils/__tests__/orderTransactions/batchUtils.spec.js +2 -2
  177. package/build/esm/src/utils/__tests__/orderTransactions/decreaseOrders.spec.js +2 -2
  178. package/build/esm/src/utils/__tests__/orderTransactions/exchangeRouterMulticall.spec.js +2 -2
  179. package/build/esm/src/utils/__tests__/orderTransactions/externalCalls.spec.js +1 -1
  180. package/build/esm/src/utils/__tests__/orderTransactions/increaseOrders.spec.js +2 -2
  181. package/build/esm/src/utils/__tests__/orderTransactions/swapOrders.spec.js +2 -2
  182. package/build/esm/src/utils/__tests__/orderTransactions/updateOrder.spec.js +2 -2
  183. package/build/esm/src/utils/__tests__/parseError.spec.js +40 -0
  184. package/build/esm/src/utils/__tests__/positions.spec.js +1 -1
  185. package/build/esm/src/utils/__tests__/prices.spec.js +2 -2
  186. package/build/esm/src/utils/__tests__/tokens.spec.js +192 -5
  187. package/build/esm/src/utils/abort/index.js +1 -0
  188. package/build/esm/src/utils/bigmath/index.js +1 -0
  189. package/build/esm/src/utils/buildUrl/index.js +1 -0
  190. package/build/esm/src/utils/chains/index.js +1 -0
  191. package/build/esm/src/utils/common/index.js +1 -0
  192. package/build/esm/src/utils/{common.js → common/utils.js} +0 -1
  193. package/build/esm/src/utils/errors/parseError.js +64 -24
  194. package/build/esm/src/utils/fees/executionFee.js +1 -1
  195. package/build/esm/src/utils/fees/index.js +7 -7
  196. package/build/esm/src/utils/fees/priceImpact.js +5 -1
  197. package/build/esm/src/utils/gelatoRelay/index.js +1 -0
  198. package/build/esm/src/utils/graphqlFetcher/index.js +1 -0
  199. package/build/esm/src/utils/hash/index.js +1 -0
  200. package/build/esm/src/utils/{hash.js → hash/utils.js} +1 -1
  201. package/build/esm/src/utils/http/http.js +26 -0
  202. package/build/esm/src/utils/indexers/index.js +1 -0
  203. package/build/esm/src/utils/{indexers.js → indexers/utils.js} +1 -1
  204. package/build/esm/src/utils/markets/__tests__/mockMarkets.js +124 -0
  205. package/build/esm/src/utils/markets/api.js +9 -0
  206. package/build/esm/src/utils/{marketKeysAndConfigs.js → markets/hashKeys.js} +30 -2
  207. package/build/esm/src/utils/markets/index.js +5 -0
  208. package/build/esm/src/{modules/markets/query-builders.js → utils/markets/multicall.js} +146 -41
  209. package/build/esm/src/utils/markets/utils.js +364 -0
  210. package/build/esm/src/utils/numbers/index.js +1 -0
  211. package/build/esm/src/utils/{numbers.js → numbers/utils.js} +10 -3
  212. package/build/esm/src/utils/objects/index.js +1 -0
  213. package/build/esm/src/utils/{objects.js → objects/utils.js} +7 -0
  214. package/build/esm/src/utils/orderTransactions/index.js +1 -0
  215. package/build/esm/src/utils/{orderTransactions.js → orderTransactions/utils.js} +14 -14
  216. package/build/esm/src/utils/orders/api.js +9 -0
  217. package/build/esm/src/utils/orders/index.js +3 -0
  218. package/build/esm/src/utils/{orders.js → orders/utils.js} +8 -8
  219. package/build/esm/src/utils/positions/api.js +10 -0
  220. package/build/esm/src/utils/positions/index.js +3 -0
  221. package/build/esm/src/utils/positions/utils.js +407 -0
  222. package/build/esm/src/utils/prices/index.js +1 -0
  223. package/build/esm/src/utils/{prices.js → prices/utils.js} +7 -7
  224. package/build/esm/src/utils/referrals/index.js +2 -0
  225. package/build/esm/src/utils/sidecarOrders/index.js +1 -0
  226. package/build/esm/src/utils/swap/__tests__/mockRouting.spec.js +2 -2
  227. package/build/esm/src/utils/swap/__tests__/swapRouting.spec.js +2 -2
  228. package/build/esm/src/utils/swap/__tests__/swapStats.spec.js +1 -1
  229. package/build/esm/src/utils/swap/botanixStaking.js +1 -1
  230. package/build/esm/src/utils/swap/buildSwapStrategy.js +1 -1
  231. package/build/esm/src/utils/swap/externalSwapPath.js +1 -1
  232. package/build/esm/src/utils/swap/externalSwapQuoteByPath.js +1 -1
  233. package/build/esm/src/utils/swap/index.js +12 -0
  234. package/build/esm/src/utils/swap/swapPath.js +1 -1
  235. package/build/esm/src/utils/swap/swapValues.js +1 -1
  236. package/build/esm/src/utils/time/index.js +1 -0
  237. package/build/esm/src/utils/tokens/index.js +2 -0
  238. package/build/esm/src/utils/{tokens.js → tokens/utils.js} +27 -7
  239. package/build/esm/src/utils/trade/decrease.js +1 -1
  240. package/build/esm/src/utils/trade/increase.js +1 -1
  241. package/build/esm/src/utils/trade/index.js +3 -0
  242. package/build/esm/src/utils/trade/trade.js +2 -2
  243. package/build/esm/src/utils/tradeHistory/index.js +2 -0
  244. package/build/esm/src/utils/{tradeHistory.js → tradeHistory/utils.js} +4 -4
  245. package/build/esm/src/utils/twap/index.js +1 -0
  246. package/build/esm/src/utils/types/index.js +3 -0
  247. package/build/types/scripts/generate-platform-tokens.d.ts +27 -0
  248. package/build/types/scripts/subsquid-codegen.d.ts +3 -0
  249. package/build/types/src/clients/v1/callContract.d.ts +7 -0
  250. package/build/types/src/{index.d.ts → clients/v1/index.d.ts} +3 -3
  251. package/build/types/src/{modules → clients/v1/modules}/markets/index.d.ts +12 -1
  252. package/build/types/src/{modules → clients/v1/modules}/oracle.d.ts +2 -2
  253. package/build/types/src/{modules → clients/v1/modules}/orders/helpers.d.ts +3 -3
  254. package/build/types/src/{modules → clients/v1/modules}/orders/orders.d.ts +6 -6
  255. package/build/types/src/{modules → clients/v1/modules}/orders/transactions/cancelOrdersTxn.d.ts +1 -1
  256. package/build/types/src/{modules → clients/v1/modules}/orders/transactions/createDecreaseOrderTxn.d.ts +3 -3
  257. package/build/types/src/{modules → clients/v1/modules}/orders/transactions/createIncreaseOrderTxn.d.ts +4 -4
  258. package/build/types/src/{modules → clients/v1/modules}/orders/transactions/createSwapOrderTxn.d.ts +2 -2
  259. package/build/types/src/{modules → clients/v1/modules}/orders/transactions/createWrapOrUnwrapTxn.d.ts +1 -1
  260. package/build/types/src/{modules → clients/v1/modules}/orders/transactions/updateOrderTxn.d.ts +2 -2
  261. package/build/types/src/{modules → clients/v1/modules}/orders/utils.d.ts +9 -9
  262. package/build/types/src/{modules → clients/v1/modules}/positions/positions.d.ts +4 -4
  263. package/build/types/src/{modules → clients/v1/modules}/tokens/tokens.d.ts +1 -1
  264. package/build/types/src/{modules → clients/v1/modules}/trades/trades.d.ts +4 -4
  265. package/build/types/src/{modules → clients/v1/modules}/utils/utils.d.ts +4 -4
  266. package/build/types/src/{utils → clients/v1}/multicall.d.ts +2 -2
  267. package/build/types/src/{utils → clients/v1}/simulateExecuteOrder.d.ts +3 -3
  268. package/build/types/src/{utils → clients/v1}/testUtil.d.ts +2 -2
  269. package/build/types/src/{types/sdk.d.ts → clients/v1/types.d.ts} +3 -3
  270. package/build/types/src/clients/v2/index.d.ts +20 -0
  271. package/build/types/src/codegen/prebuilt/index.d.ts +13876 -0
  272. package/build/types/src/{types → codegen}/subsquid.d.ts +505 -60
  273. package/build/types/src/configs/api.d.ts +1 -0
  274. package/build/types/src/configs/chains.d.ts +26 -2
  275. package/build/types/src/configs/dataStore.d.ts +1 -0
  276. package/build/types/src/configs/express.d.ts +1 -1
  277. package/build/types/src/configs/gasLimits.d.ts +1 -1
  278. package/build/types/src/configs/markets.d.ts +1 -1
  279. package/build/types/src/configs/multichain.d.ts +6 -3
  280. package/build/types/src/configs/tokens.d.ts +1 -1
  281. package/build/types/src/test/mock.d.ts +3 -7
  282. package/build/types/src/utils/24h/index.d.ts +1 -0
  283. package/build/types/src/utils/24h/types.d.ts +7 -0
  284. package/build/types/src/utils/LruCache/index.d.ts +1 -0
  285. package/build/types/src/utils/abort/index.d.ts +1 -0
  286. package/build/types/src/utils/bigmath/index.d.ts +1 -0
  287. package/build/types/src/utils/buildUrl/index.d.ts +1 -0
  288. package/build/types/src/utils/chains/index.d.ts +1 -0
  289. package/build/types/src/utils/common/index.d.ts +1 -0
  290. package/build/types/src/utils/{common.d.ts → common/utils.d.ts} +0 -1
  291. package/build/types/src/utils/errors/parseError.d.ts +13 -1
  292. package/build/types/src/utils/fees/executionFee.d.ts +3 -3
  293. package/build/types/src/utils/fees/getNaiveEstimatedGasBySwapCount.d.ts +1 -1
  294. package/build/types/src/utils/fees/index.d.ts +10 -13
  295. package/build/types/src/utils/fees/priceImpact.d.ts +4 -3
  296. package/build/types/src/{types/fees.d.ts → utils/fees/types.d.ts} +2 -2
  297. package/build/types/src/utils/gelatoRelay/index.d.ts +1 -0
  298. package/build/types/src/utils/graphqlFetcher/index.d.ts +1 -0
  299. package/build/types/src/utils/hash/index.d.ts +1 -0
  300. package/build/types/src/utils/http/http.d.ts +9 -0
  301. package/build/types/src/utils/http/types.d.ts +7 -0
  302. package/build/types/src/utils/indexers/index.d.ts +1 -0
  303. package/build/types/src/utils/markets/__tests__/mockMarkets.d.ts +9 -0
  304. package/build/types/src/utils/markets/api.d.ts +9 -0
  305. package/build/types/src/utils/markets/hashKeys.d.ts +23 -0
  306. package/build/types/src/utils/markets/index.d.ts +5 -0
  307. package/build/types/src/utils/markets/multicall.d.ts +25 -0
  308. package/build/types/src/{types/markets.d.ts → utils/markets/types.d.ts} +64 -1
  309. package/build/types/src/utils/markets/utils.d.ts +122 -0
  310. package/build/types/src/utils/numbers/index.d.ts +1 -0
  311. package/build/types/src/utils/{numbers.d.ts → numbers/utils.d.ts} +5 -1
  312. package/build/types/src/utils/objects/index.d.ts +1 -0
  313. package/build/types/src/utils/{objects.d.ts → objects/utils.d.ts} +1 -0
  314. package/build/types/src/utils/orderTransactions/index.d.ts +1 -0
  315. package/build/types/src/utils/{orderTransactions.d.ts → orderTransactions/utils.d.ts} +6 -6
  316. package/build/types/src/utils/orders/api.d.ts +7 -0
  317. package/build/types/src/utils/orders/index.d.ts +3 -0
  318. package/build/types/src/{types/orders.d.ts → utils/orders/types.d.ts} +30 -3
  319. package/build/types/src/utils/{orders.d.ts → orders/utils.d.ts} +3 -3
  320. package/build/types/src/utils/positions/api.d.ts +8 -0
  321. package/build/types/src/utils/positions/index.d.ts +3 -0
  322. package/build/types/src/{types/positions.d.ts → utils/positions/types.d.ts} +7 -18
  323. package/build/types/src/utils/{positions.d.ts → positions/utils.d.ts} +45 -4
  324. package/build/types/src/utils/prices/index.d.ts +1 -0
  325. package/build/types/src/utils/{prices.d.ts → prices/utils.d.ts} +4 -4
  326. package/build/types/src/utils/referrals/index.d.ts +2 -0
  327. package/build/types/src/utils/sidecarOrders/index.d.ts +1 -0
  328. package/build/types/src/{types/sidecarOrders.d.ts → utils/sidecarOrders/types.d.ts} +2 -2
  329. package/build/types/src/utils/swap/botanixStaking.d.ts +2 -2
  330. package/build/types/src/utils/swap/buildSwapStrategy.d.ts +5 -5
  331. package/build/types/src/utils/swap/externalSwapPath.d.ts +1 -1
  332. package/build/types/src/utils/swap/externalSwapQuoteByPath.d.ts +1 -1
  333. package/build/types/src/utils/swap/findSwapPathsBetweenTokens.d.ts +1 -1
  334. package/build/types/src/utils/swap/index.d.ts +12 -0
  335. package/build/types/src/utils/swap/preparedSwapData.d.ts +1 -1
  336. package/build/types/src/utils/swap/swapPath.d.ts +6 -6
  337. package/build/types/src/utils/swap/swapRouting.d.ts +5 -5
  338. package/build/types/src/utils/swap/swapStats.d.ts +3 -3
  339. package/build/types/src/utils/swap/swapValues.d.ts +4 -4
  340. package/build/types/src/{types/swapStrategy.d.ts → utils/swap/types.d.ts} +1 -1
  341. package/build/types/src/utils/time/index.d.ts +1 -0
  342. package/build/types/src/utils/tokens/index.d.ts +2 -0
  343. package/build/types/src/{types/tokens.d.ts → utils/tokens/types.d.ts} +1 -1
  344. package/build/types/src/utils/{tokens.d.ts → tokens/utils.d.ts} +2 -2
  345. package/build/types/src/utils/trade/decrease.d.ts +5 -5
  346. package/build/types/src/utils/trade/increase.d.ts +5 -5
  347. package/build/types/src/utils/trade/index.d.ts +3 -0
  348. package/build/types/src/utils/trade/trade.d.ts +1 -1
  349. package/build/types/src/{types/trade.d.ts → utils/trade/types.d.ts} +4 -4
  350. package/build/types/src/utils/tradeHistory/index.d.ts +2 -0
  351. package/build/types/src/{types/tradeHistory.d.ts → utils/tradeHistory/types.d.ts} +5 -5
  352. package/build/types/src/utils/{tradeHistory.d.ts → tradeHistory/utils.d.ts} +4 -4
  353. package/build/types/src/utils/twap/index.d.ts +3 -2
  354. package/build/types/src/utils/{types.d.ts → types/index.d.ts} +0 -1
  355. package/package.json +280 -31
  356. package/build/cjs/src/modules/markets/index.js +0 -366
  357. package/build/cjs/src/prebuilt/index.js +0 -15
  358. package/build/cjs/src/utils/markets.js +0 -195
  359. package/build/cjs/src/utils/positions.js +0 -213
  360. package/build/cjs/src/utils/types.js +0 -13
  361. package/build/esm/src/modules/markets/index.js +0 -359
  362. package/build/esm/src/prebuilt/index.js +0 -7
  363. package/build/esm/src/utils/markets.js +0 -171
  364. package/build/esm/src/utils/positions.js +0 -197
  365. package/build/esm/src/utils/types.js +0 -8
  366. package/build/types/src/modules/markets/query-builders.d.ts +0 -42
  367. package/build/types/src/modules/markets/types.d.ts +0 -51
  368. package/build/types/src/prebuilt/index.d.ts +0 -24
  369. package/build/types/src/types/common.d.ts +0 -1
  370. package/build/types/src/utils/callContract.d.ts +0 -17
  371. package/build/types/src/utils/marketKeysAndConfigs.d.ts +0 -73
  372. package/build/types/src/utils/markets.d.ts +0 -58
  373. /package/build/cjs/src/{modules → clients/v1/modules}/base.js +0 -0
  374. /package/build/cjs/src/{modules/markets → clients/v1}/types.js +0 -0
  375. /package/build/cjs/src/{types/chains.js → utils/24h/types.js} +0 -0
  376. /package/build/cjs/src/utils/{LruCache.js → LruCache/utils.js} +0 -0
  377. /package/build/cjs/src/utils/{abort.js → abort/utils.js} +0 -0
  378. /package/build/cjs/src/utils/{bigmath.js → bigmath/utils.js} +0 -0
  379. /package/build/cjs/src/utils/{buildUrl.js → buildUrl/utils.js} +0 -0
  380. /package/build/cjs/src/{types/common.js → utils/chains/types.js} +0 -0
  381. /package/build/cjs/src/{types/fees.js → utils/fees/types.js} +0 -0
  382. /package/build/cjs/src/utils/{gelatoRelay.js → gelatoRelay/utils.js} +0 -0
  383. /package/build/cjs/src/utils/{graphqlFetcher.js → graphqlFetcher/utils.js} +0 -0
  384. /package/build/cjs/src/{types/markets.js → utils/http/types.js} +0 -0
  385. /package/build/cjs/src/{types/positions.js → utils/markets/types.js} +0 -0
  386. /package/build/cjs/src/{types/orders.js → utils/orders/types.js} +0 -0
  387. /package/build/cjs/src/{types/sdk.js → utils/positions/types.js} +0 -0
  388. /package/build/cjs/src/{types/referrals.js → utils/referrals/types.js} +0 -0
  389. /package/build/cjs/src/utils/{referrals.js → referrals/utils.js} +0 -0
  390. /package/build/cjs/src/{types/sidecarOrders.js → utils/sidecarOrders/types.js} +0 -0
  391. /package/build/cjs/src/{types/swapStrategy.js → utils/swap/types.js} +0 -0
  392. /package/build/cjs/src/utils/{time.js → time/utils.js} +0 -0
  393. /package/build/cjs/src/{types/tokens.js → utils/tokens/types.js} +0 -0
  394. /package/build/cjs/src/{types/trade.js → utils/trade/types.js} +0 -0
  395. /package/build/cjs/src/{types/tradeHistory.js → utils/tradeHistory/types.js} +0 -0
  396. /package/build/cjs/src/{types/twap.js → utils/twap/types.js} +0 -0
  397. /package/build/esm/src/{modules → clients/v1/modules}/base.js +0 -0
  398. /package/build/esm/src/{modules/markets → clients/v1}/types.js +0 -0
  399. /package/build/esm/src/{types/chains.js → utils/24h/types.js} +0 -0
  400. /package/build/esm/src/utils/{LruCache.js → LruCache/utils.js} +0 -0
  401. /package/build/esm/src/utils/{abort.js → abort/utils.js} +0 -0
  402. /package/build/esm/src/utils/{bigmath.js → bigmath/utils.js} +0 -0
  403. /package/build/esm/src/utils/{buildUrl.js → buildUrl/utils.js} +0 -0
  404. /package/build/esm/src/{types/common.js → utils/chains/types.js} +0 -0
  405. /package/build/esm/src/{types/fees.js → utils/fees/types.js} +0 -0
  406. /package/build/esm/src/utils/{gelatoRelay.js → gelatoRelay/utils.js} +0 -0
  407. /package/build/esm/src/utils/{graphqlFetcher.js → graphqlFetcher/utils.js} +0 -0
  408. /package/build/esm/src/{types/markets.js → utils/http/types.js} +0 -0
  409. /package/build/esm/src/{types/positions.js → utils/markets/types.js} +0 -0
  410. /package/build/esm/src/{types/orders.js → utils/orders/types.js} +0 -0
  411. /package/build/esm/src/{types/sdk.js → utils/positions/types.js} +0 -0
  412. /package/build/esm/src/{types/referrals.js → utils/referrals/types.js} +0 -0
  413. /package/build/esm/src/utils/{referrals.js → referrals/utils.js} +0 -0
  414. /package/build/esm/src/{types/sidecarOrders.js → utils/sidecarOrders/types.js} +0 -0
  415. /package/build/esm/src/{types/swapStrategy.js → utils/swap/types.js} +0 -0
  416. /package/build/esm/src/utils/{time.js → time/utils.js} +0 -0
  417. /package/build/esm/src/{types/tokens.js → utils/tokens/types.js} +0 -0
  418. /package/build/esm/src/{types/trade.js → utils/trade/types.js} +0 -0
  419. /package/build/esm/src/{types/tradeHistory.js → utils/tradeHistory/types.js} +0 -0
  420. /package/build/esm/src/{types/twap.js → utils/twap/types.js} +0 -0
  421. /package/build/types/src/{modules → clients/v1/modules}/accounts/accounts.d.ts +0 -0
  422. /package/build/types/src/{modules → clients/v1/modules}/accounts/accounts.spec.d.ts +0 -0
  423. /package/build/types/src/{modules → clients/v1/modules}/base.d.ts +0 -0
  424. /package/build/types/src/{modules → clients/v1/modules}/markets/markets.spec.d.ts +0 -0
  425. /package/build/types/src/{modules → clients/v1/modules}/orders/helpers.spec.d.ts +0 -0
  426. /package/build/types/src/{modules → clients/v1/modules}/orders/orders.spec.d.ts +0 -0
  427. /package/build/types/src/{modules → clients/v1/modules}/positions/positions.spec.d.ts +0 -0
  428. /package/build/types/src/{modules → clients/v1/modules}/tokens/tokens.spec.d.ts +0 -0
  429. /package/build/types/src/{modules → clients/v1/modules}/trades/trades.spec.d.ts +0 -0
  430. /package/build/types/src/utils/{LruCache.d.ts → LruCache/utils.d.ts} +0 -0
  431. /package/build/types/src/utils/{abort.d.ts → abort/utils.d.ts} +0 -0
  432. /package/build/types/src/utils/{bigmath.d.ts → bigmath/utils.d.ts} +0 -0
  433. /package/build/types/src/utils/{buildUrl.d.ts → buildUrl/utils.d.ts} +0 -0
  434. /package/build/types/src/{types/chains.d.ts → utils/chains/types.d.ts} +0 -0
  435. /package/build/types/src/utils/{gelatoRelay.d.ts → gelatoRelay/utils.d.ts} +0 -0
  436. /package/build/types/src/utils/{graphqlFetcher.d.ts → graphqlFetcher/utils.d.ts} +0 -0
  437. /package/build/types/src/utils/{hash.d.ts → hash/utils.d.ts} +0 -0
  438. /package/build/types/src/utils/{indexers.d.ts → indexers/utils.d.ts} +0 -0
  439. /package/build/types/src/{types/referrals.d.ts → utils/referrals/types.d.ts} +0 -0
  440. /package/build/types/src/utils/{referrals.d.ts → referrals/utils.d.ts} +0 -0
  441. /package/build/types/src/utils/{time.d.ts → time/utils.d.ts} +0 -0
  442. /package/build/types/src/{types/twap.d.ts → utils/twap/types.d.ts} +0 -0
@@ -1876,6 +1876,51 @@
1876
1876
  "longInterestInTokensUsingShortToken": "0x2dc01b3b85d756baf87d00c973daa5407d890d823b6d0c3e3319969af87c09a7",
1877
1877
  "shortInterestInTokensUsingLongToken": "0xbdc14076a36f44c7f3a721b002fbe90479cef53c30049cf42365a196f962978d",
1878
1878
  "shortInterestInTokensUsingShortToken": "0x4807b52cfdf6c2cebdc1e028aa6e5ea81dc95ff2d40ac3888f859c3973fdfe1b"
1879
+ },
1880
+ "0xeb28aD1a2e497F4Acc5D9b87e7B496623C93061E": {
1881
+ "longPoolAmount": "0x1467a0ca58bd033427ce20475cdd2146a5b6ff299485de5b886c5db5ae11c172",
1882
+ "shortPoolAmount": "0x9e3a74fda2c49d91656ffb331d11776658be447bdd883306084d57f3f739da94",
1883
+ "positionImpactPoolAmount": "0xc5954c357d418e28002101792d9a99234c6ae88afebfc922507234421fc3104b",
1884
+ "swapImpactPoolAmountLong": "0x934171c5620e093fec4bb7008a9ee50d5a79ebfd3730fde986199b89522f8bf5",
1885
+ "swapImpactPoolAmountShort": "0x1543ac5644aff1a908e3ae693aa1c76b2b6673aa0598c84caa952f6e098eaef3",
1886
+ "longInterestUsingLongToken": "0xf2c3a8eaadecd1ac537e33bb22ac14c127706d1281136582159e58225d4c076a",
1887
+ "longInterestUsingShortToken": "0xa8350cf5bb79a9d49a5fb395930259ffd1a236eac5d89440261732d65a25f392",
1888
+ "shortInterestUsingLongToken": "0xc3fea30bbfa4bb8a15e8887f0b68439fbafe3417447f581d7e8bbda0e6ba880e",
1889
+ "shortInterestUsingShortToken": "0x3b6af920eddbd59ac4bca4bb9a7d3f91bd4c4dc7a83ec88b366a22cdc20cd426",
1890
+ "longInterestInTokensUsingLongToken": "0x271a29586b96afa08a1bfe937e41f0ec9d0f62b5823fc8f7f4227f706f6eed24",
1891
+ "longInterestInTokensUsingShortToken": "0x8f706aef2d39b6b65a9d992f3b6adade9daf5439bfda4887908c2312464ec306",
1892
+ "shortInterestInTokensUsingLongToken": "0xdd9cde1c272d7e80a5c53b13616c3e43754b5024c66933be1cfef9a6e74993ff",
1893
+ "shortInterestInTokensUsingShortToken": "0x0caa9990d4ecfd4edf1098046d4b06baa46490ffc2f4951089ddb412bc7a75f3"
1894
+ },
1895
+ "0x044dFE01863CE85f9ECd5639eE5485c90AC320FC": {
1896
+ "longPoolAmount": "0x4bf0992c5d2cf541db66d59b36ffb1e883c1cc602d029e0973c9c14622c84c07",
1897
+ "shortPoolAmount": "0xd2a8ce3c15aaad24a2efe6772e953c911b80f2e1fff256df0522ff73a0194d01",
1898
+ "positionImpactPoolAmount": "0x12c40a0e5e407ac30f70437ec9031c3151b81735188a53988a88339fecc428a4",
1899
+ "swapImpactPoolAmountLong": "0x1432126a23273a829380ed2e00b947b6f570505a7cca6d02d087503336ecd456",
1900
+ "swapImpactPoolAmountShort": "0xeec716206ddc3fac7ced2379a78d106fc52951ac85946bca98092b3e935e149e",
1901
+ "longInterestUsingLongToken": "0x647d62333bd375890ce5799e7e7d47f78fe9388a48add9cafa65dda86515b393",
1902
+ "longInterestUsingShortToken": "0x4c9f65dced667d3cc59b53ae23d0734190e0f7abf8c70d5638a07e550b7f3f19",
1903
+ "shortInterestUsingLongToken": "0x85a241124f20f03eb0a265a995565484e0d6110c5e6ec4ca854280a9e11255ff",
1904
+ "shortInterestUsingShortToken": "0xf72dec4a533fb6a594ed7e4347e70a215ca20501881962a44149dfce9b20a2d5",
1905
+ "longInterestInTokensUsingLongToken": "0x976de6ccbb8dc799cd340b2d4373da665a4d0270ca67dee880ddcbcbe5374c13",
1906
+ "longInterestInTokensUsingShortToken": "0x3d1b3cb5f532caa312552f39dd9daeca0045f3ce7f79cb10a816dee3857f5c97",
1907
+ "shortInterestInTokensUsingLongToken": "0x6ab7a7ae8ef78d66eb7a6ca76d7ff649371dc62c54b8f508b3500300b7b32092",
1908
+ "shortInterestInTokensUsingShortToken": "0x8e1c3bfa64049ac133fea2eb5087a2e924d3631243fa4cadfbe29fe8eadb6514"
1909
+ },
1910
+ "0x5ff52BE1968107D7886a8E9A64874A45c8F5D96a": {
1911
+ "longPoolAmount": "0x024907819809cd43c72a6a4833f33b1869840bd76bec0e31ab2cf08d0f19ff0b",
1912
+ "shortPoolAmount": "0x8e42ed2ba273e13d3c8e6c11381728642b01d4ab62f37acf94ea3ebdb57740e8",
1913
+ "positionImpactPoolAmount": "0xc33c916b124dbf517fb0bfb710757c27dc6ec1e4b03efc2bcde5c1b4aa1c3b72",
1914
+ "swapImpactPoolAmountLong": "0x83665ca0edbf1565f2f133280f5c73934f00433c57f6d6c304e9c16832d1f772",
1915
+ "swapImpactPoolAmountShort": "0xaf9bfce6eb82448e84e37277210d83e0fc1524db9c0a03531acf7728f1c18e85",
1916
+ "longInterestUsingLongToken": "0xd940c419b28f864e3b162fc087831785096ba12b653181637f8d8dc0830242fe",
1917
+ "longInterestUsingShortToken": "0x5f8c26d4bcc28b308b2443fba71efb9b72184934393fefe650bbadd6618f4b67",
1918
+ "shortInterestUsingLongToken": "0x34270c9a363217c8a4b0cc117207b58fd0bd2aa08d39a6c5fbc2497ae7c75877",
1919
+ "shortInterestUsingShortToken": "0xe27ef4a387cd77b6830adf276ef939af126a4a2366f827e6d29c547bcd4b318b",
1920
+ "longInterestInTokensUsingLongToken": "0x7eff661f177aca8caa364bfa03b55ac5ba27df637f2fd4d8c066d575e1c8849f",
1921
+ "longInterestInTokensUsingShortToken": "0x304a988d2a21904b0de78f1e71fb803b4a070e4072eba7a2b7ca9c0e4f99bcbd",
1922
+ "shortInterestInTokensUsingLongToken": "0x529852b72b88323b98314e361c5fb21846b2c64fc5f9cf7ab9b92cd6d23a9f36",
1923
+ "shortInterestInTokensUsingShortToken": "0xd8b7ef7743b28c9a6b650fc6015d93312c5030d7b96cc8ee073e3ada0d08cab4"
1879
1924
  }
1880
1925
  },
1881
1926
  "43113": {
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.HASHED_KINK_MODEL_MARKET_RATES_KEYS = exports.HASHED_MARKET_CONFIG_KEYS = exports.HASHED_MARKET_VALUES_KEYS = void 0;
7
+ /**
8
+ * Json files in this directory are prebuild by scripts from the `scripts/prebuild` directory.
9
+ * No need to edit them manually, use `yarn run prebuild` command instead.
10
+ */
11
+ const hashedKinkModelMarketRatesKeys_json_1 = __importDefault(require("./hashedKinkModelMarketRatesKeys.json"));
12
+ const hashedMarketConfigKeys_json_1 = __importDefault(require("./hashedMarketConfigKeys.json"));
13
+ const hashedMarketValuesKeys_json_1 = __importDefault(require("./hashedMarketValuesKeys.json"));
14
+ exports.HASHED_MARKET_VALUES_KEYS = hashedMarketValuesKeys_json_1.default;
15
+ exports.HASHED_MARKET_CONFIG_KEYS = hashedMarketConfigKeys_json_1.default;
16
+ exports.HASHED_KINK_MODEL_MARKET_RATES_KEYS = hashedKinkModelMarketRatesKeys_json_1.default;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VolumeInfoOrderByInput = exports.TransactionOrderByInput = exports.TradeActionOrderByInput = exports.SwapVolumeInfoOrderByInput = exports.SwapInfoOrderByInput = exports.SwapFeesInfoOrderByInput = exports.ProcessorStatusOrderByInput = exports.PriceType = exports.PriceOrderByInput = exports.PositionVolumeInfoOrderByInput = exports.PositionOrderByInput = exports.PositionFeesEntityType = exports.PositionFeesEntityOrderByInput = exports.PositionChangeType = exports.PositionChangeOrderByInput = exports.PnlAprSnapshotOrderByInput = exports.PlatformStatsOrderByInput = exports.OrderStatus = exports.OrderOrderByInput = exports.OnChainSettingType = exports.OnChainSettingOrderByInput = exports.MultichainMetadataOrderByInput = exports.MultichainFundingSendEventOrderByInput = exports.MultichainFundingReceiveEventOrderByInput = exports.MultichainFundingOperation = exports.MarketOrderByInput = exports.MarketInfoOrderByInput = exports.GlvOrderByInput = exports.EntityType = exports.DistributionOrderByInput = exports.CumulativePoolValueOrderByInput = exports.CumulativePnlOrderByInput = exports.CollectedFeesInfoOrderByInput = exports.ClaimableFundingFeeInfoOrderByInput = exports.ClaimableCollateralOrderByInput = exports.ClaimableCollateralGroupOrderByInput = exports.ClaimableAmountOrderByInput = exports.ClaimRefOrderByInput = exports.ClaimActionType = exports.ClaimActionOrderByInput = exports.BorrowingRateSnapshotOrderByInput = exports.AprSnapshotOrderByInput = exports.AccountStatOrderByInput = void 0;
3
+ exports.VolumeInfoOrderByInput = exports.TransactionOrderByInput = exports.TradeActionOrderByInput = exports.SwapVolumeInfoOrderByInput = exports.SwapInfoOrderByInput = exports.SwapFeesInfoWithPeriodOrderByInput = exports.SwapFeesInfoOrderByInput = exports.ProcessorStatusOrderByInput = exports.PriceType = exports.PriceOrderByInput = exports.PositionVolumeInfoOrderByInput = exports.PositionOrderByInput = exports.PositionFeesInfoWithPeriodOrderByInput = exports.PositionFeesEntityType = exports.PositionFeesEntityOrderByInput = exports.PositionChangeType = exports.PositionChangeOrderByInput = exports.PnlAprSnapshotOrderByInput = exports.PlatformStatsOrderByInput = exports.OrderStatus = exports.OrderOrderByInput = exports.OnChainSettingType = exports.OnChainSettingOrderByInput = exports.MultichainSamechainFundingEventOrderByInput = exports.MultichainFundingSendEventOrderByInput = exports.MultichainFundingReceiveEventOrderByInput = exports.MultichainFundingOperation = exports.MarketOrderByInput = exports.MarketInfoOrderByInput = exports.GlvOrderByInput = exports.EntityType = exports.DistributionOrderByInput = exports.CumulativePoolValueOrderByInput = exports.CumulativePnlOrderByInput = exports.CollectedFeesInfoOrderByInput = exports.ClaimableFundingFeeInfoOrderByInput = exports.ClaimableCollateralOrderByInput = exports.ClaimableCollateralGroupOrderByInput = exports.ClaimableAmountOrderByInput = exports.ClaimRefOrderByInput = exports.ClaimActionType = exports.ClaimActionOrderByInput = exports.BorrowingRateSnapshotOrderByInput = exports.AprSnapshotOrderByInput = exports.AccountStatOrderByInput = void 0;
4
4
  var AccountStatOrderByInput;
5
5
  (function (AccountStatOrderByInput) {
6
6
  AccountStatOrderByInput["closedCount_ASC"] = "closedCount_ASC";
@@ -1471,27 +1471,51 @@ var MultichainFundingSendEventOrderByInput;
1471
1471
  MultichainFundingSendEventOrderByInput["txn_DESC_NULLS_FIRST"] = "txn_DESC_NULLS_FIRST";
1472
1472
  MultichainFundingSendEventOrderByInput["txn_DESC_NULLS_LAST"] = "txn_DESC_NULLS_LAST";
1473
1473
  })(MultichainFundingSendEventOrderByInput || (exports.MultichainFundingSendEventOrderByInput = MultichainFundingSendEventOrderByInput = {}));
1474
- var MultichainMetadataOrderByInput;
1475
- (function (MultichainMetadataOrderByInput) {
1476
- MultichainMetadataOrderByInput["id_ASC"] = "id_ASC";
1477
- MultichainMetadataOrderByInput["id_ASC_NULLS_FIRST"] = "id_ASC_NULLS_FIRST";
1478
- MultichainMetadataOrderByInput["id_ASC_NULLS_LAST"] = "id_ASC_NULLS_LAST";
1479
- MultichainMetadataOrderByInput["id_DESC"] = "id_DESC";
1480
- MultichainMetadataOrderByInput["id_DESC_NULLS_FIRST"] = "id_DESC_NULLS_FIRST";
1481
- MultichainMetadataOrderByInput["id_DESC_NULLS_LAST"] = "id_DESC_NULLS_LAST";
1482
- MultichainMetadataOrderByInput["lastBlockNumber_ASC"] = "lastBlockNumber_ASC";
1483
- MultichainMetadataOrderByInput["lastBlockNumber_ASC_NULLS_FIRST"] = "lastBlockNumber_ASC_NULLS_FIRST";
1484
- MultichainMetadataOrderByInput["lastBlockNumber_ASC_NULLS_LAST"] = "lastBlockNumber_ASC_NULLS_LAST";
1485
- MultichainMetadataOrderByInput["lastBlockNumber_DESC"] = "lastBlockNumber_DESC";
1486
- MultichainMetadataOrderByInput["lastBlockNumber_DESC_NULLS_FIRST"] = "lastBlockNumber_DESC_NULLS_FIRST";
1487
- MultichainMetadataOrderByInput["lastBlockNumber_DESC_NULLS_LAST"] = "lastBlockNumber_DESC_NULLS_LAST";
1488
- MultichainMetadataOrderByInput["lastBlockTimestamp_ASC"] = "lastBlockTimestamp_ASC";
1489
- MultichainMetadataOrderByInput["lastBlockTimestamp_ASC_NULLS_FIRST"] = "lastBlockTimestamp_ASC_NULLS_FIRST";
1490
- MultichainMetadataOrderByInput["lastBlockTimestamp_ASC_NULLS_LAST"] = "lastBlockTimestamp_ASC_NULLS_LAST";
1491
- MultichainMetadataOrderByInput["lastBlockTimestamp_DESC"] = "lastBlockTimestamp_DESC";
1492
- MultichainMetadataOrderByInput["lastBlockTimestamp_DESC_NULLS_FIRST"] = "lastBlockTimestamp_DESC_NULLS_FIRST";
1493
- MultichainMetadataOrderByInput["lastBlockTimestamp_DESC_NULLS_LAST"] = "lastBlockTimestamp_DESC_NULLS_LAST";
1494
- })(MultichainMetadataOrderByInput || (exports.MultichainMetadataOrderByInput = MultichainMetadataOrderByInput = {}));
1474
+ var MultichainSamechainFundingEventOrderByInput;
1475
+ (function (MultichainSamechainFundingEventOrderByInput) {
1476
+ MultichainSamechainFundingEventOrderByInput["account_ASC"] = "account_ASC";
1477
+ MultichainSamechainFundingEventOrderByInput["account_ASC_NULLS_FIRST"] = "account_ASC_NULLS_FIRST";
1478
+ MultichainSamechainFundingEventOrderByInput["account_ASC_NULLS_LAST"] = "account_ASC_NULLS_LAST";
1479
+ MultichainSamechainFundingEventOrderByInput["account_DESC"] = "account_DESC";
1480
+ MultichainSamechainFundingEventOrderByInput["account_DESC_NULLS_FIRST"] = "account_DESC_NULLS_FIRST";
1481
+ MultichainSamechainFundingEventOrderByInput["account_DESC_NULLS_LAST"] = "account_DESC_NULLS_LAST";
1482
+ MultichainSamechainFundingEventOrderByInput["amount_ASC"] = "amount_ASC";
1483
+ MultichainSamechainFundingEventOrderByInput["amount_ASC_NULLS_FIRST"] = "amount_ASC_NULLS_FIRST";
1484
+ MultichainSamechainFundingEventOrderByInput["amount_ASC_NULLS_LAST"] = "amount_ASC_NULLS_LAST";
1485
+ MultichainSamechainFundingEventOrderByInput["amount_DESC"] = "amount_DESC";
1486
+ MultichainSamechainFundingEventOrderByInput["amount_DESC_NULLS_FIRST"] = "amount_DESC_NULLS_FIRST";
1487
+ MultichainSamechainFundingEventOrderByInput["amount_DESC_NULLS_LAST"] = "amount_DESC_NULLS_LAST";
1488
+ MultichainSamechainFundingEventOrderByInput["id_ASC"] = "id_ASC";
1489
+ MultichainSamechainFundingEventOrderByInput["id_ASC_NULLS_FIRST"] = "id_ASC_NULLS_FIRST";
1490
+ MultichainSamechainFundingEventOrderByInput["id_ASC_NULLS_LAST"] = "id_ASC_NULLS_LAST";
1491
+ MultichainSamechainFundingEventOrderByInput["id_DESC"] = "id_DESC";
1492
+ MultichainSamechainFundingEventOrderByInput["id_DESC_NULLS_FIRST"] = "id_DESC_NULLS_FIRST";
1493
+ MultichainSamechainFundingEventOrderByInput["id_DESC_NULLS_LAST"] = "id_DESC_NULLS_LAST";
1494
+ MultichainSamechainFundingEventOrderByInput["operation_ASC"] = "operation_ASC";
1495
+ MultichainSamechainFundingEventOrderByInput["operation_ASC_NULLS_FIRST"] = "operation_ASC_NULLS_FIRST";
1496
+ MultichainSamechainFundingEventOrderByInput["operation_ASC_NULLS_LAST"] = "operation_ASC_NULLS_LAST";
1497
+ MultichainSamechainFundingEventOrderByInput["operation_DESC"] = "operation_DESC";
1498
+ MultichainSamechainFundingEventOrderByInput["operation_DESC_NULLS_FIRST"] = "operation_DESC_NULLS_FIRST";
1499
+ MultichainSamechainFundingEventOrderByInput["operation_DESC_NULLS_LAST"] = "operation_DESC_NULLS_LAST";
1500
+ MultichainSamechainFundingEventOrderByInput["timestamp_ASC"] = "timestamp_ASC";
1501
+ MultichainSamechainFundingEventOrderByInput["timestamp_ASC_NULLS_FIRST"] = "timestamp_ASC_NULLS_FIRST";
1502
+ MultichainSamechainFundingEventOrderByInput["timestamp_ASC_NULLS_LAST"] = "timestamp_ASC_NULLS_LAST";
1503
+ MultichainSamechainFundingEventOrderByInput["timestamp_DESC"] = "timestamp_DESC";
1504
+ MultichainSamechainFundingEventOrderByInput["timestamp_DESC_NULLS_FIRST"] = "timestamp_DESC_NULLS_FIRST";
1505
+ MultichainSamechainFundingEventOrderByInput["timestamp_DESC_NULLS_LAST"] = "timestamp_DESC_NULLS_LAST";
1506
+ MultichainSamechainFundingEventOrderByInput["token_ASC"] = "token_ASC";
1507
+ MultichainSamechainFundingEventOrderByInput["token_ASC_NULLS_FIRST"] = "token_ASC_NULLS_FIRST";
1508
+ MultichainSamechainFundingEventOrderByInput["token_ASC_NULLS_LAST"] = "token_ASC_NULLS_LAST";
1509
+ MultichainSamechainFundingEventOrderByInput["token_DESC"] = "token_DESC";
1510
+ MultichainSamechainFundingEventOrderByInput["token_DESC_NULLS_FIRST"] = "token_DESC_NULLS_FIRST";
1511
+ MultichainSamechainFundingEventOrderByInput["token_DESC_NULLS_LAST"] = "token_DESC_NULLS_LAST";
1512
+ MultichainSamechainFundingEventOrderByInput["txHash_ASC"] = "txHash_ASC";
1513
+ MultichainSamechainFundingEventOrderByInput["txHash_ASC_NULLS_FIRST"] = "txHash_ASC_NULLS_FIRST";
1514
+ MultichainSamechainFundingEventOrderByInput["txHash_ASC_NULLS_LAST"] = "txHash_ASC_NULLS_LAST";
1515
+ MultichainSamechainFundingEventOrderByInput["txHash_DESC"] = "txHash_DESC";
1516
+ MultichainSamechainFundingEventOrderByInput["txHash_DESC_NULLS_FIRST"] = "txHash_DESC_NULLS_FIRST";
1517
+ MultichainSamechainFundingEventOrderByInput["txHash_DESC_NULLS_LAST"] = "txHash_DESC_NULLS_LAST";
1518
+ })(MultichainSamechainFundingEventOrderByInput || (exports.MultichainSamechainFundingEventOrderByInput = MultichainSamechainFundingEventOrderByInput = {}));
1495
1519
  var OnChainSettingOrderByInput;
1496
1520
  (function (OnChainSettingOrderByInput) {
1497
1521
  OnChainSettingOrderByInput["id_ASC"] = "id_ASC";
@@ -2224,6 +2248,69 @@ var PositionFeesEntityType;
2224
2248
  PositionFeesEntityType["PositionFeesCollected"] = "PositionFeesCollected";
2225
2249
  PositionFeesEntityType["PositionFeesInfo"] = "PositionFeesInfo";
2226
2250
  })(PositionFeesEntityType || (exports.PositionFeesEntityType = PositionFeesEntityType = {}));
2251
+ var PositionFeesInfoWithPeriodOrderByInput;
2252
+ (function (PositionFeesInfoWithPeriodOrderByInput) {
2253
+ PositionFeesInfoWithPeriodOrderByInput["id_ASC"] = "id_ASC";
2254
+ PositionFeesInfoWithPeriodOrderByInput["id_ASC_NULLS_FIRST"] = "id_ASC_NULLS_FIRST";
2255
+ PositionFeesInfoWithPeriodOrderByInput["id_ASC_NULLS_LAST"] = "id_ASC_NULLS_LAST";
2256
+ PositionFeesInfoWithPeriodOrderByInput["id_DESC"] = "id_DESC";
2257
+ PositionFeesInfoWithPeriodOrderByInput["id_DESC_NULLS_FIRST"] = "id_DESC_NULLS_FIRST";
2258
+ PositionFeesInfoWithPeriodOrderByInput["id_DESC_NULLS_LAST"] = "id_DESC_NULLS_LAST";
2259
+ PositionFeesInfoWithPeriodOrderByInput["period_ASC"] = "period_ASC";
2260
+ PositionFeesInfoWithPeriodOrderByInput["period_ASC_NULLS_FIRST"] = "period_ASC_NULLS_FIRST";
2261
+ PositionFeesInfoWithPeriodOrderByInput["period_ASC_NULLS_LAST"] = "period_ASC_NULLS_LAST";
2262
+ PositionFeesInfoWithPeriodOrderByInput["period_DESC"] = "period_DESC";
2263
+ PositionFeesInfoWithPeriodOrderByInput["period_DESC_NULLS_FIRST"] = "period_DESC_NULLS_FIRST";
2264
+ PositionFeesInfoWithPeriodOrderByInput["period_DESC_NULLS_LAST"] = "period_DESC_NULLS_LAST";
2265
+ PositionFeesInfoWithPeriodOrderByInput["timestamp_ASC"] = "timestamp_ASC";
2266
+ PositionFeesInfoWithPeriodOrderByInput["timestamp_ASC_NULLS_FIRST"] = "timestamp_ASC_NULLS_FIRST";
2267
+ PositionFeesInfoWithPeriodOrderByInput["timestamp_ASC_NULLS_LAST"] = "timestamp_ASC_NULLS_LAST";
2268
+ PositionFeesInfoWithPeriodOrderByInput["timestamp_DESC"] = "timestamp_DESC";
2269
+ PositionFeesInfoWithPeriodOrderByInput["timestamp_DESC_NULLS_FIRST"] = "timestamp_DESC_NULLS_FIRST";
2270
+ PositionFeesInfoWithPeriodOrderByInput["timestamp_DESC_NULLS_LAST"] = "timestamp_DESC_NULLS_LAST";
2271
+ PositionFeesInfoWithPeriodOrderByInput["totalBorrowingFeeUsd_ASC"] = "totalBorrowingFeeUsd_ASC";
2272
+ PositionFeesInfoWithPeriodOrderByInput["totalBorrowingFeeUsd_ASC_NULLS_FIRST"] = "totalBorrowingFeeUsd_ASC_NULLS_FIRST";
2273
+ PositionFeesInfoWithPeriodOrderByInput["totalBorrowingFeeUsd_ASC_NULLS_LAST"] = "totalBorrowingFeeUsd_ASC_NULLS_LAST";
2274
+ PositionFeesInfoWithPeriodOrderByInput["totalBorrowingFeeUsd_DESC"] = "totalBorrowingFeeUsd_DESC";
2275
+ PositionFeesInfoWithPeriodOrderByInput["totalBorrowingFeeUsd_DESC_NULLS_FIRST"] = "totalBorrowingFeeUsd_DESC_NULLS_FIRST";
2276
+ PositionFeesInfoWithPeriodOrderByInput["totalBorrowingFeeUsd_DESC_NULLS_LAST"] = "totalBorrowingFeeUsd_DESC_NULLS_LAST";
2277
+ PositionFeesInfoWithPeriodOrderByInput["totalLiquidationFeeAmount_ASC"] = "totalLiquidationFeeAmount_ASC";
2278
+ PositionFeesInfoWithPeriodOrderByInput["totalLiquidationFeeAmount_ASC_NULLS_FIRST"] = "totalLiquidationFeeAmount_ASC_NULLS_FIRST";
2279
+ PositionFeesInfoWithPeriodOrderByInput["totalLiquidationFeeAmount_ASC_NULLS_LAST"] = "totalLiquidationFeeAmount_ASC_NULLS_LAST";
2280
+ PositionFeesInfoWithPeriodOrderByInput["totalLiquidationFeeAmount_DESC"] = "totalLiquidationFeeAmount_DESC";
2281
+ PositionFeesInfoWithPeriodOrderByInput["totalLiquidationFeeAmount_DESC_NULLS_FIRST"] = "totalLiquidationFeeAmount_DESC_NULLS_FIRST";
2282
+ PositionFeesInfoWithPeriodOrderByInput["totalLiquidationFeeAmount_DESC_NULLS_LAST"] = "totalLiquidationFeeAmount_DESC_NULLS_LAST";
2283
+ PositionFeesInfoWithPeriodOrderByInput["totalLiquidationFeeUsd_ASC"] = "totalLiquidationFeeUsd_ASC";
2284
+ PositionFeesInfoWithPeriodOrderByInput["totalLiquidationFeeUsd_ASC_NULLS_FIRST"] = "totalLiquidationFeeUsd_ASC_NULLS_FIRST";
2285
+ PositionFeesInfoWithPeriodOrderByInput["totalLiquidationFeeUsd_ASC_NULLS_LAST"] = "totalLiquidationFeeUsd_ASC_NULLS_LAST";
2286
+ PositionFeesInfoWithPeriodOrderByInput["totalLiquidationFeeUsd_DESC"] = "totalLiquidationFeeUsd_DESC";
2287
+ PositionFeesInfoWithPeriodOrderByInput["totalLiquidationFeeUsd_DESC_NULLS_FIRST"] = "totalLiquidationFeeUsd_DESC_NULLS_FIRST";
2288
+ PositionFeesInfoWithPeriodOrderByInput["totalLiquidationFeeUsd_DESC_NULLS_LAST"] = "totalLiquidationFeeUsd_DESC_NULLS_LAST";
2289
+ PositionFeesInfoWithPeriodOrderByInput["totalPositionFeeAmountForPool_ASC"] = "totalPositionFeeAmountForPool_ASC";
2290
+ PositionFeesInfoWithPeriodOrderByInput["totalPositionFeeAmountForPool_ASC_NULLS_FIRST"] = "totalPositionFeeAmountForPool_ASC_NULLS_FIRST";
2291
+ PositionFeesInfoWithPeriodOrderByInput["totalPositionFeeAmountForPool_ASC_NULLS_LAST"] = "totalPositionFeeAmountForPool_ASC_NULLS_LAST";
2292
+ PositionFeesInfoWithPeriodOrderByInput["totalPositionFeeAmountForPool_DESC"] = "totalPositionFeeAmountForPool_DESC";
2293
+ PositionFeesInfoWithPeriodOrderByInput["totalPositionFeeAmountForPool_DESC_NULLS_FIRST"] = "totalPositionFeeAmountForPool_DESC_NULLS_FIRST";
2294
+ PositionFeesInfoWithPeriodOrderByInput["totalPositionFeeAmountForPool_DESC_NULLS_LAST"] = "totalPositionFeeAmountForPool_DESC_NULLS_LAST";
2295
+ PositionFeesInfoWithPeriodOrderByInput["totalPositionFeeAmount_ASC"] = "totalPositionFeeAmount_ASC";
2296
+ PositionFeesInfoWithPeriodOrderByInput["totalPositionFeeAmount_ASC_NULLS_FIRST"] = "totalPositionFeeAmount_ASC_NULLS_FIRST";
2297
+ PositionFeesInfoWithPeriodOrderByInput["totalPositionFeeAmount_ASC_NULLS_LAST"] = "totalPositionFeeAmount_ASC_NULLS_LAST";
2298
+ PositionFeesInfoWithPeriodOrderByInput["totalPositionFeeAmount_DESC"] = "totalPositionFeeAmount_DESC";
2299
+ PositionFeesInfoWithPeriodOrderByInput["totalPositionFeeAmount_DESC_NULLS_FIRST"] = "totalPositionFeeAmount_DESC_NULLS_FIRST";
2300
+ PositionFeesInfoWithPeriodOrderByInput["totalPositionFeeAmount_DESC_NULLS_LAST"] = "totalPositionFeeAmount_DESC_NULLS_LAST";
2301
+ PositionFeesInfoWithPeriodOrderByInput["totalPositionFeeUsdForPool_ASC"] = "totalPositionFeeUsdForPool_ASC";
2302
+ PositionFeesInfoWithPeriodOrderByInput["totalPositionFeeUsdForPool_ASC_NULLS_FIRST"] = "totalPositionFeeUsdForPool_ASC_NULLS_FIRST";
2303
+ PositionFeesInfoWithPeriodOrderByInput["totalPositionFeeUsdForPool_ASC_NULLS_LAST"] = "totalPositionFeeUsdForPool_ASC_NULLS_LAST";
2304
+ PositionFeesInfoWithPeriodOrderByInput["totalPositionFeeUsdForPool_DESC"] = "totalPositionFeeUsdForPool_DESC";
2305
+ PositionFeesInfoWithPeriodOrderByInput["totalPositionFeeUsdForPool_DESC_NULLS_FIRST"] = "totalPositionFeeUsdForPool_DESC_NULLS_FIRST";
2306
+ PositionFeesInfoWithPeriodOrderByInput["totalPositionFeeUsdForPool_DESC_NULLS_LAST"] = "totalPositionFeeUsdForPool_DESC_NULLS_LAST";
2307
+ PositionFeesInfoWithPeriodOrderByInput["totalPositionFeeUsd_ASC"] = "totalPositionFeeUsd_ASC";
2308
+ PositionFeesInfoWithPeriodOrderByInput["totalPositionFeeUsd_ASC_NULLS_FIRST"] = "totalPositionFeeUsd_ASC_NULLS_FIRST";
2309
+ PositionFeesInfoWithPeriodOrderByInput["totalPositionFeeUsd_ASC_NULLS_LAST"] = "totalPositionFeeUsd_ASC_NULLS_LAST";
2310
+ PositionFeesInfoWithPeriodOrderByInput["totalPositionFeeUsd_DESC"] = "totalPositionFeeUsd_DESC";
2311
+ PositionFeesInfoWithPeriodOrderByInput["totalPositionFeeUsd_DESC_NULLS_FIRST"] = "totalPositionFeeUsd_DESC_NULLS_FIRST";
2312
+ PositionFeesInfoWithPeriodOrderByInput["totalPositionFeeUsd_DESC_NULLS_LAST"] = "totalPositionFeeUsd_DESC_NULLS_LAST";
2313
+ })(PositionFeesInfoWithPeriodOrderByInput || (exports.PositionFeesInfoWithPeriodOrderByInput = PositionFeesInfoWithPeriodOrderByInput = {}));
2227
2314
  var PositionOrderByInput;
2228
2315
  (function (PositionOrderByInput) {
2229
2316
  PositionOrderByInput["accountStat_closedCount_ASC"] = "accountStat_closedCount_ASC";
@@ -2660,6 +2747,39 @@ var SwapFeesInfoOrderByInput;
2660
2747
  SwapFeesInfoOrderByInput["transaction_transactionIndex_DESC_NULLS_FIRST"] = "transaction_transactionIndex_DESC_NULLS_FIRST";
2661
2748
  SwapFeesInfoOrderByInput["transaction_transactionIndex_DESC_NULLS_LAST"] = "transaction_transactionIndex_DESC_NULLS_LAST";
2662
2749
  })(SwapFeesInfoOrderByInput || (exports.SwapFeesInfoOrderByInput = SwapFeesInfoOrderByInput = {}));
2750
+ var SwapFeesInfoWithPeriodOrderByInput;
2751
+ (function (SwapFeesInfoWithPeriodOrderByInput) {
2752
+ SwapFeesInfoWithPeriodOrderByInput["id_ASC"] = "id_ASC";
2753
+ SwapFeesInfoWithPeriodOrderByInput["id_ASC_NULLS_FIRST"] = "id_ASC_NULLS_FIRST";
2754
+ SwapFeesInfoWithPeriodOrderByInput["id_ASC_NULLS_LAST"] = "id_ASC_NULLS_LAST";
2755
+ SwapFeesInfoWithPeriodOrderByInput["id_DESC"] = "id_DESC";
2756
+ SwapFeesInfoWithPeriodOrderByInput["id_DESC_NULLS_FIRST"] = "id_DESC_NULLS_FIRST";
2757
+ SwapFeesInfoWithPeriodOrderByInput["id_DESC_NULLS_LAST"] = "id_DESC_NULLS_LAST";
2758
+ SwapFeesInfoWithPeriodOrderByInput["period_ASC"] = "period_ASC";
2759
+ SwapFeesInfoWithPeriodOrderByInput["period_ASC_NULLS_FIRST"] = "period_ASC_NULLS_FIRST";
2760
+ SwapFeesInfoWithPeriodOrderByInput["period_ASC_NULLS_LAST"] = "period_ASC_NULLS_LAST";
2761
+ SwapFeesInfoWithPeriodOrderByInput["period_DESC"] = "period_DESC";
2762
+ SwapFeesInfoWithPeriodOrderByInput["period_DESC_NULLS_FIRST"] = "period_DESC_NULLS_FIRST";
2763
+ SwapFeesInfoWithPeriodOrderByInput["period_DESC_NULLS_LAST"] = "period_DESC_NULLS_LAST";
2764
+ SwapFeesInfoWithPeriodOrderByInput["timestamp_ASC"] = "timestamp_ASC";
2765
+ SwapFeesInfoWithPeriodOrderByInput["timestamp_ASC_NULLS_FIRST"] = "timestamp_ASC_NULLS_FIRST";
2766
+ SwapFeesInfoWithPeriodOrderByInput["timestamp_ASC_NULLS_LAST"] = "timestamp_ASC_NULLS_LAST";
2767
+ SwapFeesInfoWithPeriodOrderByInput["timestamp_DESC"] = "timestamp_DESC";
2768
+ SwapFeesInfoWithPeriodOrderByInput["timestamp_DESC_NULLS_FIRST"] = "timestamp_DESC_NULLS_FIRST";
2769
+ SwapFeesInfoWithPeriodOrderByInput["timestamp_DESC_NULLS_LAST"] = "timestamp_DESC_NULLS_LAST";
2770
+ SwapFeesInfoWithPeriodOrderByInput["totalFeeReceiverUsd_ASC"] = "totalFeeReceiverUsd_ASC";
2771
+ SwapFeesInfoWithPeriodOrderByInput["totalFeeReceiverUsd_ASC_NULLS_FIRST"] = "totalFeeReceiverUsd_ASC_NULLS_FIRST";
2772
+ SwapFeesInfoWithPeriodOrderByInput["totalFeeReceiverUsd_ASC_NULLS_LAST"] = "totalFeeReceiverUsd_ASC_NULLS_LAST";
2773
+ SwapFeesInfoWithPeriodOrderByInput["totalFeeReceiverUsd_DESC"] = "totalFeeReceiverUsd_DESC";
2774
+ SwapFeesInfoWithPeriodOrderByInput["totalFeeReceiverUsd_DESC_NULLS_FIRST"] = "totalFeeReceiverUsd_DESC_NULLS_FIRST";
2775
+ SwapFeesInfoWithPeriodOrderByInput["totalFeeReceiverUsd_DESC_NULLS_LAST"] = "totalFeeReceiverUsd_DESC_NULLS_LAST";
2776
+ SwapFeesInfoWithPeriodOrderByInput["totalFeeUsdForPool_ASC"] = "totalFeeUsdForPool_ASC";
2777
+ SwapFeesInfoWithPeriodOrderByInput["totalFeeUsdForPool_ASC_NULLS_FIRST"] = "totalFeeUsdForPool_ASC_NULLS_FIRST";
2778
+ SwapFeesInfoWithPeriodOrderByInput["totalFeeUsdForPool_ASC_NULLS_LAST"] = "totalFeeUsdForPool_ASC_NULLS_LAST";
2779
+ SwapFeesInfoWithPeriodOrderByInput["totalFeeUsdForPool_DESC"] = "totalFeeUsdForPool_DESC";
2780
+ SwapFeesInfoWithPeriodOrderByInput["totalFeeUsdForPool_DESC_NULLS_FIRST"] = "totalFeeUsdForPool_DESC_NULLS_FIRST";
2781
+ SwapFeesInfoWithPeriodOrderByInput["totalFeeUsdForPool_DESC_NULLS_LAST"] = "totalFeeUsdForPool_DESC_NULLS_LAST";
2782
+ })(SwapFeesInfoWithPeriodOrderByInput || (exports.SwapFeesInfoWithPeriodOrderByInput = SwapFeesInfoWithPeriodOrderByInput = {}));
2663
2783
  var SwapInfoOrderByInput;
2664
2784
  (function (SwapInfoOrderByInput) {
2665
2785
  SwapInfoOrderByInput["amountInAfterFees_ASC"] = "amountInAfterFees_ASC";
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getApiUrl = void 0;
4
+ const chains_1 = require("./chains");
5
+ const API_URLS = {
6
+ [chains_1.ARBITRUM]: "https://gmx-api-arbitrum-dev-ikpem.ondigitalocean.app/api/v1",
7
+ [chains_1.AVALANCHE]: "",
8
+ [chains_1.AVALANCHE_FUJI]: "",
9
+ [chains_1.BOTANIX]: "",
10
+ [chains_1.ARBITRUM_SEPOLIA]: "",
11
+ };
12
+ function getApiUrl(chainId) {
13
+ return API_URLS[chainId];
14
+ }
15
+ exports.getApiUrl = getApiUrl;
@@ -17,13 +17,17 @@ Object.defineProperty(exports, "SOURCE_SEPOLIA", { enumerable: true, get: functi
17
17
  exports.CONTRACTS_CHAIN_IDS = [chainIds_1.ARBITRUM, chainIds_1.AVALANCHE, chainIds_1.BOTANIX];
18
18
  exports.CONTRACTS_CHAIN_IDS_DEV = [...exports.CONTRACTS_CHAIN_IDS, chainIds_1.AVALANCHE_FUJI, chainIds_1.ARBITRUM_SEPOLIA];
19
19
  exports.SETTLEMENT_CHAIN_IDS = [chainIds_1.ARBITRUM, chainIds_1.AVALANCHE];
20
- exports.SETTLEMENT_CHAIN_IDS_DEV = [...exports.SETTLEMENT_CHAIN_IDS, chainIds_1.ARBITRUM_SEPOLIA];
20
+ exports.SETTLEMENT_CHAIN_IDS_DEV = [...exports.SETTLEMENT_CHAIN_IDS, chainIds_1.ARBITRUM_SEPOLIA, chainIds_1.AVALANCHE_FUJI];
21
21
  exports.SOURCE_CHAIN_IDS = [
22
22
  chainIds_1.SOURCE_OPTIMISM_SEPOLIA,
23
23
  chainIds_1.SOURCE_SEPOLIA,
24
24
  chainIds_1.SOURCE_BASE_MAINNET,
25
25
  chainIds_1.SOURCE_BSC_MAINNET,
26
26
  chainIds_1.SOURCE_ETHEREUM_MAINNET,
27
+ chainIds_1.ARBITRUM_SEPOLIA,
28
+ chainIds_1.ARBITRUM,
29
+ chainIds_1.AVALANCHE,
30
+ chainIds_1.AVALANCHE_FUJI,
27
31
  ];
28
32
  exports.GMX_ACCOUNT_PSEUDO_CHAIN_ID = 0;
29
33
  const CONTRACTS_CHAIN_CONFIGS = {
@@ -159,6 +163,30 @@ const SOURCE_CHAIN_CONFIGS = {
159
163
  slug: "ethereum-mainnet",
160
164
  explorerUrl: "https://etherscan.io/",
161
165
  },
166
+ [chainIds_1.ARBITRUM]: {
167
+ chainId: chainIds_1.ARBITRUM,
168
+ name: "Arbitrum",
169
+ slug: "arbitrum",
170
+ explorerUrl: "https://arbiscan.io/",
171
+ },
172
+ [chainIds_1.AVALANCHE]: {
173
+ chainId: chainIds_1.AVALANCHE,
174
+ name: "Avalanche",
175
+ slug: "avalanche",
176
+ explorerUrl: "https://snowtrace.io/",
177
+ },
178
+ [chainIds_1.ARBITRUM_SEPOLIA]: {
179
+ chainId: chainIds_1.ARBITRUM_SEPOLIA,
180
+ name: "Arbitrum Sepolia",
181
+ slug: "arbitrum-sepolia",
182
+ explorerUrl: "https://sepolia.arbiscan.io/",
183
+ },
184
+ [chainIds_1.AVALANCHE_FUJI]: {
185
+ chainId: chainIds_1.AVALANCHE_FUJI,
186
+ name: "Avalanche Fuji",
187
+ slug: "avalanche-fuji",
188
+ explorerUrl: "https://testnet.snowtrace.io/",
189
+ },
162
190
  // Use this notation to correctly infer chain names, etc. from config
163
191
  };
164
192
  const ALL_CHAIN_CONFIGS = {
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.POSITION_IMPACT_POOL_DISTRIBUTION_RATE_KEY = exports.MIN_POSITION_IMPACT_POOL_AMOUNT_KEY = exports.POSITION_IMPACT_POOL_AMOUNT_KEY = exports.LENT_POSITION_IMPACT_POOL_AMOUNT_KEY = exports.MAX_LENDABLE_IMPACT_FACTOR_FOR_WITHDRAWALS_KEY = exports.MAX_LENDABLE_IMPACT_USD_KEY = exports.MAX_LENDABLE_IMPACT_FACTOR_KEY = exports.CLAIMABLE_COLLATERAL_TIME_DIVISOR_KEY = exports.CLAIMABLE_COLLATERAL_REDUCTION_FACTOR_KEY = exports.CLAIMABLE_COLLATERAL_DELAY_KEY = exports.MAX_POSITION_IMPACT_FACTOR_FOR_LIQUIDATIONS_KEY = exports.MAX_PNL_FACTOR_FOR_TRADERS_KEY = exports.MAX_PNL_FACTOR_FOR_DEPOSITS_KEY = exports.MAX_PNL_FACTOR_FOR_WITHDRAWALS_KEY = exports.MAX_PNL_FACTOR_KEY = exports.THRESHOLD_FOR_DECREASE_FUNDING = exports.THRESHOLD_FOR_STABLE_FUNDING = exports.MAX_FUNDING_FACTOR_PER_SECOND = exports.MIN_FUNDING_FACTOR_PER_SECOND = exports.FUNDING_DECREASE_FACTOR_PER_SECOND = exports.FUNDING_INCREASE_FACTOR_PER_SECOND = exports.FUNDING_EXPONENT_FACTOR_KEY = exports.FUNDING_FACTOR_KEY = exports.TOTAL_BORROWING_KEY = exports.CUMULATIVE_BORROWING_FACTOR_KEY = exports.BORROWING_EXPONENT_FACTOR_KEY = exports.BORROWING_FACTOR_KEY = exports.NONCE_KEY = exports.MAX_OPEN_INTEREST_KEY = exports.OPEN_INTEREST_RESERVE_FACTOR_KEY = exports.RESERVE_FACTOR_KEY = exports.MAX_POOL_AMOUNT_KEY = exports.MAX_POOL_USD_FOR_DEPOSIT_KEY = exports.POOL_AMOUNT_KEY = exports.OPEN_INTEREST_IN_TOKENS_KEY = exports.OPEN_INTEREST_KEY = exports.FEE_RECEIVER_POSITION_FACTOR_KEY = exports.FEE_RECEIVER_SWAP_FACTOR_KEY = exports.FEE_RECEIVER_WITHDRAWAL_FACTOR_KEY = exports.BORROWING_FEE_RECEIVER_FACTOR_KEY = exports.FEE_RECEIVER_DEPOSIT_FACTOR_KEY = exports.WITHDRAWAL_FEE_FACTOR_KEY = exports.ATOMIC_SWAP_FEE_FACTOR_KEY = exports.SWAP_FEE_FACTOR_KEY = exports.SWAP_IMPACT_EXPONENT_FACTOR_KEY = exports.SWAP_IMPACT_FACTOR_KEY = exports.POSITION_FEE_FACTOR_KEY = exports.POSITION_IMPACT_EXPONENT_FACTOR_KEY = exports.MAX_POSITION_IMPACT_FACTOR_KEY = exports.POSITION_IMPACT_FACTOR_KEY = void 0;
4
4
  exports.SUBACCOUNT_EXPIRES_AT = exports.ABOVE_OPTIMAL_USAGE_BORROWING_FACTOR = exports.BASE_BORROWING_FACTOR = exports.OPTIMAL_USAGE_FACTOR = exports.MAX_AUTO_CANCEL_ORDERS_KEY = exports.GLV_PER_MARKET_GAS_LIMIT = exports.GLV_WITHDRAWAL_GAS_LIMIT = exports.GLV_DEPOSIT_GAS_LIMIT = exports.GLV_SHIFT_MIN_INTERVAL = exports.GLV_SHIFT_LAST_EXECUTED_AT = exports.IS_GLV_MARKET_DISABLED = exports.GLV_MAX_MARKET_TOKEN_BALANCE_AMOUNT = exports.MIN_COLLATERAL_FACTOR_FOR_LIQUIDATION_KEY = exports.GLV_MAX_MARKET_TOKEN_BALANCE_USD = exports.SUBACCOUNT_AUTO_TOP_UP_AMOUNT = exports.SUBACCOUNT_INTEGRATION_ID = exports.SUBACCOUNT_ORDER_ACTION = exports.SUBACCOUNT_ACTION_COUNT = exports.MAX_ALLOWED_SUBACCOUNT_ACTION_COUNT = exports.SUBACCOUNT_LIST_KEY = exports.UI_FEE_FACTOR = exports.IS_MARKET_DISABLED_KEY = exports.AFFILIATE_REWARD_KEY = exports.VIRTUAL_INVENTORY_FOR_SWAPS_KEY = exports.VIRTUAL_INVENTORY_FOR_POSITIONS_KEY = exports.VIRTUAL_MARKET_ID_KEY = exports.VIRTUAL_TOKEN_ID_KEY = exports.CLAIMABLE_FUNDING_AMOUNT = exports.ACCOUNT_ORDER_LIST_KEY = exports.ORDER_LIST_KEY = exports.POSITION_LIST_KEY = exports.MARKET_LIST_KEY = exports.ESTIMATED_GAS_FEE_MULTIPLIER_FACTOR = exports.ESTIMATED_GAS_FEE_PER_ORACLE_PRICE = exports.ESTIMATED_GAS_FEE_BASE_AMOUNT_V2_1 = exports.NATIVE_TOKEN_TRANSFER_GAS_LIMIT_KEY = exports.TOKEN_TRANSFER_GAS_LIMIT_KEY = exports.SINGLE_SWAP_GAS_LIMIT_KEY = exports.SHIFT_GAS_LIMIT_KEY = exports.SWAP_ORDER_GAS_LIMIT_KEY = exports.DECREASE_ORDER_GAS_LIMIT_KEY = exports.INCREASE_ORDER_GAS_LIMIT_KEY = exports.WITHDRAWAL_GAS_LIMIT_KEY = exports.DEPOSIT_GAS_LIMIT_KEY = exports.MAX_LEVERAGE_KEY = exports.MIN_POSITION_SIZE_USD_KEY = exports.MIN_COLLATERAL_FACTOR_FOR_OPEN_INTEREST_MULTIPLIER_KEY = exports.MIN_COLLATERAL_FACTOR_KEY = exports.MIN_COLLATERAL_USD_KEY = exports.SWAP_IMPACT_POOL_AMOUNT_KEY = void 0;
5
- exports.withdrawalGasLimitKey = exports.depositGasLimitKey = exports.orderKey = exports.swapImpactPoolAmountKey = exports.maxPositionImpactFactorForLiquidationsKey = exports.positionImpactPoolDistributionRateKey = exports.minPositionImpactPoolAmountKey = exports.positionImpactPoolAmountKey = exports.maxPnlFactorKey = exports.thresholdForDecreaseFundingKey = exports.thresholdForStableFundingKey = exports.maxFundingFactorPerSecondKey = exports.minFundingFactorPerSecondKey = exports.fundingDecreaseFactorPerSecondKey = exports.fundingIncreaseFactorPerSecondKey = exports.fundingExponentFactorKey = exports.fundingFactorKey = exports.totalBorrowingKey = exports.cumulativeBorrowingFactorKey = exports.borrowingExponentFactorKey = exports.borrowingFactorKey = exports.maxOpenInterestKey = exports.openInterestReserveFactorKey = exports.reserveFactorKey = exports.poolAmountKey = exports.openInterestInTokensKey = exports.openInterestKey = exports.atomicSwapFeeFactorKey = exports.swapFeeFactorKey = exports.swapImpactExponentFactorKey = exports.swapImpactFactorKey = exports.positionFeeFactorKey = exports.maxPositionImpactFactorKey = exports.positionImpactExponentFactorKey = exports.positionImpactFactorKey = exports.isGlvDisabledKey = exports.glvMaxMarketTokenBalanceAmountKey = exports.glvMaxMarketTokenBalanceUsdKey = exports.glvShiftMinIntervalKey = exports.glvShiftLastExecutedAtKey = exports.subaccountExpiresAtKey = exports.USE_OPEN_INTEREST_IN_TOKENS_FOR_BALANCE = exports.GENERAL_CLAIM_FEATURE_DISABLED = exports.CLAIM_TERMS_KEY = exports.GMX_SIMULATION_ORIGIN = exports.REQUEST_EXPIRATION_TIME_KEY = exports.GELATO_RELAY_FEE_MULTIPLIER_FACTOR_KEY = exports.GASLESS_FEATURE_DISABLED_KEY = exports.PRICE_FEED_KEY = exports.MULTICHAIN_BALANCE = void 0;
6
- exports.claimsDisabledKey = exports.claimTermsKey = exports.gaslessFeatureDisabledKey = exports.priceFeedKey = exports.multichainBalanceKey = exports.subaccountAutoTopUpAmountKey = exports.subaccountIntegrationIdKey = exports.maxLendableImpactUsdKey = exports.maxLendableImpactFactorForWithdrawalsKey = exports.maxLendableImpactFactorKey = exports.subaccountActionCountKey = exports.maxAllowedSubaccountActionCountKey = exports.subaccountListKey = exports.uiFeeFactorKey = exports.maxPoolAmountKey = exports.maxPoolUsdForDepositKey = exports.isMarketDisabledKey = exports.affiliateRewardKey = exports.virtualInventoryForPositionsKey = exports.virtualInventoryForSwapsKey = exports.virtualMarketIdKey = exports.virtualTokenIdKey = exports.claimableFundingAmountKey = exports.hashedPositionKey = exports.minCollateralFactorForOpenInterest = exports.minCollateralFactorForLiquidationKey = exports.minCollateralFactorKey = exports.accountOrderListKey = exports.swapOrderGasLimitKey = exports.decreaseOrderGasLimitKey = exports.increaseOrderGasLimitKey = exports.singleSwapGasLimitKey = exports.shiftGasLimitKey = void 0;
5
+ exports.depositGasLimitKey = exports.orderKey = exports.swapImpactPoolAmountKey = exports.maxPositionImpactFactorForLiquidationsKey = exports.positionImpactPoolDistributionRateKey = exports.minPositionImpactPoolAmountKey = exports.positionImpactPoolAmountKey = exports.maxPnlFactorKey = exports.thresholdForDecreaseFundingKey = exports.thresholdForStableFundingKey = exports.maxFundingFactorPerSecondKey = exports.minFundingFactorPerSecondKey = exports.fundingDecreaseFactorPerSecondKey = exports.fundingIncreaseFactorPerSecondKey = exports.fundingExponentFactorKey = exports.fundingFactorKey = exports.totalBorrowingKey = exports.cumulativeBorrowingFactorKey = exports.borrowingExponentFactorKey = exports.borrowingFactorKey = exports.maxOpenInterestKey = exports.openInterestReserveFactorKey = exports.reserveFactorKey = exports.poolAmountKey = exports.openInterestInTokensKey = exports.openInterestKey = exports.withdrawalFeeFactorKey = exports.atomicSwapFeeFactorKey = exports.swapFeeFactorKey = exports.swapImpactExponentFactorKey = exports.swapImpactFactorKey = exports.positionFeeFactorKey = exports.maxPositionImpactFactorKey = exports.positionImpactExponentFactorKey = exports.positionImpactFactorKey = exports.isGlvDisabledKey = exports.glvMaxMarketTokenBalanceAmountKey = exports.glvMaxMarketTokenBalanceUsdKey = exports.glvShiftMinIntervalKey = exports.glvShiftLastExecutedAtKey = exports.subaccountExpiresAtKey = exports.USE_OPEN_INTEREST_IN_TOKENS_FOR_BALANCE = exports.GENERAL_CLAIM_FEATURE_DISABLED = exports.CLAIM_TERMS_KEY = exports.GMX_SIMULATION_ORIGIN = exports.REQUEST_EXPIRATION_TIME_KEY = exports.GELATO_RELAY_FEE_MULTIPLIER_FACTOR_KEY = exports.GASLESS_FEATURE_DISABLED_KEY = exports.PRICE_FEED_KEY = exports.MULTICHAIN_BALANCE = void 0;
6
+ exports.claimsDisabledKey = exports.claimTermsKey = exports.gaslessFeatureDisabledKey = exports.priceFeedKey = exports.multichainBalanceKey = exports.subaccountAutoTopUpAmountKey = exports.subaccountIntegrationIdKey = exports.maxLendableImpactUsdKey = exports.maxLendableImpactFactorForWithdrawalsKey = exports.maxLendableImpactFactorKey = exports.subaccountActionCountKey = exports.maxAllowedSubaccountActionCountKey = exports.subaccountListKey = exports.uiFeeFactorKey = exports.maxPoolAmountKey = exports.maxPoolUsdForDepositKey = exports.isMarketDisabledKey = exports.affiliateRewardKey = exports.virtualInventoryForPositionsKey = exports.virtualInventoryForSwapsKey = exports.virtualMarketIdKey = exports.virtualTokenIdKey = exports.claimableFundingAmountKey = exports.hashedPositionKey = exports.minCollateralFactorForOpenInterest = exports.minCollateralFactorForLiquidationKey = exports.minCollateralFactorKey = exports.accountOrderListKey = exports.swapOrderGasLimitKey = exports.decreaseOrderGasLimitKey = exports.increaseOrderGasLimitKey = exports.singleSwapGasLimitKey = exports.shiftGasLimitKey = exports.withdrawalGasLimitKey = void 0;
7
7
  const hash_1 = require("../utils/hash");
8
8
  exports.POSITION_IMPACT_FACTOR_KEY = (0, hash_1.hashString)("POSITION_IMPACT_FACTOR");
9
9
  exports.MAX_POSITION_IMPACT_FACTOR_KEY = (0, hash_1.hashString)("MAX_POSITION_IMPACT_FACTOR");
@@ -170,6 +170,10 @@ function atomicSwapFeeFactorKey(market) {
170
170
  return (0, hash_1.hashData)(["bytes32", "address"], [exports.ATOMIC_SWAP_FEE_FACTOR_KEY, market]);
171
171
  }
172
172
  exports.atomicSwapFeeFactorKey = atomicSwapFeeFactorKey;
173
+ function withdrawalFeeFactorKey(market, forBalanceWasImproved) {
174
+ return (0, hash_1.hashData)(["bytes32", "address", "bool"], [exports.WITHDRAWAL_FEE_FACTOR_KEY, market, forBalanceWasImproved]);
175
+ }
176
+ exports.withdrawalFeeFactorKey = withdrawalFeeFactorKey;
173
177
  function openInterestKey(market, collateralToken, isLong) {
174
178
  return (0, hash_1.hashData)(["bytes32", "address", "address", "bool"], [exports.OPEN_INTEREST_KEY, market, collateralToken, isLong]);
175
179
  }
@@ -869,6 +869,27 @@ exports.MARKETS = {
869
869
  longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
870
870
  shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
871
871
  },
872
+ // XAUT/USD [WBTC-USDC]
873
+ "0xeb28aD1a2e497F4Acc5D9b87e7B496623C93061E": {
874
+ marketTokenAddress: "0xeb28aD1a2e497F4Acc5D9b87e7B496623C93061E",
875
+ indexTokenAddress: "0x7624cccCc59361D583F28BEC40D37e7771d2ef5D",
876
+ longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f",
877
+ shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
878
+ },
879
+ // LIT/USD [WETH-USDC]
880
+ "0x044dFE01863CE85f9ECd5639eE5485c90AC320FC": {
881
+ marketTokenAddress: "0x044dFE01863CE85f9ECd5639eE5485c90AC320FC",
882
+ indexTokenAddress: "0xE6172EecBB07F197F52bb73d74daa0e19C31c4Db",
883
+ longTokenAddress: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
884
+ shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
885
+ },
886
+ // IP/USD [WBTC-USDC]
887
+ "0x5ff52BE1968107D7886a8E9A64874A45c8F5D96a": {
888
+ marketTokenAddress: "0x5ff52BE1968107D7886a8E9A64874A45c8F5D96a",
889
+ indexTokenAddress: "0xe7304E9F4ca383BD6312a5179cdC7B40B96A6F5a",
890
+ longTokenAddress: "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f",
891
+ shortTokenAddress: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
892
+ },
872
893
  },
873
894
  [chains_1.AVALANCHE]: {
874
895
  // BTC/USD [BTC-USDC]
@@ -1,27 +1,37 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isSourceChain = exports.isSettlementChain = exports.SOURCE_CHAINS = exports.SETTLEMENT_CHAINS = void 0;
3
+ exports.isSourceChainForAnySettlementChain = exports.isSourceChain = exports.isSettlementChain = void 0;
4
4
  const chainIds_1 = require("./chainIds");
5
- function ensureExhaustive(value) {
6
- return Object.keys(value).map(Number);
7
- }
8
- exports.SETTLEMENT_CHAINS = ensureExhaustive({
9
- [chainIds_1.ARBITRUM_SEPOLIA]: true,
10
- [chainIds_1.ARBITRUM]: true,
11
- [chainIds_1.AVALANCHE]: true,
12
- });
13
- exports.SOURCE_CHAINS = ensureExhaustive({
14
- [chainIds_1.SOURCE_OPTIMISM_SEPOLIA]: true,
15
- [chainIds_1.SOURCE_SEPOLIA]: true,
16
- [chainIds_1.SOURCE_BASE_MAINNET]: true,
17
- [chainIds_1.SOURCE_BSC_MAINNET]: true,
18
- [chainIds_1.SOURCE_ETHEREUM_MAINNET]: true,
19
- });
5
+ const chains_1 = require("./chains");
20
6
  function isSettlementChain(chainId) {
21
- return exports.SETTLEMENT_CHAINS.includes(chainId);
7
+ return chains_1.SETTLEMENT_CHAIN_IDS.includes(chainId) || chains_1.SETTLEMENT_CHAIN_IDS_DEV.includes(chainId);
22
8
  }
23
9
  exports.isSettlementChain = isSettlementChain;
24
- function isSourceChain(chainId) {
25
- return exports.SOURCE_CHAINS.includes(chainId);
10
+ const SOURCE_CHAIN_IDS_MAP = {
11
+ [chainIds_1.ARBITRUM]: [chainIds_1.SOURCE_BASE_MAINNET, chainIds_1.SOURCE_ETHEREUM_MAINNET, chainIds_1.SOURCE_BSC_MAINNET],
12
+ [chainIds_1.AVALANCHE]: [chainIds_1.SOURCE_BASE_MAINNET, chainIds_1.SOURCE_BSC_MAINNET],
13
+ [chainIds_1.AVALANCHE_FUJI]: [chainIds_1.ARBITRUM_SEPOLIA],
14
+ [chainIds_1.ARBITRUM_SEPOLIA]: [chainIds_1.SOURCE_SEPOLIA, chainIds_1.SOURCE_OPTIMISM_SEPOLIA],
15
+ };
16
+ function isSourceChain(chainId, forSettlementChain) {
17
+ if (!chainId || !forSettlementChain) {
18
+ return false;
19
+ }
20
+ const sourceChainIds = SOURCE_CHAIN_IDS_MAP[forSettlementChain];
21
+ if (!sourceChainIds) {
22
+ return false;
23
+ }
24
+ return sourceChainIds.includes(chainId);
26
25
  }
27
26
  exports.isSourceChain = isSourceChain;
27
+ /**
28
+ * Check if a chain is a source chain for any settlement chain
29
+ * Useful when settlement chain context is not available
30
+ */
31
+ function isSourceChainForAnySettlementChain(chainId) {
32
+ if (!chainId) {
33
+ return false;
34
+ }
35
+ return chains_1.SOURCE_CHAIN_IDS.includes(chainId);
36
+ }
37
+ exports.isSourceChainForAnySettlementChain = isSourceChainForAnySettlementChain;
@@ -320,6 +320,7 @@ exports.TOKENS = {
320
320
  symbol: "WIF",
321
321
  address: "0xA1b91fe9FD52141Ff8cac388Ce3F10BFDc1dE79d",
322
322
  decimals: 6,
323
+ priceDecimals: 5,
323
324
  categories: ["meme"],
324
325
  imageUrl: "https://assets.coingecko.com/coins/images/33566/standard/dogwifhat.jpg?1702499428",
325
326
  isPermitSupported: true,
@@ -1220,6 +1221,38 @@ exports.TOKENS = {
1220
1221
  categories: ["layer1"],
1221
1222
  imageUrl: "https://assets.coingecko.com/coins/images/8834/standard/CHZ_Token_updated.png?1696508986",
1222
1223
  },
1224
+ {
1225
+ name: "Tether Gold",
1226
+ symbol: "XAUT",
1227
+ assetSymbol: "XAUT",
1228
+ baseSymbol: "XAUT",
1229
+ address: "0x7624cccCc59361D583F28BEC40D37e7771d2ef5D",
1230
+ isSynthetic: true,
1231
+ decimals: 18,
1232
+ priceDecimals: 2,
1233
+ categories: ["rwa"],
1234
+ imageUrl: "https://assets.coingecko.com/coins/images/10481/standard/Tether_Gold.png?1696510471",
1235
+ },
1236
+ {
1237
+ name: "Lighter",
1238
+ symbol: "LIT",
1239
+ address: "0xE6172EecBB07F197F52bb73d74daa0e19C31c4Db",
1240
+ isSynthetic: true,
1241
+ decimals: 18,
1242
+ priceDecimals: 4,
1243
+ categories: ["defi"],
1244
+ imageUrl: "https://assets.coingecko.com/coins/images/71121/standard/lighter.png?1765888098",
1245
+ },
1246
+ {
1247
+ name: "Story",
1248
+ symbol: "IP",
1249
+ address: "0xe7304E9F4ca383BD6312a5179cdC7B40B96A6F5a",
1250
+ isSynthetic: true,
1251
+ decimals: 18,
1252
+ priceDecimals: 4,
1253
+ categories: ["layer1"],
1254
+ imageUrl: "https://assets.coingecko.com/coins/images/54035/standard/Transparent_bg.png?1738075331",
1255
+ },
1223
1256
  ],
1224
1257
  [chains_1.AVALANCHE]: [
1225
1258
  {
@@ -2089,6 +2122,9 @@ function getNormalizedTokenSymbol(tokenSymbol) {
2089
2122
  else if (["PBTC", "STBTC"].includes(tokenSymbol)) {
2090
2123
  return "BTC";
2091
2124
  }
2125
+ else if (tokenSymbol === "XAUT") {
2126
+ return "XAUT.v2";
2127
+ }
2092
2128
  else if (tokenSymbol.includes(".")) {
2093
2129
  return tokenSymbol.split(".")[0];
2094
2130
  }