@sonarwatch/portfolio-plugins 0.12.46 → 0.12.48

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. package/CHANGELOG.md +12 -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/01/constants.js +2 -1
  6. package/src/plugins/01/constants.js.map +1 -1
  7. package/src/plugins/hedgehog/ammJob.js +5 -5
  8. package/src/plugins/hedgehog/ammJob.js.map +1 -1
  9. package/src/plugins/hedgehog/constants.d.ts +0 -2
  10. package/src/plugins/hedgehog/constants.js +1 -3
  11. package/src/plugins/hedgehog/constants.js.map +1 -1
  12. package/src/plugins/jito/helper.d.ts +3 -0
  13. package/src/plugins/jito/helper.js +21 -0
  14. package/src/plugins/jito/helper.js.map +1 -0
  15. package/src/plugins/mango/redeemFetcher.js +1 -1
  16. package/src/plugins/mango/redeemFetcher.js.map +1 -1
  17. package/src/plugins/native-stake/solana/constants.d.ts +1 -1
  18. package/src/plugins/native-stake/solana/constants.js +2 -2
  19. package/src/plugins/native-stake/solana/constants.js.map +1 -1
  20. package/src/plugins/native-stake/solana/solanaFetcher.js +1 -1
  21. package/src/plugins/native-stake/solana/solanaFetcher.js.map +1 -1
  22. package/src/plugins/native-stake/solana/solanaValidatorsJob.js +17 -38
  23. package/src/plugins/native-stake/solana/solanaValidatorsJob.js.map +1 -1
  24. package/src/plugins/native-stake/solana/types.d.ts +7 -11
  25. package/src/plugins/nxfinance/constants.d.ts +8 -0
  26. package/src/plugins/nxfinance/constants.js +22 -0
  27. package/src/plugins/nxfinance/constants.js.map +1 -0
  28. package/src/plugins/nxfinance/idl.d.ts +166 -0
  29. package/src/plugins/nxfinance/idl.js +2169 -0
  30. package/src/plugins/nxfinance/idl.js.map +1 -0
  31. package/src/plugins/nxfinance/index.d.ts +6 -0
  32. package/src/plugins/nxfinance/index.js +12 -0
  33. package/src/plugins/nxfinance/index.js.map +1 -0
  34. package/src/plugins/nxfinance/positionsFetcher.d.ts +3 -0
  35. package/src/plugins/nxfinance/positionsFetcher.js +92 -0
  36. package/src/plugins/nxfinance/positionsFetcher.js.map +1 -0
  37. package/src/plugins/nxfinance/structs.d.ts +19 -0
  38. package/src/plugins/nxfinance/structs.js +22 -0
  39. package/src/plugins/nxfinance/structs.js.map +1 -0
  40. package/src/plugins/nxfinance/types.d.ts +21 -0
  41. package/src/plugins/nxfinance/types.js +3 -0
  42. package/src/plugins/nxfinance/types.js.map +1 -0
  43. package/src/plugins/parcl/constants.d.ts +0 -2
  44. package/src/plugins/parcl/constants.js +1 -3
  45. package/src/plugins/parcl/constants.js.map +1 -1
  46. package/src/plugins/parcl/marginFetcher.js +2 -2
  47. package/src/plugins/parcl/marginFetcher.js.map +1 -1
  48. package/src/plugins/zeta/airdropFetcher.js +8 -0
  49. package/src/plugins/zeta/airdropFetcher.js.map +1 -1
  50. package/src/plugins/zeta/constants.d.ts +5 -1
  51. package/src/plugins/zeta/constants.js +46 -2
  52. package/src/plugins/zeta/constants.js.map +1 -1
  53. package/src/plugins/zeta/depositsFetcher.js +2 -2
  54. package/src/plugins/zeta/depositsFetcher.js.map +1 -1
  55. package/src/plugins/zeta/helpers.d.ts +3 -0
  56. package/src/plugins/zeta/helpers.js +27 -1
  57. package/src/plugins/zeta/helpers.js.map +1 -1
  58. package/src/plugins/zeta/idls.d.ts +70 -0
  59. package/src/plugins/zeta/idls.js +749 -0
  60. package/src/plugins/zeta/idls.js.map +1 -0
  61. package/src/plugins/zeta/index.js +6 -1
  62. package/src/plugins/zeta/index.js.map +1 -1
  63. package/src/plugins/zeta/stakingFetcher.d.ts +3 -0
  64. package/src/plugins/zeta/stakingFetcher.js +69 -0
  65. package/src/plugins/zeta/stakingFetcher.js.map +1 -0
  66. package/src/plugins/zeta/structs.d.ts +7 -0
  67. package/src/plugins/zeta/structs.js +7 -1
  68. package/src/plugins/zeta/structs.js.map +1 -1
  69. package/src/plugins/zeta/types.d.ts +26 -0
  70. package/src/plugins/zeta/types.js +7 -0
  71. package/src/plugins/zeta/types.js.map +1 -1
  72. package/src/utils/misc/checkComputeAndStoreTokensPrices.js +2 -1
  73. package/src/utils/misc/checkComputeAndStoreTokensPrices.js.map +1 -1
  74. package/src/utils/misc/getLpUnderlyingTokenSource.js +2 -1
  75. package/src/utils/misc/getLpUnderlyingTokenSource.js.map +1 -1
  76. package/src/utils/solana/das/getAssetBatchDas.js +3 -2
  77. package/src/utils/solana/das/getAssetBatchDas.js.map +1 -1
  78. package/src/utils/solana/das/heliusAssetToAssetCollectible.js +6 -4
  79. package/src/utils/solana/das/heliusAssetToAssetCollectible.js.map +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"idls.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/idls.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG;IAClB,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,cAAc;IACpB,YAAY,EAAE;QACZ;YACE,IAAI,EAAE,cAAc;YACpB,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,eAAe;oBACrB,KAAK,EAAE,IAAI;oBACX,QAAQ,EAAE,KAAK;iBAChB;gBACD;oBACE,IAAI,EAAE,WAAW;oBACjB,KAAK,EAAE,IAAI;oBACX,QAAQ,EAAE,IAAI;iBACf;gBACD;oBACE,IAAI,EAAE,UAAU;oBAChB,KAAK,EAAE,KAAK;oBACZ,QAAQ,EAAE,KAAK;iBAChB;gBACD;oBACE,IAAI,EAAE,eAAe;oBACrB,KAAK,EAAE,KAAK;oBACZ,QAAQ,EAAE,KAAK;iBAChB;aACF;YACD,IAAI,EAAE;gBACJ;oBACE,IAAI,EAAE,sBAAsB;oBAC5B,IAAI,EAAE,KAAK;iBACZ;gBACD;oBACE,IAAI,EAAE,YAAY;oBAClB,IAAI,EAAE,KAAK;iBACZ;gBACD;oBACE,IAAI,EAAE,wBAAwB;oBAC9B,IAAI,EAAE,KAAK;iBACZ;aACF;SACF;QACD;YACE,IAAI,EAAE,iBAAiB;YACv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BAA4B;YAClC,GAAG,EAAE,iDAAiD;SACvD;QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,yCAAyC;YAC/C,GAAG,EAAE,8DAA8D;SACpE;QACD;YACE,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,yBAAyB;YAC/B,GAAG,EAAE,4BAA4B;SAClC;KACF;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,8CAA8C;KACxD;CACF,CAAC"}
