@sonarwatch/portfolio-plugins 0.12.45 → 0.12.47

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +1 -1
  3. package/src/plugins/jito/helper.d.ts +3 -0
  4. package/src/plugins/jito/helper.js +21 -0
  5. package/src/plugins/jito/helper.js.map +1 -0
  6. package/src/plugins/native-stake/solana/constants.d.ts +1 -1
  7. package/src/plugins/native-stake/solana/constants.js +2 -2
  8. package/src/plugins/native-stake/solana/constants.js.map +1 -1
  9. package/src/plugins/native-stake/solana/solanaFetcher.js +1 -1
  10. package/src/plugins/native-stake/solana/solanaFetcher.js.map +1 -1
  11. package/src/plugins/native-stake/solana/solanaValidatorsJob.js +17 -38
  12. package/src/plugins/native-stake/solana/solanaValidatorsJob.js.map +1 -1
  13. package/src/plugins/native-stake/solana/types.d.ts +7 -11
  14. package/src/plugins/zeta/airdropFetcher.js +8 -0
  15. package/src/plugins/zeta/airdropFetcher.js.map +1 -1
  16. package/src/plugins/zeta/constants.d.ts +5 -0
  17. package/src/plugins/zeta/constants.js +46 -1
  18. package/src/plugins/zeta/constants.js.map +1 -1
  19. package/src/plugins/zeta/helpers.d.ts +3 -0
  20. package/src/plugins/zeta/helpers.js +27 -1
  21. package/src/plugins/zeta/helpers.js.map +1 -1
  22. package/src/plugins/zeta/idls.d.ts +70 -0
  23. package/src/plugins/zeta/idls.js +749 -0
  24. package/src/plugins/zeta/idls.js.map +1 -0
  25. package/src/plugins/zeta/index.js +6 -1
  26. package/src/plugins/zeta/index.js.map +1 -1
  27. package/src/plugins/zeta/stakingFetcher.d.ts +3 -0
  28. package/src/plugins/zeta/stakingFetcher.js +69 -0
  29. package/src/plugins/zeta/stakingFetcher.js.map +1 -0
  30. package/src/plugins/zeta/structs.d.ts +7 -0
  31. package/src/plugins/zeta/structs.js +7 -1
  32. package/src/plugins/zeta/structs.js.map +1 -1
  33. package/src/plugins/zeta/types.d.ts +26 -0
  34. package/src/plugins/zeta/types.js +7 -0
  35. package/src/plugins/zeta/types.js.map +1 -1
  36. package/src/utils/solana/das/getAssetBatchDas.js +3 -2
  37. package/src/utils/solana/das/getAssetBatchDas.js.map +1 -1
  38. package/src/utils/solana/das/heliusAssetToAssetCollectible.js +6 -4
  39. package/src/utils/solana/das/heliusAssetToAssetCollectible.js.map +1 -1
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.12.47](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.46...plugins-0.12.47) (2024-07-05)
6
+
7
+
8
+
9
+ ## [0.12.46](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.45...plugins-0.12.46) (2024-07-02)
10
+
11
+
12
+
5
13
  ## [0.12.45](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.44...plugins-0.12.45) (2024-07-01)
6
14
 
7
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-plugins",
3
- "version": "0.12.45",
3
+ "version": "0.12.47",
4
4
  "type": "commonjs",
5
5
  "types": "./src/index.d.ts",
