@sonarwatch/portfolio-plugins 0.14.130 → 0.14.132

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 (33) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +1 -1
  3. package/src/plugins/debridge/airdropFetcher.js +7 -1
  4. package/src/plugins/debridge/airdropFetcher.js.map +1 -1
  5. package/src/plugins/debridge/dlmmVaultsFetcher.js +1 -16
  6. package/src/plugins/debridge/dlmmVaultsFetcher.js.map +1 -1
  7. package/src/plugins/jupiter/exchange/helpersPerps.d.ts +2 -0
  8. package/src/plugins/jupiter/exchange/helpersPerps.js +3 -1
  9. package/src/plugins/jupiter/exchange/helpersPerps.js.map +1 -1
  10. package/src/plugins/jupiter/exchange/perpetualFetcher.js +27 -1
  11. package/src/plugins/jupiter/exchange/perpetualFetcher.js.map +1 -1
  12. package/src/plugins/jupiter/exchange/structs.d.ts +35 -1
  13. package/src/plugins/jupiter/exchange/structs.js +36 -1
  14. package/src/plugins/jupiter/exchange/structs.js.map +1 -1
  15. package/src/plugins/jupiter/filters.d.ts +1 -0
  16. package/src/plugins/jupiter/filters.js +11 -1
  17. package/src/plugins/jupiter/filters.js.map +1 -1
  18. package/src/plugins/lulo/depositsFetcher.js +0 -2
  19. package/src/plugins/lulo/depositsFetcher.js.map +1 -1
  20. package/src/plugins/meteora/dlmmPositionsFetcher.js +9 -3
  21. package/src/plugins/meteora/dlmmPositionsFetcher.js.map +1 -1
  22. package/src/plugins/meteora/filters.d.ts +0 -2
  23. package/src/plugins/meteora/filters.js +1 -21
  24. package/src/plugins/meteora/filters.js.map +1 -1
  25. package/src/plugins/nxfinance/stakingFetcher.js +2 -2
  26. package/src/plugins/nxfinance/stakingFetcher.js.map +1 -1
  27. package/src/plugins/solayer/airdropFetcher.js +8 -3
  28. package/src/plugins/solayer/airdropFetcher.js.map +1 -1
  29. package/src/utils/elementbuilder/ElementBorrowlendBuilder.js +16 -2
  30. package/src/utils/elementbuilder/ElementBorrowlendBuilder.js.map +1 -1
  31. package/src/utils/solana/beets/ParsedGpa.d.ts +18 -0
  32. package/src/utils/solana/beets/ParsedGpa.js +49 -0
  33. package/src/utils/solana/beets/ParsedGpa.js.map +1 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.14.132](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.131...plugins-0.14.132) (2025-02-27)
6
+
7
+
8
+
9
+ ## [0.14.131](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.130...plugins-0.14.131) (2025-02-27)
10
+
11
+
12
+
5
13
  ## [0.14.130](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.129...plugins-0.14.130) (2025-02-27)
6
14
 
7
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-plugins",
3
- "version": "0.14.130",
3
+ "version": "0.14.132",
4
4
  "type": "commonjs",
5
5
  "types": "./src/index.d.ts",