@@ -6,8 +6,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.platforms = exports.fetchers = exports.jobs = void 0;
7
7
  const depositsFetcher_1 = __importDefault(require("./depositsFetcher"));
8
8
  const airdropFetcher_1 = __importDefault(require("./airdropFetcher"));
9
+ const stakingFetcher_1 = __importDefault(require("./stakingFetcher"));
9
10
  const constants_1 = require("./constants");
10
11
  exports.jobs = [];
11
- exports.fetchers = [depositsFetcher_1.default, airdropFetcher_1.default];
12
+ exports.fetchers = [
13
+ depositsFetcher_1.default,
14
+ airdropFetcher_1.default,
15
+ stakingFetcher_1.default,
16
+ ];
12
17
  exports.platforms = [constants_1.platform];
13
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/index.ts"],"names":[],"mappings":";;;;;;AAGA,wEAAgD;AAChD,sEAA8C;AAC9C,2CAAuC;AAE1B,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc,CAAC,yBAAe,EAAE,wBAAc,CAAC,CAAC;AACxD,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/index.ts"],"names":[],"mappings":";;;;;;AAGA,wEAAgD;AAChD,sEAA8C;AAC9C,sEAA8C;AAC9C,2CAAuC;AAE1B,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc;IACjC,yBAAe;IACf,wBAAc;IACd,wBAAc;CACf,CAAC;AACW,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,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
+ 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 portfolio_core_1 = require("@sonarwatch/portfolio-core");
16
+ const bignumber_js_1 = __importDefault(require("bignumber.js"));
17
+ const constants_1 = require("./constants");
18
+ const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
19
+ const clients_1 = require("../../utils/clients");
20
+ const helpers_1 = require("./helpers");
21
+ const solana_1 = require("../../utils/solana");
22
+ const networkId = portfolio_core_1.NetworkId.solana;
23
+ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
24
+ const client = (0, clients_1.getClientSolana)();
25
+ let index = 0;
26
+ const step = 5;
27
+ const accounts = [];
28
+ do {
29
+ const stakeAccountsAddresses = (0, helpers_1.getStakeAccountsAddresses)(owner, index, index + step);
30
+ const stakeAccounts = yield (0, solana_1.getAutoParsedMultipleAccountsInfo)(client, constants_1.sharkyIdlItem, stakeAccountsAddresses);
31
+ index += step;
32
+ accounts.push(...stakeAccounts);
33
+ } while (!accounts.some((acc) => !acc));
34
+ const tokenPrice = yield cache.getTokenPrice(constants_1.zexMint, networkId);
35
+ const elements = [];
36
+ for (const account of accounts) {
37
+ if (!account)
38
+ continue;
39
+ const name = (0, solana_1.u8ArrayToString)(account.name);
40
+ const amount = new bignumber_js_1.default(account.amountStillStaked)
41
+ .dividedBy(Math.pow(10, constants_1.zexDecimals))
42
+ .toNumber();
43
+ const attributes = {
44
+ lockedUntil: account.stakeState.vesting
45
+ ? (0, helpers_1.getTimestamp)(account.stakeDurationEpochs, account.stakeState.vesting.stakeStartEpoch)
46
+ : -1,
47
+ };
48
+ const asset = (0, tokenPriceToAssetToken_1.default)(constants_1.zexMint, amount, networkId, tokenPrice, undefined, attributes);
49
+ elements.push({
50
+ type: 'multiple',
51
+ label: 'Staked',
52
+ networkId,
53
+ platformId: constants_1.platformId,
54
+ name,
55
+ data: {
56
+ assets: [asset],
57
+ },
58
+ value: asset.value,
59
+ });
60
+ }
61
+ return elements;
62
+ });
63
+ const fetcher = {
64
+ id: `${constants_1.platformId}-staking`,
65
+ networkId,
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/zeta/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AACpC,gEAAqC;AAGrC,2CAA8E;AAC9E,qGAA6E;AAC7E,iDAAsD;AACtD,uCAAoE;AACpE,+CAG4B;AAG5B,MAAM,SAAS,GAAG,0BAAS,CAAC,MAAM,CAAC;AAEnC,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,MAAM,IAAI,GAAG,CAAC,C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Q,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,QAAQ;YACf,SAAS;YACT,UAAU,EAAV,sBAAU;YACV,IAAI;YACJ,IAAI,EAAE;gBACJ,MAAM,EAAE,CAAC,KAAK,CAAC;aAChB;YACD,KAAK,EAAE,KAAK,CAAC,KAAK;SACnB,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,SAAS;IACT,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -48,3 +48,10 @@ export type CrossMarginAccount = {
48
48
  padding: Buffer[];
49
49
  };
50
50
  export declare const crossMarginAccountStruct: FixableBeetStruct<CrossMarginAccount, Partial<CrossMarginAccount>>;
51
+ export type ClaimStatus = {
52
+ buffer: Buffer;
53
+ claimant: PublicKey;
54
+ claimedAt: BigNumber;
55
+ claimedAmount: BigNumber;
56
+ };
57
+ export declare const claimStatusStruct: BeetStruct<ClaimStatus, Partial<ClaimStatus>>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.crossMarginAccountStruct = exports.productLedgerStruct = exports.orderStateStruct = exports.positionStruct = exports.anchorDecimalStruct = exports.MarginAccountType = void 0;
3
+ exports.claimStatusStruct = exports.crossMarginAccountStruct = exports.productLedgerStruct = exports.orderStateStruct = exports.positionStruct = exports.anchorDecimalStruct = exports.MarginAccountType = void 0;
4
4
  const beet_1 = require("@metaplex-foundation/beet");
5
5
  const beet_solana_1 = require("@metaplex-foundation/beet-solana");
6
6
  const solana_1 = require("../../utils/solana");
@@ -49,4 +49,10 @@ exports.crossMarginAccountStruct = new beet_1.FixableBeetStruct([
49
49
  ['productLedgersPadding', (0, beet_1.uniformFixedSizeArray)(exports.productLedgerStruct, 20)],
50
50
  ['padding', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 2000)],
51
51
  ], (args) => args);
52
+ exports.claimStatusStruct = new beet_1.BeetStruct([
53
+ ['buffer', (0, solana_1.blob)(8)],
54
+ ['claimant', beet_solana_1.publicKey],
55
+ ['claimedAt', solana_1.u64],
56
+ ['claimedAmount', solana_1.u64],
57
+ ], (args) => args);
52
58
  //# sourceMappingURL=structs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/structs.ts"],"names":[],"mappings":";;;AAAA,oDAOmC;AACnC,kEAA6D;AAG7D,+CAAoD;AAEpD,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,6DAAM,CAAA;IACN,uEAAW,CAAA;AACb,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B;AAQY,QAAA,mBAAmB,GAAG,IAAI,iBAAU,CAC/C;IACE,CAAC,OAAO,EAAE,UAAG,CAAC;IACd,CAAC,IAAI,EAAE,UAAG,CAAC;IACX,CAAC,IAAI,EAAE,UAAG,CAAC;IACX,CAAC,KAAK,EAAE,UAAG,CAAC;CACb,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAqB,CAChC,CAAC;AAMW,QAAA,cAAc,GAAG,IAAI,iBAAU,CAC1C;IACE,CAAC,MAAM,EAAE,YAAG,CAAC;IACb,CAAC,cAAc,EAAE,YAAG,CAAC;CACtB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAgB,CAC3B,CAAC;AAOW,QAAA,gBAAgB,GAAG,IAAI,iBAAU,CAC5C;IACE,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,eAAe,EAAE,YAAG,CAAC;CACvB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAkB,CAC7B,CAAC;AAMW,QAAA,mBAAmB,GAAG,IAAI,iBAAU,CAC/C;IACE,CAAC,UAAU,EAAE,sBAAc,CAAC;IAC5B,CAAC,YAAY,EAAE,wBAAgB,CAAC;CACjC,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAqB,CAChC,CAAC;AAqBW,QAAA,wBAAwB,GACnC,IAAI,wBAAiB,CACnB;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,WAAW,EAAE,uBAAS,CAAC;IACxB,CAAC,iBAAiB,EAAE,uBAAS,CAAC;IAC9B,CAAC,SAAS,EAAE,YAAG,CAAC;IAChB,CAAC,iBAAiB,EAAE,SAAE,CAAC;IACvB,CAAC,OAAO,EAAE,SAAE,CAAC;IACb,CAAC,iBAAiB,EAAE,WAAI,CAAC;IACzB,CAAC,aAAa,EAAE,SAAE,CAAC;IACnB,CAAC,kBAAkB,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,CAAC,CAAC,CAAC;IAClD,CAAC,yBAAyB,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,EAAE,CAAC,CAAC;IAC1D,CAAC,iBAAiB,EAAE,YAAG,CAAC;IACxB,CAAC,mBAAmB,EAAE,IAAA,4BAAqB,EAAC,2BAAmB,EAAE,CAAC,CAAC,CAAC;IACpE;QACE,0BAA0B;QAC1B,IAAA,4BAAqB,EAAC,2BAAmB,EAAE,EAAE,CAAC;KAC/C;IACD,CAAC,gBAAgB,EAAE,IAAA,4BAAqB,EAAC,2BAAmB,EAAE,CAAC,CAAC,CAAC;IACjE,CAAC,uBAAuB,EAAE,IAAA,4BAAqB,EAAC,2BAAmB,EAAE,EAAE,CAAC,CAAC;IACzE,CAAC,SAAS,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,IAAI,CAAC,CAAC;CAC7C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAA0B,CACrC,CAAC"}
