lynx-client 0.0.35 → 0.0.37

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 (135) hide show
  1. package/dist/cjs/lib/addresses/lensAddresses.js +6 -6
  2. package/dist/cjs/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.js +3 -0
  3. package/dist/cjs/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.js +1 -0
  4. package/dist/cjs/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.js +38 -1
  5. package/dist/cjs/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.js +84 -0
  6. package/dist/cjs/lib/typechain/contracts/Lynx/Incentives/SkewIncentive.js +2 -0
  7. package/dist/cjs/lib/typechain/contracts/Lynx/interfaces/ISkewIncentive.js +2 -0
  8. package/dist/cjs/lib/typechain/factories/contracts/Lynx/Incentives/SkewIncentive__factory.js +1118 -0
  9. package/dist/cjs/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.js +1 -1
  10. package/dist/cjs/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.js +1 -1
  11. package/dist/cjs/lib/typechain/factories/contracts/Lynx/Lex/PNLR/PNLR__factory.js +1 -1
  12. package/dist/cjs/lib/typechain/factories/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1__factory.js +1 -1
  13. package/dist/cjs/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.js +1 -1
  14. package/dist/cjs/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.js +1 -1
  15. package/dist/cjs/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.js +1 -1
  16. package/dist/cjs/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.js +21 -1
  17. package/dist/cjs/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.js +222 -1
  18. package/dist/cjs/lib/typechain/factories/contracts/Lynx/interfaces/IPriceValidatorV1__factory.js +5 -0
  19. package/dist/cjs/lib/typechain/factories/contracts/Lynx/interfaces/ISkewIncentive__factory.js +538 -0
  20. package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.js +1 -1
  21. package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.js +46 -1
  22. package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.js +452 -1
  23. package/dist/esm/lib/addresses/lensAddresses.d.ts +6 -6
  24. package/dist/esm/lib/addresses/lensAddresses.js +6 -6
  25. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts +2 -1
  26. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts.map +1 -1
  27. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.js +3 -0
  28. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts.map +1 -1
  29. package/dist/esm/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.js +1 -0
  30. package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.d.ts +38 -1
  31. package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.d.ts.map +1 -1
  32. package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.js +38 -1
  33. package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.d.ts +9 -2
  34. package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.d.ts.map +1 -1
  35. package/dist/esm/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.js +84 -0
  36. package/dist/esm/lib/typechain/contracts/Lynx/Incentives/SkewIncentive.d.ts +745 -0
  37. package/dist/esm/lib/typechain/contracts/Lynx/Incentives/SkewIncentive.d.ts.map +1 -0
  38. package/dist/esm/lib/typechain/contracts/Lynx/Incentives/SkewIncentive.js +2 -0
  39. package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts +18 -6
  40. package/dist/esm/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts.map +1 -1
  41. package/dist/esm/lib/typechain/contracts/Lynx/Triggers/TriggersV1.d.ts +36 -2
  42. package/dist/esm/lib/typechain/contracts/Lynx/Triggers/TriggersV1.d.ts.map +1 -1
  43. package/dist/esm/lib/typechain/contracts/Lynx/interfaces/IPriceValidatorV1.d.ts +9 -3
  44. package/dist/esm/lib/typechain/contracts/Lynx/interfaces/IPriceValidatorV1.d.ts.map +1 -1
  45. package/dist/esm/lib/typechain/contracts/Lynx/interfaces/ISkewIncentive.d.ts +408 -0
  46. package/dist/esm/lib/typechain/contracts/Lynx/interfaces/ISkewIncentive.d.ts.map +1 -0
  47. package/dist/esm/lib/typechain/contracts/Lynx/interfaces/ISkewIncentive.js +2 -0
  48. package/dist/esm/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts +10 -1
  49. package/dist/esm/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts.map +1 -1
  50. package/dist/esm/lib/typechain/contracts/Peripheral/Lens/TriggersAndPortalLens.d.ts +205 -1
  51. package/dist/esm/lib/typechain/contracts/Peripheral/Lens/TriggersAndPortalLens.d.ts.map +1 -1
  52. package/dist/esm/lib/typechain/factories/contracts/Lynx/Incentives/SkewIncentive__factory.d.ts +861 -0
  53. package/dist/esm/lib/typechain/factories/contracts/Lynx/Incentives/SkewIncentive__factory.d.ts.map +1 -0
  54. package/dist/esm/lib/typechain/factories/contracts/Lynx/Incentives/SkewIncentive__factory.js +1118 -0
  55. package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.d.ts +1 -1
  56. package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.js +1 -1
  57. package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.d.ts +1 -1
  58. package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.js +1 -1
  59. package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/PNLR/PNLR__factory.d.ts +1 -1
  60. package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/PNLR/PNLR__factory.d.ts.map +1 -1
  61. package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/PNLR/PNLR__factory.js +1 -1
  62. package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1__factory.d.ts +1 -1
  63. package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1__factory.js +1 -1
  64. package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.d.ts +1 -1
  65. package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.js +1 -1
  66. package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.d.ts +1 -1
  67. package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.js +1 -1
  68. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts +1 -1
  69. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.js +1 -1
  70. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts +17 -1
  71. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts.map +1 -1
  72. package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.js +21 -1
  73. package/dist/esm/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts +177 -1
  74. package/dist/esm/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts.map +1 -1
  75. package/dist/esm/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.js +222 -1
  76. package/dist/esm/lib/typechain/factories/contracts/Lynx/interfaces/IPriceValidatorV1__factory.d.ts +4 -0
  77. package/dist/esm/lib/typechain/factories/contracts/Lynx/interfaces/IPriceValidatorV1__factory.d.ts.map +1 -1
  78. package/dist/esm/lib/typechain/factories/contracts/Lynx/interfaces/IPriceValidatorV1__factory.js +5 -0
  79. package/dist/esm/lib/typechain/factories/contracts/Lynx/interfaces/ISkewIncentive__factory.d.ts +415 -0
  80. package/dist/esm/lib/typechain/factories/contracts/Lynx/interfaces/ISkewIncentive__factory.d.ts.map +1 -0
  81. package/dist/esm/lib/typechain/factories/contracts/Lynx/interfaces/ISkewIncentive__factory.js +538 -0
  82. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.d.ts +1 -1
  83. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.js +1 -1
  84. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts +37 -1
  85. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts.map +1 -1
  86. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.js +46 -1
  87. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.d.ts +348 -1
  88. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.d.ts.map +1 -1
  89. package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.js +452 -1
  90. package/dist/types/lib/addresses/lensAddresses.d.ts +6 -6
  91. package/dist/types/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts +2 -1
  92. package/dist/types/lib/contractsIntegration/TradingFloorLensService/ITradingFloorLensService.d.ts.map +1 -1
  93. package/dist/types/lib/contractsIntegration/TradingFloorLensService/TradingFloorLensService.d.ts.map +1 -1
  94. package/dist/types/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.d.ts +38 -1
  95. package/dist/types/lib/contractsIntegration/TriggersAndPortalLensService/ITriggersAndPortalLensService.d.ts.map +1 -1
  96. package/dist/types/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.d.ts +9 -2
  97. package/dist/types/lib/contractsIntegration/TriggersAndPortalLensService/TriggersAndPortalLensService.d.ts.map +1 -1
  98. package/dist/types/lib/typechain/contracts/Lynx/Incentives/SkewIncentive.d.ts +745 -0
  99. package/dist/types/lib/typechain/contracts/Lynx/Incentives/SkewIncentive.d.ts.map +1 -0
  100. package/dist/types/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts +18 -6
  101. package/dist/types/lib/typechain/contracts/Lynx/TradingFloor/TradingFloorV1.d.ts.map +1 -1
  102. package/dist/types/lib/typechain/contracts/Lynx/Triggers/TriggersV1.d.ts +36 -2
  103. package/dist/types/lib/typechain/contracts/Lynx/Triggers/TriggersV1.d.ts.map +1 -1
  104. package/dist/types/lib/typechain/contracts/Lynx/interfaces/IPriceValidatorV1.d.ts +9 -3
  105. package/dist/types/lib/typechain/contracts/Lynx/interfaces/IPriceValidatorV1.d.ts.map +1 -1
  106. package/dist/types/lib/typechain/contracts/Lynx/interfaces/ISkewIncentive.d.ts +408 -0
  107. package/dist/types/lib/typechain/contracts/Lynx/interfaces/ISkewIncentive.d.ts.map +1 -0
  108. package/dist/types/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts +10 -1
  109. package/dist/types/lib/typechain/contracts/Peripheral/Lens/TradingFloorLens.d.ts.map +1 -1
  110. package/dist/types/lib/typechain/contracts/Peripheral/Lens/TriggersAndPortalLens.d.ts +205 -1
  111. package/dist/types/lib/typechain/contracts/Peripheral/Lens/TriggersAndPortalLens.d.ts.map +1 -1
  112. package/dist/types/lib/typechain/factories/contracts/Lynx/Incentives/SkewIncentive__factory.d.ts +861 -0
  113. package/dist/types/lib/typechain/factories/contracts/Lynx/Incentives/SkewIncentive__factory.d.ts.map +1 -0
  114. package/dist/types/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.d.ts +1 -1
  115. package/dist/types/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.d.ts +1 -1
  116. package/dist/types/lib/typechain/factories/contracts/Lynx/Lex/PNLR/PNLR__factory.d.ts +1 -1
  117. package/dist/types/lib/typechain/factories/contracts/Lynx/Lex/PNLR/PNLR__factory.d.ts.map +1 -1
  118. package/dist/types/lib/typechain/factories/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1__factory.d.ts +1 -1
  119. package/dist/types/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.d.ts +1 -1
  120. package/dist/types/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.d.ts +1 -1
  121. package/dist/types/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts +1 -1
  122. package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts +17 -1
  123. package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts.map +1 -1
  124. package/dist/types/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts +177 -1
  125. package/dist/types/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts.map +1 -1
  126. package/dist/types/lib/typechain/factories/contracts/Lynx/interfaces/IPriceValidatorV1__factory.d.ts +4 -0
  127. package/dist/types/lib/typechain/factories/contracts/Lynx/interfaces/IPriceValidatorV1__factory.d.ts.map +1 -1
  128. package/dist/types/lib/typechain/factories/contracts/Lynx/interfaces/ISkewIncentive__factory.d.ts +415 -0
  129. package/dist/types/lib/typechain/factories/contracts/Lynx/interfaces/ISkewIncentive__factory.d.ts.map +1 -0
  130. package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.d.ts +1 -1
  131. package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts +37 -1
  132. package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts.map +1 -1
  133. package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.d.ts +348 -1
  134. package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.d.ts.map +1 -1
  135. package/package.json +1 -1