6
6
  "peerDependencies": {
@@ -19,6 +19,7 @@ const AirdropFetcher_1 = require("../../AirdropFetcher");
19
19
  const constants_1 = require("./constants");
20
20
  const clients_1 = require("../../utils/clients");
21
21
  const distributions_json_1 = __importDefault(require("./distributions.json"));
22
+ const getMultipleAccountsInfoSafe_1 = require("../../utils/solana/getMultipleAccountsInfoSafe");
22
23
  const distributionByWallet = distributions_json_1.default;
23
24
  const executorDis1 = (owner) => __awaiter(void 0, void 0, void 0, function* () {
24
25
  const isEvm = (0, portfolio_core_1.isEvmAddress)(owner);
@@ -55,6 +56,11 @@ const executorDis1 = (owner) => __awaiter(void 0, void 0, void 0, function* () {
55
56
  const executorDis2 = (owner) => __awaiter(void 0, void 0, void 0, function* () {
56
57
  const isEvm = (0, portfolio_core_1.isEvmAddress)(owner);
57
58
  const walletDistributions = distributionByWallet[owner];
59
+ const pdas = isEvm
60
+ ? [getEvmPda(owner, 2), getEvmPda(owner, 3)]
61
+ : [getSolPda(owner, 2), getSolPda(owner, 3)];
62
+ const receipts = yield (0, getMultipleAccountsInfoSafe_1.getMultipleAccountsInfoSafe)((0, clients_1.getClientSolana)(), pdas);
63
+ const isClaimed = receipts.some((receipt) => !!receipt);
58
64
  if (!walletDistributions || !walletDistributions.two) {
59
65
  return (0, AirdropFetcher_1.getAirdropRaw)({
60
66
  statics: constants_1.secondDistribStatics,
@@ -74,7 +80,7 @@ const executorDis2 = (owner) => __awaiter(void 0, void 0, void 0, function* () {
74
80
  items: [
75
81
  {
76
82
  amount: walletDistributions.two,
77
- isClaimed: false,
83
+ isClaimed,
78
84
  label: 'DBR',
79
85
  address: isEvm ? undefined : constants_1.dbrMint,
80
86
  imageUri: isEvm ? constants_1.platform.image : undefined,
@@ -1 +1 @@
1
- {"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/debridge/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAAqE;AACrE,6CAAyD;AACzD,yDAK8B;AAC9B,2CAQqB;AACrB,iDAAsD;AACtD,8EAAiD;AAEjD,MAAM,oBAAoB,GAAG,4BAK5B,CAAC;AAEF,MAAM,YAAY,GAA2B,CAAO,KAAa,EAAE,EAAE;IACnE,MAAM,KAAK,GAAG,IAAA,6BAAY,EAAC,KAAK,CAAC,CAAC;IAClC,MAAM,mBAAmB,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC;IACxD,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAE9D,MAAM,OAAO,GACX,MAAM,IAAA,yBAAe,GAAE,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;IAE9C,IAAI,CAAC,mBAAmB,IAAI,CAAC,mBAAmB,CAAC,GAAG,E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QAAA,wBAAwB,GAAmB;IACtD,EAAE,EAAE,GAAG,+BAAmB,CAAC,EAAE,SAAS;IACtC,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ,EAAE,YAAY;CACvB,CAAC;AAEW,QAAA,qBAAqB,GAAmB;IACnD,EAAE,EAAE,GAAG,gCAAoB,CAAC,EAAE,MAAM;IACpC,SAAS,EAAE,0BAAS,CAAC,QAAQ;IAC7B,QAAQ,EAAE,YAAY;CACvB,CAAC;AAEW,QAAA,wBAAwB,GAAmB;IACtD,EAAE,EAAE,GAAG,gCAAoB,CAAC,EAAE,SAAS;IACvC,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ,EAAE,YAAY;CACvB,CAAC;AAEW,QAAA,WAAW,GAAG,IAAA,wCAAuB,EAChD,gCAAwB,EACxB,oBAAQ,CAAC,EAAE,EACX,uBAAuB,EACvB,+BAAmB,CAAC,QAAQ,CAC7B,CAAC;AAEW,QAAA,WAAW,GAAG,IAAA,wCAAuB,EAChD,gCAAwB,EACxB,oBAAQ,CAAC,EAAE,EACX,uBAAuB,EACvB,gCAAoB,CAAC,QAAQ,CAC9B,CAAC"}
1
+ {"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/debridge/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAAqE;AACrE,6CAAyD;AACzD,yDAK8B;AAC9B,2CAQqB;AACrB,iDAAsD;AACtD,8EAAiD;AACjD,gGAA6F;AAE7F,MAAM,oBAAoB,GAAG,4BAK5B,CAAC;AAEF,MAAM,YAAY,GAA2B,CAAO,KAAa,EAAE,EAAE;IACnE,MAAM,KAAK,GAAG,IAAA,6BAAY,EAAC,KAAK,CAAC,CAAC;IAClC,MAAM,mBAAmB,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC;IACxD,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,EAAE,CA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C,QAAQ,CAC7B,CAAC;AAEW,QAAA,WAAW,GAAG,IAAA,wCAAuB,EAChD,gCAAwB,EACxB,oBAAQ,CAAC,EAAE,EACX,uBAAuB,EACvB,gCAAoB,CAAC,QAAQ,CAC9B,CAAC"}
@@ -58,7 +58,6 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
58
58
  label: 'Vesting',
59
59
  link: 'https://debridge.foundation/lfg',
60
60
  });
61
- const assets = [];
62
61
  for (const escrow of accounts) {
63
62
  const vault = vaults[escrow.dlmmVault.toString()];
64
63
  if (!vault)
@@ -81,21 +80,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
81
80
  attributes: { lockedUntil: 1744876800000 },
82
81
  });
83
82
  }
84
- if (assets.length === 0)
85
- return [];
86
- return [
87
- {
88
- networkId: portfolio_core_1.NetworkId.solana,
89
- type: portfolio_core_1.PortfolioElementType.multiple,
90
- label: 'Vesting',
91
- platformId: constants_1.platformId,
92
- name: 'LFG Vault',
93
- data: {
94
- assets,
95
- },
96
- value: (0, portfolio_core_1.getUsdValueSum)(assets.map((a) => a.value)),
97
- },
98
- ];
83
+ return registry.getElements(cache);
99
84
  });
100
85
  const fetcher = {
101
86
  id: `${constants_1.platformId}-dlmm-vaults`,
@@ -1 +1 @@
1
- {"version":3,"file":"dlmmVaultsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/debridge/dlmmVaultsFetcher.ts"],"names":[],"mappings":";AAAA,2BAA2B;AAC3B,mBAAmB;;;;;;;;;;;AAEnB,+DAKoC;AAGpC,iDAAsD;AACtD,2CAA0E;AAC1E,+CAA8D;AAC9D,8CAAiD;AAEjD,oDAAqD;AACrD,gFAA6E;AAE7E,MAAM,OAAO,GAAG,KAAK,CAAC;AACtB,IAAI,IAAI,GAAkB,IAAI,CAAC;AAC/B,IAAI,UAAU,GAAG,CAAC,CAAC;AACnB,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAE/B,MAAM,QAAQ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';
3
4
  import { Position } from './structs';
4
5
  export declare const USD_POWER: BN;
6
+ export declare const USD_POWER_BIGN: BigNumber;
5
7
  export type CustodyBn = Omit<CustodyInfo, 'pricing' | 'decreasePositionBps' | 'fundingRateState' | 'jumpRateState' | 'assets'> & {
6
8
  decreasePositionBps: BN;
7
9
  pricing: {
@@ -3,10 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getLiquidationPrice = exports.getFeeAmount = exports.positionToBn = exports.custodyToBN = exports.USD_POWER = void 0;
6
+ exports.getLiquidationPrice = exports.getFeeAmount = exports.positionToBn = exports.custodyToBN = exports.USD_POWER_BIGN = exports.USD_POWER = void 0;
7
7
  const bn_js_1 = __importDefault(require("bn.js"));
8
+ const bignumber_js_1 = __importDefault(require("bignumber.js"));
8
9
  const structs_1 = require("./structs");
9
10
  exports.USD_POWER = new bn_js_1.default(1000000);
11
+ exports.USD_POWER_BIGN = new bignumber_js_1.default(1000000);
10
12
  const BPS_POWER = new bn_js_1.default(10000);
11
13
  const DBPS_POWER = new bn_js_1.default(100000);
12
14
  const RATE_POWER = new bn_js_1.default(1000000000);
@@ -1 +1 @@
1
- {"version":3,"file":"helpersPerps.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/helpersPerps.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAuB;AAEvB,uCAA2C;AAE9B,QAAA,SAAS,GAAG,IAAI,eAAE,CAAC,OAAS,CAAC,CAAC;AAC3C,MAAM,SAAS,GAAG,IAAI,eAAE,CAAC,KAAM,CAAC,CAAC;AACjC,MAAM,UAAU,GAAG,IAAI,eAAE,CAAC,MAAO,CAAC,CAAC;AACnC,MAAM,UAAU,GAAG,IAAI,eAAE,CAAC,UAAa,CAAC,CAAC;AACzC,MAAM,eAAe,GAAG,EAAE,GAAG,GAAG,CAAC;AAEjC,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AAa,CAAC;IAEzC,IAAI,YAAY,GAAG,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,GAAG,EAAE,CAAC;IACnD,YAAY,GAAG,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAE7D,IAAI,QAAQ,CAAC,IAAI,KAAK,cAAI,CAAC,IAAI,EAAE,CAAC;QAChC,IAAI,UAAU,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC;YAC7B,OAAO,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAC1C,CAAC;QACD,OAAO,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAC1C,CAAC;IACD,IAAI,UAAU,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC;QAC7B,OAAO,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;AAC1C,CAAC,CAAC;AAtCW,QAAA,mBAAmB,uBAsC9B"}
@@ -24,12 +24,13 @@ const structs_1 = require("./structs");
24
24
  const helpersPerps_1 = require("./helpersPerps");
25
25
  const usdFactor = new bignumber_js_1.default(Math.pow(10, 6));
26
26
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
27
+ var _a, _b;
27
28
  const client = (0, clients_1.getClientSolana)();
28
29
  const positionAccounts = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.positionStruct, constants_1.perpsProgramId, (0, filters_1.perpetualsPositionsFilter)(owner));
29
30
  if (positionAccounts.length === 0 ||
30
31
  positionAccounts.every((perp) => perp.sizeUsd.isLessThanOrEqualTo(0)))
31
32
  return [];
32
- const [custodiesAccounts, perpPoolsArr] = yield Promise.all([
33
+ const [custodiesAccounts, perpPoolsArr, prAccounts] = yield Promise.all([
33
34
  cache.getItem(constants_1.custodiesKey, {
34
35
  prefix: constants_1.platformId,
35
36
  networkId: portfolio_core_1.NetworkId.solana,
@@ -38,9 +39,29 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
38
39
  prefix: constants_1.platformId,
39
40
  networkId: portfolio_core_1.NetworkId.solana,
40
41
  }),
42
+ (0, solana_1.getParsedProgramAccounts)(client, structs_1.positionRequestStruct, constants_1.perpsProgramId, (0, filters_1.positionRequestFilters)(owner)),
41
43
  ]);
42
44
  if (!custodiesAccounts || !perpPoolsArr)
43
45
  return [];
46
+ const prAccountsObj = {};
47
+ prAccounts.forEach((a) => {
48
+ const position = a.position.toString();
49
+ if (a.executed || !a.triggerPrice)
50
+ return;
51
+ if (!prAccountsObj[position])
52
+ prAccountsObj[position] = {
53
+ tp: null,
54
+ sl: null,
55
+ };
56
+ if (a.triggerAboveThreshold)
57
+ prAccountsObj[position].tp = a.triggerPrice
58
+ .dividedBy(helpersPerps_1.USD_POWER_BIGN)
59
+ .toNumber();
60
+ else
61
+ prAccountsObj[position].sl = a.triggerPrice
62
+ .dividedBy(helpersPerps_1.USD_POWER_BIGN)
63
+ .toNumber();
64
+ });
44
65
  const perpPools = new Map();
45
66
  perpPoolsArr.forEach((a) => {
46
67
  perpPools.set(a.pubkey.toString(), a);
@@ -100,6 +121,9 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
100
121
  const rawPnlValue = priceVar.times(collateralValue).times(leverage);
101
122
  const netPnlValue = rawPnlValue.minus(fees);
102
123
  const value = collateralValue.plus(netPnlValue);
124
+ const positionPubkey = position.pubkey.toString();
125
+ const tp = ((_a = prAccountsObj[positionPubkey]) === null || _a === void 0 ? void 0 : _a.tp) || undefined;
126
+ const sl = ((_b = prAccountsObj[positionPubkey]) === null || _b === void 0 ? void 0 : _b.sl) || undefined;
103
127
  levPositions.push({
104
128
  address: custody.mint,
105
129
  side: isLong ? portfolio_core_1.LeverageSide.long : portfolio_core_1.LeverageSide.short,
@@ -112,6 +136,8 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
112
136
  value: value.toNumber(),
113
137
  markPrice: currentPrice,
114
138
  entryPrice: entryPrice.toNumber(),
139
+ tp,
140
+ sl,
115
141
  });
116
142
  }
117
143
  if (levPositions.length === 0)
@@ -1 +1 @@
1
- {"version":3,"file":"perpetualFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/perpetualFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,gEAAqC;AACrC,6CAA4C;AAC5C,iCAA2B;AAG3B,oDAAyD;AACzD,kDAAgF;AAChF,wCAAuD;AAEvD,2CAKqB;AACrB,uCAAiD;AACjD,iDAMwB;AAExB,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,CAAC;IACF,IACE,gBAAgB,CAAC,MAAM,KAAK,CAAC;QAC7B,gBAAgB,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;QAErE,OAAO,EAAE,CAAC;IAEZ,MAAM,CAAC,iBAAiB,EAAE,YAAY,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC1D,KAAK,CAAC,OAAO,CAAgB,wBAAY,EAAE;YACzC,MAAM,EAAE,sBAAU;YAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;SAC5B,CAAC;QACF,KAAK,CAAC,OAAO,CA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AY;oBACvB,KAAK;iBACN;gBACD,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"}
1
+ {"version":3,"file":"perpetualFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/perpetualFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,gEAAqC;AACrC,6CAA4C;AAC5C,iCAA2B;AAG3B,oDAAyD;AACzD,kDAAgF;AAChF,wCAA+E;AAE/E,2CAKqB;AACrB,uCAAwE;AACxE,iDAOwB;AAExB,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,CAAC;IACF,IACE,gBAAgB,CAAC,MAAM,KAAK,CAAC;QAC7B,gBAAgB,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;QAErE,OAAO,EAAE,CAAC;IAEZ,MAAM,CAAC,iBAAiB,EAAE,YAAY,EAAE,UAAU,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACtE,KAAK,CAAC,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N;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,7 +1,7 @@
1
1
  /// <reference types="node" />
2
2
  /// <reference types="@drift-labs/sdk/node_modules/@solana/web3.js" />
3
3
  /// <reference types="jito-ts/node_modules/@solana/web3.js" />
4
- import { BeetStruct, FixableBeetStruct } from '@metaplex-foundation/beet';
4
+ import { BeetStruct, COption, FixableBeetStruct } from '@metaplex-foundation/beet';
5
5
  import BigNumber from 'bignumber.js';
6
6
  import { PublicKey } from '@solana/web3.js';
7
7
  export type LimitOrder = {
@@ -120,6 +120,40 @@ export type VestingEscrow = {
120
120
  padding: BigNumber[];
121
121
  };
122
122
  export declare const vestingEscrowStruct: BeetStruct<VestingEscrow, Partial<VestingEscrow>>;
123
+ export declare enum RequestChange {
124
+ None = 0,
125
+ Increase = 1,
126
+ Decrease = 2
127
+ }
128
+ export declare enum RequestType {
129
+ Market = 0,
130
+ Trigger = 1
131
+ }
132
+ export type PositionRequest = {
133
+ buffer: Buffer;
134
+ owner: PublicKey;
135
+ pool: PublicKey;
136
+ custody: PublicKey;
137
+ position: PublicKey;
138
+ mint: PublicKey;
139
+ openTime: BigNumber;
140
+ updateTime: BigNumber;
141
+ sizeUsdDelta: BigNumber;
142
+ collateralDelta: BigNumber;
143
+ requestChange: RequestChange;
144
+ requestType: RequestType;
145
+ side: Side;
146
+ priceSlippage: COption<BigNumber>;
147
+ jupiterMinimumOut: COption<BigNumber>;
148
+ preSwapAmount: COption<BigNumber>;
149
+ triggerPrice: COption<BigNumber>;
150
+ triggerAboveThreshold: COption<boolean>;
151
+ entirePosition: COption<boolean>;
152
+ executed: boolean;
153
+ counter: BigNumber;
154
+ bump: number;
155
+ };
156
+ export declare const positionRequestStruct: FixableBeetStruct<PositionRequest, Partial<PositionRequest>>;
123
157
  export type Limit = {
124
158
  maxAumUsd: BigNumber;
125
159
  maxIndividualLpToken: BigNumber;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.positionStruct = exports.Side = exports.custodyStruct = exports.jumpRateStateStruct = exports.fundingRateStateStruct = exports.assetsStruct = exports.permissionsStruct = exports.pricingParamsStruct = exports.oracleParamsStruct = exports.OracleType = exports.perpetualPoolStruct = exports.feesStruct = exports.poolAprStruct = exports.limitStruct = exports.vestingEscrowStruct = exports.valueAverageStruct = exports.dcaStruct = exports.limitOrderV2Struct = exports.limitOrderStruct = void 0;
3
+ exports.positionStruct = exports.Side = exports.custodyStruct = exports.jumpRateStateStruct = exports.fundingRateStateStruct = exports.assetsStruct = exports.permissionsStruct = exports.pricingParamsStruct = exports.oracleParamsStruct = exports.OracleType = exports.perpetualPoolStruct = exports.feesStruct = exports.poolAprStruct = exports.limitStruct = exports.positionRequestStruct = exports.RequestType = exports.RequestChange = exports.vestingEscrowStruct = exports.valueAverageStruct = exports.dcaStruct = exports.limitOrderV2Struct = exports.limitOrderStruct = void 0;
4
4
  const beet_1 = require("@metaplex-foundation/beet");
5
5
  const beet_solana_1 = require("@metaplex-foundation/beet-solana");
6
6
  const solana_1 = require("../../../utils/solana");
@@ -115,6 +115,41 @@ exports.vestingEscrowStruct = new beet_1.BeetStruct([
115
115
  ['padding1', solana_1.u64],
116
116
  ['padding', (0, beet_1.uniformFixedSizeArray)(solana_1.u128, 5)],
117
117
  ], (args) => args);
118
+ var RequestChange;
119
+ (function (RequestChange) {
120
+ RequestChange[RequestChange["None"] = 0] = "None";
121
+ RequestChange[RequestChange["Increase"] = 1] = "Increase";
122
+ RequestChange[RequestChange["Decrease"] = 2] = "Decrease";
123
+ })(RequestChange || (exports.RequestChange = RequestChange = {}));
124
+ var RequestType;
125
+ (function (RequestType) {
126
+ RequestType[RequestType["Market"] = 0] = "Market";
127
+ RequestType[RequestType["Trigger"] = 1] = "Trigger";
128
+ })(RequestType || (exports.RequestType = RequestType = {}));
129
+ exports.positionRequestStruct = new beet_1.FixableBeetStruct([
130
+ ['buffer', (0, solana_1.blob)(8)],
131
+ ['owner', beet_solana_1.publicKey],
132
+ ['pool', beet_solana_1.publicKey],
133
+ ['custody', beet_solana_1.publicKey],
134
+ ['position', beet_solana_1.publicKey],
135
+ ['mint', beet_solana_1.publicKey],
136
+ ['openTime', solana_1.i64],
137
+ ['updateTime', solana_1.i64],
138
+ ['sizeUsdDelta', solana_1.u64],
139
+ ['collateralDelta', solana_1.u64],
140
+ ['requestChange', beet_1.u8],
141
+ ['requestType', beet_1.u8],
142
+ ['side', beet_1.u8],
143
+ ['priceSlippage', (0, beet_1.coption)(solana_1.u64)],
144
+ ['jupiterMinimumOut', (0, beet_1.coption)(solana_1.u64)],
145
+ ['preSwapAmount', (0, beet_1.coption)(solana_1.u64)],
146
+ ['triggerPrice', (0, beet_1.coption)(solana_1.u64)],
147
+ ['triggerAboveThreshold', (0, beet_1.coption)(beet_1.bool)],
148
+ ['entirePosition', (0, beet_1.coption)(beet_1.bool)],
149
+ ['executed', beet_1.bool],
150
+ ['counter', solana_1.u64],
151
+ ['bump', beet_1.u8],
152
+ ], (args) => args);
118
153
  exports.limitStruct = new beet_1.BeetStruct([
119
154
  ['maxAumUsd', solana_1.u128],
120
155
  ['maxIndividualLpToken', solana_1.u128],
@@ -1 +1 @@
1
- {"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/structs.ts"],"names":[],"mappings":";;;AAAA,oDAQmC;AACnC,kEAA6D;AAG7D,kDAA6D;AAqBhD,QAAA,gBAAgB,GAAG,IAAI,iBAAU,CAC5C;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAA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AAE,CAAC,IAAe,CAC1B,CAAC;AAEF,IAAY,IAIX;AAJD,WAAY,IAAI;IACd,+BAAI,CAAA;IACJ,+BAAI,CAAA;IACJ,iCAAK,CAAA;AACP,CAAC,EAJW,IAAI,oBAAJ,IAAI,QAIf;AAoBY,QAAA,cAAc,GAAG,IAAI,iBAAU,CAC1C;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,MAAM,EAAE,uBAAS,CAAC;IACnB,CAAC,SAAS,EAAE,uBAAS,CAAC;IACtB,CAAC,mBAAmB,EAAE,uBAAS,CAAC;IAChC,CAAC,UAAU,EAAE,YAAG,CAAC;IACjB,CAAC,YAAY,EAAE,YAAG,CAAC;IACnB,CAAC,MAAM,EAAE,SAAE,CAAC;IACZ,CAAC,OAAO,EAAE,YAAG,CAAC;IACd,CAAC,SAAS,EAAE,YAAG,CAAC;IAChB,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,gBAAgB,EAAE,YAAG,CAAC;IACvB,CAAC,4BAA4B,EAAE,aAAI,CAAC;IACpC,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,MAAM,EAAE,SAAE,CAAC;CACb,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAgB,CAC3B,CAAC"}
1
+ {"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/structs.ts"],"names":[],"mappings":";;;AAAA,oDAUmC;AACnC,kEAA6D;AAG7D,kDAA6D;AAqBhD,QAAA,gBAAgB,GAAG,IAAI,iBAAU,CAC5C;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,WAAW,EAAE,uBAAS,CAAC;IACxB,CAAC,YAAY,EAAE,uBAAS,CAAC;IACzB,CAAC,SAAS,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F,IAAY,IAIX;AAJD,WAAY,IAAI;IACd,+BAAI,CAAA;IACJ,+BAAI,CAAA;IACJ,iCAAK,CAAA;AACP,CAAC,EAJW,IAAI,oBAAJ,IAAI,QAIf;AAoBY,QAAA,cAAc,GAAG,IAAI,iBAAU,CAC1C;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,MAAM,EAAE,uBAAS,CAAC;IACnB,CAAC,SAAS,EAAE,uBAAS,CAAC;IACtB,CAAC,mBAAmB,EAAE,uBAAS,CAAC;IAChC,CAAC,UAAU,EAAE,YAAG,CAAC;IACjB,CAAC,YAAY,EAAE,YAAG,CAAC;IACnB,CAAC,MAAM,EAAE,SAAE,CAAC;IACZ,CAAC,OAAO,EAAE,YAAG,CAAC;IACd,CAAC,SAAS,EAAE,YAAG,CAAC;IAChB,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,gBAAgB,EAAE,YAAG,CAAC;IACvB,CAAC,4BAA4B,EAAE,aAAI,CAAC;IACpC,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,MAAM,EAAE,SAAE,CAAC;CACb,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAgB,CAC3B,CAAC"}
@@ -2,5 +2,6 @@
2
2
  /// <reference types="jito-ts/node_modules/@solana/web3.js" />
3
3
  import { GetProgramAccountsFilter } from '@solana/web3.js';
4
4
  export declare const perpetualsPositionsFilter: (owner: string) => GetProgramAccountsFilter[];
5
+ export declare const positionRequestFilters: (owner: string) => GetProgramAccountsFilter[];
5
6
  export declare const escrowFilter: (owner: string) => GetProgramAccountsFilter[];
6
7
  export declare const partialUnstakeFilter: (escrow: string) => GetProgramAccountsFilter[];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.partialUnstakeFilter = exports.escrowFilter = exports.perpetualsPositionsFilter = void 0;
3
+ exports.partialUnstakeFilter = exports.escrowFilter = exports.positionRequestFilters = exports.perpetualsPositionsFilter = void 0;
4
4
  const perpetualsPositionsFilter = (owner) => [
5
5
  {
6
6
  memcmp: {
@@ -11,6 +11,16 @@ const perpetualsPositionsFilter = (owner) => [
11
11
  { dataSize: 216 },
12
12
  ];
13
13
  exports.perpetualsPositionsFilter = perpetualsPositionsFilter;
14
+ const positionRequestFilters = (owner) => [
15
+ {
16
+ memcmp: {
17
+ offset: 8,
18
+ bytes: owner,
19
+ },
20
+ },
21
+ { dataSize: 312 },
22
+ ];
23
+ exports.positionRequestFilters = positionRequestFilters;
14
24
  const escrowFilter = (owner) => [
15
25
  {
16
26
  memcmp: {
@@ -1 +1 @@
1
- {"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/filters.ts"],"names":[],"mappings":";;;AAEO,MAAM,yBAAyB,GAAG,CACvC,KAAa,EACe,EAAE,CAAC;IAC/B;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,KAAK;SACb;KACF;IACD,EAAE,QAAQ,EAAE,GAAG,EAAE;CAClB,CAAC;AAVW,QAAA,yBAAyB,6BAUpC;AAEK,MAAM,YAAY,GAAG,CAAC,KAAa,EAA8B,EAAE,CAAC;IACzE;QACE,MAAM,EAAE;YACN,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,KAAK;SACb;KACF;IACD,EAAE,QAAQ,EAAE,GAAG,EAAE;CAClB,CAAC;AARW,QAAA,YAAY,gBAQvB;AAEK,MAAM,oBAAoB,GAAG,CAClC,MAAc,EACc,EAAE,CAAC;IAC/B;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,MAAM;SACd;KACF;IACD,EAAE,QAAQ,EAAE,GAAG,EAAE;CAClB,CAAC;AAVW,QAAA,oBAAoB,wBAU/B"}
1
+ {"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/filters.ts"],"names":[],"mappings":";;;AAEO,MAAM,yBAAyB,GAAG,CACvC,KAAa,EACe,EAAE,CAAC;IAC/B;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,KAAK;SACb;KACF;IACD,EAAE,QAAQ,EAAE,GAAG,EAAE;CAClB,CAAC;AAVW,QAAA,yBAAyB,6BAUpC;AAEK,MAAM,sBAAsB,GAAG,CACpC,KAAa,EACe,EAAE,CAAC;IAC/B;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,KAAK;SACb;KACF;IACD,EAAE,QAAQ,EAAE,GAAG,EAAE;CAClB,CAAC;AAVW,QAAA,sBAAsB,0BAUjC;AAEK,MAAM,YAAY,GAAG,CAAC,KAAa,EAA8B,EAAE,CAAC;IACzE;QACE,MAAM,EAAE;YACN,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,KAAK;SACb;KACF;IACD,EAAE,QAAQ,EAAE,GAAG,EAAE;CAClB,CAAC;AARW,QAAA,YAAY,gBAQvB;AAEK,MAAM,oBAAoB,GAAG,CAClC,MAAc,EACc,EAAE,CAAC;IAC/B;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,MAAM;SACd;KACF;IACD,EAAE,QAAQ,EAAE,GAAG,EAAE;CAClB,CAAC;AAVW,QAAA,oBAAoB,wBAU/B"}
@@ -104,8 +104,6 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
104
104
  portfolioElements.push(element);
105
105
  }
106
106
  }
107
- if (portfolioElements.length === 0)
108
- return [];
109
107
  const elements = [];
110
108
  for (const element of portfolioElements) {
111
109
  const tmpElement = element;
@@ -1 +1 @@
1
- {"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/lulo/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AACpC,6CAA4C;AAG5C,2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,EAAC,cAAc,CAAC,IAAI,CAAC;iBACnC;aACF,CAAC,CAAC;YAEH,MAAM,uBAAuB,GAAG,WAAW,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;YAEpE,cAAc,CAAC,gBAAgB,CAAC;gBAC9B,OAAO,EAAE,cAAc,CAAC,IAAI;gBAC5B,MAAM,EAAE,uBAAuB,CAAC,QAAQ,EAAE;gBAC1C,UAAU,EAAE;oBACV,IAAI,EAAE,CAAC,WAAW,CAAC;iBACpB;aACF,CAAC,CAAC;YACH,cAAc,CAAC,gBAAgB,CAAC;gBAC9B;oBACE,GAAG,EAAE,cAAc,CAAC,IAAI;oBACxB,GAAG,EAAE,IAAA,yBAAQ,EAAC,cAAc,CAAC,IAAI,CAAC;iBACnC;aACF,CAAC,CAAC;QACL,CAAC;QACD,MAAM,WAAW,GAAG,MAAM,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACtD,QAAQ,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,CAAC;IAChC,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/lulo/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AACpC,6CAA4C;AAG5C,2CAAmD;AACnD,uCAA0E;AAC1E,+EAA4D;AAC5D,0EAA8D;AAC9D,mFAA6D;AAC7D,mDAA2D;AAC3D,kFAA+E;AAC/E,iDAAsD;AACtD,qCAAsE;AACtE,6CAAmD;AACnD,iDAA8E;AAE9E,6CAA6D;AAC7D,yEAA4E;AAC5E,+CAG4B;AAE5B,qDAA2D;AAC3D,iDAA4D;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pB;aACF,CAAC,CAAC;YACH,cAAc,CAAC,gBAAgB,CAAC;gBAC9B;oBACE,GAAG,EAAE,cAAc,CAAC,IAAI;oBACxB,GAAG,EAAE,IAAA,yBAAQ,EAAC,cAAc,CAAC,IAAI,CAAC;iBACnC;aACF,CAAC,CAAC;QACL,CAAC;QACD,MAAM,WAAW,GAAG,MAAM,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACtD,QAAQ,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,CAAC;IAChC,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -19,17 +19,23 @@ const constants_1 = require("./constants");
19
19
  const clients_1 = require("../../utils/clients");
20
20
  const solana_1 = require("../../utils/solana");
21
21
  const struct_1 = require("./struct");
22
- const filters_1 = require("./filters");
23
22
  const dlmmHelper_1 = require("./dlmmHelper");
24
23
  const types_1 = require("./types");
25
24
  const getMultipleAccountsInfoSafe_1 = require("../../utils/solana/getMultipleAccountsInfoSafe");
26
25
  const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
26
+ const ParsedGpa_1 = require("../../utils/solana/beets/ParsedGpa");
27
27
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
28
28
  const client = (0, clients_1.getClientSolana)();
29
29
  const userPubKey = new web3_js_1.PublicKey(owner);
30
30
  const [positionsV1, positionsV2] = yield Promise.all([
31
- (0, solana_1.getParsedProgramAccounts)(client, struct_1.dlmmPositionV1Struct, constants_1.dlmmProgramId, (0, filters_1.dlmmPositionAccountFilter)(userPubKey.toString())),
32
- (0, solana_1.getParsedProgramAccounts)(client, struct_1.dlmmPositionV2Struct, constants_1.dlmmProgramId, (0, filters_1.dlmmPositionV2AccountFilter)(userPubKey.toString())),
31
+ ParsedGpa_1.ParsedGpa.build(client, struct_1.dlmmPositionV1Struct, constants_1.dlmmProgramId)
32
+ .addFilter('owner', userPubKey)
33
+ .addDataSizeFilter(7560)
34
+ .run(),
35
+ ParsedGpa_1.ParsedGpa.build(client, struct_1.dlmmPositionV2Struct, constants_1.dlmmProgramId)
36
+ .addFilter('owner', userPubKey)
37
+ .addDataSizeFilter(8120)
38
+ .run(),
33
39
  ]);
34
40
  const positions = [...positionsV1, ...positionsV2];
35
41
  if (positions.length === 0)
@@ -1 +1 @@
1
- {"version":3,"file":"dlmmPositionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/dlmmPositionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,6CAA4C;AAC5C,gEAAqC;AAGrC,2CAAwD;AACxD,iDAAsD;AACtD,+CAI4B;AAC5B,qCAOkB;AAClB,uCAGmB;AACnB,6CAIsB;AACtB,mCAA0C;AAC1C,gGAA6F;AAC7F,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,UAAU,GAAG,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC;IAExC,MAAM,CAAC,WAAW,EAAE,WAAW,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACnD,IAAA,iCAAwB,EACtB,MAAM,EACN,6BAAoB,EACpB,yBAAa,EACb,IAAA,mCAAyB,EAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CACjD;QACD,IAAA,iCAAwB,EACtB,MAAM,EACN,6BAAoB,EACpB,yBAAa,EACb,IAAA,qCAA2B,EAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CACnD;KACF,CAAC,CAAC;IACH,MAAM,SAAS,GAAG,CAAC,GAAG,WAAW,E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,CAAC,SAAS;gBACpC,KAAK,EAAE,eAAe;gBACtB,SAAS,EAAE,0BAAS,CAAC,MAAM;gBAC3B,UAAU,EAAV,sBAAU;gBACV,KAAK,EAAE,IAAA,+BAAc,EAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;gBACtD,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE;oBACJ,WAAW;iBACZ;gBACD,IAAI;aACL,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,iBAAiB;IAClC,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"dlmmPositionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/dlmmPositionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,6CAA4C;AAC5C,gEAAqC;AAGrC,2CAAwD;AACxD,iDAAsD;AACtD,+CAG4B;AAC5B,qCAOkB;AAClB,6CAIsB;AACtB,mCAA0C;AAC1C,gGAA6F;AAC7F,qGAA6E;AAC7E,kEAA+D;AAE/D,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,UAAU,GAAG,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC;IAExC,MAAM,CAAC,WAAW,EAAE,WAAW,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACnD,qBAAS,CAAC,KAAK,CAAC,MAAM,EAAE,6BAAoB,EAAE,yBAAa,CAAC;aACzD,SAAS,CAAC,OAAO,EAAE,UAAU,CAAC;aAC9B,iBAAi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E,EAAE;iBACzD;aACF,CAAC;YAEF,MAAM,IAAI,GAAG,EAAE,CAAC;YAChB,IACE,YAAY,CAAC,YAAY,CAAC,MAAM,EAAE;gBAClC,YAAY,CAAC,YAAY,CAAC,MAAM,EAAE;gBAElC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;YAE5B,QAAQ,CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,qCAAoB,CAAC,SAAS;gBACpC,KAAK,EAAE,eAAe;gBACtB,SAAS,EAAE,0BAAS,CAAC,MAAM;gBAC3B,UAAU,EAAV,sBAAU;gBACV,KAAK,EAAE,IAAA,+BAAc,EAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;gBACtD,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE;oBACJ,WAAW;iBACZ;gBACD,IAAI;aACL,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,iBAAiB;IAClC,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -6,8 +6,6 @@ export declare const constantPoolsFilters: GetProgramAccountsFilter[];
6
6
  export declare const stablePoolsFilters: GetProgramAccountsFilter[];
7
7
  export declare const memePoolsFilters: GetProgramAccountsFilter[];
8
8
  export declare const farmAccountFilter: (owner: string) => GetProgramAccountsFilter[];
9
- export declare const dlmmPositionAccountFilter: (owner: string) => GetProgramAccountsFilter[];
10
- export declare const dlmmPositionV2AccountFilter: (owner: string) => GetProgramAccountsFilter[];
11
9
  export declare const stakeEscrowFilter: (owner: string) => GetProgramAccountsFilter[];
12
10
  export declare const feeVaultFilter: () => GetProgramAccountsFilter[];
13
11
  export declare const unstakeFilter: (stakeEscrow: string) => GetProgramAccountsFilter[];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.unstakeFilter = exports.feeVaultFilter = exports.stakeEscrowFilter = exports.dlmmPositionV2AccountFilter = exports.dlmmPositionAccountFilter = exports.farmAccountFilter = exports.memePoolsFilters = exports.stablePoolsFilters = exports.constantPoolsFilters = exports.vaultsFilters = void 0;
3
+ exports.unstakeFilter = exports.feeVaultFilter = exports.stakeEscrowFilter = exports.farmAccountFilter = exports.memePoolsFilters = exports.stablePoolsFilters = exports.constantPoolsFilters = exports.vaultsFilters = void 0;
4
4
  exports.vaultsFilters = [{ dataSize: 10240 }];
5
5
  exports.constantPoolsFilters = [
6
6
  { dataSize: 944 },
@@ -19,26 +19,6 @@ const farmAccountFilter = (owner) => [
19
19
  },
20
20
  ];
21
21
  exports.farmAccountFilter = farmAccountFilter;
22
- const dlmmPositionAccountFilter = (owner) => [
23
- { dataSize: 7560 },
24
- {
25
- memcmp: {
26
- offset: 40,
27
- bytes: owner,
28
- },
29
- },
30
- ];
31
- exports.dlmmPositionAccountFilter = dlmmPositionAccountFilter;
32
- const dlmmPositionV2AccountFilter = (owner) => [
33
- { dataSize: 8120 },
34
- {
35
- memcmp: {
36
- offset: 40,
37
- bytes: owner,
38
- },
39
- },
40
- ];
41
- exports.dlmmPositionV2AccountFilter = dlmmPositionV2AccountFilter;
42
22
  const stakeEscrowFilter = (owner) => [
43
23
  {
44
24
  memcmp: {
@@ -1 +1 @@
1
- {"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/filters.ts"],"names":[],"mappings":";;;AAEa,QAAA,aAAa,GAA+B,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;AAElE,QAAA,oBAAoB,GAA+B;IAC9D,EAAE,QAAQ,EAAE,GAAG,EAAE;CAClB,CAAC;AAEW,QAAA,kBAAkB,GAA+B;IAC5D,EAAE,QAAQ,EAAE,IAAI,EAAE;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;AAZW,QAAA,aAAa,iBAYxB"}
1
+ {"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/meteora/filters.ts"],"names":[],"mappings":";;;AAEa,QAAA,aAAa,GAA+B,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;AAElE,QAAA,oBAAoB,GAA+B;IAC9D,EAAE,QAAQ,EAAE,GAAG,EAAE;CAClB,CAAC;AAEW,QAAA,kBAAkB,GAA+B;IAC5D,EAAE,QAAQ,EAAE,IAAI,EAAE;CACnB,CAAC;AAEW,QAAA,gBAAgB,GAA+B,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC;AAEzE,MAAM,iBAAiB,GAAG,CAC/B,KAAa,EACe,EAAE,CAAC;IAC/B,EAAE,QAAQ,EAAE,GAAG,EAAE;IACjB;QACE,MAAM,EAAE;YACN,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,KAAK;SACb;KACF;CACF,CAAC;AAVW,QAAA,iBAAiB,qBAU5B;AAEK,MAAM,iBAAiB,GAAG,CAC/B,KAAa,EACe,EAAE,CAAC;IAC/B;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,KAAK;SACb;KACF;IACD;QACE,QAAQ,EAAE,GAAG;KACd;CACF,CAAC;AAZW,QAAA,iBAAiB,qBAY5B;AAEK,MAAM,cAAc,GAAG,GAA+B,EAAE,CAAC;IAC9D;QACE,QAAQ,EAAE,IAAI;KACf;CACF,CAAC;AAJW,QAAA,cAAc,kBAIzB;AAEK,MAAM,aAAa,GAAG,CAC3B,WAAmB,EACS,EAAE,CAAC;IAC/B;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,WAAW;SACnB;KACF;IACD;QACE,QAAQ,EAAE,GAAG;KACd;CACF,CAAC;AAZW,QAAA,aAAa,iBAYxB"}
@@ -28,14 +28,14 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
28
28
  new web3_js_1.PublicKey(owner).toBuffer(),
29
29
  ], new web3_js_1.PublicKey(constants_1.stakingProgramId))[0],
30
30
  ]))[0];
31
- if (!stakingAccount || stakingAccount.stakedTokens === '0')
31
+ if (!stakingAccount)
32
32
  return [];
33
33
  const stakePoolAccount = yield cache.getItem(constants_1.stakingPoolKey, {
34
34
  prefix: constants_1.platformId,
35
35
  networkId: portfolio_core_1.NetworkId.solana,
36
36
  });
37
37
  if (!stakePoolAccount)
38
- return [];
38
+ throw new Error('Stake pool not found in cache.');
39
39
  const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
40
40
  const element = elementRegistry.addElementMultiple({
41
41
  label: 'Staked',
@@ -1 +1 @@
1
- {"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nxfinance/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAA4E;AAC5E,6CAA4C;AAC5C,gEAAqC;AAErC,2CAMqB;AAErB,iDAAsD;AACtD,+CAAuE;AAEvE,gFAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,cAAc,GAAG,CACrB,MAAM,IAAA,0CAAiC,EACrC,UAAU,EACV,mCAAuB,EACvB;QACE,mBAAS,CAAC,sBAAsB,CAC9B;YACE,IAAI,mBAAS,CAAC,qBAAS,CAAC,CAAC,QAAQ,EAAE;YACnC,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC;YACjC,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE;SAChC,EACD,IAAI,mBAAS,CAAC,4BAAgB,CAAC,CAChC,CAAC,CAAC,CAAC;KACL,CACF,CACF,CAAC,CAAC,CAAC,CAAC;IACL,IAAI,CAAC,cAAc,IAAI,cAAc,C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AAE;SACd;KACF,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/nxfinance/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAA4E;AAC5E,6CAA4C;AAC5C,gEAAqC;AAErC,2CAMqB;AAErB,iDAAsD;AACtD,+CAAuE;AAEvE,gFAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,cAAc,GAAG,CACrB,MAAM,IAAA,0CAAiC,EACrC,UAAU,EACV,mCAAuB,EACvB;QACE,mBAAS,CAAC,sBAAsB,CAC9B;YACE,IAAI,mBAAS,CAAC,qBAAS,CAAC,CAAC,QAAQ,EAAE;YACnC,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC;YACjC,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE;SAChC,EACD,IAAI,mBAAS,CAAC,4BAAgB,CAAC,CAChC,CAAC,CAAC,CAAC;KACL,CACF,CACF,CAAC,CAAC,CAAC,CAAC;IACL,IAAI,CAAC,cAAc;QAAE,OAAO,EAAE,CAAC;IAE/B,MAAM,gBAAgB,GAAG,MAAM,KAAK,CAAC,OAAO,CAC1C,0BAAc,EACd;QACE,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CACF,CAAC;IAEF,IAAI,CAAC,gBAAgB;QAAE,MAAM,IAAI,KAAK,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ACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -33,13 +33,18 @@ const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
33
33
  ],
34
34
  });
35
35
  const amount = (0, bignumber_js_1.default)(res.data.totalAmount);
36
- const isClaimed = amount.isEqualTo(Number(res.data.claimedAmount));
36
+ const isFullyClaimed = amount.isEqualTo(Number(res.data.claimedAmount));
37
37
  return (0, AirdropFetcher_1.getAirdropRaw)({
38
38
  statics: constants_1.airdropStatics,
39
39
  items: [
40
40
  {
41
- amount: amount.dividedBy(Math.pow(10, constants_1.layerDecimals)).toNumber(),
42
- isClaimed,
41
+ amount: isFullyClaimed
42
+ ? amount.dividedBy(Math.pow(10, constants_1.layerDecimals)).toNumber()
43
+ : amount
44
+ .minus(res.data.claimedAmount)
45
+ .dividedBy(Math.pow(10, constants_1.layerDecimals))
46
+ .toNumber(),
47
+ isClaimed: isFullyClaimed,
43
48
  label: 'LAYER',
44
49
  address: constants_1.layerMint,
45
50
  },
@@ -1 +1 @@
1
- {"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/solayer/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,kDAA6C;AAC7C,gEAAqC;AACrC,yDAK8B;AAC9B,2CAMqB;AAGrB,MAAM,QAAQ,GAA2B,CAAO,KAAa,EAAE,EAAE;IAC/D,MAAM,GAAG,GAAmC,MAAM,eAAK,CAAC,GAAG,CACzD,sBAAU,GAAG,KAAK,CACnB,CAAC;IAEF,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,CAAC,WAAW,KAAK,GAAG;QAC3C,OAAO,IAAA,8BAAa,EAAC;YACnB,OAAO,EAAE,0BAAc;YACvB,KAAK,EAAE;gBACL;oBACE,MAAM,EAAE,CAAC;oBACT,SAAS,EAAE,KAAK;oBAChB,KAAK,EAAE,OAAO;oBACd,OAAO,EAAE,qBAAS;iBACnB;aACF;SACF,CAAC,CAAC;IAEL,MAAM,MAAM,GAAG,IAAA,sBAAS,EAAC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC/C,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;IAEnE,OAAO,IAAA,8BAAa,EAAC;QACnB,OAAO,EAAE,0BAAc;QACvB,KAAK,EAAE;YACL;gBACE,MAAM,EAAE,MAAM,CAAC,SAAS,CAAC,SAAA,EAAE,EAAI,yBAAa,CAAA,CAAC,CAAC,QAAQ,EAAE;gBACxD,SAAS;gBACT,KAAK,EAAE,OAAO;gBACd,OAAO,EAAE,qBAAS;aACnB;SACF;KACF,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEW,QAAA,cAAc,GAAmB;IAC5C,EAAE,EAAE,0BAAc,CAAC,EAAE;IACrB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AACW,QAAA,OAAO,GAAG,IAAA,wCAAuB,EAC5C,sBAAc,EACd,oBAAQ,CAAC,EAAE,EACX,iBAAiB,EACjB,0BAAc,CAAC,QAAQ,CACxB,CAAC"}
1
+ {"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/solayer/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,kDAA6C;AAC7C,gEAAqC;AACrC,yDAK8B;AAC9B,2CAMqB;AAGrB,MAAM,QAAQ,GAA2B,CAAO,KAAa,EAAE,EAAE;IAC/D,MAAM,GAAG,GAAmC,MAAM,eAAK,CAAC,GAAG,CACzD,sBAAU,GAAG,KAAK,CACnB,CAAC;IAEF,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,CAAC,WAAW,KAAK,GAAG;QAC3C,OAAO,IAAA,8BAAa,EAAC;YACnB,OAAO,EAAE,0BAAc;YACvB,KAAK,EAAE;gBACL;oBACE,MAAM,EAAE,CAAC;oBACT,SAAS,EAAE,KAAK;oBAChB,KAAK,EAAE,OAAO;oBACd,OAAO,EAAE,qBAAS;iBACnB;aACF;SACF,CAAC,CAAC;IAEL,MAAM,MAAM,GAAG,IAAA,sBAAS,EAAC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC/C,MAAM,cAAc,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;IAExE,OAAO,IAAA,8BAAa,EAAC;QACnB,OAAO,EAAE,0BAAc;QACvB,KAAK,EAAE;YACL;gBACE,MAAM,EAAE,cAAc;oBACpB,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,SAAA,EAAE,EAAI,yBAAa,CAAA,CAAC,CAAC,QAAQ,EAAE;oBAClD,CAAC,CAAC,MAAM;yBACH,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC;yBAC7B,SAAS,CAAC,SAAA,EAAE,EAAI,yBAAa,CAAA,CAAC;yBAC9B,QAAQ,EAAE;gBACjB,SAAS,EAAE,cAAc;gBACzB,KAAK,EAAE,OAAO;gBACd,OAAO,EAAE,qBAAS;aACnB;SACF;KACF,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEW,QAAA,cAAc,GAAmB;IAC5C,EAAE,EAAE,0BAAc,CAAC,EAAE;IACrB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AACW,QAAA,OAAO,GAAG,IAAA,wCAAuB,EAC5C,sBAAc,EACd,oBAAQ,CAAC,EAAE,EACX,iBAAiB,EACjB,0BAAc,CAAC,QAAQ,CACxB,CAAC"}
@@ -61,10 +61,24 @@ class ElementBorrowlendBuilder extends ElementBuilder_1.ElementBuilder {
61
61
  get(networkId, platformId, tokenPrices) {
62
62
  var _a;
63
63
  const suppliedAssets = this.suppliedAssets
64
- .map((a) => a.get(networkId, tokenPrices))
64
+ .map((sAB, i) => {
65
+ const sA = sAB.get(networkId, tokenPrices);
66
+ if (sA === null) {
67
+ this.suppliedYields.splice(i, 1);
68
+ this.suppliedLtvs.splice(i, 1);
69
+ }
70
+ return sA;
71
+ })
65
72
  .filter((a) => a !== null);
66
73
  const borrowedAssets = this.borrowedAssets
67
- .map((a) => a.get(networkId, tokenPrices))
74
+ .map((bAB, i) => {
75
+ const bA = bAB.get(networkId, tokenPrices);
76
+ if (bA === null) {
77
+ this.borrowedYields.splice(i, 1);
78
+ this.borrowedWeights.splice(i, 1);
79
+ }
80
+ return bA;
81
+ })
68
82
  .filter((a) => a !== null && a.value && a.value > 0.002);
69
83
  const rewardAssets = this.rewardAssets
70
84
  .map((a) => a.get(networkId, tokenPrices))
@@ -1 +1 @@
1
- {"version":3,"file":"ElementBorrowlendBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/ElementBorrowlendBuilder.ts"],"names":[],"mappings":";;;AAAA,+DAQoC;AACpC,qDAAkD;AAQlD,2DAAwD;AACxD,+DAA4D;AAE5D,MAAa,wBAAyB,SAAQ,+BAAc;IAU1D,YAAY,MAAc;QACxB,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;QAC1B,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;IAC5B,CAAC;IAED,gBAAgB,CAAC,MAAiC;QAChD,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,qCAAiB,CAAC,MAAM,CAA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,EAAE,eAAe;oBACvB,KAAK,EAAE,cAAc;iBACtB;gBACD,KAAK;gBACL,GAAG,EAAE,MAAA,IAAI,CAAC,GAAG,0CAAE,QAAQ,EAAE;gBACzB,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,IAAI,EAAE,IAAI,CAAC,IAAI;aAChB;YACD,KAAK;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;IACJ,CAAC;CACF;AA1JD,4DA0JC"}
1
+ {"version":3,"file":"ElementBorrowlendBuilder.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/ElementBorrowlendBuilder.ts"],"names":[],"mappings":";;;AAAA,+DAQoC;AACpC,qDAAkD;AAQlD,2DAAwD;AACxD,+DAA4D;AAE5D,MAAa,wBAAyB,SAAQ,+BAAc;IAU1D,YAAY,MAAc;QACxB,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;QAC1B,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QACvB,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;IAC5B,CAAC;IAED,gBAAgB,CAAC,MAAiC;QAChD,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,qCAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;IAC1D,CAAC;IAED,uBAAuB,CAAC,MAAmC;QACzD,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,yCAAmB,CAAC,MAAM,CAAC,CAAC,CAAC;IAC5D,CAAC;IAED,gBAAgB,CAAC,MAAiC;QACh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CAAC;QAElE,OAAO;YACL,IAAI,EAAE,qCAAoB,CAAC,UAAU;YACrC,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,SAAS;YACT,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,UAAU;YACzC,IAAI,EAAE;gBACJ,cAAc;gBACd,aAAa;gBACb,cAAc,EAAE,IAAI,CAAC,cAAc;gBACnC,cAAc;gBACd,aAAa;gBACb,cAAc,EAAE,IAAI,CAAC,cAAc;gBACnC,YAAY;gBACZ,WAAW;gBACX,WAAW;gBACX,SAAS,EAAE;oBACT,MAAM,EAAE,eAAe;oBACvB,KAAK,EAAE,cAAc;iBACtB;gBACD,KAAK;gBACL,GAAG,EAAE,MAAA,IAAI,CAAC,GAAG,0CAAE,QAAQ,EAAE;gBACzB,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,IAAI,EAAE,IAAI,CAAC,IAAI;aAChB;YACD,KAAK;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;SAChB,CAAC;IACJ,CAAC;CACF;AA1KD,4DA0KC"}
@@ -0,0 +1,18 @@
1
+ /// <reference types="@drift-labs/sdk/node_modules/@solana/web3.js" />
2
+ /// <reference types="jito-ts/node_modules/@solana/web3.js" />
3
+ import { GpaBuilder } from '@metaplex-foundation/beet-solana';
4
+ import { Connection, PublicKey } from '@solana/web3.js';
5
+ import { GlobalBeetStruct, ParsedAccount } from '../types';
6
+ export declare class ParsedGpa<T> {
7
+ protected readonly connection: Connection;
8
+ protected programId: PublicKey;
9
+ protected beets: GlobalBeetStruct<T>;
10
+ protected gpaBuilder: GpaBuilder<T>;
11
+ static build<T>(connection: Connection, beets: GlobalBeetStruct<T>, programId: PublicKey): ParsedGpa<T>;
12
+ private constructor();
13
+ addInnerFilter(keys: string, val: T[keyof T] & NonNullable<unknown>): this;
14
+ addFilter(key: keyof T & string, val: T[keyof T]): this;
15
+ addDataSizeFilter(size?: number): this;
16
+ run(): Promise<ParsedAccount<T>[]>;
17
+ debug(): this;
18
+ }
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ParsedGpa = void 0;
13
+ const beet_solana_1 = require("@metaplex-foundation/beet-solana");
14
+ class ParsedGpa {
15
+ static build(connection, beets, programId) {
16
+ return new ParsedGpa(connection, programId, beets);
17
+ }
18
+ constructor(connection, programId, beets) {
19
+ this.connection = connection;
20
+ this.programId = programId;
21
+ this.beets = beets;
22
+ this.gpaBuilder = beet_solana_1.GpaBuilder.fromStruct(programId, beets);
23
+ }
24
+ addInnerFilter(keys, val) {
25
+ this.gpaBuilder.addInnerFilter(keys, val);
26
+ return this;
27
+ }
28
+ addFilter(key, val) {
29
+ this.gpaBuilder.addFilter(key, val);
30
+ return this;
31
+ }
32
+ addDataSizeFilter(size) {
33
+ this.gpaBuilder.dataSize(!size && 'byteSize' in this.beets ? this.beets.byteSize : size);
34
+ return this;
35
+ }
36
+ run() {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ const accounts = yield this.gpaBuilder.run(this.connection);
39
+ return accounts.map((account) => (Object.assign({ pubkey: account.pubkey, lamports: account.account.lamports }, this.beets.deserialize(account.account.data)[0])));
40
+ });
41
+ }
42
+ debug() {
43
+ console.log(this.programId.toString());
44
+ console.log(this.gpaBuilder.config.filters);
45
+ return this;
46
+ }
47
+ }
48
+ exports.ParsedGpa = ParsedGpa;
49
+ //# sourceMappingURL=ParsedGpa.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ParsedGpa.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/solana/beets/ParsedGpa.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kEAA8D;AAK9D,MAAa,SAAS;IAGpB,MAAM,CAAC,KAAK,CACV,UAAsB,EACtB,KAA0B,EAC1B,SAAoB;QAEpB,OAAO,IAAI,SAAS,CAAI,UAAU,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;IACxD,CAAC;IAED,YACqB,UAAsB,EAC/B,SAAoB,EACpB,KAA0B;QAFjB,eAAU,GAAV,UAAU,CAAY;QAC/B,cAAS,GAAT,SAAS,CAAW;QACpB,UAAK,GAAL,KAAK,CAAqB;QAEpC,IAAI,CAAC,UAAU,GAAG,wBAAU,CAAC,UAAU,CACrC,SAAS,EACT,KAA+C,CAChD,CAAC;IACJ,CAAC;IAED,cAAc,CAAC,IAAY,EAAE,GAAsC;QACjE,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAC1C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,SAAS,CAAC,GAAqB,EAAE,GAAe;QAC9C,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACpC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,iBAAiB,CAAC,IAAa;QAC7B,IAAI,CAAC,UAAU,CAAC,QAAQ,CACtB,CAAC,IAAI,IAAI,UAAU,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAC/D,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC;IAEK,GAAG;;YACP,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YAC5D,O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