1
+ {"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/structs.ts"],"names":[],"mappings":";;;AAAA,oDAOmC;AACnC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C;IACvB,CAAC,OAAO,EAAE,SAAE,CAAC;IACb,CAAC,iBAAiB,EAAE,WAAI,CAAC;IACzB,CAAC,aAAa,EAAE,SAAE,CAAC;IACnB,CAAC,kBAAkB,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,CAAC,CAAC,CAAC;IAClD,CAAC,yBAAyB,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,EAAE,CAAC,CAAC;IAC1D,CAAC,iBAAiB,EAAE,YAAG,CAAC;IACxB,CAAC,mBAAmB,EAAE,IAAA,4BAAqB,EAAC,2BAAmB,EAAE,CAAC,CAAC,CAAC;IACpE;QACE,0BAA0B;QAC1B,IAAA,4BAAqB,EAAC,2BAAmB,EAAE,EAAE,CAAC;KAC/C;IACD,CAAC,gBAAgB,EAAE,IAAA,4BAAqB,EAAC,2BAAmB,EAAE,CAAC,CAAC,CAAC;IACjE,CAAC,uBAAuB,EAAE,IAAA,4BAAqB,EAAC,2BAAmB,EAAE,EAAE,CAAC,CAAC;IACzE,CAAC,SAAS,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,IAAI,CAAC,CAAC;CAC7C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAA0B,CACrC,CAAC;AASS,QAAA,iBAAiB,GAAG,IAAI,iBAAU,CAC7C;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,UAAU,EAAE,uBAAS,CAAC;IACvB,CAAC,WAAW,EAAE,YAAG,CAAC;IAClB,CAAC,eAAe,EAAE,YAAG,CAAC;CACvB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAmB,CAC9B,CAAC"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="node" />
1
2
  export type GQLResponse = {
2
3
  getAirdropFinalFrontend: GetAirdropFinalFrontend;
3
4
  };
@@ -12,3 +13,28 @@ export type GetAirdropFinalFrontend = {
12
13
  total_allocation: number;
13
14
  __typename: string;
14
15
  };
