@sonarwatch/portfolio-plugins 0.12.36 → 0.12.38

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. package/CHANGELOG.md +1847 -1839
  2. package/README.md +3 -3
  3. package/package.json +1 -1
  4. package/src/plugins/allbridge/constants.d.ts +0 -1
  5. package/src/plugins/allbridge/constants.js +1 -2
  6. package/src/plugins/allbridge/constants.js.map +1 -1
  7. package/src/plugins/allbridge/positionsFetcher.js +6 -2
  8. package/src/plugins/allbridge/positionsFetcher.js.map +1 -1
  9. package/src/plugins/balancer/helpers/pools.js +21 -21
  10. package/src/plugins/banx/constants.d.ts +0 -1
  11. package/src/plugins/banx/constants.js +1 -2
  12. package/src/plugins/banx/constants.js.map +1 -1
  13. package/src/plugins/banx/idl.d.ts +15 -7
  14. package/src/plugins/banx/idl.js +199 -268
  15. package/src/plugins/banx/idl.js.map +1 -1
  16. package/src/plugins/banx/loansFetcher.js +19 -23
  17. package/src/plugins/banx/loansFetcher.js.map +1 -1
  18. package/src/plugins/banx/offersFetcher.js +10 -15
  19. package/src/plugins/banx/offersFetcher.js.map +1 -1
  20. package/src/plugins/citrus/collectionsJob.js.map +1 -1
  21. package/src/plugins/citrus/constants.d.ts +0 -1
  22. package/src/plugins/citrus/constants.js +1 -2
  23. package/src/plugins/citrus/constants.js.map +1 -1
  24. package/src/plugins/citrus/loansFetcher.js +14 -20
  25. package/src/plugins/citrus/loansFetcher.js.map +1 -1
  26. package/src/plugins/drift/constants.d.ts +1 -0
  27. package/src/plugins/drift/constants.js +2 -1
  28. package/src/plugins/drift/constants.js.map +1 -1
  29. package/src/plugins/drift/depositsFetcher.js +63 -1
  30. package/src/plugins/drift/depositsFetcher.js.map +1 -1
  31. package/src/plugins/drift/filters.d.ts +1 -0
  32. package/src/plugins/drift/filters.js +4 -1
  33. package/src/plugins/drift/filters.js.map +1 -1
  34. package/src/plugins/drift/index.js +2 -1
  35. package/src/plugins/drift/index.js.map +1 -1
  36. package/src/plugins/drift/perpHelpers/amm.d.ts +74 -0
  37. package/src/plugins/drift/perpHelpers/amm.js +567 -0
  38. package/src/plugins/drift/perpHelpers/amm.js.map +1 -0
  39. package/src/plugins/drift/perpHelpers/assert.d.ts +1 -0
  40. package/src/plugins/drift/perpHelpers/assert.js +10 -0
  41. package/src/plugins/drift/perpHelpers/assert.js.map +1 -0
  42. package/src/plugins/drift/perpHelpers/constants.d.ts +27 -0
  43. package/src/plugins/drift/perpHelpers/constants.js +35 -0
  44. package/src/plugins/drift/perpHelpers/constants.js.map +1 -0
  45. package/src/plugins/drift/perpHelpers/convert.d.ts +0 -0
  46. package/src/plugins/drift/perpHelpers/convert.js +2 -0
  47. package/src/plugins/drift/perpHelpers/convert.js.map +1 -0
  48. package/src/plugins/drift/perpHelpers/getOraclePrice.d.ts +4 -0
  49. package/src/plugins/drift/perpHelpers/getOraclePrice.js +61 -0
  50. package/src/plugins/drift/perpHelpers/getOraclePrice.js.map +1 -0
  51. package/src/plugins/drift/perpHelpers/getPerpMarket.d.ts +4 -0
  52. package/src/plugins/drift/perpHelpers/getPerpMarket.js +33 -0
  53. package/src/plugins/drift/perpHelpers/getPerpMarket.js.map +1 -0
  54. package/src/plugins/drift/perpHelpers/margin.d.ts +10 -0
  55. package/src/plugins/drift/perpHelpers/margin.js +82 -0
  56. package/src/plugins/drift/perpHelpers/margin.js.map +1 -0
  57. package/src/plugins/drift/perpHelpers/math.d.ts +4 -0
  58. package/src/plugins/drift/perpHelpers/math.js +29 -0
  59. package/src/plugins/drift/perpHelpers/math.js.map +1 -0
  60. package/src/plugins/drift/perpHelpers/oracle.d.ts +6 -0
  61. package/src/plugins/drift/perpHelpers/oracle.js +54 -0
  62. package/src/plugins/drift/perpHelpers/oracle.js.map +1 -0
  63. package/src/plugins/drift/perpHelpers/orders.d.ts +2 -0
  64. package/src/plugins/drift/perpHelpers/orders.js +9 -0
  65. package/src/plugins/drift/perpHelpers/orders.js.map +1 -0
  66. package/src/plugins/drift/perpHelpers/position.d.ts +44 -0
  67. package/src/plugins/drift/perpHelpers/position.js +184 -0
  68. package/src/plugins/drift/perpHelpers/position.js.map +1 -0
  69. package/src/plugins/drift/perpHelpers/prelaunchOracle.d.ts +3 -0
  70. package/src/plugins/drift/perpHelpers/prelaunchOracle.js +20 -0
  71. package/src/plugins/drift/perpHelpers/prelaunchOracle.js.map +1 -0
  72. package/src/plugins/drift/perpHelpers/pyth.d.ts +5 -0
  73. package/src/plugins/drift/perpHelpers/pyth.js +42 -0
  74. package/src/plugins/drift/perpHelpers/pyth.js.map +1 -0
  75. package/src/plugins/drift/perpHelpers/repeg.d.ts +14 -0
  76. package/src/plugins/drift/perpHelpers/repeg.js +162 -0
  77. package/src/plugins/drift/perpHelpers/repeg.js.map +1 -0
  78. package/src/plugins/drift/perpHelpers/switchboard.d.ts +3 -0
  79. package/src/plugins/drift/perpHelpers/switchboard.js +31 -0
  80. package/src/plugins/drift/perpHelpers/switchboard.js.map +1 -0
  81. package/src/plugins/drift/perpHelpers/types.d.ts +28 -0
  82. package/src/plugins/drift/perpHelpers/types.js +19 -0
  83. package/src/plugins/drift/perpHelpers/types.js.map +1 -0
  84. package/src/plugins/drift/prepMarketsJob.d.ts +3 -0
  85. package/src/plugins/drift/prepMarketsJob.js +38 -0
  86. package/src/plugins/drift/prepMarketsJob.js.map +1 -0
  87. package/src/plugins/drift/struct.d.ts +82 -76
  88. package/src/plugins/drift/struct.js +79 -74
  89. package/src/plugins/drift/struct.js.map +1 -1
  90. package/src/plugins/drift/types.d.ts +1 -0
  91. package/src/plugins/jupiter/exchange/constants.d.ts +1 -0
  92. package/src/plugins/jupiter/exchange/constants.js +2 -1
  93. package/src/plugins/jupiter/exchange/constants.js.map +1 -1
  94. package/src/plugins/jupiter/exchange/limitFetcher.js +9 -6
  95. package/src/plugins/jupiter/exchange/limitFetcher.js.map +1 -1
  96. package/src/plugins/jupiter/exchange/perpetualFetcher.js +3 -6
  97. package/src/plugins/jupiter/exchange/perpetualFetcher.js.map +1 -1
  98. package/src/plugins/jupiter/exchange/structs.d.ts +21 -0
  99. package/src/plugins/jupiter/exchange/structs.js +21 -1
  100. package/src/plugins/jupiter/exchange/structs.js.map +1 -1
  101. package/src/plugins/jupiter/exchange/valueAverageFetcher.js.map +1 -1
  102. package/src/plugins/jupiter/helpers.d.ts +2 -2
  103. package/src/plugins/jupiter/helpers.js.map +1 -1
  104. package/src/plugins/rain/collectionsJob.js +6 -10
  105. package/src/plugins/rain/collectionsJob.js.map +1 -1
  106. package/src/plugins/rain/helpers.js +3 -1
  107. package/src/plugins/rain/helpers.js.map +1 -1
  108. package/src/plugins/rain/index.js +2 -1
  109. package/src/plugins/rain/index.js.map +1 -1
  110. package/src/plugins/rain/loansFetcher.js +60 -25
  111. package/src/plugins/rain/loansFetcher.js.map +1 -1
  112. package/src/plugins/rain/types.d.ts +3 -0
  113. package/src/plugins/sharky/constants.d.ts +0 -1
  114. package/src/plugins/sharky/constants.js +3 -4
  115. package/src/plugins/sharky/constants.js.map +1 -1
  116. package/src/plugins/sharky/loansFetcher.js +17 -20
  117. package/src/plugins/sharky/loansFetcher.js.map +1 -1
  118. package/src/plugins/sushiswap/helpers.js +24 -24
  119. package/src/plugins/uniswap-v2/helpers.js +22 -22
  120. package/src/plugins/zeta/airdropFetcher.js +14 -14
  121. package/src/utils/misc/MemoizedCache.d.ts +12 -0
  122. package/src/utils/misc/MemoizedCache.js +35 -0
  123. package/src/utils/misc/MemoizedCache.js.map +1 -0
  124. package/src/utils/misc/arrayToMap.d.ts +1 -0
  125. package/src/utils/misc/arrayToMap.js +12 -0
  126. package/src/utils/misc/arrayToMap.js.map +1 -0
  127. package/src/utils/misc/pick.d.ts +2 -0
  128. package/src/utils/misc/pick.js +16 -0
  129. package/src/utils/misc/pick.js.map +1 -0
  130. package/src/utils/sei/constants.js +8 -8
  131. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
  132. package/src/utils/solana/getAutoParsedMultipleAccountsInfo.js +8 -3
  133. package/src/utils/solana/getAutoParsedMultipleAccountsInfo.js.map +1 -1
  134. package/src/plugins/allbridge/getPoolInfo.d.ts +0 -3
  135. package/src/plugins/allbridge/getPoolInfo.js +0 -28
  136. package/src/plugins/allbridge/getPoolInfo.js.map +0 -1