@@ -5,15 +5,15 @@ exports.LensAddresses = {
5
5
  boba: {
6
6
  intentsVerifierLens: "0x7DfA2F609573AB8eD8cA231498FF4E8f1e7d31Fa",
7
7
  lexLens: "0xacd54792eB1844eEB2285C29dE267aA65a7A4fB0",
8
- tradingFloorLensLens: "0xa2320e397400bd2C56facFD958B602996FdC4a64",
9
- triggersAndPortalLens: "0x756934Ca491C177f5C28D1556E1a1a89109C822b",
8
+ tradingFloorLensLens: "0x3fBE188f4C52683B910A2a0CBD914613f08CBC19",
9
+ triggersAndPortalLens: "0xd8E6E20A03b6f3Dc02880ac6595678dc28ae2E8A",
10
10
  rateModelLens: "0xee6354F34892C5388FC69ea1CEc0f3050aF84fB9",
11
11
  },
12
12
  sonic: {
13
13
  intentsVerifierLens: "0x0C1Fcd85856b5564a87ae378336b7CC0c139C5f7",
14
14
  lexLens: "0x175b535ED0383e96Cc5f436464AF88768242E8d8",
15
- tradingFloorLensLens: "0xe8cB576813Eca9B3B9BD851Ce768eB0920274fE8",
16
- triggersAndPortalLens: "0x0D28C4ad0dD674Cbc15Fa54c1f6FacA1D7c81093",
15
+ tradingFloorLensLens: "0x60E7D645e8Bd03A5865D787206Ab97c78dB234C1",
16
+ triggersAndPortalLens: "0xF791EB99654411487d9AC8334c6090716001E451",
17
17
  rateModelLens: "0x771176a09E84365552504437e3A026ea049CBa41",
18
18
  },
19
19
  fantom: {
@@ -26,8 +26,8 @@ exports.LensAddresses = {
26
26
  flare: {
27
27
  intentsVerifierLens: "0x8fBb98F9BbBBB455A86371D4B2E8ECc7b1b9C6F6",
28
28
  lexLens: "0x731C1CECb65ab3056BDbBBF3037FBf85A8C888c8",
29
- tradingFloorLensLens: "0x2779d0a13Bb4CB7798A8D656e8EdEbB560c17431",
30
- triggersAndPortalLens: "0x618d7b961baC037bbbb01c06395Ee16c06A25A2c",
29
+ tradingFloorLensLens: "0xa23D17478ef3f35AE0D540Cdfe6f48ae37Ae9423",
30
+ triggersAndPortalLens: "0x1D618cb0543827d0Db1063AEaa61cFCF54b33834",
31
31
  rateModelLens: "0x7D1893Da64A559C5F23C0f565F62C8480ff6A295",
32
32
  },
33
33
  };
@@ -30,6 +30,9 @@ exports.EMPTY_COMPLETE_POSITION_DATA = {
30
30
  funding: 0n,
31
31
  borrowInterest: 0n,
32
32
  liquidationPrice: 0n,
33
+ skewIncentiveRate: 0n,
34
+ skewIncentiveDisabled: false,
35
+ skewIncentiveOpenTimestamp: 0,
33
36
  };
34
37
  exports.EMPTY_POSITIONS_RESULT = {
35
38
  positions: [],
@@ -25,6 +25,7 @@ function convertPositionData(pos) {
25
25
  pendingUpdateOrderType: Number(baseStruct.pendingUpdateOrderType),
26
26
  pendingUpdateOrderTimestamp: Number(baseStruct.pendingUpdateOrderTimestamp),
27
27
  liquidationPrice: baseStruct.liquidationPrice,
28
+ skewIncentiveOpenTimestamp: Number(baseStruct.skewIncentiveOpenTimestamp),
28
29
  };
29
30
  }
30
31
  function convertLiquidationInfo(pos) {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EMPTY_TRADERS_PORTAL_PER_PAIR_PARAMETERS = exports.EMPTY_ON_BEHALF_TRADING_CONFIGURATIONS = exports.EMPTY_ON_BEHALF_TRADING_TOKEN_CONFIG = exports.EMPTY_COMPLETE_TRIGGER_CONFIGURATIONS = exports.EMPTY_COMPLETE_TRADERS_PORTAL_CONFIGURATIONS = exports.EMPTY_PAIR_CONFIGS_IN_TRIGGERS = void 0;
3
+ exports.EMPTY_SKEW_INCENTIVE_FULL_CONFIG = exports.EMPTY_SKEW_INCENTIVE_PAIR_CONFIG = exports.EMPTY_SKEW_INCENTIVE_GLOBAL_CONFIG = exports.EMPTY_SKEW_INCENTIVE_ASSET_CONFIG = exports.EMPTY_POSITION_SKEW_STATUS = exports.EMPTY_TRADERS_PORTAL_PER_PAIR_PARAMETERS = exports.EMPTY_ON_BEHALF_TRADING_CONFIGURATIONS = exports.EMPTY_ON_BEHALF_TRADING_TOKEN_CONFIG = exports.EMPTY_COMPLETE_TRIGGER_CONFIGURATIONS = exports.EMPTY_COMPLETE_TRADERS_PORTAL_CONFIGURATIONS = exports.EMPTY_PAIR_CONFIGS_IN_TRIGGERS = void 0;
4
4
  exports.EMPTY_PAIR_CONFIGS_IN_TRIGGERS = {
5
5
  pairId: 0,
6
6
  maxConfidenceFraction: 0,
@@ -54,3 +54,40 @@ exports.EMPTY_TRADERS_PORTAL_PER_PAIR_PARAMETERS = {
54
54
  minLiveTimeForMarketClose: 0,
55
55
  limitsMarginFraction: 0,
56
56
  };
57
+ exports.EMPTY_POSITION_SKEW_STATUS = {
58
+ positionId: "",
59
+ isEligible: false,
60
+ incentiveRate: 0,
61
+ disabled: false,
62
+ openTimestamp: 0,
63
+ };
64
+ exports.EMPTY_SKEW_INCENTIVE_ASSET_CONFIG = {
65
+ settlementAsset: "",
66
+ enabled: false,
67
+ skewThreshold: 0,
68
+ incentiveRate: 0,
69
+ minPositionSize: 0n,
70
+ minHoldingTime: 0,
71
+ };
72
+ exports.EMPTY_SKEW_INCENTIVE_GLOBAL_CONFIG = {
73
+ contractAddress: "",
74
+ globalEnabled: false,
75
+ activePositionCount: 0,
76
+ configuredSettlementAssetCount: 0,
77
+ };
78
+ exports.EMPTY_SKEW_INCENTIVE_PAIR_CONFIG = {
79
+ settlementAsset: "",
80
+ pairId: 0,
81
+ enabled: false,
82
+ skewThreshold: 0,
83
+ incentiveRate: 0,
84
+ minPositionSize: 0n,
85
+ minHoldingTime: 0,
86
+ };
87
+ exports.EMPTY_SKEW_INCENTIVE_FULL_CONFIG = {
88
+ contractAddress: "",
89
+ globalEnabled: false,
90
+ activePositionCount: 0,
91
+ assetConfigs: [],
92
+ pairConfigs: [],
93
+ };
@@ -98,6 +98,90 @@ class TriggersAndPortalLensService {
98
98
  const result = await this.contract.getOnBehalfTradingTokenConfigs(onBehalfTrading, tokens, { ...callOptions });
99
99
  return (0, ethersTypes_1.ethersStructResponseToArray)(result, ITriggersAndPortalLensService_1.EMPTY_ON_BEHALF_TRADING_TOKEN_CONFIG);
100
100
  }
101
+ async getPositionSkewStatuses(skewIncentive, positionIds, callOptions) {
102
+ const result = await this.contract.getPositionSkewStatuses(skewIncentive, positionIds, { ...callOptions });
103
+ const baseArray = (0, ethersTypes_1.ethersStructResponseToArray)(result, ITriggersAndPortalLensService_1.EMPTY_POSITION_SKEW_STATUS);
104
+ return baseArray.map(item => ({
105
+ ...item,
106
+ incentiveRate: Number(item.incentiveRate),
107
+ openTimestamp: Number(item.openTimestamp),
108
+ }));
109
+ }
110
+ async getSkewIncentiveAssetConfig(skewIncentive, settlementAsset, callOptions) {
111
+ const result = await this.contract.getSkewIncentiveAssetConfig(skewIncentive, settlementAsset, { ...callOptions });
112
+ const baseStruct = (0, ethersTypes_1.ethersStructResponseToObject)(result, ITriggersAndPortalLensService_1.EMPTY_SKEW_INCENTIVE_ASSET_CONFIG);
113
+ return {
114
+ ...baseStruct,
115
+ skewThreshold: Number(baseStruct.skewThreshold),
116
+ incentiveRate: Number(baseStruct.incentiveRate),
117
+ minHoldingTime: Number(baseStruct.minHoldingTime),
118
+ };
119
+ }
120
+ async getSkewIncentiveAssetConfigs(skewIncentive, settlementAssets, callOptions) {
121
+ const result = await this.contract.getSkewIncentiveAssetConfigs(skewIncentive, settlementAssets, { ...callOptions });
122
+ const baseArray = (0, ethersTypes_1.ethersStructResponseToArray)(result, ITriggersAndPortalLensService_1.EMPTY_SKEW_INCENTIVE_ASSET_CONFIG);
123
+ return baseArray.map(item => ({
124
+ ...item,
125
+ skewThreshold: Number(item.skewThreshold),
126
+ incentiveRate: Number(item.incentiveRate),
127
+ minHoldingTime: Number(item.minHoldingTime),
128
+ }));
129
+ }
130
+ async getSkewIncentiveGlobalConfig(skewIncentive, callOptions) {
131
+ const result = await this.contract.getSkewIncentiveGlobalConfig(skewIncentive, { ...callOptions });
132
+ const baseStruct = (0, ethersTypes_1.ethersStructResponseToObject)(result, ITriggersAndPortalLensService_1.EMPTY_SKEW_INCENTIVE_GLOBAL_CONFIG);
133
+ return {
134
+ ...baseStruct,
135
+ activePositionCount: Number(baseStruct.activePositionCount),
136
+ configuredSettlementAssetCount: Number(baseStruct.configuredSettlementAssetCount),
137
+ };
138
+ }
139
+ async getSkewIncentivePairConfig(skewIncentive, settlementAsset, pairId, callOptions) {
140
+ const result = await this.contract.getSkewIncentivePairConfig(skewIncentive, settlementAsset, BigInt(pairId), { ...callOptions });
141
+ const baseStruct = (0, ethersTypes_1.ethersStructResponseToObject)(result, ITriggersAndPortalLensService_1.EMPTY_SKEW_INCENTIVE_PAIR_CONFIG);
142
+ return {
143
+ ...baseStruct,
144
+ pairId: Number(baseStruct.pairId),
145
+ skewThreshold: Number(baseStruct.skewThreshold),
146
+ incentiveRate: Number(baseStruct.incentiveRate),
147
+ minHoldingTime: Number(baseStruct.minHoldingTime),
148
+ };
149
+ }
150
+ async getSkewIncentivePairConfigs(skewIncentive, settlementAsset, pairIds, callOptions) {
151
+ const result = await this.contract.getSkewIncentivePairConfigs(skewIncentive, settlementAsset, pairIds.map(id => BigInt(id)), { ...callOptions });
152
+ const baseArray = (0, ethersTypes_1.ethersStructResponseToArray)(result, ITriggersAndPortalLensService_1.EMPTY_SKEW_INCENTIVE_PAIR_CONFIG);
153
+ return baseArray.map(item => ({
154
+ ...item,
155
+ pairId: Number(item.pairId),
156
+ skewThreshold: Number(item.skewThreshold),
157
+ incentiveRate: Number(item.incentiveRate),
158
+ minHoldingTime: Number(item.minHoldingTime),
159
+ }));
160
+ }
161
+ async getSkewIncentiveFullConfig(skewIncentive, callOptions) {
162
+ const result = await this.contract.getSkewIncentiveFullConfig(skewIncentive, { ...callOptions });
163
+ const baseStruct = (0, ethersTypes_1.ethersStructResponseToObject)(result, ITriggersAndPortalLensService_1.EMPTY_SKEW_INCENTIVE_FULL_CONFIG, {
164
+ assetConfigs: ITriggersAndPortalLensService_1.EMPTY_SKEW_INCENTIVE_ASSET_CONFIG,
165
+ pairConfigs: ITriggersAndPortalLensService_1.EMPTY_SKEW_INCENTIVE_PAIR_CONFIG,
166
+ });
167
+ return {
168
+ ...baseStruct,
169
+ activePositionCount: Number(baseStruct.activePositionCount),
170
+ assetConfigs: baseStruct.assetConfigs.map(item => ({
171
+ ...item,
172
+ skewThreshold: Number(item.skewThreshold),
173
+ incentiveRate: Number(item.incentiveRate),
174
+ minHoldingTime: Number(item.minHoldingTime),
175
+ })),
176
+ pairConfigs: baseStruct.pairConfigs.map(item => ({
177
+ ...item,
178
+ pairId: Number(item.pairId),
179
+ skewThreshold: Number(item.skewThreshold),
180
+ incentiveRate: Number(item.incentiveRate),
181
+ minHoldingTime: Number(item.minHoldingTime),
182
+ })),
183
+ };
184
+ }
101
185
  getContract() {
102
186
  return this.contract;
103
187
  }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });