@sonarwatch/portfolio-plugins 0.14.129 → 0.14.131

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 (34) hide show
  1. package/CHANGELOG.md +9 -1
  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/dcaFetcher.js +1 -0
  8. package/src/plugins/jupiter/exchange/dcaFetcher.js.map +1 -1
  9. package/src/plugins/jupiter/exchange/limitFetcher.js +1 -0
  10. package/src/plugins/jupiter/exchange/limitFetcher.js.map +1 -1
  11. package/src/plugins/jupiter/exchange/valueAverageFetcher.js +1 -1
  12. package/src/plugins/jupiter/exchange/valueAverageFetcher.js.map +1 -1
  13. package/src/plugins/lulo/depositsFetcher.js +0 -2
  14. package/src/plugins/lulo/depositsFetcher.js.map +1 -1
  15. package/src/plugins/meteora/dlmmPositionsFetcher.js +9 -3
  16. package/src/plugins/meteora/dlmmPositionsFetcher.js.map +1 -1
  17. package/src/plugins/meteora/filters.d.ts +0 -2
  18. package/src/plugins/meteora/filters.js +1 -21
  19. package/src/plugins/meteora/filters.js.map +1 -1
  20. package/src/plugins/nxfinance/stakingFetcher.js +2 -2
  21. package/src/plugins/nxfinance/stakingFetcher.js.map +1 -1
  22. package/src/plugins/solayer/airdropFetcher.js +8 -3
  23. package/src/plugins/solayer/airdropFetcher.js.map +1 -1
  24. package/src/utils/clients/getClientSolanaAlt.d.ts +2 -0
  25. package/src/utils/clients/getClientSolanaAlt.js +93 -0
  26. package/src/utils/clients/getClientSolanaAlt.js.map +1 -0
  27. package/src/utils/elementbuilder/ElementBorrowlendBuilder.js +16 -2
  28. package/src/utils/elementbuilder/ElementBorrowlendBuilder.js.map +1 -1
  29. package/src/utils/elementbuilder/ElementRegistry.d.ts +1 -3
  30. package/src/utils/elementbuilder/ElementRegistry.js +2 -5
  31. package/src/utils/elementbuilder/ElementRegistry.js.map +1 -1
  32. package/src/utils/solana/beets/ParsedGpa.d.ts +18 -0
  33. package/src/utils/solana/beets/ParsedGpa.js +49 -0
  34. package/src/utils/solana/beets/ParsedGpa.js.map +1 -0
package/CHANGELOG.md CHANGED
@@ -2,10 +2,18 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
- ## [0.14.129](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.128...plugins-0.14.129) (2025-02-26)
5
+ ## [0.14.131](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.130...plugins-0.14.131) (2025-02-27)
6
6
 
7
7
 
8
8
 
9
+ ## [0.14.130](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.129...plugins-0.14.130) (2025-02-27)
10
+
11
+
12
+
13
+ ## [0.14.129](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.128...plugins-0.14.129) (2025-02-26)
14
+
15
+
16
+
9
17
  ## [0.14.128](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.127...plugins-0.14.128) (2025-02-25)
10
18
 
11
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-plugins",
3
- "version": "0.14.129",
3
+ "version": "0.14.131",
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,S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C,CAAC,OAAO,EAAE,CAAC,EAC1E,0BAAc,CACf,CAAC,CAAC,CAAC,CAAC;AACP,CAAC;AAEY,QAAA,qBAAqB,GAAmB;IACnD,EAAE,EAAE,GAAG,+BAAmB,CAAC,EAAE,MAAM;IACnC,SAAS,EAAE,0BAAS,CAAC,QAAQ;IAC7B,QAAQ,EAAE,YAAY;CACvB,CAAC;AAEW,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;AA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AmB;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"}
@@ -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;AACt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YACpB,GAAG,EAAE,MAAM,CAAC,MAAM;YAClB,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;YACtD,UAAU,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE;SAC3C,CAAC,CAAC;IACL,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEnC,OAAO;QACL;YACE,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,IAAI,EAAE,qCAAoB,CAAC,QAAQ;YACnC,KAAK,EAAE,SAAS;YAChB,UAAU,EAAV,sBAAU;YACV,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE;gBACJ,MAAM;aACP;YACD,KAAK,EAAE,IAAA,+BAAc,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;SAClD;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,cAAc;IAC/B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"dlmmVaultsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/debridge/dlmmVaultsFetcher.ts"],"names":[],"mappings":";AAAA,2BAA2B;AAC3B,mBAAmB;;;;;;;;;;;AAEnB,+DAAuD;AAGvD,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,GAAoB,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;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,cAAc;IAC/B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -40,6 +40,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
40
40
  },
41
41
  initialInputAmount: account.inDeposited,
42
42
  withdrawnOutputAmount: account.outWithdrawn,
43
+ createdAt: account.createdAt.toNumber() * 1000,
43
44
  });
44
45
  }
45
46
  return elementRegistry.getElements(cache);
@@ -1 +1 @@
1
- {"version":3,"file":"dcaFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/dcaFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,oDAAyD;AACzD,kDAAiE;AACjE,2CAAuD;AACvD,uCAAsC;AACtC,uCAAuC;AACvC,mFAAgF;AAEhF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,MAAM,EACN,mBAAS,EACT,wBAAY,EACZ,IAAA,oBAAU,EAAC,KAAK,CAAC,CAClB,CAAC;IACF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;IAE1E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACzC,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAE5B,MAAM,OAAO,GAAG,eAAe,CAAC,eAAe,CAAC;YAC9C,KAAK,EAAE,KAAK;YACZ,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE;YAC9B,IAAI,EAAE,2BAA2B;SAClC,CAAC,CAAC;QAEH,OAAO,CAAC,QAAQ,CAAC;YACf,UAAU,EAAE;gBACV,OAAO,EAAE,OAAO,CAAC,SAAS;gBAC1B,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;aAClD;YACD,WAAW,EAAE;gBACX,OAAO,EAAE,OAAO,CAAC,UAAU;gBAC3B,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC;aACxD;YACD,kBAAkB,EAAE,OAAO,CAAC,WAAW;YACvC,qBAAqB,EAAE,OAAO,CAAC,YAAY;SAC5C,CAAC,CAAC;IACL,CAAC;IAED,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,MAAM;IACvB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"dcaFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/dcaFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,oDAAyD;AACzD,kDAAiE;AACjE,2CAAuD;AACvD,uCAAsC;AACtC,uCAAuC;AACvC,mFAAgF;AAEhF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,MAAM,EACN,mBAAS,EACT,wBAAY,EACZ,IAAA,oBAAU,EAAC,KAAK,CAAC,CAClB,CAAC;IACF,IAAI,QAAQ,CAA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, void 0, function* (
36
36
  tags: isV1 ? ['deprecated'] : undefined,
37
37
  ref: account.pubkey.toString(),
38
38
  link: 'https://jup.ag/trigger/',
39
+ label: 'LimitOrder',
39
40
  });