6
6
  "peerDependencies": {
@@ -0,0 +1,3 @@
1
+ import { PublicKey } from '@solana/web3.js';
2
+ export declare function findClaimStatusKey(claimant: string, distributor: string, programId: string): PublicKey;
3
+ export declare function findClaimStatusesKeys(claimant: string, distributors: string[], programId: string): PublicKey[];
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.findClaimStatusesKeys = exports.findClaimStatusKey = void 0;
4
+ const web3_js_1 = require("@solana/web3.js");
5
+ function findClaimStatusKey(claimant, distributor, programId) {
6
+ return web3_js_1.PublicKey.findProgramAddressSync([
7
+ Buffer.from('ClaimStatus'),
8
+ new web3_js_1.PublicKey(distributor).toBytes(),
9
+ new web3_js_1.PublicKey(claimant).toBytes(),
10
+ ], new web3_js_1.PublicKey(programId))[0];
11
+ }
12
+ exports.findClaimStatusKey = findClaimStatusKey;
13
+ function findClaimStatusesKeys(claimant, distributors, programId) {
14
+ return distributors.map((distributor) => web3_js_1.PublicKey.findProgramAddressSync([
15
+ Buffer.from('ClaimStatus'),
16
+ new web3_js_1.PublicKey(distributor).toBytes(),
17
+ new web3_js_1.PublicKey(claimant).toBytes(),
18
+ ], new web3_js_1.PublicKey(programId))[0]);
19
+ }
20
+ exports.findClaimStatusesKeys = findClaimStatusesKeys;
21
+ //# sourceMappingURL=helper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jito/helper.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAE5C,SAAgB,kBAAkB,CAChC,QAAgB,EAChB,WAAmB,EACnB,SAAiB;IAEjB,OAAO,mBAAS,CAAC,sBAAsB,CACrC;QACE,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC;QAC1B,IAAI,mBAAS,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE;QACpC,IAAI,mBAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE;KAClC,EACD,IAAI,mBAAS,CAAC,SAAS,CAAC,CACzB,CAAC,CAAC,CAAC,CAAC;AACP,CAAC;AAbD,gDAaC;AAED,SAAgB,qBAAqB,CACnC,QAAgB,EAChB,YAAsB,EACtB,SAAiB;IAEjB,OAAO,YAAY,CAAC,GAAG,CACrB,CAAC,WAAW,EAAE,EAAE,CACd,mBAAS,CAAC,sBAAsB,CAC9B;QACE,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC;QAC1B,IAAI,mBAAS,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE;QACpC,IAAI,mBAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE;KAClC,EACD,IAAI,mBAAS,CAAC,SAAS,CAAC,CACzB,CAAC,CAAC,CAAC,CACP,CAAC;AACJ,CAAC;AAhBD,sDAgBC"}
@@ -1,5 +1,5 @@
1
1
  import { PublicKey } from '@solana/web3.js';
2
2
  export declare const epochInfoCacheKey = "epoch-info";
3
3
  export declare const stakeProgramId: PublicKey;
4
- export declare const configProgramId: PublicKey;
4
+ export declare const stakewizApi = "https://api.stakewiz.com/validators";
5
5
  export declare const marinadeManagerAddresses: string[];
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.marinadeManagerAddresses = exports.configProgramId = exports.stakeProgramId = exports.epochInfoCacheKey = void 0;
3
+ exports.marinadeManagerAddresses = exports.stakewizApi = exports.stakeProgramId = exports.epochInfoCacheKey = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
5
  exports.epochInfoCacheKey = 'epoch-info';
6
6
  exports.stakeProgramId = new web3_js_1.PublicKey('Stake11111111111111111111111111111111111111');
7
- exports.configProgramId = new web3_js_1.PublicKey('Config1111111111111111111111111111111111111');
7
+ exports.stakewizApi = 'https://api.stakewiz.com/validators';
8
8
  exports.marinadeManagerAddresses = [
9
9
  'stWirqFCf2Uts1JBL1Jsd3r6VBWhgnpdPxCTe1MFjrq',
10
10
  'noMa7dN4cHQLV4ZonXrC29HTKFpxrpFbDLK5Gub8W8t',
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/native-stake/solana/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAE/B,QAAA,iBAAiB,GAAG,YAAY,CAAC;AACjC,QAAA,cAAc,GAAG,IAAI,mBAAS,CACzC,6CAA6C,CAC9C,CAAC;AACW,QAAA,eAAe,GAAG,IAAI,mBAAS,CAC1C,6CAA6C,CAC9C,CAAC;AACW,QAAA,wBAAwB,GAAG;IACtC,6CAA6C;IAC7C,6CAA6C;IAC7C,6CAA6C;CAC9C,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/native-stake/solana/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAE/B,QAAA,iBAAiB,GAAG,YAAY,CAAC;AACjC,QAAA,cAAc,GAAG,IAAI,mBAAS,CACzC,6CAA6C,CAC9C,CAAC;AACW,QAAA,WAAW,GAAG,qCAAqC,CAAC;AACpD,QAAA,wBAAwB,GAAG;IACtC,6CAA6C;IAC7C,6CAA6C;IAC7C,6CAA6C;CAC9C,CAAC"}
@@ -95,7 +95,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
95
95
  nativeAssets.push(Object.assign(Object.assign({}, (0, tokenPriceToAssetToken_1.default)(portfolio_core_1.solanaNetwork.native.address, amount, portfolio_core_1.NetworkId.solana, solTokenPrice, undefined, {
96
96
  tags,
97
97
  lockedUntil,
98
- })), { name: validator === null || validator === void 0 ? void 0 : validator.name, imageUri: validator === null || validator === void 0 ? void 0 : validator.iconUrl }));
98
+ })), { name: validator === null || validator === void 0 ? void 0 : validator.name, imageUri: validator === null || validator === void 0 ? void 0 : validator.imageUri }));
99
99
  }