16
+ export declare enum StakeStateName {
17
+ Uninitialized = 0,
18
+ Vesting = 1,
19
+ Locked = 2
20
+ }
21
+ export type StakeState = {
22
+ vesting?: {
23
+ lastClaimTs: string;
24
+ stakeStartEpoch: number;
25
+ };
26
+ locked?: null;
27
+ uninitialized?: null;
28
+ };
29
+ export type StakeAccount = {
30
+ buffer: Buffer;
31
+ name: number[];
32
+ vaultNonce: number;
33
+ bitInUse: number;
34
+ stakeState: StakeState;
35
+ initialStakeAmount: string;
36
+ amountStillStaked: string;
37
+ amountClaimed: string;
38
+ stakeDurationEpochs: number;
39
+ authority: string;
40
+ };
@@ -1,3 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StakeStateName = void 0;
4
+ var StakeStateName;
5
+ (function (StakeStateName) {
6
+ StakeStateName[StakeStateName["Uninitialized"] = 0] = "Uninitialized";
7
+ StakeStateName[StakeStateName["Vesting"] = 1] = "Vesting";
8
+ StakeStateName[StakeStateName["Locked"] = 2] = "Locked";
9
+ })(StakeStateName || (exports.StakeStateName = StakeStateName = {}));
3
10
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/types.ts"],"names":[],"mappings":";;;AAgBA,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,qEAAa,CAAA;IACb,yDAAO,CAAA;IACP,uDAAM,CAAA;AACR,CAAC,EAJW,cAAc,8BAAd,cAAc,QAIzB"}
@@ -17,6 +17,7 @@ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
17
17
  const getSourceWeight_1 = __importDefault(require("./getSourceWeight"));
18
18
  const getDecimalsForToken_1 = require("./getDecimalsForToken");
19
19
  const constants_1 = require("../../plugins/tokens/constants");
