@gmx-io/sdk 1.4.0 → 1.4.1

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 (151) hide show
  1. package/build/cjs/src/abis/GlvReader.js +940 -940
  2. package/build/cjs/src/abis/IStargate.js +603 -0
  3. package/build/cjs/src/abis/LayerZeroProvider.js +273 -46
  4. package/build/cjs/src/abis/index.js +2 -2
  5. package/build/cjs/src/configs/batch.js +29 -103
  6. package/build/cjs/src/configs/chainIds.js +2 -2
  7. package/build/cjs/src/configs/chains.js +230 -151
  8. package/build/cjs/src/configs/contracts.js +1 -5
  9. package/build/cjs/src/configs/dataStore.js +5 -4
  10. package/build/cjs/src/configs/express.js +1 -1
  11. package/build/cjs/src/configs/gasLimits.js +41 -0
  12. package/build/cjs/src/configs/markets.js +67 -1
  13. package/build/cjs/src/configs/multichain.js +1 -0
  14. package/build/cjs/src/configs/oracleKeeper.js +18 -20
  15. package/build/cjs/src/configs/tokens.js +53 -14
  16. package/build/cjs/src/modules/markets/index.js +6 -2
  17. package/build/cjs/src/modules/markets/markets.spec.js +5 -5
  18. package/build/cjs/src/modules/markets/query-builders.js +8 -0
  19. package/build/cjs/src/modules/orders/helpers.js +2 -2
  20. package/build/cjs/src/modules/orders/helpers.spec.js +1 -1
  21. package/build/cjs/src/modules/orders/orders.spec.js +1 -1
  22. package/build/cjs/src/modules/positions/positions.spec.js +2 -2
  23. package/build/cjs/src/modules/tokens/tokens.spec.js +2 -2
  24. package/build/cjs/src/modules/trades/trades.spec.js +1 -1
  25. package/build/cjs/src/modules/utils/utils.js +7 -6
  26. package/build/cjs/src/prebuilt/hashedKinkModelMarketRatesKeys.json +24 -0
  27. package/build/cjs/src/prebuilt/hashedMarketConfigKeys.json +495 -0
  28. package/build/cjs/src/prebuilt/hashedMarketValuesKeys.json +45 -0
  29. package/build/cjs/src/test/mock.js +2 -0
  30. package/build/cjs/src/types/chains.js +2 -0
  31. package/build/cjs/src/types/orders.js +8 -2
  32. package/build/cjs/src/types/subsquid.js +241 -1
  33. package/build/cjs/src/types/tokens.js +7 -0
  34. package/build/cjs/src/utils/__tests__/abort.spec.js +122 -0
  35. package/build/cjs/src/utils/__tests__/numbers.spec.js +94 -14
  36. package/build/cjs/src/utils/abort.js +31 -0
  37. package/build/cjs/src/utils/callContract.js +4 -4
  38. package/build/cjs/src/utils/fees/executionFee.js +14 -11
  39. package/build/cjs/src/utils/fees/index.js +8 -2
  40. package/build/cjs/src/utils/marketKeysAndConfigs.js +8 -0
  41. package/build/cjs/src/utils/markets.js +7 -1
  42. package/build/cjs/src/utils/multicall.js +54 -17
  43. package/build/cjs/src/utils/numbers.js +25 -14
  44. package/build/cjs/src/utils/orders.js +2 -2
  45. package/build/cjs/src/utils/swap/__tests__/mockRouting.spec.js +7 -6
  46. package/build/cjs/src/utils/swap/__tests__/swapRouting.spec.js +5 -4
  47. package/build/cjs/src/utils/swap/__tests__/swapStats.spec.js +10 -9
  48. package/build/cjs/src/utils/swap/buildSwapStrategy.js +10 -9
  49. package/build/cjs/src/utils/swap/swapPath.js +6 -6
  50. package/build/cjs/src/utils/swap/swapRouting.js +8 -4
  51. package/build/cjs/src/utils/swap/swapStats.js +6 -6
  52. package/build/cjs/src/utils/swap/swapValues.js +4 -0
  53. package/build/cjs/src/utils/tokens.js +17 -1
  54. package/build/cjs/src/utils/trade/decrease.js +1 -1
  55. package/build/esm/src/abis/GlvReader.js +940 -940
  56. package/build/esm/src/abis/IStargate.js +601 -0
  57. package/build/esm/src/abis/LayerZeroProvider.js +273 -46
  58. package/build/esm/src/abis/index.js +2 -2
  59. package/build/esm/src/configs/batch.js +30 -104
  60. package/build/esm/src/configs/chainIds.js +1 -1
  61. package/build/esm/src/configs/chains.js +212 -147
  62. package/build/esm/src/configs/contracts.js +1 -5
  63. package/build/esm/src/configs/dataStore.js +1 -0
  64. package/build/esm/src/configs/express.js +1 -1
  65. package/build/esm/src/configs/gasLimits.js +38 -0
  66. package/build/esm/src/configs/markets.js +60 -1
  67. package/build/esm/src/configs/multichain.js +2 -1
  68. package/build/esm/src/configs/oracleKeeper.js +17 -19
  69. package/build/esm/src/configs/tokens.js +52 -13
  70. package/build/esm/src/modules/markets/index.js +6 -2
  71. package/build/esm/src/modules/markets/markets.spec.js +5 -5
  72. package/build/esm/src/modules/markets/query-builders.js +8 -0
  73. package/build/esm/src/modules/orders/helpers.js +3 -3
  74. package/build/esm/src/modules/orders/helpers.spec.js +1 -1
  75. package/build/esm/src/modules/orders/orders.spec.js +1 -1
  76. package/build/esm/src/modules/positions/positions.spec.js +2 -2
  77. package/build/esm/src/modules/tokens/tokens.spec.js +2 -2
  78. package/build/esm/src/modules/trades/trades.spec.js +1 -1
  79. package/build/esm/src/modules/utils/utils.js +7 -6
  80. package/build/esm/src/prebuilt/hashedKinkModelMarketRatesKeys.json +24 -0
  81. package/build/esm/src/prebuilt/hashedMarketConfigKeys.json +495 -0
  82. package/build/esm/src/prebuilt/hashedMarketValuesKeys.json +45 -0
  83. package/build/esm/src/test/mock.js +2 -0
  84. package/build/esm/src/types/chains.js +1 -0
  85. package/build/esm/src/types/orders.js +8 -2
  86. package/build/esm/src/types/subsquid.js +240 -0
  87. package/build/esm/src/types/tokens.js +6 -1
  88. package/build/esm/src/utils/__tests__/abort.spec.js +120 -0
  89. package/build/esm/src/utils/__tests__/numbers.spec.js +95 -15
  90. package/build/esm/src/utils/abort.js +27 -0
  91. package/build/esm/src/utils/callContract.js +5 -5
  92. package/build/esm/src/utils/fees/executionFee.js +15 -12
  93. package/build/esm/src/utils/fees/index.js +8 -2
  94. package/build/esm/src/utils/marketKeysAndConfigs.js +9 -1
  95. package/build/esm/src/utils/markets.js +5 -0
  96. package/build/esm/src/utils/multicall.js +53 -16
  97. package/build/esm/src/utils/numbers.js +21 -12
  98. package/build/esm/src/utils/orders.js +3 -3
  99. package/build/esm/src/utils/swap/__tests__/mockRouting.spec.js +7 -6
  100. package/build/esm/src/utils/swap/__tests__/swapRouting.spec.js +5 -4
  101. package/build/esm/src/utils/swap/__tests__/swapStats.spec.js +10 -9
  102. package/build/esm/src/utils/swap/buildSwapStrategy.js +10 -9
  103. package/build/esm/src/utils/swap/swapPath.js +6 -6
  104. package/build/esm/src/utils/swap/swapRouting.js +8 -4
  105. package/build/esm/src/utils/swap/swapStats.js +6 -6
  106. package/build/esm/src/utils/swap/swapValues.js +4 -0
  107. package/build/esm/src/utils/tokens.js +15 -1
  108. package/build/esm/src/utils/trade/decrease.js +2 -2
  109. package/build/types/src/abis/IStargate.d.ts +464 -0
  110. package/build/types/src/abis/LayerZeroProvider.d.ts +12 -0
  111. package/build/types/src/abis/index.d.ts +475 -99
  112. package/build/types/src/configs/chainIds.d.ts +1 -1
  113. package/build/types/src/configs/chains.d.ts +170 -27
  114. package/build/types/src/configs/contracts.d.ts +0 -4
  115. package/build/types/src/configs/dataStore.d.ts +1 -0
  116. package/build/types/src/configs/express.d.ts +1 -1
  117. package/build/types/src/configs/gasLimits.d.ts +4 -0
  118. package/build/types/src/configs/markets.d.ts +10 -1
  119. package/build/types/src/configs/oracleKeeper.d.ts +13 -0
  120. package/build/types/src/configs/tokens.d.ts +3 -0
  121. package/build/types/src/index.d.ts +1 -1
  122. package/build/types/src/modules/base.d.ts +1 -1
  123. package/build/types/src/modules/markets/index.d.ts +2 -0
  124. package/build/types/src/modules/markets/query-builders.d.ts +1 -1
  125. package/build/types/src/modules/markets/types.d.ts +2 -2
  126. package/build/types/src/modules/utils/utils.d.ts +2 -3
  127. package/build/types/src/types/chains.d.ts +57 -0
  128. package/build/types/src/types/markets.d.ts +2 -0
  129. package/build/types/src/types/orders.d.ts +8 -2
  130. package/build/types/src/types/subsquid.d.ts +5987 -5172
  131. package/build/types/src/types/tokens.d.ts +11 -3
  132. package/build/types/src/types/trade.d.ts +5 -0
  133. package/build/types/src/utils/__tests__/abort.spec.d.ts +1 -0
  134. package/build/types/src/utils/abort.d.ts +1 -0
  135. package/build/types/src/utils/fees/estimateOraclePriceCount.d.ts +2 -2
  136. package/build/types/src/utils/fees/executionFee.d.ts +6 -6
  137. package/build/types/src/utils/fees/index.d.ts +2 -1
  138. package/build/types/src/utils/marketKeysAndConfigs.d.ts +2 -0
  139. package/build/types/src/utils/markets.d.ts +4 -2
  140. package/build/types/src/utils/multicall.d.ts +4 -2
  141. package/build/types/src/utils/numbers.d.ts +8 -1
  142. package/build/types/src/utils/swap/buildSwapStrategy.d.ts +6 -3
  143. package/build/types/src/utils/swap/swapPath.d.ts +2 -1
  144. package/build/types/src/utils/swap/swapRouting.d.ts +7 -2
  145. package/build/types/src/utils/swap/swapStats.d.ts +3 -2
  146. package/build/types/src/utils/swap/swapValues.d.ts +1 -1
  147. package/build/types/src/utils/tokens.d.ts +3 -0
  148. package/package.json +8 -2
  149. package/build/cjs/src/abis/MultichainUtils.js +0 -133
  150. package/build/esm/src/abis/MultichainUtils.js +0 -131
  151. package/build/types/src/abis/MultichainUtils.d.ts +0 -100