100
100
  if (nativeAssets.length > 30) {
101
101
  nativeAssets = [
@@ -1 +1 @@
1
- {"version":3,"file":"solanaFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/native-stake/solana/solanaFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,gEAAqC;AAIrC,4CAA8E;AAC9E,oDAAyD;AACzD,kDAAiE;AACjE,uCAAgD;AAChD,uCAA+C;AAC/C,wGAAgF;AAChF,wDAA4E;AAC5E,oDAAoE;AACpE,2CAIqB;AACrB,qEAAkE;AAElE,+DAA4D;AAE5D,MAAM,cAAc,GAAG,IAAI,6BAAa,CACtC,yBAAa,EACb;IACE,MAAM,EAAE,sBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,EACD,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,uBAAU,EAAC,GAAG,IAAI,EAAE,EAAE,OAAO,CAAC,CACxC,CAAC;AAEF,M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AQ,CAAC;AAClB,CAAC,CAAA,CAAC;AACF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,SAAS;IAC1B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"solanaFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/native-stake/solana/solanaFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,gEAAqC;AAIrC,4CAA8E;AAC9E,oDAAyD;AACzD,kDAAiE;AACjE,uCAAgD;AAChD,uCAA+C;AAC/C,wGAAgF;AAChF,wDAA4E;AAC5E,oDAAoE;AACpE,2CAIqB;AACrB,qEAAkE;AAElE,+DAA4D;AAE5D,MAAM,cAAc,GAAG,IAAI,6BAAa,CACtC,yBAAa,EACb;IACE,MAAM,EAAE,sBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,EACD,CAAC,GAAG,EAAE,EAAE,CAAC,IAAA,uBAAU,EAAC,GAAG,IAAI,EAAE,EAAE,OAAO,CAAC,CACxC,CAAC;AAEF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,OAAO,GAAG,IAAA,6BAAmB,EAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEtD,MAAM,aAAa,GAAG,MAAM,IAAA,iCAAwB,EAClD,MAAM,EACN,4BAAkB,EAClB,0BAAc,EACd,OAAO,CACR,CAAC;IACF,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAE1C,MAAM,CAAC,aAAa,EAAE,SAAS,EAAE,UAAU,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC/D,KAAK,CAAC,aAAa,CAAC,8BAAa,CAAC,MAA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oDAED,IAAA,gCAAsB,EACvB,8BAAa,CAAC,MAAM,CAAC,OAAO,EAC5B,iBAAiB,EACjB,0BAAS,CAAC,MAAM,EAChB,aAAa,CACd,KACD,UAAU,EAAE,EAAE;iBAEjB;aACF;SACF,CAAC,CAAC;IACL,CAAC;IACD,IAAI,UAAU,GAAG,CAAC,EAAE,CAAC;QACnB,QAAQ,CAAC,IAAI,CAAC;YACZ,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAE,sBAAc;YAC1B,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,aAAa;YACnB,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,UAAU,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI;YAC9D,IAAI,EAAE;gBACJ,MAAM,EAAE;oDAED,IAAA,gCAAsB,EACvB,8BAAa,CAAC,MAAM,CAAC,OAAO,EAC5B,UAAU,EACV,0BAAS,CAAC,MAAM,EAChB,aAAa,CACd,KACD,UAAU,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;iBAEpC;aACF;SACF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AACF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,SAAS;IAC1B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -8,50 +8,29 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
- const explorer_kit_idls_1 = require("@solanafm/explorer-kit-idls");
13
15
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
14
- const clients_1 = require("../../../utils/clients");
16
+ const axios_1 = __importDefault(require("axios"));
15
17
  const constants_1 = require("../constants");
16
- const solana_1 = require("../../../utils/solana");
17
18
  const constants_2 = require("./constants");
18
19
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
19
- const client = (0, clients_1.getClientSolana)();
20
- const SFMIdlItem = yield (0, explorer_kit_idls_1.getProgramIdl)(constants_2.configProgramId.toString());
21
- if (!SFMIdlItem)
22
- return;
23
- const [{ current, delinquent }, configs] = yield Promise.all([
24
- client.getVoteAccounts(),
25
- (0, solana_1.getAutoParsedProgramAccounts)(client, SFMIdlItem),
26
- ]);
27
- const voters = [...current, ...delinquent];
28
- const configsByVoter = new Map();
29
- configs.forEach((c) => {
30
- if (!c.info)
31
- return;
32
- try {
33
- const info = JSON.parse(c.info);
34
- const voter = c.configKeys.keysTuple[1][0];
35
- configsByVoter.set(voter, {
36
- voter,
37
- name: info.name,
38
- iconUrl: info.iconUrl,
39
- });
40
- }
41
- catch (err) {
42
- /* empty */
43
- }
44
- });
45
- const validators = [];
46
- voters.forEach((voteAcc) => {
47
- const config = configsByVoter.get(voteAcc.nodePubkey.toString());
48
- validators.push({
49
- voter: voteAcc.votePubkey.toString(),
50
- commission: voteAcc.commission,
51
- name: config === null || config === void 0 ? void 0 : config.name,
52
- iconUrl: config === null || config === void 0 ? void 0 : config.iconUrl,
53
- });
20
+ const res = yield axios_1.default
21
+ .get(constants_2.stakewizApi, {
22
+ timeout: 2000,
23
+ })
24
+ .catch((err) => {
25
+ throw Error(`STAKEWIZ_API ERR: ${err}`);
54
26
  });
27
+ if (!res.data)
28
+ throw Error(`STAKEWIZ_API NO DATA`);
29
+ const validators = res.data.map((r) => ({
30
+ voter: r.vote_identity,
31
+ name: r.name,
32
+ imageUri: r.image,
33
+ }));
55
34
  yield cache.setItem(constants_1.validatorsKey, validators, {
56
35
  prefix: constants_1.platformId,
57
36
  networkId: portfolio_core_1.NetworkId.solana,
@@ -1 +1 @@
1
- {"version":3,"file":"solanaValidatorsJob.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/native-stake/solana/solanaValidatorsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,mEAA4D;AAC5D,+DAAuD;AAIvD,oDAAyD;AACzD,4CAAyD;AACzD,kDAAqE;AACrE,2CAA8C;AAG9C,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,UAAU,GAAG,MAAM,IAAA,iCAAa,EAAC,2BAAe,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEnE,IAAI,CAAC,UAAU;QAAE,OAAO;IAExB,MAAM,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,OAAO,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC3D,MAAM,CAAC,eAAe,EAAE;QACxB,IAAA,qCAA4B,EAAgB,MAAM,EAAE,UAAU,CAAC;KAChE,CAAC,CAAC;IAEH,MAAM,MAAM,GAAsB,CAAC,GAAG,OAAO,EAAE,GAAG,UAAU,CAAC,CAAC;IAE9D,MAAM,cAAc,GAAG,IAAI,GAAG,EAA2B,CAAC;IAC1D,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;QACpB,IAAI,CAAC,CAAC,CAAC,IAAI;YAAE,OAAO;QAEpB,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YAChC,MAAM,KAAK,GAAG,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC3C,cAAc,CAAC,GAAG,CAAC,KAAK,EAAE;gBACxB,KAAK;gBACL,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,WAAW;QACb,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,MAAM,UAAU,GAAgB,EAAE,CAAC;IACnC,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QACzB,MAAM,MAAM,GAAG,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;QAEjE,UAAU,CAAC,IAAI,CAAC;YACd,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ,EAAE;YACpC,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,IAAI,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI;YAClB,OAAO,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,OAAO;SACzB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,MAAM,KAAK,CAAC,OAAO,CAAC,yBAAa,EAAE,UAAU,EAAE;QAC7C,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,oBAAoB;IACrC,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"solanaValidatorsJob.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/native-stake/solana/solanaValidatorsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,kDAA6C;AAG7C,4CAAyD;AACzD,2CAA0C;AAG1C,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,GAAG,GAAG,MAAM,eAAK;SACpB,GAAG,CAAgD,uBAAW,EAAE;QAC/D,OAAO,EAAE,IAAI;KACd,CAAC;SACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QACb,MAAM,KAAK,CAAC,qBAAqB,GAAG,EAAE,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;IAEL,IAAI,CAAC,GAAG,CAAC,IAAI;QAAE,MAAM,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAEnD,MAAM,UAAU,GAAgB,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACnD,KAAK,EAAE,CAAC,CAAC,aAAa;QACtB,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,QAAQ,EAAE,CAAC,CAAC,KAAK;KAClB,CAAC,CAAC,CAAC;IAEJ,MAAM,KAAK,CAAC,OAAO,CAAC,yBAAa,EAAE,UAAU,EAAE;QAC7C,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,oBAAoB;IACrC,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -1,15 +1,11 @@
1
- export type ConfigAccount = {
2
- lamports: number;
3
- configKeys: {
4
- keysTuple: [string, boolean][];
5
- };
6
- info: string;
1
+ export type ValidatorsApiResponse = ValidatorApiResponse[];
2
+ export type ValidatorApiResponse = {
3
+ vote_identity: string;
4
+ name: string;
5
+ image: string;
7
6
  };
8
- export type ValidatorConfig = {
7
+ export type Validator = {
9
8
  voter: string;
10
9
  name?: string;
11
- iconUrl?: string;
12
- };
13
- export type Validator = ValidatorConfig & {
14
- commission?: number;
10
+ imageUri?: string;
15
11
  };
@@ -39,6 +39,9 @@ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
39
39
  const graphql_request_1 = __importStar(require("graphql-request"));
40
40
  const constants_1 = require("./constants");
41
41
  const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
42
+ const helper_1 = require("../jito/helper");
43
+ const clients_1 = require("../../utils/clients");
44
+ const getMultipleAccountsInfoSafe_1 = require("../../utils/solana/getMultipleAccountsInfoSafe");
42
45
  const query = (0, graphql_request_1.gql) `
43
46
  query GetAirdropFinalFrontend($authority: String!) {
44
47
  getAirdropFinalFrontend(authority: $authority) {
@@ -68,6 +71,11 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
68
71
  const amount = res.getAirdropFinalFrontend.total_allocation;
69
72
  if (amount === 0)
70
73
  return [];
74
+ const claimStatuses = (0, helper_1.findClaimStatusesKeys)(owner, constants_1.distributors, constants_1.distributorPid);
75
+ const client = (0, clients_1.getClientSolana)();
76
+ const claimStatusesAccount = yield (0, getMultipleAccountsInfoSafe_1.getMultipleAccountsInfoSafe)(client, claimStatuses);
77
+ if (claimStatusesAccount.some((account) => account))
78
+ return [];
71
79
  const tokenPrice = yield cache.getTokenPrice(constants_1.zexMint, networkId);
72
80
  const asset = tokenPrice
73
81
  ? (0, tokenPriceToAssetToken_1.default)(tokenPrice.address, amount, networkId, tokenPrice, undefined, { lockedUntil: 1719475200000 })
@@ -1 +1 @@
1
- {"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+DAAuE;AACvE,mEAA+C;AAG/C,2CAA8D;AAE9D,qGAA6E;AAE7E,MAAM,KAAK,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;CAchB,CAAC;AAEF,MAAM,SAAS,GAAG,0BAAS,CAAC,MAAM,CAAC;AAEnC,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,GAAG,GAAG,MAAM,IAAA,yBAAO,EACvB,sBAAU,EACV,KAAK,EACL;QACE,SAAS,EAAE,KAAK;KACjB,EACD;QACE,MAAM,EAAE,4BAA4B;QAC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,GAAmB,UAAU;QACtC,CAAC,CAAC,IAAA,gCAAsB,EACpB,UAAU,CAAC,OAAO,EAClB,MAAM,EACN,SAAS,EACT,UAAU,EACV,SAAS,EACT,EAAE,WAAW,EAAE,aAAa,EAAE,CAC/B;QACH,CAAC,CAAC;YACE,IAAI,EAAE,SAAS;YACf,IAAI,EAAE;gBACJ,OAAO,EAAE,mBAAO;gBAChB,QAAQ,EACN,kMAAkM;gBACpM,MAAM;gBACN,KAAK,EAAE,IAAI;gBACX,IAAI,EAAE,KAAK;aACZ;YACD,KAAK,EAAE,IAAI;YACX,SAAS;YACT,UAAU,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE;SAC3C,CAAC;IAEN,OAAO;QACL;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,SAAS;YAChB,SAAS;YACT,UAAU,EAAV,sBAAU;YACV,IAAI,EAAE;gBACJ,MAAM,EAAE,CAAC,KAAK,CAAC;aAChB;YACD,KAAK,EAAE,KAAK,CAAC,KAAK;SACnB;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,SAAS;IACT,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { PublicKey } from '@solana/web3.js';
2
2
  import { Platform } from '@sonarwatch/portfolio-core';
3
+ import { IdlItem } from '@solanafm/explorer-kit-idls';
3
4
  export declare const platformId = "zeta";
4
5
  export declare const platform: Platform;
5
6
  export declare const usdcMint = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";
@@ -7,3 +8,7 @@ export declare const programId: PublicKey;
7
8
  export declare const graphqlApi = "https://api-gql.zeta.markets/graphql";
8
9
  export declare const zexMint = "ZEXy1pqteRu3n13kdyh4LwPQknkFk3GzmMYMuNadWPo";
9
10
  export declare const zexDecimals = 6;
11
+ export declare const distributorPid = "4JSALTb4QbipG7NNLryAFJg4y8X5C1ELErSncsVMA3gZ";
12
+ export declare const distributors: string[];
13
+ export declare const stakingPid: PublicKey;
14
+ export declare const sharkyIdlItem: IdlItem;
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zexDecimals = exports.zexMint = exports.graphqlApi = exports.programId = exports.usdcMint = exports.platform = exports.platformId = void 0;
3
+ exports.sharkyIdlItem = exports.stakingPid = exports.distributors = exports.distributorPid = exports.zexDecimals = exports.zexMint = exports.graphqlApi = exports.programId = exports.usdcMint = exports.platform = exports.platformId = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
+ const idls_1 = require("./idls");
5
6
  exports.platformId = 'zeta';
6
7
  exports.platform = {
7
8
  id: exports.platformId,
@@ -15,4 +16,48 @@ exports.programId = new web3_js_1.PublicKey('ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxv
15
16
  exports.graphqlApi = 'https://api-gql.zeta.markets/graphql';
16
17
  exports.zexMint = 'ZEXy1pqteRu3n13kdyh4LwPQknkFk3GzmMYMuNadWPo';
17
18
  exports.zexDecimals = 6;
19
+ exports.distributorPid = '4JSALTb4QbipG7NNLryAFJg4y8X5C1ELErSncsVMA3gZ';
20
+ exports.distributors = [
21
+ 'Ena5PXG5QHAFqxLHueKW8fc74kGSghBVL2UDHyrUnFc1',
22
+ 'CLPmtotgeWyYqwEQrV3yXWqNdk6aSdj9f86gQHnHVEBo',
23
+ '4TqxRLvWyA3i8u18iG97ocuAY6wKL2mFLc1Qogd6moor',
24
+ '3rLQ4wYXhi4XxBvoeZXdsvCC5HD1Ei9xPZhAtUzNiPZf',
25
+ 'Csq8eYrtntuDEJ7YFG3jXuQ6SmMS9taxPbic7UZUYFNX',
26
+ 'Do44U3Nbi4Y1vdjB3XCNa1chJCpFgYvBN1reCx385wQ1',
27
+ 'DWpLKpu8xV8ndXAAHMbjgyeRUwUYAxtYhtwJh8Dssd2d',
28
+ '7BUBEu7jE2Jaz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ezkd7VwNc8bT4iLFedawHDgjBNVkkesVh2ciDK',
50
+ '5yrdm62pK6L4nxBfJjb2n31ZBStdL2Za2Dj8xWjWwm4N',
51
+ '5NveKpT8P41C8BgsEmGTRqCmZkWwjkaF5NC7WQ1jiBSd',
52
+ '4npWCt7noK6FXceZ5FgLuMsa4P2sqCzsKATJR66t1orC',
53
+ '8aTtdjE4v7HhiDgHAcS156vb1zvboCh1ukHLXa5AqBEk',
54
+ 'C12iWEzCdiyU1zL9VrJwFCW26XZTMmSwoJczc9ZrDuHo',
55
+ '6o1ZexNBJnQCDXiWtJgDPkE4u5WndgUb1wKDjofRuWme',
56
+ ];
57
+ exports.stakingPid = new web3_js_1.PublicKey('4DUapvWZDDCkfWJpdwvX2QjwAE9Yq4wU8792RMMv7Csg');
58
+ exports.sharkyIdlItem = {
59
+ programId: exports.stakingPid.toString(),
60
+ idl: idls_1.idls,
61
+ idlType: 'anchor',
62
+ };
18
63
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,MAAM,CAAC;AACpB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,4CAA4C;IACnD,WAAW,EAAE,MAAM;IACnB,OAAO,EAAE,2BAA2B;CACrC,CAAC;AAEW,QAAA,QAAQ,GAAG,8CAA8C,CAAC;AAC1D,QAAA,SAAS,GAAG,IAAI,mBAAS,CACpC,6CAA6C,CAC9C,CAAC;AACW,QAAA,UAAU,GAAG,sCAAsC,CAAC;AACpD,QAAA,OAAO,GAAG,6CAA6C,CAAC;AACxD,QAAA,WAAW,GAAG,CAAC,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/constants.ts"],"names":[],"mappings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;IAClB,OAAO,EAAE,QAAQ;CACP,CAAC"}
@@ -2,3 +2,6 @@ import { PublicKey } from '@solana/web3.js';
2
2
  export declare function getCrossMarginAccount(programId: PublicKey, userKey: PublicKey, seedNumber: number): PublicKey;
3
3
  export declare function getMarginAccount(programId: PublicKey, zetaGroup: PublicKey, userKey: PublicKey): [PublicKey, number];
4
4
  export declare function getCrossMarginAccounts(programId: PublicKey, owner: PublicKey, startId: number, endId: number): PublicKey[];
5
+ export declare function getStakeAccountAddress(userKey: PublicKey, bit: number): [PublicKey, number];
6
+ export declare function getStakeAccountsAddresses(userKey: string, start: number, end: number): PublicKey[];
7
+ export declare function getTimestamp(stakeDuration: number, startEpoch: number): number;
@@ -1,7 +1,12 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getCrossMarginAccounts = exports.getMarginAccount = exports.getCrossMarginAccount = void 0;
6
+ exports.getTimestamp = exports.getStakeAccountsAddresses = exports.getStakeAccountAddress = exports.getCrossMarginAccounts = exports.getMarginAccount = exports.getCrossMarginAccount = void 0;
4
7
  const web3_js_1 = require("@solana/web3.js");
8
+ const bignumber_js_1 = __importDefault(require("bignumber.js"));
9
+ const constants_1 = require("./constants");
5
10
  function getCrossMarginAccount(programId, userKey, seedNumber) {
6
11
  return web3_js_1.PublicKey.findProgramAddressSync([
7
12
  Buffer.from('cross-margin', 'utf-8'),
@@ -22,4 +27,25 @@ function getCrossMarginAccounts(programId, owner, startId, endId) {
22
27
  return keys;
23
28
  }
24
29
  exports.getCrossMarginAccounts = getCrossMarginAccounts;
30
+ function getStakeAccountAddress(userKey, bit) {
31
+ return web3_js_1.PublicKey.findProgramAddressSync([Buffer.from('stake-account'), userKey.toBuffer(), Uint8Array.from([bit])], constants_1.stakingPid);
32
+ }
33
+ exports.getStakeAccountAddress = getStakeAccountAddress;
34
+ function getStakeAccountsAddresses(userKey, start, end) {
35
+ const user = new web3_js_1.PublicKey(userKey);
36
+ const keys = [];
37
+ for (let i = start; i <= end; i++) {
38
+ keys.push(getStakeAccountAddress(user, i)[0]);
39
+ }
40
+ return keys;
41
+ }
42
+ exports.getStakeAccountsAddresses = getStakeAccountsAddresses;
43
+ const timestampOfEpoch0 = new bignumber_js_1.default(1719144000000);
44
+ const oneDay = 60 * 60 * 24 * 1000;
45
+ function getTimestamp(stakeDuration, startEpoch) {
46
+ return timestampOfEpoch0
47
+ .plus((startEpoch + stakeDuration) * oneDay)
48
+ .toNumber();
49
+ }
50
+ exports.getTimestamp = getTimestamp;
25
51
  //# sourceMappingURL=helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/helpers.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAE5C,SAAgB,qBAAqB,CACnC,SAAoB,EACpB,OAAkB,EAClB,UAAkB;IAElB,OAAO,mBAAS,CAAC,sBAAsB,CACrC;QACE,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC;QACpC,OAAO,CAAC,QAAQ,EAAE;QAClB,UAAU,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC;KAC9B,EACD,SAAS,CACV,CAAC,CAAC,CAAC,CAAC;AACP,CAAC;AAbD,sDAaC;AAED,SAAgB,gBAAgB,CAC9B,SAAoB,EACpB,SAAoB,EACpB,OAAkB;IAElB,OAAO,mBAAS,CAAC,sBAAsB,CACrC,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,SAAS,CAAC,QAAQ,EAAE,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,EAC1E,SAAS,CACV,CAAC;AACJ,CAAC;AATD,4CASC;AAED,SAAgB,sBAAsB,CACpC,SAAoB,EACpB,KAAgB,EAChB,OAAe,EACf,KAAa;IAEb,MAAM,IAAI,GAAG,EAAE,CAAC;IAChB,KAAK,IAAI,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;IACxD,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAXD,wDAWC"}
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/helpers.ts"],"names":[],"mappings":";;;;;;AAAA,6CAA4C;AAC5C,gEAAqC;AACrC,2CAAyC;AAEzC,SAAgB,qBAAqB,CACnC,SAAoB,EACpB,OAAkB,EAClB,UAAkB;IAElB,OAAO,mBAAS,CAAC,sBAAsB,CACrC;QACE,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC;QACpC,OAAO,CAAC,QAAQ,EAAE;QAClB,UAAU,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC;KAC9B,EACD,SAAS,CACV,CAAC,CAAC,CAAC,CAAC;AACP,CAAC;AAbD,sDAaC;AAED,SAAgB,gBAAgB,CAC9B,SAAoB,EACpB,SAAoB,EACpB,OAAkB;IAElB,OAAO,mBAAS,CAAC,sBAAsB,CACrC,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,SAAS,CAAC,QAAQ,EAAE,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,EAC1E,SAAS,CACV,CAAC;AACJ,CAAC;AATD,4CASC;AAED,SAAgB,sBAAsB,CACpC,SAAoB,EACpB,KAAgB,EAChB,OAAe,EACf,KAAa;IAEb,MAAM,IAAI,GAAG,EAAE,CAAC;IAChB,KAAK,IAAI,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;IACxD,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAXD,wDAWC;AAED,SAAgB,sBAAsB,CACpC,OAAkB,EAClB,GAAW;IAEX,OAAO,mBAAS,CAAC,sBAAsB,CACrC,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC,QAAQ,EAAE,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAC1E,sBAAU,CACX,CAAC;AACJ,CAAC;AARD,wDAQC;AAED,SAAgB,yBAAyB,CACvC,OAAe,EACf,KAAa,EACb,GAAW;IAEX,MAAM,IAAI,GAAG,IAAI,mBAAS,CAAC,OAAO,CAAC,CAAC;IACpC,MAAM,IAAI,GAAG,EAAE,CAAC;IAChB,KAAK,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,IAAI,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;QAClC,IAAI,CAAC,IAAI,CAAC,sBAAsB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAChD,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAXD,8DAWC;AAED,MAAM,iBAAiB,GAAG,IAAI,sBAAS,CAAC,aAAa,CAAC,CAAC;AACvD,MAAM,MAAM,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AACnC,SAAgB,YAAY,CAAC,aAAqB,EAAE,UAAkB;IACpE,OAAO,iBAAiB;SACrB,IAAI,CAAC,CAAC,UAAU,GAAG,aAAa,CAAC,GAAG,MAAM,CAAC;SAC3C,QAAQ,EAAE,CAAC;AAChB,CAAC;AAJD,oCAIC"}
@@ -0,0 +1,70 @@
1
+ export declare const idls: {
2
+ version: string;
3
+ name: string;
4
+ instructions: {
5
+ name: string;
6
+ accounts: {
7
+ name: string;
8
+ isMut: boolean;
9
+ isSigner: boolean;
10
+ }[];
11
+ args: {
12
+ name: string;
13
+ type: string;
14
+ }[];
15
+ }[];
16
+ accounts: {
17
+ name: string;
18
+ type: {
19
+ kind: string;
20
+ fields: ({
21
+ name: string;
22
+ type: {
23
+ array: (string | number)[];
24
+ defined?: undefined;
25
+ };
26
+ } | {
27
+ name: string;
28
+ type: string;
29
+ } | {
30
+ name: string;
31
+ type: {
32
+ defined: string;
33
+ array?: undefined;
34
+ };
35
+ })[];
36
+ };
37
+ }[];
38
+ types: {
39
+ name: string;
40
+ type: {
41
+ kind: string;
42
+ variants: ({
43
+ name: string;
44
+ fields?: undefined;
45
+ } | {
46
+ name: string;
47
+ fields: {
48
+ name: string;
49
+ type: string;
50
+ }[];
51
+ })[];
52
+ };
53
+ }[];
54
+ events: {
55
+ name: string;
56
+ fields: {
57
+ name: string;
58
+ type: string;
59
+ index: boolean;
60
+ }[];
61
+ }[];
62
+ errors: {
63
+ code: number;
64
+ name: string;
65
+ msg: string;
66
+ }[];
67
+ metadata: {
68
+ address: string;
69
+ };
70
+ };