40
41
  element.setTrade({
41
42
  inputAsset: {
@@ -1 +1 @@
1
- {"version":3,"file":"limitFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/limitFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,oDAAyD;AACzD,kDAAiE;AACjE,2CAA6E;AAC7E,uCAAyC;AACzC,mFAAgF;AAChF,uCAAiE;AAEjE,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACpC,KAAK;QACL,IAAA,iCAAwB,EACtB,MAAM,EACN,0BAAgB,EAChB,4BAAgB,EAChB,IAAA,sBAAY,EAAC,KAAK,CAAC,CACpB;QACD,KAAK;QACL,IAAA,iCAAwB,EACtB,MAAM,EACN,4BAAkB,EAClB,4BAAgB,EAChB,IAAA,sBAAY,EAAC,KAAK,CAAC,CACpB;KACF,CAAC,CAAC;IACH,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IACvC,MAAM,QAAQ,GAAG,WAAW,CAAC,IAAI,EAAE,CAAC;IACpC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;IAE1E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACzC,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAE5B,MAAM,IAAI,GAAG,CAAC,IAAI,QAAQ,GAAG,CAAC,CAAC;QAE/B,MAAM,OAAO,GAAG,eAAe,CAAC,eAAe,CAAC;YAC9C,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,SAAS;YACvC,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE;YAC9B,IAAI,EAAE,yBAAyB;SAChC,CAAC,CAAC;QAEH,OAAO,CAAC,QAAQ,CAAC;YACf,UAAU,EAAE;gBACV,OAAO,EAAE,OAAO,CAAC,SAAS;gBAC1B,MAAM,EAAE,OAAO,CAAC,YAAY;aAC7B;YACD,WAAW,EAAE;gBACX,OAAO,EAAE,OAAO,CAAC,UAAU;gBAC3B,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC;aAC5D;YACD,kBAAkB,EAAE,OAAO,CAAC,eAAe;YAC3C,oBAAoB,EAAE,OAAO,CAAC,eAAe;YAC7C,qBAAqB,EAAE,CAAC;SACzB,CAAC,CAAC;IACL,CAAC;IAED,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,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,+DAAuD;AAGvD,oDAAyD;AACzD,kDAAiE;AACjE,2CAA6E;AAC7E,uCAAyC;AACzC,mFAAgF;AAChF,uCAAiE;AAEjE,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MA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ACD,WAAW,EAAE;gBACX,OAAO,EAAE,OAAO,CAAC,UAAU;gBAC3B,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC;aAC5D;YACD,kBAAkB,EAAE,OAAO,CAAC,eAAe;YAC3C,oBAAoB,EAAE,OAAO,CAAC,eAAe;YAC7C,qBAAqB,EAAE,CAAC;SACzB,CAAC,CAAC;IACL,CAAC;IAED,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,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"}
@@ -51,7 +51,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
51
51
  type: portfolio_core_1.PortfolioElementType.trade,
52
52
  networkId: portfolio_core_1.NetworkId.solana,
53
53
  platformId: constants_1.platformId,
54
- label: 'Deposit',
54
+ label: 'DCA',
55
55
  data: {
56
56
  assets: {
57
57
  input: inputAsset,
@@ -1 +1 @@
1
- {"version":3,"file":"valueAverageFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/valueAverageFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AAGpC,2CAAgE;AAChE,oDAAyD;AACzD,kDAAiE;AACjE,wGAAgF;AAChF,uCAA+C;AAC/C,uCAAgD;AAEhD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,MAAM,EACN,4BAAkB,EAClB,iCAAqB,EACrB,IAAA,6BAAmB,EAAC,KAAK,CAAC,CAC3B,CAAC;IACF,IAA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O,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,gBAAgB;IACjC,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"valueAverageFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/valueAverageFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AAGpC,2CAAgE;AAChE,oDAAyD;AACzD,kDAAiE;AACjE,wGAAgF;AAChF,uCAA+C;AAC/C,uCAAgD;AAEhD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,MAAM,EACN,4BAAkB,EAClB,iCAAqB,EACrB,IAAA,6BAAmB,EAAC,KAAK,CAAC,CAC3B,CAAC;IACF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,mBAAmB,CACjD,QAAQ;SACL,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;SAC7D,IAAI,EAAE,EACT,0BAAS,CAAC,MAAM,CACjB,CAAC;IAEF,MAAM,QAAQ,GAA4B,EAAE,CAAC;IAC7C,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,YAAY,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;QAClD,MAAM,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC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CAAC,kBAAkB,CAAC,CAAC,QAAQ,EAAE;gBACnE,kBAAkB;gBAClB,YAAY;gBACZ,aAAa;gBACb,UAAU,EAAE,eAAe,CAAC,KAAK;gBACjC,WAAW,EAAE,gBAAgB,CAAC,KAAK;gBACnC,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;gBACnD,qBAAqB,EAAE,OAAO,CAAC,YAAY;qBACxC,GAAG,CAAC,SAAA,EAAE,EAAI,gBAAgB,CAAC,QAAQ,CAAA,CAAC;qBACpC,QAAQ,EAAE;gBACb,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE;gBAC9B,IAAI,EAAE,2BAA2B;aAClC;YACD,KAAK,EAAE,IAAA,+BAAc,EAAC,CAAC,UAAU,CAAC,KAAK,EAAE,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,KAAK,KAAI,CAAC,CAAC,CAAC;SACnE,CAAC;QACF,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACzB,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,gBAAgB;IACjC,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -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,2CAA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AC,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;AAE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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,EAAE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AC,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,iBAAiB,C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AAE;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;CACn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ZW,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,CAAC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;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,CAA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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"}
@@ -0,0 +1,2 @@
1
+ import { SolanaClient } from './types';
2
+ export default function getClientSolanaAlt(): SolanaClient;
@@ -0,0 +1,93 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ const axios_1 = __importDefault(require("axios"));
16
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
17
+ const web3_js_1 = require("@solana/web3.js");
18
+ const node_http_1 = require("node:http");
19
+ const getBasicAuthHeaders_1 = require("../misc/getBasicAuthHeaders");
20
+ const constants_1 = require("./constants");
21
+ const sleep_1 = __importDefault(require("../misc/sleep"));
22
+ const agent = new node_http_1.Agent({
23
+ maxSockets: 100,
24
+ });
25
+ const axiosObject = axios_1.default.create({
26
+ httpsAgent: agent,
27
+ });
28
+ function axiosFetchWithRetries(input, init, retryAttempts = 0) {
29
+ return __awaiter(this, void 0, void 0, function* () {
30
+ let attempt = 0;
31
+ let fInit = init;
32
+ // Adding default headers
33
+ if (!fInit || !fInit.headers) {
34
+ fInit = Object.assign(Object.assign({}, fInit), { headers: Object.assign({ 'Content-Type': 'application/json' }, fInit === null || fInit === void 0 ? void 0 : fInit.headers) });
35
+ }
36
+ // console.log(' fInit:', fInit);
37
+ while (attempt < retryAttempts) {
38
+ try {
39
+ const axiosHeaders = {};
40
+ new Headers(fInit.headers).forEach((value, key) => {
41
+ axiosHeaders[key] = value;
42
+ });
43
+ const axiosConfig = {
44
+ data: fInit.body,
45
+ headers: axiosHeaders,
46
+ method: fInit.method,
47
+ baseURL: input.toString(),
48
+ validateStatus: () => true,
49
+ };
50
+ const axiosResponse = yield axiosObject.request(axiosConfig);
51
+ const { data, status, statusText, headers } = axiosResponse;
52
+ // Mapping headers from axios to fetch format
53
+ const headersArray = Object.entries(headers).map(([key, value]) => [key, value]);
54
+ const fetchHeaders = new Headers(headersArray);
55
+ const response = new Response(JSON.stringify(data), {
56
+ status,
57
+ statusText,
58
+ headers: fetchHeaders,
59
+ });
60
+ // Comment the above lines and uncomment the following one to switch from axios to fetch
61
+ // const response = await fetch(input, init);
62
+ // Traffic might get routed to backups or node restarts or if anything throws a 502, retry
63
+ if (response.status === 502) {
64
+ attempt += 1;
65
+ yield (0, sleep_1.default)(100 * attempt);
66
+ continue;
67
+ }
68
+ return yield Promise.resolve(response);
69
+ }
70
+ catch (e) {
71
+ attempt += 1;
72
+ continue;
73
+ }
74
+ }
75
+ return Promise.reject(new Error(`Max retries reached: ${retryAttempts}`));
76
+ });
77
+ }
78
+ function getClientSolanaAlt() {
79
+ const rpcEndpoint = (0, constants_1.getRpcEndpoint)(portfolio_core_1.NetworkId.solana);
80
+ const httpHeaders = rpcEndpoint.basicAuth
81
+ ? (0, getBasicAuthHeaders_1.getBasicAuthHeaders)(rpcEndpoint.basicAuth.username, rpcEndpoint.basicAuth.password)
82
+ : undefined;
83
+ return new web3_js_1.Connection(rpcEndpoint.url, {
84
+ httpHeaders,
85
+ fetch(input, init) {
86
+ return __awaiter(this, void 0, void 0, function* () {
87
+ return axiosFetchWithRetries(input, init, 5);
88
+ });
89
+ },
90
+ });
91
+ }
92
+ exports.default = getClientSolanaAlt;
93
+ //# sourceMappingURL=getClientSolanaAlt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getClientSolanaAlt.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/clients/getClientSolanaAlt.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,+DAAuD;AACvD,6CAA6C;AAE7C,yCAAkC;AAClC,qEAAkE;AAClE,2CAA6C;AAE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C,WAAW,CAAC,GAAG,EAAE;QACrC,WAAW;QACL,KAAK,CAAC,KAAK,EAAE,IAAK;;gBACtB,OAAO,qBAAqB,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;YAC/C,CAAC;SAAA;KACF,CAAC,CAAC;AACL,CAAC;AAfD,qCAeC"}
@@ -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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,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;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;Q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AAC,MAAM,KAAK,cAAc,CAAC,MAAM;gBAChD,CAAC,CAAC,IAAI,CAAC,YAAY;gBACnB,CAAC,CAAC,SAAS;YACf,eAAe,EACb,IAAI,CAAC,eAAe,CAAC,MAAM,KAAK,cAAc,CAAC,MAAM;gBACnD,CAAC,CAAC,IAAI,CAAC,eAAe;gBACtB,CAAC,CAAC,SAAS;YACf,eAAe;SAChB,CAAC,CAAC;QAEH,IAAI,CAAC,aAAa,IAAI,CAAC,aAAa,IAAI,CAAC,WAAW;YAAE,OAAO,IAAI,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"}
@@ -20,8 +20,6 @@ export declare class ElementRegistry {
20
20
  }): ElementConcentratedLiquidityBuilder;
21
21
  addElementBorrowlend(params: Omit<Params, 'type'>): ElementBorrowlendBuilder;
22
22
  addElementLeverage(params: Omit<Params, 'type'>): ElementLeverageBuilder;
23
- addElementTrade(elementParams?: Omit<Params, 'type' | 'label'> & {
24
- label?: PortfolioElementLabel;
25
- }): ElementTradeBuilder;
23
+ addElementTrade(params: Omit<Params, 'type'>): ElementTradeBuilder;
26
24
  getElements(cache: Cache): Promise<PortfolioElement[]>;
27
25
  }
@@ -48,11 +48,8 @@ class ElementRegistry {
48
48
  this.elements.push(elementBuilder);
49
49
  return elementBuilder;
50
50
  }
51
- addElementTrade(elementParams) {
52
- const elementBuilder = new ElementTradeBuilder_1.ElementTradeBuilder({
53
- type: portfolio_core_1.PortfolioElementType.trade,
54
- label: (elementParams === null || elementParams === void 0 ? void 0 : elementParams.label) || 'LimitOrder',
55
- });
51
+ addElementTrade(params) {
52
+ const elementBuilder = new ElementTradeBuilder_1.ElementTradeBuilder(Object.assign(Object.assign({}, params), { type: portfolio_core_1.PortfolioElementType.trade }));
56
53
  this.elements.push(elementBuilder);
57
54
  return elementBuilder;
58
55
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ElementRegistry.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/ElementRegistry.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAKoC;AAIpC,qEAAkE;AAClE,uEAAoE;AACpE,yEAAsE;AACtE,qEAAkE;AAClE,+FAA4F;AAC5F,+DAA4D;AAE5D,MAAa,eAAe;IAK1B,YAAY,SAAwB,EAAE,UAAkB;QACtD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IACrB,CAAC;IAED,kBAAkB,CAAC,MAA4B;QAC7C,MAAM,cAAc,GAAG,IAAI,+CAAsB,iCAC5C,MAAM,KACT,IAAI,EAAE,qCAAoB,CAAC,QAAQ,IACnC,CAAC;QACH,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACnC,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,mBAAmB,CAAC,MAA4B;QAC9C,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CAAE,KAAK,KAAI,YAAY;SAC5C,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACnC,OAAO,cAAc,CAAC;IACxB,CAAC;IAEK,WAAW,CAAC,KAAY;;YAC5B,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;YAClE,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,mBAAmB,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;YAE3E,OAAO,IAAI,CAAC,QAAQ;iBACjB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;iBAC/D,MAAM,CACL,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CACtB,CAAC;QAC5B,CAAC;KAAA;CACF;AArFD,0CAqFC"}
1
+ {"version":3,"file":"ElementRegistry.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/ElementRegistry.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAKoC;AAIpC,qEAAkE;AAClE,uEAAoE;AACpE,yEAAsE;AACtE,qEAAkE;AAClE,+FAA4F;AAC5F,+DAA4D;AAE5D,MAAa,eAAe;IAK1B,YAAY,SAAwB,EAAE,UAAkB;QACtD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IACrB,CAAC;IAED,kBAAkB,CAAC,MAA4B;QAC7C,MAAM,cAAc,GAAG,IAA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AC,CAAC;QACnC,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,eAAe,CAAC,MAA4B;QAC1C,MAAM,cAAc,GAAG,IAAI,yCAAmB,iCACzC,MAAM,KACT,IAAI,EAAE,qCAAoB,CAAC,KAAK,IAChC,CAAC;QACH,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACnC,OAAO,cAAc,CAAC;IACxB,CAAC;IAEK,WAAW,CAAC,KAAY;;YAC5B,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;YAClE,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,mBAAmB,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;YAE3E,OAAO,IAAI,CAAC,QAAQ;iBACjB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;iBAC/D,MAAM,CACL,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CACtB,CAAC;QAC5B,CAAC;KAAA;CACF;AAjFD,0CAiFC"}
@@ -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,KAA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