@@ -1756,6 +1756,51 @@
1756
1756
  "longInterestInTokensUsingShortToken": "0x6734f6e1ed79dbc103747ae3793283a241f5781bdedcee7ecc33e856c5dedb83",
1757
1757
  "shortInterestInTokensUsingLongToken": "0x3290d5bb740ead6457be88ecd3dc9fe14cabb45ae3b6f79c1348639e03fa16c6",
1758
1758
  "shortInterestInTokensUsingShortToken": "0xc6a4753ad0bccf47988451d2174e0bc5dbd2eb198aeb6e17426d3b8ce0e4b028"
1759
+ },
1760
+ "0x66AB9D61A0124b61C8892A4ac687Ac48DbA8ff2c": {
1761
+ "longPoolAmount": "0x5661e078962dbc784b7a17cecca12cfbd5600a21fa3297dc638cc6f1d1046493",
1762
+ "shortPoolAmount": "0xf9f13803349449db626ac6f6313e40aee5e825974ea5343fc20705f5717a4a63",
1763
+ "positionImpactPoolAmount": "0x85eb4f5f6c82d284dd0125e049e4d3d9644348f409db85d507b0976cf3f56e0b",
1764
+ "swapImpactPoolAmountLong": "0x1d359a85d48c70f0ee3cb93653f66445f8176f7ea40b8225543f55678a4cf16f",
1765
+ "swapImpactPoolAmountShort": "0x5bf55afb1627b36620f80515384ef3512044d0cb15bad2834257210b9fb831ad",
1766
+ "longInterestUsingLongToken": "0x5c9b7a26db46be6be52ff43c23ba724f7a611f1b1d6ea79bf0c31dafece2dd73",
1767
+ "longInterestUsingShortToken": "0xef06200611d7c2e17001b8eb0bef6c59e5fbb510807deda09442776b06172d8f",
1768
+ "shortInterestUsingLongToken": "0x0030ba0747b42bb6c7fc78299c003bf446a7b74928de19e27982c75470273bfb",
1769
+ "shortInterestUsingShortToken": "0x2fccdb93b869579e0ab3ba456b425ed1fe0ed3ec3d37e0fb02d1009c928683ef",
1770
+ "longInterestInTokensUsingLongToken": "0x4d0636fc30ec5d0946166825d3529ab8abec7a67dbf2f61d510d1c6a9b69db33",
1771
+ "longInterestInTokensUsingShortToken": "0xf754a35647b4bb1d0994dd139506d074624929e8603afc3d7a036f5c1ec29f4b",
1772
+ "shortInterestInTokensUsingLongToken": "0x2061e3bce5bec7ca22d0e6471341e4426e7e79ab3e1a5ef6b81d97e9acb0a47f",
1773
+ "shortInterestInTokensUsingShortToken": "0x524eee5972856af1944aa29eb2def1352092388483c22dee1afed3a2a622a7f8"
1774
+ },
1775
+ "0x587759c237acCa739bCE3911647BacF56C876E60": {
1776
+ "longPoolAmount": "0x405f450c6837127eea52cb7a5adf5174d032d48569888685d1f3fbbe73aaf4cf",
1777
+ "shortPoolAmount": "0x40b5e0dd2730bf75bccb83c22ef3b10a16caff60c68c82d14d09af6817b49c07",
1778
+ "positionImpactPoolAmount": "0xaa5713894d8e1a2dedc2b80a7e6e0aca11ffeb4516debea1209b8c91f5446b2c",
1779
+ "swapImpactPoolAmountLong": "0x60bc7e3f55cf4de3909d5c2f17bf420bfa968a579d346131a54ebe899b3b70a9",
1780
+ "swapImpactPoolAmountShort": "0x6002e6d197af4ba5bff4a852320894a939f8a7471d466825943d644e15c645bf",
1781
+ "longInterestUsingLongToken": "0xfaada052609aa4aeaee352d2c3653ded1546972dac675a5b0ef493b4b048ecd3",
1782
+ "longInterestUsingShortToken": "0x7828a689f759931f07d41023220ea95f211d8c78ae8ff51170bb662c2f69db3c",
1783
+ "shortInterestUsingLongToken": "0xf19626d23c99a52faf31420ff2d78490fb1d6796c521183cbee86f88f197ff62",
1784
+ "shortInterestUsingShortToken": "0x462ccab88cf00a39ec99b665f5cbddb507d04e1f9f299229418effcada93846f",
1785
+ "longInterestInTokensUsingLongToken": "0x8800845b00a19f74f245101c9c5300b63b580d3c0bedfa753a5c0dadd7a3c685",
1786
+ "longInterestInTokensUsingShortToken": "0x16737a49e9c8e4e4d3d9578a2cffc9d82ecd02cbdb3d1433f7733a5d348d97a4",
1787
+ "shortInterestInTokensUsingLongToken": "0x04b993baa9ecd37570c605022f54e2d6cae7eda955be07f5171e55755cbeb12c",
1788
+ "shortInterestInTokensUsingShortToken": "0xde53ce1b9f4ed36a3385cd7e862002c3a62c865d7e3981f8aa413b293097f5a0"
1789
+ },
1790
+ "0x00310c6d8A9F821e3FE991f4835f2cA4d87034Cf": {
1791
+ "longPoolAmount": "0x2a2e4cd11620eab1b42ba531fed7a20e24945042e4bbedf461731d9664b3f546",
1792
+ "shortPoolAmount": "0x9c04ed781c483037dc9bc153601d926fee1ddb383c1a678ced44310174ba5695",
1793
+ "positionImpactPoolAmount": "0xe02b77f5768c2ff82ccd91f56ec89b8f1b57735919ba6d889b8fa94b0ee0ad44",
1794
+ "swapImpactPoolAmountLong": "0xf4690c0911cd29cb5278909d852155e649f2a0863a9ea9c2e07d7fbf51b00a8e",
1795
+ "swapImpactPoolAmountShort": "0xbd3268b907d7351d5c7288aec636644f2088db232e8c97543c81e280fe8306a9",
1796
+ "longInterestUsingLongToken": "0x7bd795fa61c935e554e40934975be4042b9d8c0896aadf6e527c5ca7fc6db085",
1797
+ "longInterestUsingShortToken": "0x52fd08299b1456da39fa37efb8aa61a82e1ece3194820b1bab016badece6808a",
1798
+ "shortInterestUsingLongToken": "0xbb680a83b92776a2afc7ec3f3678f51636bcf6875fc08a5b900d2b9a5946bd00",
1799
+ "shortInterestUsingShortToken": "0x9a44bf9a70f91c4f9baeb32922722169dea930ddac234a59c9f9479bca9e17de",
1800
+ "longInterestInTokensUsingLongToken": "0x6a99806df5b157c5f981d3024d1642ee5a8a17713ef7d80b4958432553c3a2fa",
1801
+ "longInterestInTokensUsingShortToken": "0x10be684d3b02317e078f4c9f561ad313cbdf6701163346bb271543b58a6cfcc7",
1802
+ "shortInterestInTokensUsingLongToken": "0x74b8efa44465155c5fc9951e7518290fba4cbed2741539562502e86745b04058",
1803
+ "shortInterestInTokensUsingShortToken": "0x344592d78feae63ecf187af3a66c1e0d1b24afc5abdd978cf47dc7fca9928e97"
1759
1804
  }
