@sonarwatch/portfolio-plugins 0.12.177 → 0.12.178

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/package.json +1 -1
  3. package/src/index.js +4 -0
  4. package/src/index.js.map +1 -1
  5. package/src/plugins/adrena/constants.d.ts +8 -0
  6. package/src/plugins/adrena/constants.js +18 -0
  7. package/src/plugins/adrena/constants.js.map +1 -0
  8. package/src/plugins/adrena/custodiesJob.d.ts +3 -0
  9. package/src/plugins/adrena/custodiesJob.js +34 -0
  10. package/src/plugins/adrena/custodiesJob.js.map +1 -0
  11. package/src/plugins/adrena/filters.d.ts +3 -0
  12. package/src/plugins/adrena/filters.js +21 -0
  13. package/src/plugins/adrena/filters.js.map +1 -0
  14. package/src/plugins/adrena/helpers.d.ts +5 -0
  15. package/src/plugins/adrena/helpers.js +22 -0
  16. package/src/plugins/adrena/helpers.js.map +1 -0
  17. package/src/plugins/adrena/index.d.ts +6 -0
  18. package/src/plugins/adrena/index.js +14 -0
  19. package/src/plugins/adrena/index.js.map +1 -0
  20. package/src/plugins/adrena/positionsFetcher.d.ts +3 -0
  21. package/src/plugins/adrena/positionsFetcher.js +49 -0
  22. package/src/plugins/adrena/positionsFetcher.js.map +1 -0
  23. package/src/plugins/adrena/stakingFetcher.d.ts +3 -0
  24. package/src/plugins/adrena/stakingFetcher.js +69 -0
  25. package/src/plugins/adrena/stakingFetcher.js.map +1 -0
  26. package/src/plugins/adrena/structs.d.ts +187 -0
  27. package/src/plugins/adrena/structs.js +175 -0
  28. package/src/plugins/adrena/structs.js.map +1 -0
  29. package/src/plugins/adrena/types.d.ts +9 -0
  30. package/src/plugins/adrena/types.js +3 -0
  31. package/src/plugins/adrena/types.js.map +1 -0
  32. package/src/plugins/elemental/depositFetcher.js +0 -8
  33. package/src/plugins/elemental/depositFetcher.js.map +1 -1
  34. package/src/plugins/flash/helpers.js +16 -1
  35. package/src/plugins/flash/helpers.js.map +1 -1
  36. package/src/plugins/flash/types.d.ts +5 -0
  37. package/src/plugins/hawksight/positionsFetcher.js +4 -0
  38. package/src/plugins/hawksight/positionsFetcher.js.map +1 -1
  39. package/src/plugins/jupiter/exchange/constants.d.ts +1 -0
  40. package/src/plugins/jupiter/exchange/constants.js +2 -1
  41. package/src/plugins/jupiter/exchange/constants.js.map +1 -1
  42. package/src/plugins/jupiter/exchange/filters.d.ts +1 -0
  43. package/src/plugins/jupiter/exchange/filters.js +11 -1
  44. package/src/plugins/jupiter/exchange/filters.js.map +1 -1
  45. package/src/plugins/jupiter/exchange/lockFetcher.d.ts +3 -0
  46. package/src/plugins/jupiter/exchange/lockFetcher.js +47 -0
  47. package/src/plugins/jupiter/exchange/lockFetcher.js.map +1 -0
  48. package/src/plugins/jupiter/exchange/structs.d.ts +19 -0
  49. package/src/plugins/jupiter/exchange/structs.js +19 -1
  50. package/src/plugins/jupiter/exchange/structs.js.map +1 -1
  51. package/src/plugins/jupiter/index.js +2 -0
  52. package/src/plugins/jupiter/index.js.map +1 -1
  53. package/src/plugins/navi/collateralFetcher.js +42 -81
  54. package/src/plugins/navi/collateralFetcher.js.map +1 -1
  55. package/src/utils/elementbuilder/ElementBorrowlendBuilder.js +1 -1
  56. package/src/utils/elementbuilder/ElementBorrowlendBuilder.js.map +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.12.178](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.177...plugins-0.12.178) (2024-10-04)
6
+
7
+
8
+
5
9
  ## [0.12.177](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.176...plugins-0.12.177) (2024-10-03)
6
10
 
7
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-plugins",
3
- "version": "0.12.177",
3
+ "version": "0.12.178",
4
4
  "type": "commonjs",
5
5
  "types": "./src/index.d.ts",