@@ -2,6 +2,7 @@
2
2
  import { BeetStruct } from '@metaplex-foundation/beet';
3
3
  import { PublicKey } from '@solana/web3.js';
4
4
  import BigNumber from 'bignumber.js';
5
+ import BN from 'bn.js';
5
6
  export declare enum OrderTriggerCondition {
6
7
  Above = 0,
7
8
  Below = 1,
@@ -62,7 +63,12 @@ export declare enum OracleSource {
62
63
  QuoteAsset = 2,
63
64
  Pyth1K = 3,
64
65
  Pyth1M = 4,
65
- PythStableCoin = 5
66
+ PythStableCoin = 5,
67
+ Prelaunch = 6,
68
+ PythPull = 7,
69
+ Pyth1KPull = 8,
70
+ Pyth1MPull = 9,
71
+ PythStableCoinPull = 10
66
72
  }
67
73
  export declare enum ContractType {
68
74
  Perpetual = 0,
@@ -103,18 +109,18 @@ export type Order = {
103
109
  };
104
110
  export declare const orderStruct: BeetStruct<Order, Partial<Order>>;
105
111
  export type PerpPosition = {
106
- lastCumulativeFundingRate: BigNumber;
107
- baseAssetAmount: BigNumber;
108
- quoteAssetAmount: BigNumber;
109
- quoteBreakEvenAmount: BigNumber;
110
- quoteEntryAmount: BigNumber;
111
- openBids: BigNumber;
112
- openAsks: BigNumber;
113
- settledPnl: BigNumber;
114
- lpShares: BigNumber;
115
- lastBaseAssetAmountPerLp: BigNumber;
116
- lastQuoteAssetAmountPerLp: BigNumber;
117
- remainderBaseAssetAmount: BigNumber;
112
+ lastCumulativeFundingRate: BN;
113
+ baseAssetAmount: BN;
114
+ quoteAssetAmount: BN;
115
+ quoteBreakEvenAmount: BN;
116
+ quoteEntryAmount: BN;
117
+ openBids: BN;
118
+ openAsks: BN;
119
+ settledPnl: BN;
120
+ lpShares: BN;
121
+ lastBaseAssetAmountPerLp: BN;
122
+ lastQuoteAssetAmountPerLp: BN;
123
+ remainderBaseAssetAmount: BN;
118
124
  marketIndex: number;
119
125
  openOrders: number;
120
126
  padding: number[];
@@ -270,67 +276,67 @@ export declare const insuranceFundStakeStruct: BeetStruct<InsuranceFundStake, Pa
270
276
  export type AMM = {
271
277
  oracle: PublicKey;
272
278
  historicalOracleData: HistoricalOracleData;
273
- baseAssetAmountPerLp: BigNumber;
274
- quoteAssetAmountPerLp: BigNumber;
279
+ baseAssetAmountPerLp: BN;
280
+ quoteAssetAmountPerLp: BN;
275
281
  feePool: PoolBalance;
276
- baseAssetReserve: BigNumber;
277
- quoteAssetReserve: BigNumber;
278
- concentrationCoef: BigNumber;
279
- minBaseAssetReserve: BigNumber;
280
- maxBaseAssetReserve: BigNumber;
281
- sqrtK: BigNumber;
282
- pegMultiplier: BigNumber;
283
- terminalQuoteAssetReserve: BigNumber;
284
- baseAssetAmountLong: BigNumber;
285
- baseAssetAmountShort: BigNumber;
286
- baseAssetAmountWithAmm: BigNumber;
287
- baseAssetAmountWithUnsettledLp: BigNumber;
288
- maxOpenInterest: BigNumber;
289
- quoteAssetAmount: BigNumber;
290
- quoteEntryAmountLong: BigNumber;
291
- quoteEntryAmountShort: BigNumber;
292
- quoteBreakEvenAmountLong: BigNumber;
293
- quoteBreakEvenAmountShort: BigNumber;
294
- userLpShares: BigNumber;
295
- lastFundingRate: BigNumber;
296
- lastFundingRateLong: BigNumber;
297
- lastFundingRateShort: BigNumber;
298
- last24hAvgFundingRate: BigNumber;
299
- totalFee: BigNumber;
300
- totalMmFee: BigNumber;
301
- totalExchangeFee: BigNumber;
302
- totalFeeMinusDistributions: BigNumber;
303
- totalFeeWithdrawn: BigNumber;
304
- totalLiquidationFee: BigNumber;
305
- cumulativeFundingRateLong: BigNumber;
306
- cumulativeFundingRateShort: BigNumber;
307
- totalSocialLoss: BigNumber;
308
- askBaseAssetReserve: BigNumber;
309
- askQuoteAssetReserve: BigNumber;
310
- bidBaseAssetReserve: BigNumber;
311
- bidQuoteAssetReserve: BigNumber;
312
- lastOracleNormalisedPrice: BigNumber;
313
- lastOracleReservePriceSpreadPct: BigNumber;
314
- lastBidPriceTwap: BigNumber;
315
- lastAskPriceTwap: BigNumber;
316
- lastMarkPriceTwap: BigNumber;
317
- lastMarkPriceTwap5min: BigNumber;
318
- lastUpdateSlot: BigNumber;
319
- lastOracleConfPct: BigNumber;
320
- netRevenueSinceLastFunding: BigNumber;
321
- lastFundingRateTs: BigNumber;
322
- fundingPeriod: BigNumber;
323
- orderStepSize: BigNumber;
324
- orderTickSize: BigNumber;
325
- minOrderSize: BigNumber;
326
- maxPositionSize: BigNumber;
327
- volume24h: BigNumber;
328
- longIntensityVolume: BigNumber;
329
- shortIntensityVolume: BigNumber;
330
- lastTradeTs: BigNumber;
331
- markStd: BigNumber;
332
- oracleStd: BigNumber;
333
- lastMarkPriceTwapTs: BigNumber;
282
+ baseAssetReserve: BN;
283
+ quoteAssetReserve: BN;
284
+ concentrationCoef: BN;
285
+ minBaseAssetReserve: BN;
286
+ maxBaseAssetReserve: BN;
287
+ sqrtK: BN;
288
+ pegMultiplier: BN;
289
+ terminalQuoteAssetReserve: BN;
290
+ baseAssetAmountLong: BN;
291
+ baseAssetAmountShort: BN;
292
+ baseAssetAmountWithAmm: BN;
293
+ baseAssetAmountWithUnsettledLp: BN;
294
+ maxOpenInterest: BN;
295
+ quoteAssetAmount: BN;
296
+ quoteEntryAmountLong: BN;
297
+ quoteEntryAmountShort: BN;
298
+ quoteBreakEvenAmountLong: BN;
299
+ quoteBreakEvenAmountShort: BN;
300
+ userLpShares: BN;
301
+ lastFundingRate: BN;
302
+ lastFundingRateLong: BN;
303
+ lastFundingRateShort: BN;
304
+ last24HAvgFundingRate: BN;
305
+ totalFee: BN;
306
+ totalMmFee: BN;
307
+ totalExchangeFee: BN;
308
+ totalFeeMinusDistributions: BN;
309
+ totalFeeWithdrawn: BN;
310
+ totalLiquidationFee: BN;
311
+ cumulativeFundingRateLong: BN;
312
+ cumulativeFundingRateShort: BN;
313
+ totalSocialLoss: BN;
314
+ askBaseAssetReserve: BN;
315
+ askQuoteAssetReserve: BN;
316
+ bidBaseAssetReserve: BN;
317
+ bidQuoteAssetReserve: BN;
318
+ lastOracleNormalisedPrice: BN;
319
+ lastOracleReservePriceSpreadPct: BN;
320
+ lastBidPriceTwap: BN;
321
+ lastAskPriceTwap: BN;
322
+ lastMarkPriceTwap: BN;
323
+ lastMarkPriceTwap5Min: BN;
324
+ lastUpdateSlot: BN;
325
+ lastOracleConfPct: BN;
326
+ netRevenueSinceLastFunding: BN;
327
+ lastFundingRateTs: BN;
328
+ fundingPeriod: BN;
329
+ orderStepSize: BN;
330
+ orderTickSize: BN;
331
+ minOrderSize: BN;
332
+ maxPositionSize: BN;
333
+ volume24H: BN;
334
+ longIntensityVolume: BN;
335
+ shortIntensityVolume: BN;
336
+ lastTradeTs: BN;
337
+ markStd: BN;
338
+ oracleStd: BN;
339
+ lastMarkPriceTwapTs: BN;
334
340
  baseSpread: number;
335
341
  maxSpread: number;
336
342
  longSpread: number;
@@ -347,9 +353,9 @@ export type AMM = {
347
353
  perLpBase: number;
348
354
  padding1: number;
349
355
  padding2: number;
350
- totalFeeEarnedPerLp: BigNumber;
351
- netUnsettledFundingPnl: BigNumber;
352
- quoteAssetAmountWithUnsettledLp: BigNumber;
356
+ totalFeeEarnedPerLp: BN;
357
+ netUnsettledFundingPnl: BN;
358
+ quoteAssetAmountWithUnsettledLp: BN;
353
359
  referencePriceOffset: number;
354
360
  padding: number[];
355
361
  };
@@ -75,6 +75,11 @@ var OracleSource;
75
75
  OracleSource[OracleSource["Pyth1K"] = 3] = "Pyth1K";
76
76
  OracleSource[OracleSource["Pyth1M"] = 4] = "Pyth1M";
77
77
  OracleSource[OracleSource["PythStableCoin"] = 5] = "PythStableCoin";
78
+ OracleSource[OracleSource["Prelaunch"] = 6] = "Prelaunch";
79
+ OracleSource[OracleSource["PythPull"] = 7] = "PythPull";
80
+ OracleSource[OracleSource["Pyth1KPull"] = 8] = "Pyth1KPull";
81
+ OracleSource[OracleSource["Pyth1MPull"] = 9] = "Pyth1MPull";
82
+ OracleSource[OracleSource["PythStableCoinPull"] = 10] = "PythStableCoinPull";
78
83
  })(OracleSource || (exports.OracleSource = OracleSource = {}));
79
84
  var ContractType;
80
85
  (function (ContractType) {
@@ -116,17 +121,17 @@ exports.orderStruct = new beet_1.BeetStruct([
116
121
  ['padding', beet_1.u8],
117
122
  ], (args) => args);
118
123
  exports.perpPositionStruct = new beet_1.BeetStruct([
119
- ['lastCumulativeFundingRate', solana_1.i64],
120
- ['baseAssetAmount', solana_1.i64],
121
- ['quoteAssetAmount', solana_1.i64],
122
- ['quoteBreakEvenAmount', solana_1.i64],
123
- ['quoteEntryAmount', solana_1.i64],
124
- ['openBids', solana_1.i64],
125
- ['openAsks', solana_1.i64],
126
- ['settledPnl', solana_1.i64],
127
- ['lpShares', solana_1.u64],
128
- ['lastBaseAssetAmountPerLp', solana_1.i64],
129
- ['lastQuoteAssetAmountPerLp', solana_1.i64],
124
+ ['lastCumulativeFundingRate', beet_1.i64],
125
+ ['baseAssetAmount', beet_1.i64],
126
+ ['quoteAssetAmount', beet_1.i64],
127
+ ['quoteBreakEvenAmount', beet_1.i64],
128
+ ['quoteEntryAmount', beet_1.i64],
129
+ ['openBids', beet_1.i64],
130
+ ['openAsks', beet_1.i64],
131
+ ['settledPnl', beet_1.i64],
132
+ ['lpShares', beet_1.u64],
133
+ ['lastBaseAssetAmountPerLp', beet_1.i64],
134
+ ['lastQuoteAssetAmountPerLp', beet_1.i64],
130
135
  ['remainderBaseAssetAmount', beet_1.i32],
131
136
  ['marketIndex', beet_1.u16],
132
137
  ['openOrders', beet_1.u8],
@@ -274,67 +279,67 @@ exports.insuranceFundStakeStruct = new beet_1.BeetStruct([
274
279
  exports.ammStruct = new beet_1.BeetStruct([
275
280
  ['oracle', beet_solana_1.publicKey],
276
281
  ['historicalOracleData', exports.historicalOracleDataStruct],
277
- ['baseAssetAmountPerLp', solana_1.i128],
278
- ['quoteAssetAmountPerLp', solana_1.i128],
282
+ ['baseAssetAmountPerLp', beet_1.i128],
283
+ ['quoteAssetAmountPerLp', beet_1.i128],
279
284
  ['feePool', exports.poolBalanceStruct],
280
- ['baseAssetReserve', solana_1.u128],
281
- ['quoteAssetReserve', solana_1.u128],
282
- ['concentrationCoef', solana_1.u128],
283
- ['minBaseAssetReserve', solana_1.u128],
284
- ['maxBaseAssetReserve', solana_1.u128],
285
- ['sqrtK', solana_1.u128],
286
- ['pegMultiplier', solana_1.u128],
287
- ['terminalQuoteAssetReserve', solana_1.u128],
288
- ['baseAssetAmountLong', solana_1.i128],
289
- ['baseAssetAmountShort', solana_1.i128],
290
- ['baseAssetAmountWithAmm', solana_1.i128],
291
- ['baseAssetAmountWithUnsettledLp', solana_1.i128],
292
- ['maxOpenInterest', solana_1.u128],
293
- ['quoteAssetAmount', solana_1.i128],
294
- ['quoteEntryAmountLong', solana_1.i128],
295
- ['quoteEntryAmountShort', solana_1.i128],
296
- ['quoteBreakEvenAmountLong', solana_1.i128],
297
- ['quoteBreakEvenAmountShort', solana_1.i128],
298
- ['userLpShares', solana_1.u128],
299
- ['lastFundingRate', solana_1.i64],
300
- ['lastFundingRateLong', solana_1.i64],
301
- ['lastFundingRateShort', solana_1.i64],
302
- ['last24hAvgFundingRate', solana_1.i64],
303
- ['totalFee', solana_1.i128],
304
- ['totalMmFee', solana_1.i128],
305
- ['totalExchangeFee', solana_1.u128],
306
- ['totalFeeMinusDistributions', solana_1.i128],
307
- ['totalFeeWithdrawn', solana_1.u128],
308
- ['totalLiquidationFee', solana_1.u128],
309
- ['cumulativeFundingRateLong', solana_1.i128],
310
- ['cumulativeFundingRateShort', solana_1.i128],
311
- ['totalSocialLoss', solana_1.u128],
312
- ['askBaseAssetReserve', solana_1.u128],
313
- ['askQuoteAssetReserve', solana_1.u128],
314
- ['bidBaseAssetReserve', solana_1.u128],
315
- ['bidQuoteAssetReserve', solana_1.u128],
316
- ['lastOracleNormalisedPrice', solana_1.i64],
317
- ['lastOracleReservePriceSpreadPct', solana_1.i64],
318
- ['lastBidPriceTwap', solana_1.u64],
319
- ['lastAskPriceTwap', solana_1.u64],
320
- ['lastMarkPriceTwap', solana_1.u64],
321
- ['lastMarkPriceTwap5min', solana_1.u64],
322
- ['lastUpdateSlot', solana_1.u64],
323
- ['lastOracleConfPct', solana_1.u64],
324
- ['netRevenueSinceLastFunding', solana_1.i64],
325
- ['lastFundingRateTs', solana_1.i64],
326
- ['fundingPeriod', solana_1.i64],
327
- ['orderStepSize', solana_1.u64],
328
- ['orderTickSize', solana_1.u64],
329
- ['minOrderSize', solana_1.u64],
330
- ['maxPositionSize', solana_1.u64],
331
- ['volume24h', solana_1.u64],
332
- ['longIntensityVolume', solana_1.u64],
333
- ['shortIntensityVolume', solana_1.u64],
334
- ['lastTradeTs', solana_1.i64],
335
- ['markStd', solana_1.u64],
336
- ['oracleStd', solana_1.u64],
337
- ['lastMarkPriceTwapTs', solana_1.i64],
285
+ ['baseAssetReserve', beet_1.u128],
286
+ ['quoteAssetReserve', beet_1.u128],
287
+ ['concentrationCoef', beet_1.u128],
288
+ ['minBaseAssetReserve', beet_1.u128],
289
+ ['maxBaseAssetReserve', beet_1.u128],
290
+ ['sqrtK', beet_1.u128],
291
+ ['pegMultiplier', beet_1.u128],
292
+ ['terminalQuoteAssetReserve', beet_1.u128],
293
+ ['baseAssetAmountLong', beet_1.i128],
294
+ ['baseAssetAmountShort', beet_1.i128],
295
+ ['baseAssetAmountWithAmm', beet_1.i128],
296
+ ['baseAssetAmountWithUnsettledLp', beet_1.i128],
297
+ ['maxOpenInterest', beet_1.u128],
298
+ ['quoteAssetAmount', beet_1.i128],
299
+ ['quoteEntryAmountLong', beet_1.i128],
300
+ ['quoteEntryAmountShort', beet_1.i128],
301
+ ['quoteBreakEvenAmountLong', beet_1.i128],
302
+ ['quoteBreakEvenAmountShort', beet_1.i128],
303
+ ['userLpShares', beet_1.u128],
304
+ ['lastFundingRate', beet_1.i64],
305
+ ['lastFundingRateLong', beet_1.i64],
306
+ ['lastFundingRateShort', beet_1.i64],
307
+ ['last24HAvgFundingRate', beet_1.i64],
308
+ ['totalFee', beet_1.i128],
309
+ ['totalMmFee', beet_1.i128],
310
+ ['totalExchangeFee', beet_1.u128],
311
+ ['totalFeeMinusDistributions', beet_1.i128],
312
+ ['totalFeeWithdrawn', beet_1.u128],
313
+ ['totalLiquidationFee', beet_1.u128],
314
+ ['cumulativeFundingRateLong', beet_1.i128],
315
+ ['cumulativeFundingRateShort', beet_1.i128],
316
+ ['totalSocialLoss', beet_1.u128],
317
+ ['askBaseAssetReserve', beet_1.u128],
318
+ ['askQuoteAssetReserve', beet_1.u128],
319
+ ['bidBaseAssetReserve', beet_1.u128],
320
+ ['bidQuoteAssetReserve', beet_1.u128],
321
+ ['lastOracleNormalisedPrice', beet_1.i64],
322
+ ['lastOracleReservePriceSpreadPct', beet_1.i64],
323
+ ['lastBidPriceTwap', beet_1.u64],
324
+ ['lastAskPriceTwap', beet_1.u64],
325
+ ['lastMarkPriceTwap', beet_1.u64],
326
+ ['lastMarkPriceTwap5Min', beet_1.u64],
327
+ ['lastUpdateSlot', beet_1.u64],
328
+ ['lastOracleConfPct', beet_1.u64],
329
+ ['netRevenueSinceLastFunding', beet_1.i64],
330
+ ['lastFundingRateTs', beet_1.i64],
331
+ ['fundingPeriod', beet_1.i64],
332
+ ['orderStepSize', beet_1.u64],
333
+ ['orderTickSize', beet_1.u64],
334
+ ['minOrderSize', beet_1.u64],
335
+ ['maxPositionSize', beet_1.u64],
336
+ ['volume24H', beet_1.u64],
337
+ ['longIntensityVolume', beet_1.u64],
338
+ ['shortIntensityVolume', beet_1.u64],
339
+ ['lastTradeTs', beet_1.i64],
340
+ ['markStd', beet_1.u64],
341
+ ['oracleStd', beet_1.u64],
342
+ ['lastMarkPriceTwapTs', beet_1.i64],
338
343
  ['baseSpread', beet_1.u32],
339
344
  ['maxSpread', beet_1.u32],
340
345
  ['longSpread', beet_1.u32],
@@ -351,9 +356,9 @@ exports.ammStruct = new beet_1.BeetStruct([
351
356
  ['perLpBase', beet_1.i8],
352
357
  ['padding1', beet_1.u8],
353
358
  ['padding2', beet_1.u16],
354
- ['totalFeeEarnedPerLp', solana_1.u64],
355
- ['netUnsettledFundingPnl', solana_1.i64],
356
- ['quoteAssetAmountWithUnsettledLp', solana_1.i64],
359
+ ['totalFeeEarnedPerLp', beet_1.u64],
360
+ ['netUnsettledFundingPnl', beet_1.i64],
361
+ ['quoteAssetAmountWithUnsettledLp', beet_1.i64],
357
362
  ['referencePriceOffset', beet_1.i32],
358
363
  ['padding', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 12)],
359
364
  ], (args) => args);
@@ -1 +1 @@
1
- {"version":3,"file":"struct.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift/struct.ts"],"names":[],"mappings":";;;AAAA,oDAUmC;AACnC,kEAA6D;AAG7D,+CAAgE;AAEhE,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC/B,mEAAK,CAAA;IACL,mEAAK,CAAA;IACL,qFAAc,CAAA;IACd,qFAAc,CAAA;AAChB,CAAC,EALW,qBAAqB,qCAArB,qBAAqB,QAKhC;AAED,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,yDAAI,CAAA;IACJ,2DAAK,CAAA;AACP,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B;AAED,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,2CAAI,CAAA;IACJ,2CAAI,CAAA;AACN,CAAC,EAHW,UAAU,0BAAV,UAAU,QAGrB;AAED,IAAY,SAMX;AAND,WAAY,SAAS;IACnB,6CAAM,CAAA;IACN,2CAAK,CAAA;IACL,2DAAa,CAAA;IACb,yDAAY,CAAA;IACZ,6CAAM,CAAA;AACR,CAAC,EANW,SAAS,yBAAT,SAAS,QAMpB;AAED,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,6CAAI,CAAA;IACJ,6CAAI,CAAA;IACJ,iDAAM,CAAA;IACN,qDAAQ,CAAA;AACV,C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AAE,SAAE,CAAC;IACd,CAAC,cAAc,EAAE,SAAE,CAAC;IACpB,CAAC,cAAc,EAAE,SAAE,CAAC;IACpB,CAAC,kBAAkB,EAAE,SAAE,CAAC;IACxB,CAAC,sBAAsB,EAAE,UAAG,CAAC;IAC7B,CAAC,eAAe,EAAE,UAAG,CAAC;IACtB,CAAC,SAAS,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,EAAE,CAAC,CAAC;CAC3C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAkB,CAC7B,CAAC;AAaW,QAAA,qBAAqB,GAAG,IAAI,iBAAU,CACjD;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,OAAO,EAAE,YAAG,CAAC;IACd,CAAC,UAAU,EAAE,YAAG,CAAC;IACjB,CAAC,YAAY,EAAE,YAAG,CAAC;IACnB,CAAC,gBAAgB,EAAE,YAAG,CAAC;IACvB,CAAC,mBAAmB,EAAE,YAAG,CAAC;IAC1B,CAAC,iBAAiB,EAAE,UAAG,CAAC;IACxB,CAAC,SAAS,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,EAAE,CAAC,CAAC;CAC3C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAuB,CAClC,CAAC"}
1
+ {"version":3,"file":"struct.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift/struct.ts"],"names":[],"mappings":";;;AAAA,oDAcmC;AACnC,kEAA6D;AAI7D,+CAA0D;AAE1D,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC/B,mEAAK,CAAA;IACL,mEAAK,CAAA;IACL,qFAAc,CAAA;IACd,qFAAc,CAAA;AAChB,CAAC,EALW,qBAAqB,qCAArB,qBAAqB,QAKhC;AAED,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,yDAAI,CAAA;IACJ,2DAAK,CAAA;AACP,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B;A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C,CAAC;CAC3C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAuB,CAClC,CAAC"}
@@ -23,3 +23,4 @@ export type AirdropInfo = {
23
23
  merkle: string;
24
24
  amount: number;
25
25
  };
26
+ export type PerpMarketIndexes = Array<[number, string]>;
@@ -5,6 +5,7 @@ export declare const platform: Platform;
5
5
  export declare const perpsProgramId: PublicKey;
6
6
  export declare const valueAverageProgramId: PublicKey;
7
7
  export declare const limitProgramId: PublicKey;
8
+ export declare const limitV2ProgramId: PublicKey;
8
9
  export declare const dcaProgramId: PublicKey;
9
10
  export declare const jlpPool: PublicKey;
10
11
  export declare const jlpToken: PublicKey;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.perpPoolsKey = exports.custodiesKey = exports.jlpToken = exports.jlpPool = exports.dcaProgramId = exports.limitProgramId = exports.valueAverageProgramId = exports.perpsProgramId = exports.platform = exports.platformId = void 0;
3
+ exports.perpPoolsKey = exports.custodiesKey = exports.jlpToken = exports.jlpPool = exports.dcaProgramId = exports.limitV2ProgramId = exports.limitProgramId = exports.valueAverageProgramId = exports.perpsProgramId = exports.platform = exports.platformId = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
5
  exports.platformId = 'jupiter-exchange';
6
6
  exports.platform = {
@@ -14,6 +14,7 @@ exports.platform = {
14
14
  exports.perpsProgramId = new web3_js_1.PublicKey('PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu');
15
15
  exports.valueAverageProgramId = new web3_js_1.PublicKey('JVAp1DSLnM4Qh8qM1QasQ8x56ccb9S3DhbyEckybTF9');
16
16
  exports.limitProgramId = new web3_js_1.PublicKey('jupoNjAxXgZ4rjzxzPMP4oxduvQsQtZzyknqvzYNrNu');
17
+ exports.limitV2ProgramId = new web3_js_1.PublicKey('j1o2qRpjcyUwEvwtcfhEQefh773ZgjxcVRry7LDqg5X');
17
18
  exports.dcaProgramId = new web3_js_1.PublicKey('DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M');
18
19
  exports.jlpPool = new web3_js_1.PublicKey('5BUwFW4nRbftYTDMbgxykoFWqWHPzahFSNAaaaJtVKsq');
19
20
  exports.jlpToken = new web3_js_1.PublicKey('27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4');
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAI/B,QAAA,UAAU,GAAG,kBAAkB,CAAC;AAChC,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,kBAAkB;IACxB,KAAK,EAAE,+CAA+C;IACtD,WAAW,EAAE,gBAAgB;IAC7B,OAAO,EAAE,iBAAiB;IAC1B,OAAO,EAAE,qCAAqC;CAC/C,CAAC;AAEW,QAAA,cAAc,GAAG,IAAI,mBAAS,CACzC,6CAA6C,CAC9C,CAAC;AACW,QAAA,qBAAqB,GAAG,IAAI,mBAAS,CAChD,6CAA6C,CAC9C,CAAC;AACW,QAAA,cAAc,GAAG,IAAI,mBAAS,CACzC,6CAA6C,CAC9C,CAAC;AACW,QAAA,YAAY,GAAG,IAAI,mBAAS,CACvC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,OAAO,GAAG,IAAI,mBAAS,CAClC,8CAA8C,CAC/C,CAAC;AACW,QAAA,QAAQ,GAAG,IAAI,mBAAS,CACnC,8CAA8C,CAC/C,CAAC;AACW,QAAA,YAAY,GAAG,WAAW,CAAC;AAC3B,QAAA,YAAY,GAAG,WAAW,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAI/B,QAAA,UAAU,GAAG,kBAAkB,CAAC;AAChC,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,kBAAkB;IACxB,KAAK,EAAE,+CAA+C;IACtD,WAAW,EAAE,gBAAgB;IAC7B,OAAO,EAAE,iBAAiB;IAC1B,OAAO,EAAE,qCAAqC;CAC/C,CAAC;AAEW,QAAA,cAAc,GAAG,IAAI,mBAAS,CACzC,6CAA6C,CAC9C,CAAC;AACW,QAAA,qBAAqB,GAAG,IAAI,mBAAS,CAChD,6CAA6C,CAC9C,CAAC;AACW,QAAA,cAAc,GAAG,IAAI,mBAAS,CACzC,6CAA6C,CAC9C,CAAC;AACW,QAAA,gBAAgB,GAAG,IAAI,mBAAS,CAC3C,6CAA6C,CAC9C,CAAC;AACW,QAAA,YAAY,GAAG,IAAI,mBAAS,CACvC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,OAAO,GAAG,IAAI,mBAAS,CAClC,8CAA8C,CAC/C,CAAC;AACW,QAAA,QAAQ,GAAG,IAAI,mBAAS,CACnC,8CAA8C,CAC/C,CAAC;AACW,QAAA,YAAY,GAAG,WAAW,CAAC;AAC3B,QAAA,YAAY,GAAG,WAAW,CAAC"}
@@ -21,15 +21,18 @@ const structs_1 = require("./structs");
21
21
  const filters_1 = require("./filters");
22
22
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
23
23
  const client = (0, clients_1.getClientSolana)();
24
- const limitOrdersAccounts = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.limitOrderStruct, constants_1.limitProgramId, (0, filters_1.limitFilters)(owner));
25
- if (limitOrdersAccounts.length === 0)
24
+ const allAccounts = (yield Promise.all([
25
+ (0, solana_1.getParsedProgramAccounts)(client, structs_1.limitOrderStruct, constants_1.limitProgramId, (0, filters_1.limitFilters)(owner)),
26
+ (0, solana_1.getParsedProgramAccounts)(client, structs_1.limitOrderV2Struct, constants_1.limitV2ProgramId, (0, filters_1.limitFilters)(owner)),
27
+ ])).flat();
28
+ if (allAccounts.length === 0)
26
29
  return [];
27
30
  const mints = new Set();
28
- limitOrdersAccounts.forEach((account) => mints.add(account.inputMint.toString()));
31
+ allAccounts.forEach((account) => mints.add(account.inputMint.toString()));
29
32
  const tokenPriceById = yield cache.getTokenPricesAsMap(Array.from(mints), portfolio_core_1.NetworkId.solana);
30
33
  const rawAmountByMint = new Map();
31
- for (let i = 0; i < limitOrdersAccounts.length; i += 1) {
32
- const limOrder = limitOrdersAccounts[i];
34
+ for (let i = 0; i < allAccounts.length; i += 1) {
35
+ const limOrder = allAccounts[i];
33
36
  const mint = limOrder.inputMint.toString();
34
37
  const amountLeftInOrder = limOrder.makingAmount;
35
38
  const totalAmount = rawAmountByMint.get(mint);
@@ -56,7 +59,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
56
59
  platformId: constants_1.platformId,
57
60
  value,
58
61
  label: 'Deposit',
59
- name: `Limit Orders (${limitOrdersAccounts.length})`,
62
+ name: `Limit Orders (${allAccounts.length})`,
60
63
  data: { assets },
61
64
  };
62
65
  return [element];
@@ -1 +1 @@
1
- {"version":3,"file":"limitFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/limitFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AAIpC,oDAAyD;AACzD,kDAAiE;AACjE,wGAAgF;AAChF,2CAAyD;AACzD,uCAA6C;AAC7C,uCAAyC;AAEzC,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,mBAAmB,GAAG,MAAM,IAAA,iCAAwB,EACxD,MAAM,EACN,0BAAgB,EAChB,0BAAc,EACd,IAAA,sBAAY,EAAC,KAAK,CAAC,CACpB,CAAC;IACF,IAAI,mBAAmB,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEhD,MAAM,KAAK,GAAgB,IAAI,GAAG,EAAE,CAAC;IACrC,mBAAmB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,gCAAsB,EAClC,IAAI,EACJ,MAAM,EACN,0BAAS,CAAC,MAAM,EAChB,UAAU,CACX,CAAC;QACF,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnB,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACzC,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEnC,MAAM,OAAO,GAA6B;QACxC,IAAI,EAAE,UAAU;QAChB,SAAS,EAAE,0BAAS,CAAC,MAAM;QAC3B,UAAU,EAAV,sBAAU;QACV,KAAK;QACL,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,iBAAiB,mBAAmB,CAAC,MAAM,GAAG;QACpD,IAAI,EAAE,EAAE,MAAM,EAAE;KACjB,CAAC;IAEF,OAAO,CAAC,OAAO,CAAC,CAAC;AACnB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"limitFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/limitFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AAIpC,oDAAyD;AACzD,kDAAiE;AACjE,wGAAgF;AAChF,2CAA2E;AAC3E,uCAAiE;AACjE,uCAAyC;AAEzC,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,WAAW,GAAG,CAClB,MAAM,OAAO,CAAC,GAAG,CAAC;QAChB,IAAA,iCAAwB,EACtB,MAAM,EACN,0BAAgB,EAChB,0BAAc,EACd,I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,IAAI,SAAS,CAAC,MAAM,EAAE;YAAE,SAAS;QAEjC,MAAM,UAAU,GAAG,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC5C,IAAI,CAAC,UAAU;YAAE,SAAS;QAE1B,MAAM,MAAM,GAAG,SAAS,CAAC,SAAS,CAAC,SAAA,EAAE,EAAI,UAAU,CAAC,QAAQ,CAAA,CAAC,CAAC,QAAQ,EAAE,CAAC;QACzE,MAAM,KAAK,GAAG,IAAA,gCAAsB,EAClC,IAAI,EACJ,MAAM,EACN,0BAAS,CAAC,MAAM,EAChB,UAAU,CACX,CAAC;QACF,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACnB,KAAK,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACzC,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEnC,MAAM,OAAO,GAA6B;QACxC,IAAI,EAAE,UAAU;QAChB,SAAS,EAAE,0BAAS,CAAC,MAAM;QAC3B,UAAU,EAAV,sBAAU;QACV,KAAK;QACL,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,iBAAiB,WAAW,CAAC,MAAM,GAAG;QAC5C,IAAI,EAAE,EAAE,MAAM,EAAE;KACjB,CAAC;IAEF,OAAO,CAAC,OAAO,CAAC,CAAC;AACnB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -57,7 +57,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
57
57
  tokensDetails.forEach((tD) => tD ? tokensDetailsById.set(tD.address, tD) : undefined);
58
58
  const levPositions = [];
59
59
  for (const position of positionAccounts) {
60
- const { collateralUsd, sizeUsd, price, side, cumulativeInterestSnapshot, lockedAmount, } = position;
60
+ const { collateralUsd, sizeUsd, price, side, cumulativeInterestSnapshot } = position;
61
61
  if (sizeUsd.isLessThanOrEqualTo(0))
62
62
  continue;
63
63
  if (side === structs_1.Side.None)
@@ -74,8 +74,8 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
74
74
  const currentPrice = pythPricesByAccount.get(custody.oracle.oracleAccount);
75
75
  if (!currentPrice)
76
76
  continue;
77
- const size = lockedAmount.div(Math.pow(10, custody.decimals));
78
77
  const sizeValue = sizeUsd.dividedBy(usdFactor);
78
+ const size = sizeValue.div(entryPrice);
79
79
  const leverage = sizeUsd.dividedBy(collateralUsd);
80
80
  const collateralValue = collateralUsd.dividedBy(usdFactor);
81
81
  const { increasePositionBps, decreasePositionBps } = perpPool.fees;
@@ -115,11 +115,8 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
115
115
  {
116
116
  type: portfolio_core_1.PortfolioElementType.leverage,
117
117
  data: {
118
- levPositions,
119
- levValue: value,
118
+ positions: levPositions,
120
119
  value,
121
- rewardAssets: [],
122
- rewardValue: 0,
123
120
  },
124
121
  label: 'Leverage',
125
122
  networkId: portfolio_core_1.NetworkId.solana,
@@ -1 +1 @@
1
- {"version":3,"file":"perpetualFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/perpetualFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,gEAAqC;AACrC,6CAA4C;AAG5C,oDAAyD;AACzD,kDAAgF;AAChF,wCAAuD;AAEvD,gEAAwE;AACxE,sDAAiE;AACjE,2CAKqB;AACrB,uCAAiD;AAEjD,MAAM,SAAS,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,CAAC,CAAA,CAAC,CAAC;AACzC,MAAM,QAAQ,GAAoB,CAChC,KAAa,EACb,KAAY,EACyB,EAAE;IACvC,MAAM,M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AAC;QAAE,OAAO,EAAE,CAAC;IACzC,MAAM,KAAK,GAAG,IAAA,+BAAc,EAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IAC/D,OAAO;QACL;YACE,IAAI,EAAE,qCAAoB,CAAC,QAAQ;YACnC,IAAI,EAAE;gBACJ,YAAY;gBACZ,QAAQ,EAAE,KAAK;gBACf,KAAK;gBACL,YAAY,EAAE,EAAE;gBAChB,WAAW,EAAE,CAAC;aACf;YACD,KAAK,EAAE,UAAU;YACjB,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,KAAK;SACN;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"perpetualFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/perpetualFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,gEAAqC;AACrC,6CAA4C;AAG5C,oDAAyD;AACzD,kDAAgF;AAChF,wCAAuD;AAEvD,gEAAwE;AACxE,sDAAiE;AACjE,2CAKqB;AACrB,uCAAiD;AAEjD,MAAM,SAAS,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,CAAC,CAAA,CAAC,CAAC;AACzC,MAAM,QAAQ,GAAoB,CAChC,KAAa,EACb,KAAY,EACyB,EAAE;IACvC,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,gBAAgB,GAAG,MAAM,IAAA,iCAAwB,EACrD,MAAM,EACN,wBAAc,EACd,0BAAc,EACd,IAAA,mCAAyB,EAAC,KAAK,CAAC,CACjC,CA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QAAQ;YACnC,IAAI,EAAE;gBACJ,SAAS,EAAE,YAAY;gBACvB,KAAK;aACN;YACD,KAAK,EAAE,UAAU;YACjB,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,KAAK;SACN;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -21,6 +21,27 @@ export type LimitOrder = {
21
21
  referral: PublicKey;
22
22
  };
23
23
  export declare const limitOrderStruct: BeetStruct<LimitOrder, Partial<LimitOrder>>;
24
+ export type LimitOrderV2 = {
25
+ buffer: Buffer;
26
+ maker: PublicKey;
27
+ inputMint: PublicKey;
28
+ outputMint: PublicKey;
29
+ inputTokenProgram: PublicKey;
30
+ outputTokenProgram: PublicKey;
31
+ uniqueId: boolean;
32
+ oriMakingAmount: BigNumber;
33
+ oriTakingAmount: BigNumber;
34
+ makingAmount: BigNumber;
35
+ takingAmount: BigNumber;
36
+ borrowMakingAmount: BigNumber;
37
+ expiredAt: BigNumber;
38
+ feeBps: number;
39
+ feeAccount: PublicKey;
40
+ createdAt: BigNumber;
41
+ updatedAt: BigNumber;
42
+ bump: number;
43
+ };
44
+ export declare const limitOrderV2Struct: BeetStruct<LimitOrderV2, Partial<LimitOrderV2>>;
24
45
  export type DCA = {
25
46
  buffer: Buffer;
26
47
  user: PublicKey;