1760
1805
  },
1761
1806
  "43113": {
@@ -211,6 +211,8 @@ function mockMarketsInfoData(tokensData, marketKeys, overrides = {}) {
211
211
  swapImpactFactorPositive: (0, numbers_1.expandDecimals)(2, 23),
212
212
  swapImpactFactorNegative: (0, numbers_1.expandDecimals)(1, 23),
213
213
  swapImpactExponentFactor: (0, numbers_1.expandDecimals)(2, 30),
214
+ withdrawalFeeFactorBalanceWasImproved: (0, numbers_1.expandDecimals)(2, 27),
215
+ withdrawalFeeFactorBalanceWasNotImproved: (0, numbers_1.expandDecimals)(2, 27),
214
216
  // MarketInfo
215
217
  borrowingFactorPerSecondForLongs: 0n,
216
218
  borrowingFactorPerSecondForShorts: 0n,
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -24,11 +24,17 @@ var OrderType;
24
24
  // @dev StopIncrease: increase position if the triggerPrice is reached and the acceptablePrice can be fulfilled
25
25
  OrderType[OrderType["StopIncrease"] = 8] = "StopIncrease";
26
26
  })(OrderType || (exports.OrderType = OrderType = {}));
27
+ /**
28
+ * @see https://github.com/gmx-io/gmx-synthetics/blob/a54f774198d79954d66d694af1be479bb6da61f1/contracts/pricing/ISwapPricingUtils.sol#L5
29
+ */
27
30
  var SwapPricingType;
28
31
  (function (SwapPricingType) {
29
- SwapPricingType[SwapPricingType["TwoStep"] = 0] = "TwoStep";
32
+ SwapPricingType[SwapPricingType["Swap"] = 0] = "Swap";
30
33
  SwapPricingType[SwapPricingType["Shift"] = 1] = "Shift";
31
- SwapPricingType[SwapPricingType["Atomic"] = 2] = "Atomic";
34
+ SwapPricingType[SwapPricingType["AtomicWithdrawal"] = 2] = "AtomicWithdrawal";
35
+ SwapPricingType[SwapPricingType["Deposit"] = 3] = "Deposit";
36
+ SwapPricingType[SwapPricingType["Withdrawal"] = 4] = "Withdrawal";
37
+ SwapPricingType[SwapPricingType["AtomicSwap"] = 5] = "AtomicSwap";
32
38
  })(SwapPricingType || (exports.SwapPricingType = SwapPricingType = {}));
33
39
  var DecreasePositionSwapType;