6
6
  "peerDependencies": {
package/src/index.js CHANGED
@@ -143,6 +143,7 @@ const stabble_1 = require("./plugins/stabble");
143
143
  const francium_1 = require("./plugins/francium");
144
144
  const adrastea_1 = require("./plugins/adrastea");
145
145
  const elemental_1 = require("./plugins/elemental");
146
+ const adrena_1 = require("./plugins/adrena");
146
147
  var constants_1 = require("./plugins/tokens/constants");
147
148
  Object.defineProperty(exports, "walletTokensPlatform", { enumerable: true, get: function () { return constants_1.walletTokensPlatform; } });
148
149
  Object.defineProperty(exports, "walletNftsPlatform", { enumerable: true, get: function () { return constants_1.walletNftsPlatform; } });
@@ -279,6 +280,7 @@ exports.platforms = [
279
280
  ...francium_1.platforms,
280
281
  ...adrastea_1.platforms,
281
282
  ...elemental_1.platforms,
283
+ ...adrena_1.platforms,
282
284
  ];
283
285
  // JOBS //
284
286
  exports.jobs = [
@@ -398,6 +400,7 @@ exports.jobs = [
398
400
  ...francium_1.jobs,
399
401
  ...adrastea_1.jobs,
400
402
  ...elemental_1.jobs,
403
+ ...adrena_1.jobs,
401
404
  ];
402
405
  // FETCHERS //
403
406
  exports.fetchers = [
@@ -519,6 +522,7 @@ exports.fetchers = [
519
522
  ...francium_1.fetchers,
520
523
  ...adrastea_1.fetchers,
521
524
  ...elemental_1.fetchers,
525
+ ...adrena_1.fetchers,
522
526
  ];
523
527
  exports.fetchersByAddressSystem = (0, getFetchersByAddressSystem_1.getFetchersByAddressSystem)(exports.fetchers);
524
528
  exports.airdropFetchers = [
package/src/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,wFAAqF;AACrF,wEAAgD;AAChD,6CAI0B;AAC1B,yDAIgC;AAChC,uDAAgE;AAChE,iDAG4B;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,yCAIwB;AACxB,+CAI2B;AAC3B,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,6CAI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;IACnB,GAAG,gBAAa;IAChB,GAAG,mBAAgB;IACnB,GAAG,kBAAe;IAClB,GAAG,gBAAa;IAChB,GAAG,oBAAiB;IACpB,GAAG,mBAAgB;IACnB,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,mBAAgB;IACnB,GAAG,oBAAiB;CACrB,CAAC;AACW,QAAA,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,gBAAQ,CAAC,CAAC;AAE/D,QAAA,eAAe,GAAqB;IAC/C,GAAG,yBAAsB;IACzB,GAAG,wBAAqB;IACxB,GAAG,yBAAsB;IACzB,sBAAmB;IACnB,sBAAmB;IACnB,yBAAsB;IACtB,sBAAmB;IACnB,GAAG,0BAAuB;CAC3B,CAAC;AACW,QAAA,8BAA8B,GACzC,IAAA,uDAA0B,EAAC,uBAAe,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,wFAAqF;AACrF,wEAAgD;AAChD,6CAI0B;AAC1B,yDAIgC;AAChC,uDAAgE;AAChE,iDAG4B;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,yCAIwB;AACxB,+CAI2B;AAC3B,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,6CAG0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,2DAGiC;AACjC,6CAI0B;AAC1B,2CAKyB;AACzB,2CAIyB;AACzB,qDAA6D;AAC7D,qEAIsC;AACtC,uDAI+B;AAC/B,mDAI6B;AAC7B,qDAG8B;AAC9B,uDAG+B;AAC/B,2CAIyB;AACzB,6CAK0B;AAC1B,6CAG0B;AAC1B,yCAIwB;AACxB,+CAI2B;AAC3B,uDAG+B;AAC/B,yCAGwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,6CAI0B;AAC1B,+CAI2B;AAC3B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GAAG,wBAAqB;IACxB,GAAG,yBAAsB;IACzB,sBAAmB;IACnB,sBAAmB;IACnB,yBAAsB;IACtB,sBAAmB;IACnB,GAAG,0BAAuB;CAC3B,CAAC;AACW,QAAA,8BAA8B,GACzC,IAAA,uDAA0B,EAAC,uBAAe,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { Platform } from '@sonarwatch/portfolio-core';
2
+ import { PublicKey } from '@solana/web3.js';
3
+ export declare const platformId = "adrena";
4
+ export declare const platform: Platform;
5
+ export declare const custodiesCacheKey = "custodies";
6
+ export declare const pid: PublicKey;
7
+ export declare const adxMint = "AuQaustGiaqxRvj2gtCdrd22PBzTn8kM3kEPEkZCtuDw";
8
+ export declare const alpMint = "4yCLi5yWGzpTWMQ1iWHG5CrGYAdBkhyEdsuSugjDUqwj";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.alpMint = exports.adxMint = exports.pid = exports.custodiesCacheKey = exports.platform = exports.platformId = void 0;
4
+ const web3_js_1 = require("@solana/web3.js");
5
+ exports.platformId = 'adrena';
6
+ exports.platform = {
7
+ id: exports.platformId,
8
+ name: 'Adrena',
9
+ image: 'https://sonar.watch/img/platforms/adrena.webp',
10
+ website: 'https://app.adrena.xyz/',
11
+ twitter: 'https://x.com/AdrenaProtocol',
12
+ defiLlamaId: 'adrena', // from https://defillama.com/docs/api
13
+ };
14
+ exports.custodiesCacheKey = `custodies`;
15
+ exports.pid = new web3_js_1.PublicKey('13gDzEXCdocbj8iAiqrScGo47NiSuYENGsRqi3SEAwet');
16
+ exports.adxMint = 'AuQaustGiaqxRvj2gtCdrd22PBzTn8kM3kEPEkZCtuDw';
17
+ exports.alpMint = '4yCLi5yWGzpTWMQ1iWHG5CrGYAdBkhyEdsuSugjDUqwj';
18
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/adrena/constants.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAE/B,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,+CAA+C;IACtD,OAAO,EAAE,yBAAyB;IAClC,OAAO,EAAE,8BAA8B;IACvC,WAAW,EAAE,QAAQ,EAAE,sCAAsC;CAC9D,CAAC;AAEW,QAAA,iBAAiB,GAAG,WAAW,CAAC;AAChC,QAAA,GAAG,GAAG,IAAI,mBAAS,CAC9B,8CAA8C,CAC/C,CAAC;AACW,QAAA,OAAO,GAAG,8CAA8C,CAAC;AACzD,QAAA,OAAO,GAAG,8CAA8C,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Job } from '../../Job';
2
+ declare const job: Job;
3
+ export default job;
@@ -0,0 +1,34 @@
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
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
13
+ const constants_1 = require("./constants");
14
+ const clients_1 = require("../../utils/clients");
15
+ const solana_1 = require("../../utils/solana");
16
+ const structs_1 = require("./structs");
17
+ const filters_1 = require("./filters");
18
+ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
19
+ const client = (0, clients_1.getClientSolana)();
20
+ const custodies = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.custodyStruct, constants_1.pid, filters_1.custodiesFilters);
21
+ if (!custodies)
22
+ return;
23
+ yield cache.setItem(constants_1.custodiesCacheKey, custodies, {
24
+ prefix: constants_1.platformId,
25
+ networkId: portfolio_core_1.NetworkId.solana,
26
+ });
27
+ });
28
+ const job = {
29
+ id: `${constants_1.platformId}-custodies`,
30
+ executor,
31
+ label: 'normal',
32
+ };
33
+ exports.default = job;
34
+ //# sourceMappingURL=custodiesJob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custodiesJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/adrena/custodiesJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,2CAAiE;AACjE,iDAAsD;AACtD,+CAA8D;AAC9D,uCAA0C;AAC1C,uCAA6C;AAE7C,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,SAAS,GAAG,MAAM,IAAA,iCAAwB,EAC9C,MAAM,EACN,uBAAa,EACb,eAAG,EACH,0BAAgB,CACjB,CAAC;IAEF,IAAI,CAAC,SAAS;QAAE,OAAO;IAEvB,MAAM,KAAK,CAAC,OAAO,CAAC,6BAAiB,EAAE,SAAS,EAAE;QAChD,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AACF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { GetProgramAccountsFilter } from '@solana/web3.js';
2
+ export declare const positionFilter: (owner: string) => GetProgramAccountsFilter[];
3
+ export declare const custodiesFilters: GetProgramAccountsFilter[];
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.custodiesFilters = exports.positionFilter = void 0;
4
+ const positionFilter = (owner) => [
5
+ {
6
+ memcmp: {
7
+ offset: 16,
8
+ bytes: owner,
9
+ },
10
+ },
11
+ {
12
+ dataSize: 288,
13
+ },
14
+ ];
15
+ exports.positionFilter = positionFilter;
16
+ exports.custodiesFilters = [
17
+ {
18
+ dataSize: 824,
19
+ },
20
+ ];
21
+ //# sourceMappingURL=filters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/adrena/filters.ts"],"names":[],"mappings":";;;AAEO,MAAM,cAAc,GAAG,CAAC,KAAa,EAA8B,EAAE,CAAC;IAC3E;QACE,MAAM,EAAE;YACN,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,KAAK;SACb;KACF;IACD;QACE,QAAQ,EAAE,GAAG;KACd;CACF,CAAC;AAVW,QAAA,cAAc,kBAUzB;AAEW,QAAA,gBAAgB,GAA+B;IAC1D;QACE,QAAQ,EAAE,GAAG;KACd;CACF,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { PublicKey } from '@solana/web3.js';
2
+ export declare function getStakingPda(stakedTokenMint: PublicKey): PublicKey;
3
+ export declare function getUserStakingPda(owner: PublicKey, stakingPda: PublicKey): PublicKey;
4
+ export declare function getAlpStakingAccountKey(owner: string): PublicKey;
5
+ export declare function getAdxStakingAccountKey(owner: string): PublicKey;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAdxStakingAccountKey = exports.getAlpStakingAccountKey = exports.getUserStakingPda = exports.getStakingPda = void 0;
4
+ const web3_js_1 = require("@solana/web3.js");
5
+ const constants_1 = require("./constants");
6
+ function getStakingPda(stakedTokenMint) {
7
+ return web3_js_1.PublicKey.findProgramAddressSync([Buffer.from('staking'), stakedTokenMint.toBuffer()], constants_1.pid)[0];
8
+ }
9
+ exports.getStakingPda = getStakingPda;
10
+ function getUserStakingPda(owner, stakingPda) {
11
+ return web3_js_1.PublicKey.findProgramAddressSync([Buffer.from('user_staking'), owner.toBuffer(), stakingPda.toBuffer()], constants_1.pid)[0];
12
+ }
13
+ exports.getUserStakingPda = getUserStakingPda;
14
+ function getAlpStakingAccountKey(owner) {
15
+ return getUserStakingPda(new web3_js_1.PublicKey(owner), getStakingPda(new web3_js_1.PublicKey(constants_1.alpMint)));
16
+ }
17
+ exports.getAlpStakingAccountKey = getAlpStakingAccountKey;
18
+ function getAdxStakingAccountKey(owner) {
19
+ return getUserStakingPda(new web3_js_1.PublicKey(owner), getStakingPda(new web3_js_1.PublicKey(constants_1.adxMint)));
20
+ }
21
+ exports.getAdxStakingAccountKey = getAdxStakingAccountKey;
22
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/adrena/helpers.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAC5C,2CAAoD;AAEpD,SAAgB,aAAa,CAAC,eAA0B;IACtD,OAAO,mBAAS,CAAC,sBAAsB,CACrC,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,eAAe,CAAC,QAAQ,EAAE,CAAC,EACpD,eAAG,CACJ,CAAC,CAAC,CAAC,CAAC;AACP,CAAC;AALD,sCAKC;AAED,SAAgB,iBAAiB,CAAC,KAAgB,EAAE,UAAqB;IACvE,OAAO,mBAAS,CAAC,sBAAsB,CACrC,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,UAAU,CAAC,QAAQ,EAAE,CAAC,EACtE,eAAG,CACJ,CAAC,CAAC,CAAC,CAAC;AACP,CAAC;AALD,8CAKC;AAED,SAAgB,uBAAuB,CAAC,KAAa;IACnD,OAAO,iBAAiB,CACtB,IAAI,mBAAS,CAAC,KAAK,CAAC,EACpB,aAAa,CAAC,IAAI,mBAAS,CAAC,mBAAO,CAAC,CAAC,CACtC,CAAC;AACJ,CAAC;AALD,0DAKC;AAED,SAAgB,uBAAuB,CAAC,KAAa;IACnD,OAAO,iBAAiB,CACtB,IAAI,mBAAS,CAAC,KAAK,CAAC,EACpB,aAAa,CAAC,IAAI,mBAAS,CAAC,mBAAO,CAAC,CAAC,CACtC,CAAC;AACJ,CAAC;AALD,0DAKC"}
@@ -0,0 +1,6 @@
1
+ import { Platform } from '@sonarwatch/portfolio-core';
2
+ import { Fetcher } from '../../Fetcher';
3
+ import { Job } from '../../Job';
4
+ export declare const platforms: Platform[];
5
+ export declare const jobs: Job[];
6
+ export declare const fetchers: Fetcher[];
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.fetchers = exports.jobs = exports.platforms = void 0;
7
+ const constants_1 = require("./constants");
8
+ const custodiesJob_1 = __importDefault(require("./custodiesJob"));
9
+ const positionsFetcher_1 = __importDefault(require("./positionsFetcher"));
10
+ const stakingFetcher_1 = __importDefault(require("./stakingFetcher"));
11
+ exports.platforms = [constants_1.platform];
12
+ exports.jobs = [custodiesJob_1.default];
13
+ exports.fetchers = [positionsFetcher_1.default, stakingFetcher_1.default];
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/adrena/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,kEAA0C;AAC1C,0EAAkD;AAClD,sEAA8C;AAEjC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,sBAAY,CAAC,CAAC;AAC7B,QAAA,QAAQ,GAAc,CAAC,0BAAgB,EAAE,wBAAc,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Fetcher } from '../../Fetcher';
2
+ declare const fetcher: Fetcher;
3
+ export default fetcher;
@@ -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
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
13
+ const constants_1 = require("./constants");
14
+ const MemoizedCache_1 = require("../../utils/misc/MemoizedCache");
15
+ const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
16
+ const structs_1 = require("./structs");
17
+ const solana_1 = require("../../utils/solana");
18
+ const filters_1 = require("./filters");
19
+ const clients_1 = require("../../utils/clients");
20
+ const custodiesMemo = new MemoizedCache_1.MemoizedCache(constants_1.custodiesCacheKey, {
21
+ prefix: constants_1.platformId,
22
+ networkId: portfolio_core_1.NetworkId.solana,
23
+ });
24
+ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
25
+ const client = (0, clients_1.getClientSolana)();
26
+ const custodies = yield custodiesMemo.getItem(cache);
27
+ const positions = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.positionStruct, constants_1.pid, (0, filters_1.positionFilter)(owner));
28
+ if (!positions)
29
+ return [];
30
+ const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
31
+ const element = elementRegistry.addElementMultiple({ label: 'Leverage' });
32
+ for (const position of positions) {
33
+ const custodie = custodies.find((c) => c.pubkey === position.custody.toString());
34
+ if (!custodie)
35
+ continue;
36
+ element.addAsset({
37
+ address: custodie.mint.toString(),
38
+ amount: position.collateralAmount,
39
+ });
40
+ }
41
+ return elementRegistry.getElements(cache);
42
+ });
43
+ const fetcher = {
44
+ id: `${constants_1.platformId}-positions`,
45
+ networkId: portfolio_core_1.NetworkId.solana,
46
+ executor,
47
+ };
48
+ exports.default = fetcher;
49
+ //# sourceMappingURL=positionsFetcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/adrena/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAEvD,2CAAiE;AAEjE,kEAA+D;AAC/D,gFAA6E;AAC7E,uCAA2C;AAC3C,+CAA8D;AAC9D,uCAA2C;AAC3C,iDAAsD;AAGtD,MAAM,aAAa,GAAG,IAAI,6BAAa,CAAkB,6BAAiB,EAAE;IAC1E,MAAM,EAAE,sBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,SAAS,GAAG,MAAM,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAErD,MAAM,SAAS,GAAG,MAAM,IAAA,iCAAwB,EAC9C,MAAM,EACN,wBAAc,EACd,eAAG,EACH,IAAA,wBAAc,EAAC,KAAK,CAAC,CACtB,CAAC;IAEF,IAAI,CAAC,SAAS;QAAE,OAAO,EAAE,CAAC;IAE1B,MAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;IAC1E,MAAM,OAAO,GAAG,eAAe,CAAC,kBAAkB,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;IAC1E,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;QACjC,MAAM,QAAQ,GAAG,SAAS,CAAC,IAAI,CAC7B,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,CAChD,CAAC;QACF,IAAI,CAAC,QAAQ;YAAE,SAAS;QAExB,OAAO,CAAC,QAAQ,CAAC;YACf,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE;YACjC,MAAM,EAAE,QAAQ,CAAC,gBAAgB;SAClC,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,YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Fetcher } from '../../Fetcher';
2
+ declare const fetcher: Fetcher;
3
+ export default fetcher;
@@ -0,0 +1,69 @@
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
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
13
+ const constants_1 = require("./constants");
14
+ const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
15
+ const structs_1 = require("./structs");
16
+ const solana_1 = require("../../utils/solana");
17
+ const helpers_1 = require("./helpers");
18
+ const clients_1 = require("../../utils/clients");
19
+ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
20
+ const client = (0, clients_1.getClientSolana)();
21
+ const [alpStakingAccountKey, adxStakingAccountKey] = [
22
+ (0, helpers_1.getAlpStakingAccountKey)(owner),
23
+ (0, helpers_1.getAdxStakingAccountKey)(owner),
24
+ ];
25
+ const [alpStakingAccount, adxStakingAccount] = yield (0, solana_1.getParsedMultipleAccountsInfo)(client, structs_1.userStakingStruct, [
26
+ alpStakingAccountKey,
27
+ adxStakingAccountKey,
28
+ ]);
29
+ if (!alpStakingAccount && !adxStakingAccount)
30
+ return [];
31
+ const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
32
+ if (alpStakingAccount) {
33
+ const alpElement = elementRegistry.addElementMultiple({ label: 'Staked' });
34
+ for (const lockStake of alpStakingAccount.lockedStakes) {
35
+ alpElement.addAsset({
36
+ address: constants_1.alpMint,
37
+ amount: lockStake.stakeTime,
38
+ attributes: {
39
+ lockedUntil: lockStake.lockDuration.times(1000).toNumber(),
40
+ },
41
+ });
42
+ }
43
+ }
44
+ if (adxStakingAccount) {
45
+ const adxElement = elementRegistry.addElementMultiple({ label: 'Staked' });
46
+ for (const lockStake of adxStakingAccount.lockedStakes) {
47
+ adxElement.addAsset({
48
+ address: constants_1.adxMint,
49
+ amount: lockStake.stakeTime,
50
+ attributes: {
51
+ lockedUntil: lockStake.lockDuration.times(1000).toNumber(),
52
+ },
53
+ });
54
+ }
55
+ adxElement.addAsset({
56
+ address: constants_1.adxMint,
57
+ amount: adxStakingAccount.liquidStake.stakeTime,
58
+ attributes: { tags: ['Liquid'] },
59
+ });
60
+ }
61
+ return elementRegistry.getElements(cache);
62
+ });
63
+ const fetcher = {
64
+ id: `${constants_1.platformId}-staking`,
65
+ networkId: portfolio_core_1.NetworkId.solana,
66
+ executor,
67
+ };
68
+ exports.default = fetcher;
69
+ //# sourceMappingURL=stakingFetcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/adrena/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAEvD,2CAA2D;AAE3D,gFAA6E;AAC7E,uCAA8C;AAC9C,+CAAmE;AACnE,uCAA6E;AAC7E,iDAAsD;AAEtD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,GAAG;QACnD,IAAA,iCAAuB,EAAC,KAAK,CAAC;QAC9B,IAAA,iCAAuB,EAAC,KAAK,CAAC;KAC/B,CAAC;IACF,MAAM,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,GAC1C,MAAM,IAAA,sCAA6B,EAAC,MAAM,EAAE,2BAAiB,EAAE;QAC7D,oBAAoB;QACpB,oBAAoB;KACrB,CAAC,CAAC;IAEL,IAAI,CAAC,iBAAiB,IAAI,CAAC,iBAAiB;QAAE,OAAO,EAAE,CAAC;IAExD,MAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;IAE1E,IAAI,iBAAiB,EAAE,CAAC;QACtB,MAAM,UAAU,GAAG,eAAe,CAAC,kBAAkB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC3E,KAAK,MAAM,SAAS,IAAI,iBAAiB,CAAC,YAAY,EAAE,CAAC;YACvD,UAAU,CAAC,QAAQ,CAAC;gBAClB,OAAO,EAAE,mBAAO;gBAChB,MAAM,EAAE,SAAS,CAAC,SAAS;gBAC3B,UAAU,EAAE;oBACV,WAAW,EAAE,SAAS,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;iBAC3D;aACF,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,IAAI,iBAAiB,EAAE,CAAC;QACtB,MAAM,UAAU,GAAG,eAAe,CAAC,kBAAkB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC3E,KAAK,MAAM,SAAS,IAAI,iBAAiB,CAAC,YAAY,EAAE,CAAC;YACvD,UAAU,CAAC,QAAQ,CAAC;gBAClB,OAAO,EAAE,mBAAO;gBAChB,MAAM,EAAE,SAAS,CAAC,SAAS;gBAC3B,UAAU,EAAE;oBACV,WAAW,EAAE,SAAS,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;iBAC3D;aACF,CAAC,CAAC;QACL,CAAC;QACD,UAAU,CAAC,QAAQ,CAAC;YAClB,OAAO,EAAE,mBAAO;YAChB,MAAM,EAAE,iBAAiB,CAAC,WAAW,CAAC,SAAS;YAC/C,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,QAAQ,CAAC,EAAE;SACjC,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,UAAU;IAC3B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -0,0 +1,187 @@
1
+ /// <reference types="node" />
2
+ import { BeetStruct, FixableBeetStruct } from '@metaplex-foundation/beet';
3
+ import { PublicKey } from '@solana/web3.js';
4
+ import BigNumber from 'bignumber.js';
5
+ export type PricingParams = {
6
+ maxInitialLeverage: number;
7
+ maxLeverage: number;
8
+ maxPositionLockedUsd: BigNumber;
9
+ maxCumulativeShortPositionSizeUsd: BigNumber;
10
+ };
11
+ export declare const pricingParamsStruct: BeetStruct<PricingParams, Partial<PricingParams>>;
12
+ export type Fees = {
13
+ swapIn: number;
14
+ swapOut: number;
15
+ stableSwapIn: number;
16
+ stableSwapOut: number;
17
+ addLiquidity: number;
18
+ removeLiquidity: number;
19
+ closePosition: number;
20
+ liquidation: number;
21
+ feeMax: number;
22
+ padding: number[];
23
+ padding2: BigNumber;
24
+ };
25
+ export declare const feesStruct: BeetStruct<Fees, Partial<Fees>>;
26
+ export type BorrowRateParams = {
27
+ maxHourlyBorrowInterestRate: BigNumber;
28
+ };
29
+ export declare const borrowRateParamsStruct: BeetStruct<BorrowRateParams, Partial<BorrowRateParams>>;
30
+ export type FeesStats = {
31
+ swapUsd: BigNumber;
32
+ addLiquidityUsd: BigNumber;
33
+ removeLiquidityUsd: BigNumber;
34
+ closePositionUsd: BigNumber;
35
+ liquidationUsd: BigNumber;
36
+ borrowUsd: BigNumber;
37
+ };
38
+ export declare const feesStatsStruct: BeetStruct<FeesStats, Partial<FeesStats>>;
39
+ export type Assets = {
40
+ collateral: BigNumber;
41
+ owned: BigNumber;
42
+ locked: BigNumber;
43
+ };
44
+ export declare const assetsStruct: BeetStruct<Assets, Partial<Assets>>;
45
+ export type VolumeStats = {
46
+ swapUsd: BigNumber;
47
+ addLiquidityUsd: BigNumber;
48
+ removeLiquidityUsd: BigNumber;
49
+ openPositionUsd: BigNumber;
50
+ closePositionUsd: BigNumber;
51
+ liquidationUsd: BigNumber;
52
+ };
53
+ export declare const volumeStatsStruct: BeetStruct<VolumeStats, Partial<VolumeStats>>;
54
+ export type TradeStats = {
55
+ profitUsd: BigNumber;
56
+ lossUsd: BigNumber;
57
+ oiLongUsd: BigNumber;
58
+ oiShortUsd: BigNumber;
59
+ };
60
+ export declare const tradeStatsStruct: BeetStruct<TradeStats, Partial<TradeStats>>;
61
+ export type U128Split = {
62
+ high: BigNumber;
63
+ low: BigNumber;
64
+ };
65
+ export declare const u128SplitStruct: BeetStruct<U128Split, Partial<U128Split>>;
66
+ export type StableLockedAmountStat = {
67
+ custody: PublicKey;
68
+ lockedAmount: BigNumber;
69
+ padding: number[];
70
+ };
71
+ export declare const StableLockedAmountStatStruct: BeetStruct<StableLockedAmountStat, Partial<StableLockedAmountStat>>;
72
+ export type PositionsAccounting = {
73
+ openPositions: BigNumber;
74
+ sizeUsd: BigNumber;
75
+ borrowSizeUsd: BigNumber;
76
+ lockedAmount: BigNumber;
77
+ weightedPrice: U128Split;
78
+ totalQuantity: U128Split;
79
+ cumulativeInterestUsd: BigNumber;
80
+ padding: number[];
81
+ cumulativeInterestSnapshot: U128Split;
82
+ exitFeeUsd: BigNumber;
83
+ stableLockedAmount: StableLockedAmountStat[];
84
+ };
85
+ export declare const positionsAccountingStruct: FixableBeetStruct<PositionsAccounting, Partial<PositionsAccounting>>;
86
+ export type BorrowRateState = {
87
+ currentRate: BigNumber;
88
+ lastUpdate: BigNumber;
89
+ cumulativeInterest: U128Split;
90
+ };
91
+ export declare const borrowRateStateStruct: BeetStruct<BorrowRateState, Partial<BorrowRateState>>;
92
+ export type Custody = {
93
+ buffer: Buffer;
94
+ bump: number;
95
+ tokenAccountBump: number;
96
+ allowTrade: number;
97
+ allowSwap: number;
98
+ decimals: number;
99
+ isStable: number;
100
+ padding: number[];
101
+ pool: PublicKey;
102
+ mint: PublicKey;
103
+ tokenAccount: PublicKey;
104
+ oracle: PublicKey;
105
+ tradeOracle: PublicKey;
106
+ pricing: PricingParams;
107
+ fees: Fees;
108
+ borrowRate: BorrowRateParams;
109
+ collectedFees: FeesStats;
110
+ volumeStats: VolumeStats;
111
+ tradeStats: TradeStats;
112
+ assets: Assets;
113
+ longPositions: PositionsAccounting;
114
+ shortPositions: PositionsAccounting;
115
+ borrowRateState: BorrowRateState;
116
+ };
117
+ export declare const custodyStruct: FixableBeetStruct<Custody, Partial<Custody>>;
118
+ export type Position = {
119
+ buffer: Buffer;
120
+ bump: number;
121
+ side: number;
122
+ takeProfitThreadIsSet: number;
123
+ stopLossThreadIsSet: number;
124
+ padding: number[];
125
+ owner: PublicKey;
126
+ pool: PublicKey;
127
+ custody: PublicKey;
128
+ collateralCustody: PublicKey;
129
+ openTime: BigNumber;
130
+ updateTime: BigNumber;
131
+ price: BigNumber;
132
+ sizeUsd: BigNumber;
133
+ borrowSizeUsd: BigNumber;
134
+ collateralUsd: BigNumber;
135
+ unrealizedLossUsd: BigNumber;
136
+ cumulativeInterestSnapshot: U128Split;
137
+ lockedAmount: BigNumber;
138
+ collateralAmount: BigNumber;
139
+ exitFeeUsd: BigNumber;
140
+ liquidationFeeUsd: BigNumber;
141
+ takeProfitThreadId: BigNumber;
142
+ takeProfitLimitPrice: BigNumber;
143
+ stopLossThreadId: BigNumber;
144
+ stopLossLimitPrice: BigNumber;
145
+ stopLossClosePositionPrice: BigNumber;
146
+ };
147
+ export declare const positionStruct: BeetStruct<Position, Partial<Position>>;
148
+ export type LockedStake = {
149
+ amount: BigNumber;
150
+ stakeTime: BigNumber;
151
+ claimTime: BigNumber;
152
+ endTime: BigNumber;
153
+ lockDuration: BigNumber;
154
+ rewardMultiplier: number;
155
+ lmRewardMultiplier: number;
156
+ voteMultiplier: number;
157
+ padding: number[];
158
+ amountWithRewardMultiplier: BigNumber;
159
+ amountWithLmRewardMultiplier: BigNumber;
160
+ resolved: number;
161
+ padding2: number[];
162
+ stakeResolutionThreadId: BigNumber;
163
+ earlyExit: number;
164
+ padding3: number[];
165
+ earlyExitFee: BigNumber;
166
+ isGenesis: number;
167
+ padding4: number[];
168
+ genesisClaimTime: BigNumber;
169
+ };
170
+ export declare const lockedStakeStruct: BeetStruct<LockedStake, Partial<LockedStake>>;
171
+ export type LiquidStake = {
172
+ amount: BigNumber;
173
+ stakeTime: BigNumber;
174
+ claimTime: BigNumber;
175
+ overlapTime: BigNumber;
176
+ overlapAmount: BigNumber;
177
+ };
178
+ export declare const liquidStakeStruct: BeetStruct<LiquidStake, Partial<LiquidStake>>;
179
+ export type UserStaking = {
180
+ bump: number;
181
+ threadAuthorityBump: number;
182
+ padding: number[];
183
+ stakesClaimCronThreadId: BigNumber;
184
+ liquidStake: LiquidStake;
185
+ lockedStakes: LockedStake[];
186
+ };
187
+ export declare const userStakingStruct: FixableBeetStruct<UserStaking, Partial<UserStaking>>;