20
+ const solana_1 = require("../solana");
20
21
  /**
21
22
  * @deprecated
22
23
  * This function has been deprecated. Use the getLpUnderlyingTokenSource instead.
@@ -44,7 +45,7 @@ exports.tokensToRelyOnByNetwork = new Map([
44
45
  'J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn', // jito SOL
45
46
  'mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So', // mSOL
46
47
  '7dHbWXmci3dT8UFYWYZweBLXgycu7Y3iL6trKn1Y7ARj', // lido SOL
47
- 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v', // USDC
48
+ solana_1.usdcSolanaMint, // USDC
48
49
  'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB', // USDT
49
50
  ],
50
51
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"checkComputeAndStoreTokensPrices.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/checkComputeAndStoreTokensPrices.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAMoC;AAGpC,wEAAgD;AAChD,+DAA4D;AAC5D,8DAAsE;AAetE;;;;;;;;;GASG;AACU,QAAA,uBAAuB,GAAiC,IAAI,GAAG,CAAC;IAC3E;QACE,0BAAS,CAAC,GAAG;QACb;YACE,yBAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO;YAC3B,sEAAsE,EAAE,OAAO;YAC/E,qHAAqH,EAAE,SAAS;SACjI;KACF;IACD;QACE,0BAAS,CAAC,MAAM;QAChB;YACE,yBAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO;YAC9B,2CAA0B,EAAE,OAAO;YACnC,8CAA8C,EAAE,WAAW;YAC3D,6CAA6C,EAAE,OAAO;YACtD,8CAA8C,EAAE,WAAW;YAC3D,8CAA8C,EAAE,OAAO;YACvD,8CAA8C,EAAE,OAAO;SACxD;KACF;IACD;QACE,0BAAS,CAAC,KAAK;QACf;YACE,yBAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,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gBACT,OAAO,EAAE,MAAM,CAAC,IAAI;gBACpB,QAAQ,EAAE,cAAc;gBACxB,KAAK,EAAE,MAAM;aACd,CAAC;YAEF,uBAAuB,GAAG;gBACxB,SAAS;gBACT,OAAO,EAAE,MAAM,CAAC,IAAI;gBACpB,QAAQ,EAAE,cAAc;gBACxB,KAAK,EAAE,MAAM;aACd,CAAC;YAEF,MAAM,KAAK,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;YACtD,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,CAAC;QAC9D,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;CAAA;AApID,mDAoIC"}
1
+ {"version":3,"file":"checkComputeAndStoreTokensPrices.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/checkComputeAndStoreTokensPrices.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAMoC;AAGpC,wEAAgD;AAChD,+DAA4D;AAC5D,8DAAsE;AACtE,sCAA2C;AAe3C;;;;;;;;;GASG;AACU,QAAA,uBAAuB,GAAiC,IAAI,GAAG,CAAC;IAC3E;QACE,0BAAS,CAAC,GAAG;QACb;YACE,yBAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO;YAC3B,sEAAsE,EAAE,OAAO;YAC/E,qHAAqH,EAAE,SAAS;SACjI;KACF;IACD;QACE,0BAAS,CAAC,MAAM;QAChB;YACE,yBAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO;YAC9B,2CAA0B,EAAE,OAAO;YACnC,8CAA8C,EAAE,WAAW;YAC3D,6CAA6C,EAAE,OAAO;YACtD,8CAA8C,EAAE,WAAW;YAC3D,uBAAc,EAAE,OAAO;YACvB,8CAA8C,EAAE,OAAO;SACxD;KACF;IACD;QACE,0BAAS,CAAC,KAAK;QACf;YACE,yBAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO;YAC7B,6EAA6E,EAAE,SAAS;YACxF,mFAAmF,EAAE,oBA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AAc;gBACxB,KAAK,EAAE,MAAM;aACd,CAAC;YAEF,uBAAuB,GAAG;gBACxB,SAAS;gBACT,OAAO,EAAE,MAAM,CAAC,IAAI;gBACpB,QAAQ,EAAE,cAAc;gBACxB,KAAK,EAAE,MAAM;aACd,CAAC;YAEF,MAAM,KAAK,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;YACtD,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,CAAC;QAC9D,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;CAAA;AApID,mDAoIC"}
@@ -9,6 +9,7 @@ const constants_1 = require("../../plugins/tokens/constants");
9
9
  const getSourceWeight_1 = __importDefault(require("./getSourceWeight"));
10
10
  const constants_2 = require("../sui/constants");
11
11
  const constants_3 = require("./constants");
12
+ const solana_1 = require("../solana");
12
13
  exports.defaultAcceptedPairs = new Map([
13
14
  [
14
15
  portfolio_core_1.NetworkId.sei,
@@ -23,7 +24,7 @@ exports.defaultAcceptedPairs = new Map([
23
24
  [
24
25
  portfolio_core_1.solanaNativeAddress,
25
26
  portfolio_core_1.solanaNativeWrappedAddress,
26
- 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v', // USDC
27
+ solana_1.usdcSolanaMint, // USDC
27
28
  'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB', // USDT
28
29
  ].map((a) => (0, portfolio_core_1.formatTokenAddress)(a, portfolio_core_1.NetworkId.solana)),
29
30
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"getLpUnderlyingTokenSource.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/getLpUnderlyingTokenSource.ts"],"names":[],"mappings":";;;;;;AAAA,+DAYoC;AACpC,8DAAsE;AACtE,wEAAgD;AAChD,gDAA+C;AAC/C,2CAAkD;AAErC,QAAA,oBAAoB,GAAG,IAAI,GAAG,CAA0B;IACnE;QACE,0BAAS,CAAC,GAAG;QACb;YACE,iCAAgB;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ACtB,QAAQ,EAAE,CAAC,CAAC,QAAQ;YACpB,KAAK;YACL,MAAM,EAAE,IAAA,yBAAe,EAAC,iBAAiB,CAAC;YAC1C,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,aAAa;YACb,WAAW;SACZ,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAnFD,gEAmFC"}
1
+ {"version":3,"file":"getLpUnderlyingTokenSource.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/getLpUnderlyingTokenSource.ts"],"names":[],"mappings":";;;;;;AAAA,+DAYoC;AACpC,8DAAsE;AACtE,wEAAgD;AAChD,gDAA+C;AAC/C,2CAAkD;AAClD,sCAA2C;AAE9B,QAAA,oBAAoB,GAAG,IAAI,GAAG,CAA0B;IACnE;QACE,0BAAS,CAAC,GAAG;QACb;YACE,iCAAgB;YAChB,sEAAsE,EAAE,OAAO;YAC/E,qHAAqH,EAAE,SAAS;SACjI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,mCAAkB,EAAC,CAAC,EAAE,0BAAS,CAAC,GAAG,CAAC,CAAC;KACnD;IACD;QACE,0BAAS,CAAC,MAAM;QAChB;YACE,oCAAmB;YACnB,2CAA0B;YAC1B,uBAAc,EAAE,OAAO;YACvB,8CAA8C,EAAE,OAAO;SACxD,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,mCAAkB,EAAC,CAAC,EAAE,0BAAS,CAAC,MAAM,CAAC,CAAC;KACtD;IACD;QACE,0BAAS,CAAC,KAAK;QACf;YACE,mCAAkB;YAClB,6EAA6E,EAAE,SAAS;YACxF,mFAAmF,EAAE,oBAAoB;SAC1G,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,mCAAkB,EAAC,CAAC,EAAE,0BAAS,CAAC,KAAK,CAAC,CAAC;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U,CAAC,CAAC,CAAC,CAAC;YAAE,SAAS;QACpD,IACE,CAAC,CAAC,UAAU;YACZ,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,kCAAiB,CAAC;YAE5D,SAAS;QAEX,IAAI,YAAY,GAAG,CAAC,CAAC;QACrB,IAAI,CAAC,CAAC,MAAM,IAAI,eAAe,CAAC,MAAM;YACpC,YAAY,GAAG,CAAC,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC;QACnD,MAAM,KAAK,GAAG,CAAC,YAAY,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC,aAAa,CAAC;QAEnE,MAAM,MAAM,GAAqB;YAC/B,EAAE,EAAE,QAAQ;YACZ,SAAS;YACT,UAAU,EAAE,gCAAoB,CAAC,EAAE;YACnC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;YACtB,QAAQ,EAAE,CAAC,CAAC,QAAQ;YACpB,KAAK;YACL,MAAM,EAAE,IAAA,yBAAe,EAAC,iBAAiB,CAAC;YAC1C,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,aAAa;YACb,WAAW;SACZ,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAnFD,gEAmFC"}
@@ -18,11 +18,12 @@ const getBasicAuthHeaders_1 = require("../../misc/getBasicAuthHeaders");
18
18
  const MAX_MINTS = 1000;
19
19
  function getAssetBatchDas(dasEndpoint, publicKeys) {
20
20
  return __awaiter(this, void 0, void 0, function* () {
21
+ const uniquePublicKeys = Array.from(new Set(publicKeys));
21
22
  if (publicKeys.length <= MAX_MINTS) {
22
- return getAssetBatchDasUnsafe(dasEndpoint, publicKeys);
23
+ return getAssetBatchDasUnsafe(dasEndpoint, uniquePublicKeys);
23
24
  }
24
25
  const assetsInfo = [];
25
- const publicKeysToFetch = [...publicKeys];
26
+ const publicKeysToFetch = [...uniquePublicKeys];
26
27
  while (publicKeysToFetch.length !== 0) {
27
28
  const currPublicKeysToFetch = publicKeysToFetch.splice(0, MAX_MINTS);
28
29
  const accountsInfoRes = yield getAssetBatchDasUnsafe(dasEndpoint, currPublicKeysToFetch);
@@ -1 +1 @@
1
- {"version":3,"file":"getAssetBatchDas.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/solana/das/getAssetBatchDas.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,kDAA6C;AAE7C,wEAAqE;AAErE,MAAM,SAAS,GAAG,IAAI,CAAC;AAEvB,SAAsB,gBAAgB,CACpC,WAAwB,EACxB,UAAoB;;QAEpB,IAAI,UAAU,CAAC,MAAM,IAAI,SAAS,EAAE,CAAC;YACnC,OAAO,sBAAsB,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QACzD,CAAC;QACD,MAAM,UAAU,GAAG,EAAE,CAAC;QACtB,MAAM,iBAAiB,GAAG,CAAC,GAAG,UAAU,CAAC,CAAC;QAC1C,OAAO,iBAAiB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtC,MAAM,qBAAqB,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC;YACrE,MAAM,eAAe,GAAG,MAAM,sBAAsB,CAClD,WAAW,EACX,qBAAqB,CACtB,CAAC;YACF,UAAU,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,CAAC;QACtC,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;CAAA;AAlBD,4CAkBC;AAED,SAAsB,qBAAqB,CACzC,WAAwB,EACxB,UAAoB;;QAEpB,MAAM,MAAM,GAAG,MAAM,gBAAgB,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QAE/D,MAAM,SAAS,GAA6B,IAAI,GAAG,EAAE,CAAC;QACtD,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;YACvB,IAAI,CAAC,KAAK;gBAAE,OAAO;YACnB,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;QAEH,OAAO,SAAS,CAAC;IACnB,CAAC;CAAA;AAbD,sDAaC;AAED,SAAe,sBAAsB,CACnC,WAAwB,EACxB,UAAoB;;QAEpB,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QACvC,MAAM,WAAW,GAAG,WAAW,CAAC,SAAS;YACvC,CAAC,CAAC,IAAA,yCAAmB,EACjB,WAAW,CAAC,SAAS,CAAC,QAAQ,EAC9B,WAAW,CAAC,SAAS,CAAC,QAAQ,CAC/B;YACH,CAAC,CAAC,SAAS,CAAC;QAEd,MAAM,GAAG,GAAG,MAAM,eAAK,CAAC,IAAI,CAK1B,WAAW,CAAC,GAAG,EACf;YACE,OAAO,EAAE,KAAK;YACd,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC5B,MAAM,EAAE,eAAe;YACvB,MAAM,EAAE;gBACN,GAAG,EAAE,UAAU;aAChB;SACF,EACD;YACE,OAAO,kBACL,cAAc,EAAE,kBAAkB,IAC/B,WAAW,CACf;SACF,CACF,CAAC;QAEF,OAAO,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;IACzB,CAAC;CAAA"}
1
+ {"version":3,"file":"getAssetBatchDas.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/solana/das/getAssetBatchDas.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,kDAA6C;AAE7C,wEAAqE;AAErE,MAAM,SAAS,GAAG,IAAI,CAAC;AAEvB,SAAsB,gBAAgB,CACpC,WAAwB,EACxB,UAAoB;;QAEpB,MAAM,gBAAgB,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;QACzD,IAAI,UAAU,CAAC,M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CAAC,SAAS,CAAC;QAEd,MAAM,GAAG,GAAG,MAAM,eAAK,CAAC,IAAI,CAK1B,WAAW,CAAC,GAAG,EACf;YACE,OAAO,EAAE,KAAK;YACd,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC5B,MAAM,EAAE,eAAe;YACvB,MAAM,EAAE;gBACN,GAAG,EAAE,UAAU;aAChB;SACF,EACD;YACE,OAAO,kBACL,cAAc,EAAE,kBAAkB,IAC/B,WAAW,CACf;SACF,CACF,CAAC;QAEF,OAAO,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;IACzB,CAAC;CAAA"}
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.heliusAssetToAssetCollectible = void 0;
4
4
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
5
5
  function heliusAssetToAssetCollectible(asset, props) {
6
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
6
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
7
7
  // Tags
8
8
  const tags = [];
9
9
  if (asset.compression.compressed)
@@ -59,14 +59,16 @@ function heliusAssetToAssetCollectible(asset, props) {
59
59
  address: asset.id,
60
60
  amount,
61
61
  price: (_j = (_h = props === null || props === void 0 ? void 0 : props.collection) === null || _h === void 0 ? void 0 : _h.floorPrice) !== null && _j !== void 0 ? _j : null,
62
- name: asset.content.metadata.name,
62
+ name: asset.content.metadata.name ||
63
+ (collection === null || collection === void 0 ? void 0 : collection.name) ||
64
+ ((_k = props === null || props === void 0 ? void 0 : props.collection) === null || _k === void 0 ? void 0 : _k.name),
63
65
  dataUri: asset.content.json_uri,
64
- imageUri: (_k = asset.content.links) === null || _k === void 0 ? void 0 : _k.image,
66
+ imageUri: (_l = asset.content.links) === null || _l === void 0 ? void 0 : _l.image,
65
67
  attributes: asset.content.metadata.attributes,
66
68
  collection,
67
69
  },
68
70
  networkId: portfolio_core_1.NetworkId.solana,
69
- value: (_m = (_l = props === null || props === void 0 ? void 0 : props.collection) === null || _l === void 0 ? void 0 : _l.floorPrice) !== null && _m !== void 0 ? _m : null,
71
+ value: (_o = (_m = props === null || props === void 0 ? void 0 : props.collection) === null || _m === void 0 ? void 0 : _m.floorPrice) !== null && _o !== void 0 ? _o : null,
70
72
  };
71
73
  }
72
74
  exports.heliusAssetToAssetCollectible = heliusAssetToAssetCollectible;
@@ -1 +1 @@
1
- {"version":3,"file":"heliusAssetToAssetCollectible.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/solana/das/heliusAssetToAssetCollectible.ts"],"names":[],"mappings":";;;AAAA,+DAKoC;AAGpC,SAAgB,6BAA6B,CAC3C,KAAkB,EAClB,KAGC;;IAED,OAAO;IACP,MAAM,IAAI,GAAyB,EAAE,CAAC;IACtC,IAAI,KAAK,CAAC,WAAW,CAAC,UAAU;QAAE,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC1D,IAAI,KAAK,CAAC,WAAW;QAAE,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAEhD,IAAI,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,MAAM;QAAE,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;IAElD,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,IAAI,UAA6C,CAAC;IAElD,MAAM,QAAQ,GAAG,MAAA,KAAK,CAAC,UAAU,0CAAE,QAAQ,CAAC;IAC5C,MAAM,OAAO,GAAG,MAAA,KAAK,CAAC,UAAU,0CAAE,OAAO,CAAC;IAC1C,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAE1D,SAAS;IACT,IAAI,OAAO,IAAI,OAAO,KAAK,CAAC,EAAE,CAAC;QAC7B,MAAM,GAAG,OAAO,CAAC;QACjB,IAAI,CAAC,IAAI,CAAC,K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AAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;SACzC;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,KAAK,CAAC,EAAE;YACjB,MAAM;YACN,KAAK,EAAE,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,0CAAE,UAAU,mCAAI,IAAI;YAC5C,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI;YACjC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ;YAC/B,QAAQ,EAAE,MAAA,KAAK,CAAC,OAAO,CAAC,KAAK,0CAAE,KAAK;YACpC,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU;YAC7C,UAAU;SACX;QACD,SAAS,EAAE,0BAAS,CAAC,MAAM;QAC3B,KAAK,EAAE,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,0CAAE,UAAU,mCAAI,IAAI;KAC7C,CAAC;AACJ,CAAC;AA1ED,sEA0EC"}
1
+ {"version":3,"file":"heliusAssetToAssetCollectible.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/solana/das/heliusAssetToAssetCollectible.ts"],"names":[],"mappings":";;;AAAA,+DAKoC;AAGpC,SAAgB,6BAA6B,CAC3C,KAAkB,EAClB,KAGC;;IAED,OAAO;IACP,MAAM,IAAI,GAAyB,EAAE,CAAC;IACtC,IAAI,KAAK,CAAC,WAAW,CAAC,UAAU;QAAE,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC1D,IAAI,KAAK,CAAC,WAAW;QAAE,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAEhD,IAAI,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,MAAM;QAAE,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;IAElD,IAAI,MAAM,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