34
40
  (function (DecreasePositionSwapType) {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TransactionOrderByInput = exports.TradeActionOrderByInput = exports.SwapInfoOrderByInput = exports.ProcessorStatusOrderByInput = exports.PriceType = exports.PriceOrderByInput = 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.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;
4
4
  var AccountStatOrderByInput;
5
5
  (function (AccountStatOrderByInput) {
6
6
  AccountStatOrderByInput["closedCount_ASC"] = "closedCount_ASC";
@@ -1264,6 +1264,12 @@ var MarketInfoOrderByInput;
1264
1264
  MarketInfoOrderByInput["totalBorrowingFees_DESC"] = "totalBorrowingFees_DESC";
1265
1265
  MarketInfoOrderByInput["totalBorrowingFees_DESC_NULLS_FIRST"] = "totalBorrowingFees_DESC_NULLS_FIRST";
1266
1266
  MarketInfoOrderByInput["totalBorrowingFees_DESC_NULLS_LAST"] = "totalBorrowingFees_DESC_NULLS_LAST";
1267
+ MarketInfoOrderByInput["useOpenInterestInTokensForBalance_ASC"] = "useOpenInterestInTokensForBalance_ASC";
1268
+ MarketInfoOrderByInput["useOpenInterestInTokensForBalance_ASC_NULLS_FIRST"] = "useOpenInterestInTokensForBalance_ASC_NULLS_FIRST";
1269
+ MarketInfoOrderByInput["useOpenInterestInTokensForBalance_ASC_NULLS_LAST"] = "useOpenInterestInTokensForBalance_ASC_NULLS_LAST";
1270
+ MarketInfoOrderByInput["useOpenInterestInTokensForBalance_DESC"] = "useOpenInterestInTokensForBalance_DESC";
1271
+ MarketInfoOrderByInput["useOpenInterestInTokensForBalance_DESC_NULLS_FIRST"] = "useOpenInterestInTokensForBalance_DESC_NULLS_FIRST";
1272
+ MarketInfoOrderByInput["useOpenInterestInTokensForBalance_DESC_NULLS_LAST"] = "useOpenInterestInTokensForBalance_DESC_NULLS_LAST";
1267
1273
  MarketInfoOrderByInput["virtualIndexTokenId_ASC"] = "virtualIndexTokenId_ASC";
1268
1274
  MarketInfoOrderByInput["virtualIndexTokenId_ASC_NULLS_FIRST"] = "virtualIndexTokenId_ASC_NULLS_FIRST";
1269
1275
  MarketInfoOrderByInput["virtualIndexTokenId_ASC_NULLS_LAST"] = "virtualIndexTokenId_ASC_NULLS_LAST";
@@ -1964,6 +1970,18 @@ var PositionChangeOrderByInput;
1964
1970
  PositionChangeOrderByInput["maxSize_DESC"] = "maxSize_DESC";
1965
1971
  PositionChangeOrderByInput["maxSize_DESC_NULLS_FIRST"] = "maxSize_DESC_NULLS_FIRST";
1966
1972
  PositionChangeOrderByInput["maxSize_DESC_NULLS_LAST"] = "maxSize_DESC_NULLS_LAST";
1973
+ PositionChangeOrderByInput["orderKey_ASC"] = "orderKey_ASC";
1974
+ PositionChangeOrderByInput["orderKey_ASC_NULLS_FIRST"] = "orderKey_ASC_NULLS_FIRST";
1975
+ PositionChangeOrderByInput["orderKey_ASC_NULLS_LAST"] = "orderKey_ASC_NULLS_LAST";
1976
+ PositionChangeOrderByInput["orderKey_DESC"] = "orderKey_DESC";
1977
+ PositionChangeOrderByInput["orderKey_DESC_NULLS_FIRST"] = "orderKey_DESC_NULLS_FIRST";
1978
+ PositionChangeOrderByInput["orderKey_DESC_NULLS_LAST"] = "orderKey_DESC_NULLS_LAST";
1979
+ PositionChangeOrderByInput["positionKey_ASC"] = "positionKey_ASC";
1980
+ PositionChangeOrderByInput["positionKey_ASC_NULLS_FIRST"] = "positionKey_ASC_NULLS_FIRST";
1981
+ PositionChangeOrderByInput["positionKey_ASC_NULLS_LAST"] = "positionKey_ASC_NULLS_LAST";
1982
+ PositionChangeOrderByInput["positionKey_DESC"] = "positionKey_DESC";
1983
+ PositionChangeOrderByInput["positionKey_DESC_NULLS_FIRST"] = "positionKey_DESC_NULLS_FIRST";
1984
+ PositionChangeOrderByInput["positionKey_DESC_NULLS_LAST"] = "positionKey_DESC_NULLS_LAST";
1967
1985
  PositionChangeOrderByInput["priceImpactAmount_ASC"] = "priceImpactAmount_ASC";
1968
1986
  PositionChangeOrderByInput["priceImpactAmount_ASC_NULLS_FIRST"] = "priceImpactAmount_ASC_NULLS_FIRST";
1969
1987
  PositionChangeOrderByInput["priceImpactAmount_ASC_NULLS_LAST"] = "priceImpactAmount_ASC_NULLS_LAST";
@@ -2000,6 +2018,12 @@ var PositionChangeOrderByInput;
2000
2018
  PositionChangeOrderByInput["sizeDeltaUsd_DESC"] = "sizeDeltaUsd_DESC";
2001
2019
  PositionChangeOrderByInput["sizeDeltaUsd_DESC_NULLS_FIRST"] = "sizeDeltaUsd_DESC_NULLS_FIRST";
2002
2020
  PositionChangeOrderByInput["sizeDeltaUsd_DESC_NULLS_LAST"] = "sizeDeltaUsd_DESC_NULLS_LAST";
2021
+ PositionChangeOrderByInput["sizeInTokens_ASC"] = "sizeInTokens_ASC";
2022
+ PositionChangeOrderByInput["sizeInTokens_ASC_NULLS_FIRST"] = "sizeInTokens_ASC_NULLS_FIRST";
2023
+ PositionChangeOrderByInput["sizeInTokens_ASC_NULLS_LAST"] = "sizeInTokens_ASC_NULLS_LAST";
2024
+ PositionChangeOrderByInput["sizeInTokens_DESC"] = "sizeInTokens_DESC";
2025
+ PositionChangeOrderByInput["sizeInTokens_DESC_NULLS_FIRST"] = "sizeInTokens_DESC_NULLS_FIRST";
2026
+ PositionChangeOrderByInput["sizeInTokens_DESC_NULLS_LAST"] = "sizeInTokens_DESC_NULLS_LAST";
2003
2027
  PositionChangeOrderByInput["sizeInUsd_ASC"] = "sizeInUsd_ASC";
2004
2028
  PositionChangeOrderByInput["sizeInUsd_ASC_NULLS_FIRST"] = "sizeInUsd_ASC_NULLS_FIRST";
2005
2029
  PositionChangeOrderByInput["sizeInUsd_ASC_NULLS_LAST"] = "sizeInUsd_ASC_NULLS_LAST";
@@ -2425,6 +2449,45 @@ var PositionOrderByInput;
2425
2449
  PositionOrderByInput["unrealizedPriceImpact_DESC_NULLS_FIRST"] = "unrealizedPriceImpact_DESC_NULLS_FIRST";
2426
2450
  PositionOrderByInput["unrealizedPriceImpact_DESC_NULLS_LAST"] = "unrealizedPriceImpact_DESC_NULLS_LAST";
2427
2451
  })(PositionOrderByInput || (exports.PositionOrderByInput = PositionOrderByInput = {}));
2452
+ var PositionVolumeInfoOrderByInput;
2453
+ (function (PositionVolumeInfoOrderByInput) {
2454
+ PositionVolumeInfoOrderByInput["collateralToken_ASC"] = "collateralToken_ASC";
2455
+ PositionVolumeInfoOrderByInput["collateralToken_ASC_NULLS_FIRST"] = "collateralToken_ASC_NULLS_FIRST";
2456
+ PositionVolumeInfoOrderByInput["collateralToken_ASC_NULLS_LAST"] = "collateralToken_ASC_NULLS_LAST";
2457
+ PositionVolumeInfoOrderByInput["collateralToken_DESC"] = "collateralToken_DESC";
2458
+ PositionVolumeInfoOrderByInput["collateralToken_DESC_NULLS_FIRST"] = "collateralToken_DESC_NULLS_FIRST";
2459
+ PositionVolumeInfoOrderByInput["collateralToken_DESC_NULLS_LAST"] = "collateralToken_DESC_NULLS_LAST";
2460
+ PositionVolumeInfoOrderByInput["id_ASC"] = "id_ASC";
2461
+ PositionVolumeInfoOrderByInput["id_ASC_NULLS_FIRST"] = "id_ASC_NULLS_FIRST";
2462
+ PositionVolumeInfoOrderByInput["id_ASC_NULLS_LAST"] = "id_ASC_NULLS_LAST";
2463
+ PositionVolumeInfoOrderByInput["id_DESC"] = "id_DESC";
2464
+ PositionVolumeInfoOrderByInput["id_DESC_NULLS_FIRST"] = "id_DESC_NULLS_FIRST";
2465
+ PositionVolumeInfoOrderByInput["id_DESC_NULLS_LAST"] = "id_DESC_NULLS_LAST";
2466
+ PositionVolumeInfoOrderByInput["indexToken_ASC"] = "indexToken_ASC";
2467
+ PositionVolumeInfoOrderByInput["indexToken_ASC_NULLS_FIRST"] = "indexToken_ASC_NULLS_FIRST";
2468
+ PositionVolumeInfoOrderByInput["indexToken_ASC_NULLS_LAST"] = "indexToken_ASC_NULLS_LAST";
2469
+ PositionVolumeInfoOrderByInput["indexToken_DESC"] = "indexToken_DESC";
2470
+ PositionVolumeInfoOrderByInput["indexToken_DESC_NULLS_FIRST"] = "indexToken_DESC_NULLS_FIRST";
2471
+ PositionVolumeInfoOrderByInput["indexToken_DESC_NULLS_LAST"] = "indexToken_DESC_NULLS_LAST";
2472
+ PositionVolumeInfoOrderByInput["period_ASC"] = "period_ASC";
2473
+ PositionVolumeInfoOrderByInput["period_ASC_NULLS_FIRST"] = "period_ASC_NULLS_FIRST";
2474
+ PositionVolumeInfoOrderByInput["period_ASC_NULLS_LAST"] = "period_ASC_NULLS_LAST";
2475
+ PositionVolumeInfoOrderByInput["period_DESC"] = "period_DESC";
2476
+ PositionVolumeInfoOrderByInput["period_DESC_NULLS_FIRST"] = "period_DESC_NULLS_FIRST";
2477
+ PositionVolumeInfoOrderByInput["period_DESC_NULLS_LAST"] = "period_DESC_NULLS_LAST";
2478
+ PositionVolumeInfoOrderByInput["timestamp_ASC"] = "timestamp_ASC";
2479
+ PositionVolumeInfoOrderByInput["timestamp_ASC_NULLS_FIRST"] = "timestamp_ASC_NULLS_FIRST";
2480
+ PositionVolumeInfoOrderByInput["timestamp_ASC_NULLS_LAST"] = "timestamp_ASC_NULLS_LAST";
2481
+ PositionVolumeInfoOrderByInput["timestamp_DESC"] = "timestamp_DESC";
2482
+ PositionVolumeInfoOrderByInput["timestamp_DESC_NULLS_FIRST"] = "timestamp_DESC_NULLS_FIRST";
2483
+ PositionVolumeInfoOrderByInput["timestamp_DESC_NULLS_LAST"] = "timestamp_DESC_NULLS_LAST";
2484
+ PositionVolumeInfoOrderByInput["volumeUsd_ASC"] = "volumeUsd_ASC";
2485
+ PositionVolumeInfoOrderByInput["volumeUsd_ASC_NULLS_FIRST"] = "volumeUsd_ASC_NULLS_FIRST";
2486
+ PositionVolumeInfoOrderByInput["volumeUsd_ASC_NULLS_LAST"] = "volumeUsd_ASC_NULLS_LAST";
2487
+ PositionVolumeInfoOrderByInput["volumeUsd_DESC"] = "volumeUsd_DESC";
2488
+ PositionVolumeInfoOrderByInput["volumeUsd_DESC_NULLS_FIRST"] = "volumeUsd_DESC_NULLS_FIRST";
2489
+ PositionVolumeInfoOrderByInput["volumeUsd_DESC_NULLS_LAST"] = "volumeUsd_DESC_NULLS_LAST";
2490
+ })(PositionVolumeInfoOrderByInput || (exports.PositionVolumeInfoOrderByInput = PositionVolumeInfoOrderByInput = {}));
2428
2491
  var PriceOrderByInput;
2429
2492
  (function (PriceOrderByInput) {
2430
2493
  PriceOrderByInput["id_ASC"] = "id_ASC";
@@ -2510,6 +2573,93 @@ var ProcessorStatusOrderByInput;
2510
2573
  ProcessorStatusOrderByInput["lastProcessorCallTimestamp_DESC_NULLS_FIRST"] = "lastProcessorCallTimestamp_DESC_NULLS_FIRST";
2511
2574
  ProcessorStatusOrderByInput["lastProcessorCallTimestamp_DESC_NULLS_LAST"] = "lastProcessorCallTimestamp_DESC_NULLS_LAST";
2512
2575
  })(ProcessorStatusOrderByInput || (exports.ProcessorStatusOrderByInput = ProcessorStatusOrderByInput = {}));
2576
+ var SwapFeesInfoOrderByInput;
2577
+ (function (SwapFeesInfoOrderByInput) {
2578
+ SwapFeesInfoOrderByInput["feeReceiverAmount_ASC"] = "feeReceiverAmount_ASC";
2579
+ SwapFeesInfoOrderByInput["feeReceiverAmount_ASC_NULLS_FIRST"] = "feeReceiverAmount_ASC_NULLS_FIRST";
2580
+ SwapFeesInfoOrderByInput["feeReceiverAmount_ASC_NULLS_LAST"] = "feeReceiverAmount_ASC_NULLS_LAST";
2581
+ SwapFeesInfoOrderByInput["feeReceiverAmount_DESC"] = "feeReceiverAmount_DESC";
2582
+ SwapFeesInfoOrderByInput["feeReceiverAmount_DESC_NULLS_FIRST"] = "feeReceiverAmount_DESC_NULLS_FIRST";
2583
+ SwapFeesInfoOrderByInput["feeReceiverAmount_DESC_NULLS_LAST"] = "feeReceiverAmount_DESC_NULLS_LAST";
2584
+ SwapFeesInfoOrderByInput["feeUsdForPool_ASC"] = "feeUsdForPool_ASC";
2585
+ SwapFeesInfoOrderByInput["feeUsdForPool_ASC_NULLS_FIRST"] = "feeUsdForPool_ASC_NULLS_FIRST";
2586
+ SwapFeesInfoOrderByInput["feeUsdForPool_ASC_NULLS_LAST"] = "feeUsdForPool_ASC_NULLS_LAST";
2587
+ SwapFeesInfoOrderByInput["feeUsdForPool_DESC"] = "feeUsdForPool_DESC";
2588
+ SwapFeesInfoOrderByInput["feeUsdForPool_DESC_NULLS_FIRST"] = "feeUsdForPool_DESC_NULLS_FIRST";
2589
+ SwapFeesInfoOrderByInput["feeUsdForPool_DESC_NULLS_LAST"] = "feeUsdForPool_DESC_NULLS_LAST";
2590
+ SwapFeesInfoOrderByInput["id_ASC"] = "id_ASC";
2591
+ SwapFeesInfoOrderByInput["id_ASC_NULLS_FIRST"] = "id_ASC_NULLS_FIRST";
2592
+ SwapFeesInfoOrderByInput["id_ASC_NULLS_LAST"] = "id_ASC_NULLS_LAST";
2593
+ SwapFeesInfoOrderByInput["id_DESC"] = "id_DESC";
2594
+ SwapFeesInfoOrderByInput["id_DESC_NULLS_FIRST"] = "id_DESC_NULLS_FIRST";
2595
+ SwapFeesInfoOrderByInput["id_DESC_NULLS_LAST"] = "id_DESC_NULLS_LAST";
2596
+ SwapFeesInfoOrderByInput["marketAddress_ASC"] = "marketAddress_ASC";
2597
+ SwapFeesInfoOrderByInput["marketAddress_ASC_NULLS_FIRST"] = "marketAddress_ASC_NULLS_FIRST";
2598
+ SwapFeesInfoOrderByInput["marketAddress_ASC_NULLS_LAST"] = "marketAddress_ASC_NULLS_LAST";
2599
+ SwapFeesInfoOrderByInput["marketAddress_DESC"] = "marketAddress_DESC";
2600
+ SwapFeesInfoOrderByInput["marketAddress_DESC_NULLS_FIRST"] = "marketAddress_DESC_NULLS_FIRST";
2601
+ SwapFeesInfoOrderByInput["marketAddress_DESC_NULLS_LAST"] = "marketAddress_DESC_NULLS_LAST";
2602
+ SwapFeesInfoOrderByInput["swapFeeType_ASC"] = "swapFeeType_ASC";
2603
+ SwapFeesInfoOrderByInput["swapFeeType_ASC_NULLS_FIRST"] = "swapFeeType_ASC_NULLS_FIRST";
2604
+ SwapFeesInfoOrderByInput["swapFeeType_ASC_NULLS_LAST"] = "swapFeeType_ASC_NULLS_LAST";
2605
+ SwapFeesInfoOrderByInput["swapFeeType_DESC"] = "swapFeeType_DESC";
2606
+ SwapFeesInfoOrderByInput["swapFeeType_DESC_NULLS_FIRST"] = "swapFeeType_DESC_NULLS_FIRST";
2607
+ SwapFeesInfoOrderByInput["swapFeeType_DESC_NULLS_LAST"] = "swapFeeType_DESC_NULLS_LAST";
2608
+ SwapFeesInfoOrderByInput["tokenAddress_ASC"] = "tokenAddress_ASC";
2609
+ SwapFeesInfoOrderByInput["tokenAddress_ASC_NULLS_FIRST"] = "tokenAddress_ASC_NULLS_FIRST";
2610
+ SwapFeesInfoOrderByInput["tokenAddress_ASC_NULLS_LAST"] = "tokenAddress_ASC_NULLS_LAST";
2611
+ SwapFeesInfoOrderByInput["tokenAddress_DESC"] = "tokenAddress_DESC";
2612
+ SwapFeesInfoOrderByInput["tokenAddress_DESC_NULLS_FIRST"] = "tokenAddress_DESC_NULLS_FIRST";
2613
+ SwapFeesInfoOrderByInput["tokenAddress_DESC_NULLS_LAST"] = "tokenAddress_DESC_NULLS_LAST";
2614
+ SwapFeesInfoOrderByInput["tokenPrice_ASC"] = "tokenPrice_ASC";
2615
+ SwapFeesInfoOrderByInput["tokenPrice_ASC_NULLS_FIRST"] = "tokenPrice_ASC_NULLS_FIRST";
2616
+ SwapFeesInfoOrderByInput["tokenPrice_ASC_NULLS_LAST"] = "tokenPrice_ASC_NULLS_LAST";
2617
+ SwapFeesInfoOrderByInput["tokenPrice_DESC"] = "tokenPrice_DESC";
2618
+ SwapFeesInfoOrderByInput["tokenPrice_DESC_NULLS_FIRST"] = "tokenPrice_DESC_NULLS_FIRST";
2619
+ SwapFeesInfoOrderByInput["tokenPrice_DESC_NULLS_LAST"] = "tokenPrice_DESC_NULLS_LAST";
2620
+ SwapFeesInfoOrderByInput["transaction_blockNumber_ASC"] = "transaction_blockNumber_ASC";
2621
+ SwapFeesInfoOrderByInput["transaction_blockNumber_ASC_NULLS_FIRST"] = "transaction_blockNumber_ASC_NULLS_FIRST";
2622
+ SwapFeesInfoOrderByInput["transaction_blockNumber_ASC_NULLS_LAST"] = "transaction_blockNumber_ASC_NULLS_LAST";
2623
+ SwapFeesInfoOrderByInput["transaction_blockNumber_DESC"] = "transaction_blockNumber_DESC";
2624
+ SwapFeesInfoOrderByInput["transaction_blockNumber_DESC_NULLS_FIRST"] = "transaction_blockNumber_DESC_NULLS_FIRST";
2625
+ SwapFeesInfoOrderByInput["transaction_blockNumber_DESC_NULLS_LAST"] = "transaction_blockNumber_DESC_NULLS_LAST";
2626
+ SwapFeesInfoOrderByInput["transaction_from_ASC"] = "transaction_from_ASC";
2627
+ SwapFeesInfoOrderByInput["transaction_from_ASC_NULLS_FIRST"] = "transaction_from_ASC_NULLS_FIRST";
2628
+ SwapFeesInfoOrderByInput["transaction_from_ASC_NULLS_LAST"] = "transaction_from_ASC_NULLS_LAST";
2629
+ SwapFeesInfoOrderByInput["transaction_from_DESC"] = "transaction_from_DESC";
2630
+ SwapFeesInfoOrderByInput["transaction_from_DESC_NULLS_FIRST"] = "transaction_from_DESC_NULLS_FIRST";
2631
+ SwapFeesInfoOrderByInput["transaction_from_DESC_NULLS_LAST"] = "transaction_from_DESC_NULLS_LAST";
2632
+ SwapFeesInfoOrderByInput["transaction_hash_ASC"] = "transaction_hash_ASC";
2633
+ SwapFeesInfoOrderByInput["transaction_hash_ASC_NULLS_FIRST"] = "transaction_hash_ASC_NULLS_FIRST";
2634
+ SwapFeesInfoOrderByInput["transaction_hash_ASC_NULLS_LAST"] = "transaction_hash_ASC_NULLS_LAST";
2635
+ SwapFeesInfoOrderByInput["transaction_hash_DESC"] = "transaction_hash_DESC";
2636
+ SwapFeesInfoOrderByInput["transaction_hash_DESC_NULLS_FIRST"] = "transaction_hash_DESC_NULLS_FIRST";
2637
+ SwapFeesInfoOrderByInput["transaction_hash_DESC_NULLS_LAST"] = "transaction_hash_DESC_NULLS_LAST";
2638
+ SwapFeesInfoOrderByInput["transaction_id_ASC"] = "transaction_id_ASC";
2639
+ SwapFeesInfoOrderByInput["transaction_id_ASC_NULLS_FIRST"] = "transaction_id_ASC_NULLS_FIRST";
2640
+ SwapFeesInfoOrderByInput["transaction_id_ASC_NULLS_LAST"] = "transaction_id_ASC_NULLS_LAST";
2641
+ SwapFeesInfoOrderByInput["transaction_id_DESC"] = "transaction_id_DESC";
2642
+ SwapFeesInfoOrderByInput["transaction_id_DESC_NULLS_FIRST"] = "transaction_id_DESC_NULLS_FIRST";
2643
+ SwapFeesInfoOrderByInput["transaction_id_DESC_NULLS_LAST"] = "transaction_id_DESC_NULLS_LAST";
2644
+ SwapFeesInfoOrderByInput["transaction_timestamp_ASC"] = "transaction_timestamp_ASC";
2645
+ SwapFeesInfoOrderByInput["transaction_timestamp_ASC_NULLS_FIRST"] = "transaction_timestamp_ASC_NULLS_FIRST";
2646
+ SwapFeesInfoOrderByInput["transaction_timestamp_ASC_NULLS_LAST"] = "transaction_timestamp_ASC_NULLS_LAST";
2647
+ SwapFeesInfoOrderByInput["transaction_timestamp_DESC"] = "transaction_timestamp_DESC";
2648
+ SwapFeesInfoOrderByInput["transaction_timestamp_DESC_NULLS_FIRST"] = "transaction_timestamp_DESC_NULLS_FIRST";
2649
+ SwapFeesInfoOrderByInput["transaction_timestamp_DESC_NULLS_LAST"] = "transaction_timestamp_DESC_NULLS_LAST";
2650
+ SwapFeesInfoOrderByInput["transaction_to_ASC"] = "transaction_to_ASC";
2651
+ SwapFeesInfoOrderByInput["transaction_to_ASC_NULLS_FIRST"] = "transaction_to_ASC_NULLS_FIRST";
2652
+ SwapFeesInfoOrderByInput["transaction_to_ASC_NULLS_LAST"] = "transaction_to_ASC_NULLS_LAST";
2653
+ SwapFeesInfoOrderByInput["transaction_to_DESC"] = "transaction_to_DESC";
2654
+ SwapFeesInfoOrderByInput["transaction_to_DESC_NULLS_FIRST"] = "transaction_to_DESC_NULLS_FIRST";
2655
+ SwapFeesInfoOrderByInput["transaction_to_DESC_NULLS_LAST"] = "transaction_to_DESC_NULLS_LAST";
2656
+ SwapFeesInfoOrderByInput["transaction_transactionIndex_ASC"] = "transaction_transactionIndex_ASC";
2657
+ SwapFeesInfoOrderByInput["transaction_transactionIndex_ASC_NULLS_FIRST"] = "transaction_transactionIndex_ASC_NULLS_FIRST";
2658
+ SwapFeesInfoOrderByInput["transaction_transactionIndex_ASC_NULLS_LAST"] = "transaction_transactionIndex_ASC_NULLS_LAST";
2659
+ SwapFeesInfoOrderByInput["transaction_transactionIndex_DESC"] = "transaction_transactionIndex_DESC";
2660
+ SwapFeesInfoOrderByInput["transaction_transactionIndex_DESC_NULLS_FIRST"] = "transaction_transactionIndex_DESC_NULLS_FIRST";
2661
+ SwapFeesInfoOrderByInput["transaction_transactionIndex_DESC_NULLS_LAST"] = "transaction_transactionIndex_DESC_NULLS_LAST";
2662
+ })(SwapFeesInfoOrderByInput || (exports.SwapFeesInfoOrderByInput = SwapFeesInfoOrderByInput = {}));
2513
2663
  var SwapInfoOrderByInput;
2514
2664
  (function (SwapInfoOrderByInput) {
2515
2665
  SwapInfoOrderByInput["amountInAfterFees_ASC"] = "amountInAfterFees_ASC";
@@ -2627,6 +2777,45 @@ var SwapInfoOrderByInput;
2627
2777
  SwapInfoOrderByInput["transaction_transactionIndex_DESC_NULLS_FIRST"] = "transaction_transactionIndex_DESC_NULLS_FIRST";
2628
2778
  SwapInfoOrderByInput["transaction_transactionIndex_DESC_NULLS_LAST"] = "transaction_transactionIndex_DESC_NULLS_LAST";
2629
2779
  })(SwapInfoOrderByInput || (exports.SwapInfoOrderByInput = SwapInfoOrderByInput = {}));
2780
+ var SwapVolumeInfoOrderByInput;
2781
+ (function (SwapVolumeInfoOrderByInput) {
2782
+ SwapVolumeInfoOrderByInput["id_ASC"] = "id_ASC";
2783
+ SwapVolumeInfoOrderByInput["id_ASC_NULLS_FIRST"] = "id_ASC_NULLS_FIRST";
2784
+ SwapVolumeInfoOrderByInput["id_ASC_NULLS_LAST"] = "id_ASC_NULLS_LAST";
2785
+ SwapVolumeInfoOrderByInput["id_DESC"] = "id_DESC";
2786
+ SwapVolumeInfoOrderByInput["id_DESC_NULLS_FIRST"] = "id_DESC_NULLS_FIRST";
2787
+ SwapVolumeInfoOrderByInput["id_DESC_NULLS_LAST"] = "id_DESC_NULLS_LAST";
2788
+ SwapVolumeInfoOrderByInput["period_ASC"] = "period_ASC";
2789
+ SwapVolumeInfoOrderByInput["period_ASC_NULLS_FIRST"] = "period_ASC_NULLS_FIRST";
2790
+ SwapVolumeInfoOrderByInput["period_ASC_NULLS_LAST"] = "period_ASC_NULLS_LAST";
2791
+ SwapVolumeInfoOrderByInput["period_DESC"] = "period_DESC";
2792
+ SwapVolumeInfoOrderByInput["period_DESC_NULLS_FIRST"] = "period_DESC_NULLS_FIRST";
2793
+ SwapVolumeInfoOrderByInput["period_DESC_NULLS_LAST"] = "period_DESC_NULLS_LAST";
2794
+ SwapVolumeInfoOrderByInput["timestamp_ASC"] = "timestamp_ASC";
2795
+ SwapVolumeInfoOrderByInput["timestamp_ASC_NULLS_FIRST"] = "timestamp_ASC_NULLS_FIRST";
2796
+ SwapVolumeInfoOrderByInput["timestamp_ASC_NULLS_LAST"] = "timestamp_ASC_NULLS_LAST";
2797
+ SwapVolumeInfoOrderByInput["timestamp_DESC"] = "timestamp_DESC";
2798
+ SwapVolumeInfoOrderByInput["timestamp_DESC_NULLS_FIRST"] = "timestamp_DESC_NULLS_FIRST";
2799
+ SwapVolumeInfoOrderByInput["timestamp_DESC_NULLS_LAST"] = "timestamp_DESC_NULLS_LAST";
2800
+ SwapVolumeInfoOrderByInput["tokenIn_ASC"] = "tokenIn_ASC";
2801
+ SwapVolumeInfoOrderByInput["tokenIn_ASC_NULLS_FIRST"] = "tokenIn_ASC_NULLS_FIRST";
2802
+ SwapVolumeInfoOrderByInput["tokenIn_ASC_NULLS_LAST"] = "tokenIn_ASC_NULLS_LAST";
2803
+ SwapVolumeInfoOrderByInput["tokenIn_DESC"] = "tokenIn_DESC";
2804
+ SwapVolumeInfoOrderByInput["tokenIn_DESC_NULLS_FIRST"] = "tokenIn_DESC_NULLS_FIRST";
2805
+ SwapVolumeInfoOrderByInput["tokenIn_DESC_NULLS_LAST"] = "tokenIn_DESC_NULLS_LAST";
2806
+ SwapVolumeInfoOrderByInput["tokenOut_ASC"] = "tokenOut_ASC";
2807
+ SwapVolumeInfoOrderByInput["tokenOut_ASC_NULLS_FIRST"] = "tokenOut_ASC_NULLS_FIRST";
2808
+ SwapVolumeInfoOrderByInput["tokenOut_ASC_NULLS_LAST"] = "tokenOut_ASC_NULLS_LAST";
2809
+ SwapVolumeInfoOrderByInput["tokenOut_DESC"] = "tokenOut_DESC";
2810
+ SwapVolumeInfoOrderByInput["tokenOut_DESC_NULLS_FIRST"] = "tokenOut_DESC_NULLS_FIRST";
2811
+ SwapVolumeInfoOrderByInput["tokenOut_DESC_NULLS_LAST"] = "tokenOut_DESC_NULLS_LAST";
2812
+ SwapVolumeInfoOrderByInput["volumeUsd_ASC"] = "volumeUsd_ASC";
2813
+ SwapVolumeInfoOrderByInput["volumeUsd_ASC_NULLS_FIRST"] = "volumeUsd_ASC_NULLS_FIRST";
2814
+ SwapVolumeInfoOrderByInput["volumeUsd_ASC_NULLS_LAST"] = "volumeUsd_ASC_NULLS_LAST";
2815
+ SwapVolumeInfoOrderByInput["volumeUsd_DESC"] = "volumeUsd_DESC";
2816
+ SwapVolumeInfoOrderByInput["volumeUsd_DESC_NULLS_FIRST"] = "volumeUsd_DESC_NULLS_FIRST";
2817
+ SwapVolumeInfoOrderByInput["volumeUsd_DESC_NULLS_LAST"] = "volumeUsd_DESC_NULLS_LAST";
2818
+ })(SwapVolumeInfoOrderByInput || (exports.SwapVolumeInfoOrderByInput = SwapVolumeInfoOrderByInput = {}));
2630
2819
  var TradeActionOrderByInput;
2631
2820
  (function (TradeActionOrderByInput) {
2632
2821
  TradeActionOrderByInput["acceptablePrice_ASC"] = "acceptablePrice_ASC";
@@ -2975,3 +3164,54 @@ var TransactionOrderByInput;
2975
3164
  TransactionOrderByInput["transactionIndex_DESC_NULLS_FIRST"] = "transactionIndex_DESC_NULLS_FIRST";
2976
3165
  TransactionOrderByInput["transactionIndex_DESC_NULLS_LAST"] = "transactionIndex_DESC_NULLS_LAST";
2977
3166
  })(TransactionOrderByInput || (exports.TransactionOrderByInput = TransactionOrderByInput = {}));
3167
+ var VolumeInfoOrderByInput;
3168
+ (function (VolumeInfoOrderByInput) {
3169
+ VolumeInfoOrderByInput["depositVolumeUsd_ASC"] = "depositVolumeUsd_ASC";
3170
+ VolumeInfoOrderByInput["depositVolumeUsd_ASC_NULLS_FIRST"] = "depositVolumeUsd_ASC_NULLS_FIRST";
3171
+ VolumeInfoOrderByInput["depositVolumeUsd_ASC_NULLS_LAST"] = "depositVolumeUsd_ASC_NULLS_LAST";
3172
+ VolumeInfoOrderByInput["depositVolumeUsd_DESC"] = "depositVolumeUsd_DESC";
3173
+ VolumeInfoOrderByInput["depositVolumeUsd_DESC_NULLS_FIRST"] = "depositVolumeUsd_DESC_NULLS_FIRST";
3174
+ VolumeInfoOrderByInput["depositVolumeUsd_DESC_NULLS_LAST"] = "depositVolumeUsd_DESC_NULLS_LAST";
3175
+ VolumeInfoOrderByInput["id_ASC"] = "id_ASC";
3176
+ VolumeInfoOrderByInput["id_ASC_NULLS_FIRST"] = "id_ASC_NULLS_FIRST";
3177
+ VolumeInfoOrderByInput["id_ASC_NULLS_LAST"] = "id_ASC_NULLS_LAST";
3178
+ VolumeInfoOrderByInput["id_DESC"] = "id_DESC";
3179
+ VolumeInfoOrderByInput["id_DESC_NULLS_FIRST"] = "id_DESC_NULLS_FIRST";
3180
+ VolumeInfoOrderByInput["id_DESC_NULLS_LAST"] = "id_DESC_NULLS_LAST";
3181
+ VolumeInfoOrderByInput["marginVolumeUsd_ASC"] = "marginVolumeUsd_ASC";
3182
+ VolumeInfoOrderByInput["marginVolumeUsd_ASC_NULLS_FIRST"] = "marginVolumeUsd_ASC_NULLS_FIRST";
3183
+ VolumeInfoOrderByInput["marginVolumeUsd_ASC_NULLS_LAST"] = "marginVolumeUsd_ASC_NULLS_LAST";
3184
+ VolumeInfoOrderByInput["marginVolumeUsd_DESC"] = "marginVolumeUsd_DESC";
3185
+ VolumeInfoOrderByInput["marginVolumeUsd_DESC_NULLS_FIRST"] = "marginVolumeUsd_DESC_NULLS_FIRST";
3186
+ VolumeInfoOrderByInput["marginVolumeUsd_DESC_NULLS_LAST"] = "marginVolumeUsd_DESC_NULLS_LAST";
3187
+ VolumeInfoOrderByInput["period_ASC"] = "period_ASC";
3188
+ VolumeInfoOrderByInput["period_ASC_NULLS_FIRST"] = "period_ASC_NULLS_FIRST";
3189
+ VolumeInfoOrderByInput["period_ASC_NULLS_LAST"] = "period_ASC_NULLS_LAST";
3190
+ VolumeInfoOrderByInput["period_DESC"] = "period_DESC";
3191
+ VolumeInfoOrderByInput["period_DESC_NULLS_FIRST"] = "period_DESC_NULLS_FIRST";
3192
+ VolumeInfoOrderByInput["period_DESC_NULLS_LAST"] = "period_DESC_NULLS_LAST";
3193
+ VolumeInfoOrderByInput["swapVolumeUsd_ASC"] = "swapVolumeUsd_ASC";
3194
+ VolumeInfoOrderByInput["swapVolumeUsd_ASC_NULLS_FIRST"] = "swapVolumeUsd_ASC_NULLS_FIRST";
3195
+ VolumeInfoOrderByInput["swapVolumeUsd_ASC_NULLS_LAST"] = "swapVolumeUsd_ASC_NULLS_LAST";
3196
+ VolumeInfoOrderByInput["swapVolumeUsd_DESC"] = "swapVolumeUsd_DESC";
3197
+ VolumeInfoOrderByInput["swapVolumeUsd_DESC_NULLS_FIRST"] = "swapVolumeUsd_DESC_NULLS_FIRST";
3198
+ VolumeInfoOrderByInput["swapVolumeUsd_DESC_NULLS_LAST"] = "swapVolumeUsd_DESC_NULLS_LAST";
3199
+ VolumeInfoOrderByInput["timestamp_ASC"] = "timestamp_ASC";
3200
+ VolumeInfoOrderByInput["timestamp_ASC_NULLS_FIRST"] = "timestamp_ASC_NULLS_FIRST";
3201
+ VolumeInfoOrderByInput["timestamp_ASC_NULLS_LAST"] = "timestamp_ASC_NULLS_LAST";
3202
+ VolumeInfoOrderByInput["timestamp_DESC"] = "timestamp_DESC";
3203
+ VolumeInfoOrderByInput["timestamp_DESC_NULLS_FIRST"] = "timestamp_DESC_NULLS_FIRST";
3204
+ VolumeInfoOrderByInput["timestamp_DESC_NULLS_LAST"] = "timestamp_DESC_NULLS_LAST";
3205
+ VolumeInfoOrderByInput["volumeUsd_ASC"] = "volumeUsd_ASC";
3206
+ VolumeInfoOrderByInput["volumeUsd_ASC_NULLS_FIRST"] = "volumeUsd_ASC_NULLS_FIRST";
3207
+ VolumeInfoOrderByInput["volumeUsd_ASC_NULLS_LAST"] = "volumeUsd_ASC_NULLS_LAST";
3208
+ VolumeInfoOrderByInput["volumeUsd_DESC"] = "volumeUsd_DESC";
3209
+ VolumeInfoOrderByInput["volumeUsd_DESC_NULLS_FIRST"] = "volumeUsd_DESC_NULLS_FIRST";
3210
+ VolumeInfoOrderByInput["volumeUsd_DESC_NULLS_LAST"] = "volumeUsd_DESC_NULLS_LAST";
3211
+ VolumeInfoOrderByInput["withdrawalVolumeUsd_ASC"] = "withdrawalVolumeUsd_ASC";
3212
+ VolumeInfoOrderByInput["withdrawalVolumeUsd_ASC_NULLS_FIRST"] = "withdrawalVolumeUsd_ASC_NULLS_FIRST";
3213
+ VolumeInfoOrderByInput["withdrawalVolumeUsd_ASC_NULLS_LAST"] = "withdrawalVolumeUsd_ASC_NULLS_LAST";
3214
+ VolumeInfoOrderByInput["withdrawalVolumeUsd_DESC"] = "withdrawalVolumeUsd_DESC";
3215
+ VolumeInfoOrderByInput["withdrawalVolumeUsd_DESC_NULLS_FIRST"] = "withdrawalVolumeUsd_DESC_NULLS_FIRST";
3216
+ VolumeInfoOrderByInput["withdrawalVolumeUsd_DESC_NULLS_LAST"] = "withdrawalVolumeUsd_DESC_NULLS_LAST";
3217
+ })(VolumeInfoOrderByInput || (exports.VolumeInfoOrderByInput = VolumeInfoOrderByInput = {}));
@@ -1,2 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TokenBalanceType = void 0;
4
+ var TokenBalanceType;
5
+ (function (TokenBalanceType) {
6
+ TokenBalanceType[TokenBalanceType["Wallet"] = 0] = "Wallet";
7
+ TokenBalanceType[TokenBalanceType["GmxAccount"] = 1] = "GmxAccount";
8
+ TokenBalanceType[TokenBalanceType["SourceChain"] = 2] = "SourceChain";
9
+ })(TokenBalanceType || (exports.TokenBalanceType = TokenBalanceType = {}));
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const vitest_1 = require("vitest");
4
+ const abort_1 = require("../abort");
5
+ (0, vitest_1.describe)("combineAbortSignals", () => {
6
+ (0, vitest_1.it)("should return an AbortController", () => {
7
+ const controller1 = new AbortController();
8
+ const controller2 = new AbortController();
9
+ const combined = (0, abort_1.combineAbortSignals)(controller1.signal, controller2.signal);
10
+ (0, vitest_1.expect)(combined).toBeInstanceOf(AbortController);
11
+ (0, vitest_1.expect)(combined.signal.aborted).toBe(false);
12
+ });
13
+ (0, vitest_1.it)("should abort combined controller when first signal is aborted", () => {
14
+ const controller1 = new AbortController();
15
+ const controller2 = new AbortController();
16
+ controller1.abort();
17
+ const combined = (0, abort_1.combineAbortSignals)(controller1.signal, controller2.signal);
18
+ (0, vitest_1.expect)(combined.signal.aborted).toBe(true);
19
+ });
20
+ (0, vitest_1.it)("should abort combined controller when second signal is aborted", () => {
21
+ const controller1 = new AbortController();
22
+ const controller2 = new AbortController();
23
+ controller2.abort();
24
+ const combined = (0, abort_1.combineAbortSignals)(controller1.signal, controller2.signal);
25
+ (0, vitest_1.expect)(combined.signal.aborted).toBe(true);
26
+ });
27
+ (0, vitest_1.it)("should abort combined controller when any signal is aborted after creation", () => {
28
+ const controller1 = new AbortController();
29
+ const controller2 = new AbortController();
30
+ const combined = (0, abort_1.combineAbortSignals)(controller1.signal, controller2.signal);
31
+ (0, vitest_1.expect)(combined.signal.aborted).toBe(false);
32
+ controller1.abort();
33
+ (0, vitest_1.expect)(combined.signal.aborted).toBe(true);
34
+ });
35
+ (0, vitest_1.it)("should abort combined controller when multiple signals are aborted", () => {
36
+ const controller1 = new AbortController();
37
+ const controller2 = new AbortController();
38
+ const controller3 = new AbortController();
39
+ const combined = (0, abort_1.combineAbortSignals)(controller1.signal, controller2.signal, controller3.signal);
40
+ (0, vitest_1.expect)(combined.signal.aborted).toBe(false);
41
+ controller2.abort();
42
+ (0, vitest_1.expect)(combined.signal.aborted).toBe(true);
43
+ });
44
+ (0, vitest_1.it)("should clean up event listeners when combined controller is aborted", () => {
45
+ const controller1 = new AbortController();
46
+ const controller2 = new AbortController();
47
+ const removeEventListener1 = vitest_1.vi.spyOn(controller1.signal, "removeEventListener");
48
+ const removeEventListener2 = vitest_1.vi.spyOn(controller2.signal, "removeEventListener");
49
+ const combined = (0, abort_1.combineAbortSignals)(controller1.signal, controller2.signal);
50
+ combined.abort();
51
+ (0, vitest_1.expect)(removeEventListener1).toHaveBeenCalled();
52
+ (0, vitest_1.expect)(removeEventListener2).toHaveBeenCalled();
53
+ });
54
+ (0, vitest_1.it)("should clean up event listeners when source signal is aborted", () => {
55
+ const controller1 = new AbortController();
56
+ const controller2 = new AbortController();
57
+ const removeEventListener1 = vitest_1.vi.spyOn(controller1.signal, "removeEventListener");
58
+ const removeEventListener2 = vitest_1.vi.spyOn(controller2.signal, "removeEventListener");
59
+ const combined = (0, abort_1.combineAbortSignals)(controller1.signal, controller2.signal);
60
+ controller1.abort();
61
+ (0, vitest_1.expect)(combined.signal.aborted).toBe(true);
62
+ (0, vitest_1.expect)(removeEventListener1).toHaveBeenCalled();
63
+ (0, vitest_1.expect)(removeEventListener2).toHaveBeenCalled();
64
+ });
65
+ (0, vitest_1.it)("should work with single signal", () => {
66
+ const controller = new AbortController();
67
+ const combined = (0, abort_1.combineAbortSignals)(controller.signal);
68
+ (0, vitest_1.expect)(combined.signal.aborted).toBe(false);
69
+ controller.abort();
70
+ (0, vitest_1.expect)(combined.signal.aborted).toBe(true);
71
+ });
72
+ (0, vitest_1.it)("should work with empty array", () => {
73
+ const combined = (0, abort_1.combineAbortSignals)();
74
+ (0, vitest_1.expect)(combined).toBeInstanceOf(AbortController);
75
+ (0, vitest_1.expect)(combined.signal.aborted).toBe(false);
76
+ });
77
+ (0, vitest_1.it)("should handle multiple aborts gracefully", () => {
78
+ const controller1 = new AbortController();
79
+ const controller2 = new AbortController();
80
+ const combined = (0, abort_1.combineAbortSignals)(controller1.signal, controller2.signal);
81
+ controller1.abort();
82
+ controller2.abort();
83
+ (0, vitest_1.expect)(combined.signal.aborted).toBe(true);
84
+ });
85
+ (0, vitest_1.it)("should not leak memory when signals are aborted multiple times", () => {
86
+ const controller1 = new AbortController();
87
+ const controller2 = new AbortController();
88
+ const removeEventListener1 = vitest_1.vi.spyOn(controller1.signal, "removeEventListener");
89
+ const removeEventListener2 = vitest_1.vi.spyOn(controller2.signal, "removeEventListener");
90
+ const combined = (0, abort_1.combineAbortSignals)(controller1.signal, controller2.signal);
91
+ controller1.abort();
92
+ controller2.abort();
93
+ combined.abort();
94
+ const callCount1 = removeEventListener1.mock.calls.length;
95
+ const callCount2 = removeEventListener2.mock.calls.length;
96
+ (0, vitest_1.expect)(callCount1).toBeGreaterThan(0);
97
+ (0, vitest_1.expect)(callCount2).toBeGreaterThan(0);
98
+ });
99
+ (0, vitest_1.it)("should clean up listeners when later signal is already aborted", () => {
100
+ const controller1 = new AbortController();
101
+ const controller2 = new AbortController();
102
+ controller2.abort();
103
+ const removeEventListener1 = vitest_1.vi.spyOn(controller1.signal, "removeEventListener");
104
+ const addEventListener1 = vitest_1.vi.spyOn(controller1.signal, "addEventListener");
105
+ const combined = (0, abort_1.combineAbortSignals)(controller1.signal, controller2.signal);
106
+ (0, vitest_1.expect)(combined.signal.aborted).toBe(true);
107
+ (0, vitest_1.expect)(addEventListener1).toHaveBeenCalled();
108
+ (0, vitest_1.expect)(removeEventListener1).toHaveBeenCalled();
109
+ });
110
+ (0, vitest_1.it)("should clean up listeners when middle signal is already aborted", () => {
111
+ const controller1 = new AbortController();
112
+ const controller2 = new AbortController();
113
+ const controller3 = new AbortController();
114
+ controller2.abort();
115
+ const removeEventListener1 = vitest_1.vi.spyOn(controller1.signal, "removeEventListener");
116
+ const addEventListener1 = vitest_1.vi.spyOn(controller1.signal, "addEventListener");
117
+ const combined = (0, abort_1.combineAbortSignals)(controller1.signal, controller2.signal, controller3.signal);
118
+ (0, vitest_1.expect)(combined.signal.aborted).toBe(true);
119
+ (0, vitest_1.expect)(addEventListener1).toHaveBeenCalled();
120
+ (0, vitest_1.expect)(removeEventListener1).toHaveBeenCalled();
121
+ });
122
+ });