@sonarwatch/portfolio-plugins 0.14.128 → 0.14.130

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (189) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +1 -1
  3. package/src/index.js +5 -0
  4. package/src/index.js.map +1 -1
  5. package/src/plugins/adrena/positionsFetcher.js +1 -0
  6. package/src/plugins/adrena/positionsFetcher.js.map +1 -1
  7. package/src/plugins/allbridge/positionsFetcher.js +9 -1
  8. package/src/plugins/allbridge/positionsFetcher.js.map +1 -1
  9. package/src/plugins/armada-staking/stakingFetcher.js +4 -1
  10. package/src/plugins/armada-staking/stakingFetcher.js.map +1 -1
  11. package/src/plugins/aurory/stakingFetcher.js +5 -1
  12. package/src/plugins/aurory/stakingFetcher.js.map +1 -1
  13. package/src/plugins/bonfida/offersFetcher.js +30 -37
  14. package/src/plugins/bonfida/offersFetcher.js.map +1 -1
  15. package/src/plugins/bonkrewards/positionFetcher.js +16 -22
  16. package/src/plugins/bonkrewards/positionFetcher.js.map +1 -1
  17. package/src/plugins/cyberfrogs/thorDepositFetcher.js +2 -0
  18. package/src/plugins/cyberfrogs/thorDepositFetcher.js.map +1 -1
  19. package/src/plugins/daos/realmsDepositsFetcher.js +29 -43
  20. package/src/plugins/daos/realmsDepositsFetcher.js.map +1 -1
  21. package/src/plugins/debridge/dlmmVaultsFetcher.js +16 -10
  22. package/src/plugins/debridge/dlmmVaultsFetcher.js.map +1 -1
  23. package/src/plugins/defiland/stakingFetcher.js +8 -1
  24. package/src/plugins/defiland/stakingFetcher.js.map +1 -1
  25. package/src/plugins/defituna/lendingFetcher.js +3 -0
  26. package/src/plugins/defituna/lendingFetcher.js.map +1 -1
  27. package/src/plugins/defituna/positionsFetcher.js +7 -1
  28. package/src/plugins/defituna/positionsFetcher.js.map +1 -1
  29. package/src/plugins/defituna/structs.d.ts +1 -0
  30. package/src/plugins/defituna/structs.js.map +1 -1
  31. package/src/plugins/divvy/constants.d.ts +1 -0
  32. package/src/plugins/divvy/constants.js +2 -1
  33. package/src/plugins/divvy/constants.js.map +1 -1
  34. package/src/plugins/divvy/housePoolFetcher.js +3 -0
  35. package/src/plugins/divvy/housePoolFetcher.js.map +1 -1
  36. package/src/plugins/divvy/stakingFetcher.js +3 -1
  37. package/src/plugins/divvy/stakingFetcher.js.map +1 -1
  38. package/src/plugins/drift/depositsFetcher.js +15 -0
  39. package/src/plugins/drift/depositsFetcher.js.map +1 -1
  40. package/src/plugins/drift-market-maker-vault/depositsFetcher.js +2 -1
  41. package/src/plugins/drift-market-maker-vault/depositsFetcher.js.map +1 -1
  42. package/src/plugins/elemental/depositFetcher.js +3 -0
  43. package/src/plugins/elemental/depositFetcher.js.map +1 -1
  44. package/src/plugins/ensofi/solanaLoansFetcher.js +6 -0
  45. package/src/plugins/ensofi/solanaLoansFetcher.js.map +1 -1
  46. package/src/plugins/exponent/liquidityFetcher.js +1 -0
  47. package/src/plugins/exponent/liquidityFetcher.js.map +1 -1
  48. package/src/plugins/exponent/tradeFetcher.js +1 -0
  49. package/src/plugins/exponent/tradeFetcher.js.map +1 -1
  50. package/src/plugins/famousfoxfederation/stakingFetcher.js +18 -22
  51. package/src/plugins/famousfoxfederation/stakingFetcher.js.map +1 -1
  52. package/src/plugins/flash/perpetualFetcher.js +1 -1
  53. package/src/plugins/flash/perpetualFetcher.js.map +1 -1
  54. package/src/plugins/fragmetric/pricingJob.js +6 -0
  55. package/src/plugins/fragmetric/pricingJob.js.map +1 -1
  56. package/src/plugins/francium/lendingFetcher.js +1 -0
  57. package/src/plugins/francium/lendingFetcher.js.map +1 -1
  58. package/src/plugins/futarchy/daosJob.js +9 -0
  59. package/src/plugins/futarchy/daosJob.js.map +1 -1
  60. package/src/plugins/genesysgo/stakingFetcher.js +12 -25
  61. package/src/plugins/genesysgo/stakingFetcher.js.map +1 -1
  62. package/src/plugins/goosefx/stakingFetcher.js +18 -27
  63. package/src/plugins/goosefx/stakingFetcher.js.map +1 -1
  64. package/src/plugins/gpool/stakingFetcher.js +5 -1
  65. package/src/plugins/gpool/stakingFetcher.js.map +1 -1
  66. package/src/plugins/guano/constants.d.ts +8 -0
  67. package/src/plugins/guano/constants.js +15 -0
  68. package/src/plugins/guano/constants.js.map +1 -0
  69. package/src/plugins/guano/filters.d.ts +20 -0
  70. package/src/plugins/guano/filters.js +41 -0
  71. package/src/plugins/guano/filters.js.map +1 -0
  72. package/src/plugins/guano/index.d.ts +6 -0
  73. package/src/plugins/guano/index.js +10 -0
  74. package/src/plugins/guano/index.js.map +1 -0
  75. package/src/plugins/guano/stakingFetcher.d.ts +3 -0
  76. package/src/plugins/guano/stakingFetcher.js +70 -0
  77. package/src/plugins/guano/stakingFetcher.js.map +1 -0
  78. package/src/plugins/guano/structs.d.ts +34 -0
  79. package/src/plugins/guano/structs.js +33 -0
  80. package/src/plugins/guano/structs.js.map +1 -0
  81. package/src/plugins/guano/types.d.ts +15 -0
  82. package/src/plugins/guano/types.js +3 -0
  83. package/src/plugins/guano/types.js.map +1 -0
  84. package/src/plugins/hedgehog/ammJob.js +8 -0
  85. package/src/plugins/hedgehog/ammJob.js.map +1 -1
  86. package/src/plugins/hxro/stakingFetcher.js +2 -0
  87. package/src/plugins/hxro/stakingFetcher.js.map +1 -1
  88. package/src/plugins/iloop/depositsFetcher.js +8 -0
  89. package/src/plugins/iloop/depositsFetcher.js.map +1 -1
  90. package/src/plugins/jupiter/exchange/dcaFetcher.js +6 -1
  91. package/src/plugins/jupiter/exchange/dcaFetcher.js.map +1 -1
  92. package/src/plugins/jupiter/exchange/limitFetcher.js +3 -0
  93. package/src/plugins/jupiter/exchange/limitFetcher.js.map +1 -1
  94. package/src/plugins/jupiter/exchange/valueAverageFetcher.js +2 -1
  95. package/src/plugins/jupiter/exchange/valueAverageFetcher.js.map +1 -1
  96. package/src/plugins/kamino/lendsFetcher.js +6 -0
  97. package/src/plugins/kamino/lendsFetcher.js.map +1 -1
  98. package/src/plugins/kamino/ordersFetcher.js +2 -1
  99. package/src/plugins/kamino/ordersFetcher.js.map +1 -1
  100. package/src/plugins/layer3/stakingFetcher.js +1 -0
  101. package/src/plugins/layer3/stakingFetcher.js.map +1 -1
  102. package/src/plugins/lifinity/lockerFetcher.js +14 -17
  103. package/src/plugins/lifinity/lockerFetcher.js.map +1 -1
  104. package/src/plugins/loverflow/airdropClaimFetcher.js +1 -0
  105. package/src/plugins/loverflow/airdropClaimFetcher.js.map +1 -1
  106. package/src/plugins/magiceden/escrowFetcher.js +12 -18
  107. package/src/plugins/magiceden/escrowFetcher.js.map +1 -1
  108. package/src/plugins/marginfi/helpers.d.ts +2 -1
  109. package/src/plugins/marginfi/helpers.js +8 -2
  110. package/src/plugins/marginfi/helpers.js.map +1 -1
  111. package/src/plugins/marinade/ticketsFetcher.js +14 -31
  112. package/src/plugins/marinade/ticketsFetcher.js.map +1 -1
  113. package/src/plugins/metaplex/resizableNftFetcher.js +1 -0
  114. package/src/plugins/metaplex/resizableNftFetcher.js.map +1 -1
  115. package/src/plugins/nxfinance/positionsFetcher.js +19 -2
  116. package/src/plugins/nxfinance/positionsFetcher.js.map +1 -1
  117. package/src/plugins/orca/getWhirlpoolPositions.js +10 -1
  118. package/src/plugins/orca/getWhirlpoolPositions.js.map +1 -1
  119. package/src/plugins/parcl/depositsFetcher.js +1 -1
  120. package/src/plugins/parcl/depositsFetcher.js.map +1 -1
  121. package/src/plugins/parcl/marginFetcher.js +1 -1
  122. package/src/plugins/parcl/marginFetcher.js.map +1 -1
  123. package/src/plugins/parcl/stakingFetcher.js +6 -3
  124. package/src/plugins/parcl/stakingFetcher.js.map +1 -1
  125. package/src/plugins/photofinish/stakingFetcher.js +6 -1
  126. package/src/plugins/photofinish/stakingFetcher.js.map +1 -1
  127. package/src/plugins/picasso/unstakingPositionsFetcher.js +3 -2
  128. package/src/plugins/picasso/unstakingPositionsFetcher.js.map +1 -1
  129. package/src/plugins/quarry/calculatePositions.js +7 -1
  130. package/src/plugins/quarry/calculatePositions.js.map +1 -1
  131. package/src/plugins/quarry/positionsFetcher.js +2 -0
  132. package/src/plugins/quarry/positionsFetcher.js.map +1 -1
  133. package/src/plugins/quarry/types.d.ts +3 -0
  134. package/src/plugins/ratex/positionsFetcher.js +2 -0
  135. package/src/plugins/ratex/positionsFetcher.js.map +1 -1
  136. package/src/plugins/saber/lpTokensJob.js +1 -0
  137. package/src/plugins/saber/lpTokensJob.js.map +1 -1
  138. package/src/plugins/sandglass/depositFetcher.js +3 -0
  139. package/src/plugins/sandglass/depositFetcher.js.map +1 -1
  140. package/src/plugins/sharky/loansFetcher.js +1 -0
  141. package/src/plugins/sharky/loansFetcher.js.map +1 -1
  142. package/src/plugins/solayer/airdropFetcher.d.ts +3 -0
  143. package/src/plugins/solayer/airdropFetcher.js +55 -0
  144. package/src/plugins/solayer/airdropFetcher.js.map +1 -0
  145. package/src/plugins/solayer/constants.d.ts +5 -0
  146. package/src/plugins/solayer/constants.js +13 -1
  147. package/src/plugins/solayer/constants.js.map +1 -1
  148. package/src/plugins/solayer/index.d.ts +2 -0
  149. package/src/plugins/solayer/index.js +4 -2
  150. package/src/plugins/solayer/index.js.map +1 -1
  151. package/src/plugins/solayer/proofsFetcher.js +7 -6
  152. package/src/plugins/solayer/proofsFetcher.js.map +1 -1
  153. package/src/plugins/solayer/types.d.ts +8 -0
  154. package/src/plugins/solayer/types.js +3 -0
  155. package/src/plugins/solayer/types.js.map +1 -0
  156. package/src/plugins/spdr/stakingFetcher.js +3 -0
  157. package/src/plugins/spdr/stakingFetcher.js.map +1 -1
  158. package/src/plugins/stabble/poolsJob.js +1 -0
  159. package/src/plugins/stabble/poolsJob.js.map +1 -1
  160. package/src/plugins/staratlas/lockersFetcher.js +2 -0
  161. package/src/plugins/staratlas/lockersFetcher.js.map +1 -1
  162. package/src/plugins/staratlas/stakingFetcher.js +2 -1
  163. package/src/plugins/staratlas/stakingFetcher.js.map +1 -1
  164. package/src/plugins/streamflow/vestingFetcher.js +1 -1
  165. package/src/plugins/streamflow/vestingFetcher.js.map +1 -1
  166. package/src/plugins/tensor/bidsFetcher.js +1 -1
  167. package/src/plugins/tensor/bidsFetcher.js.map +1 -1
  168. package/src/plugins/texture/loansFetcher.js +2 -1
  169. package/src/plugins/texture/loansFetcher.js.map +1 -1
  170. package/src/plugins/tulip/depositsFetcher.js +3 -1
  171. package/src/plugins/tulip/depositsFetcher.js.map +1 -1
  172. package/src/plugins/uxd/stakingFetcher.js +4 -3
  173. package/src/plugins/uxd/stakingFetcher.js.map +1 -1
  174. package/src/plugins/vaultka/lendingFetcher.js +5 -0
  175. package/src/plugins/vaultka/lendingFetcher.js.map +1 -1
  176. package/src/plugins/vaultka/strategyFetcher.js +3 -0
  177. package/src/plugins/vaultka/strategyFetcher.js.map +1 -1
  178. package/src/plugins/whalesmarket/depositFetcher.js +7 -5
  179. package/src/plugins/whalesmarket/depositFetcher.js.map +1 -1
  180. package/src/plugins/zelo/positionsFetcher.js +2 -0
  181. package/src/plugins/zelo/positionsFetcher.js.map +1 -1
  182. package/src/plugins/zeta/depositsFetcher.js +5 -1
  183. package/src/plugins/zeta/depositsFetcher.js.map +1 -1
  184. package/src/utils/clients/getClientSolanaAlt.d.ts +2 -0
  185. package/src/utils/clients/getClientSolanaAlt.js +93 -0
  186. package/src/utils/clients/getClientSolanaAlt.js.map +1 -0
  187. package/src/utils/elementbuilder/ElementRegistry.d.ts +1 -3
  188. package/src/utils/elementbuilder/ElementRegistry.js +2 -5
  189. package/src/utils/elementbuilder/ElementRegistry.js.map +1 -1
@@ -41,6 +41,9 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
41
41
  const strategy = strategiesInfo[i];
42
42
  const element = elementRegistry.addElementBorrowlend({
43
43
  label: 'Leverage',
44
+ link: 'https://solana.vaultka.com/leverage',
45
+ ref: positionInfo[0].pubkey,
46
+ sourceRefs: [{ name: 'Strategy', address: strategy.pubkey.toString() }],
44
47
  });
45
48
  let borrowMint;
46
49
  if (isLstStrategy(strategy)) {
@@ -1 +1 @@
1
- {"version":3,"file":"strategyFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/vaultka/strategyFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAA4C;AAE5C,2CAAyE;AAEzE,iDAAsD;AACtD,+CAA8D;AAC9D,gFAA6E;AAQ7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,aAAa,GAAG,MAAM,OAAO,CAAC,GAAG,CACrC,sBAAU,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAC1B,IAAA,iCAAwB,EACtB,UAAU,EACV,QAAQ,CAAC,kBAAkB,EAC3B,IAAI,mBAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,EAC9B;QACE;YACE,MAAM,EAAE;gBACN,MAAM,EAAE,EAAE;gBACV,KAAK,EAAE,KAAK;aACb;SACF;KACF,CACF,CACF,CACF,CAAC;IAEF,IAAI,CAAC,aAAa,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC;QACxE,OAAO,EAAE,CAAC;IAEZ,MAAM,cAAc,GAAG,MAAM,KAAK,CAAC,OAAO,CACxC,8BAAkB,EAClB;QACE,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CACF,CAAC;IAEF,IAAI,CAAC,cAAc;QAAE,OAAO,EAAE,CAAC;IAE/B,MAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;IAE1E,aAAa,CAAC,OAAO,CAAC,CAAC,YAAY,EAAE,CAAC,EAAE,EAAE;QACxC,IACE,YAAY,CAAC,CAAC,CAAC;YACf,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,UAAU;YAC3B,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,MAAM,EACvB,CAAC;YACD,MAAM,QAAQ,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;YAEnC,MAAM,OAAO,GAAG,eAAe,CAAC,oBAAoB,CAAC;gBACnD,KAAK,EAAE,UAAU;aAClB,CAAC,CAAC;YAEH,IAAI,UAAU,CAAC;YACf,IAAI,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAC5B,UAAU,GAAG,QAAQ,CAAC,eAAe,CAAC;YACxC,CAAC;iBAAM,CAAC;gBACN,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC;YACpC,CAAC;YAED,OAAO,CAAC,gBAAgB,CAAC;gBACvB,OAAO,EAAE,QAAQ,CAAC,eAAe;gBACjC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,eAAe;aACxC,CAAC,CAAC;YACH,OAAO,CAAC,gBAAgB,CAAC;gBACvB,OAAO,EAAE,UAAU;gBACnB,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,eAAe;aACxC,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,SAAS,aAAa,CACpB,QAAgC;IAEhC,OAAO,CAAC,CAAC,aAAa,IAAI,QAAQ,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"strategyFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/vaultka/strategyFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAA4C;AAE5C,2CAAyE;AAEzE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AAoB,CAAC;gBACnD,KAAK,EAAE,UAAU;gBACjB,IAAI,EAAE,qCAAqC;gBAC3C,GAAG,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,MAAM;gBAC3B,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,CAAC;aACxE,CAAC,CAAC;YAEH,IAAI,UAAU,CAAC;YACf,IAAI,aAAa,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAC5B,UAAU,GAAG,QAAQ,CAAC,eAAe,CAAC;YACxC,CAAC;iBAAM,CAAC;gBACN,UAAU,GAAG,QAAQ,CAAC,WAAW,CAAC;YACpC,CAAC;YAED,OAAO,CAAC,gBAAgB,CAAC;gBACvB,OAAO,EAAE,QAAQ,CAAC,eAAe;gBACjC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,eAAe;aACxC,CAAC,CAAC;YACH,OAAO,CAAC,gBAAgB,CAAC;gBACvB,OAAO,EAAE,UAAU;gBACnB,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,eAAe;aACxC,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,SAAS,aAAa,CACpB,QAAgC;IAEhC,OAAO,CAAC,CAAC,aAAa,IAAI,QAAQ,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -94,12 +94,12 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
94
94
  .toNumber();
95
95
  if (fill === 0 && offer.status === structs_1.OfferStatus.Closed)
96
96
  continue;
97
- const collatAsset = (0, tokenPriceToAssetToken_1.default)(mint, collateral, portfolio_core_1.NetworkId.solana, tokenPrice, undefined, {
97
+ const collatAsset = Object.assign(Object.assign({}, (0, tokenPriceToAssetToken_1.default)(mint, collateral, portfolio_core_1.NetworkId.solana, tokenPrice, undefined, {
98
98
  tags: isEnded
99
99
  ? undefined
100
100
  : [`${structs_1.OfferType[offer.offerType]} Offer`, `${fill}% Filled`],
101
101
  isClaimable: isEnded ? true : undefined,
102
- });
102
+ })), { ref: offer.pubkey.toString() });
103
103
  const existingAssets = assetsById.get(id);
104
104
  if (!existingAssets) {
105
105
  assetsById.set(id, [collatAsset]);
@@ -133,9 +133,11 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
133
133
  const amountToCollatAmount = collateral.dividedBy(offer.totalAmount);
134
134
  const amount = order.amount.times(amountToCollatAmount).toNumber();
135
135
  const side = offer.offerType === structs_1.OfferType.Buy ? 'Sell Order' : 'Buy Order';
136
- const collatAsset = (0, tokenPriceToAssetToken_1.default)(mint, amount, portfolio_core_1.NetworkId.solana, tokenPrice, undefined, {
136
+ const collatAsset = Object.assign(Object.assign({}, (0, tokenPriceToAssetToken_1.default)(mint, amount, portfolio_core_1.NetworkId.solana, tokenPrice, undefined, {
137
137
  tags: [side],
138
- });
138
+ })), { ref: order.pubkey.toString(), sourceRefs: [
139
+ { name: 'Pool', address: offer.pubkey.toString() },
140
+ ] });
139
141
  const existingAssets = assetsById.get(id);
140
142
  if (!existingAssets) {
141
143
  assetsById.set(id, [collatAsset]);
@@ -166,7 +168,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
166
168
  name: `${type} : ${info.symbol} (${info.status})`,
167
169
  networkId: portfolio_core_1.NetworkId.solana,
168
170
  platformId: constants_1.platformId,
169
- data: { assets },
171
+ data: { assets, link: 'https://pro.whales.market/dashboard' },
170
172
  value: (0, portfolio_core_1.getUsdValueSum)(assets.map((asset) => asset.value)),
171
173
  });
172
174
  }
@@ -1 +1 @@
1
- {"version":3,"file":"depositFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/whalesmarket/depositFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,6CAA4C;AAG5C,2CAAyD;AACzD,iDAAsD;AACtD,+CAG4B;AAC5B,uCAQmB;AACnB,uCAAyE;AACzE,qGAA6E;AAC7E,mCAA0C;AAE1C,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACpE,IAAA,iCAAwB,EAAC,MAAM,EAAE,qBAAW,EAAE,eAAG,EAAE,IAAA,qBAAW,EAAC,KAAK,CAAC,CAAC;QACtE,IAAA,iCAAwB,EAAC,MAAM,EAAE,qBAAW,EAAE,eAAG,EAAE,IAAA,wBAAc,EAAC,KAAK,CAAC,CAAC;QACzE,IAAA,iCAAwB,EAAC,MAAM,EAAE,qBAAW,EAAE,eAAG,EAAE,IAAA,yBAAe,EAAC,KAAK,CAAC,CAAC;QAC1E,KAAK,CAAC,OAAO,CAAU,qBAAS,EAAE;YAChC,MAAM,EAAE,sBAAU;YAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;SAC5B,CAAC;KACH,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,CAAC,GAAG,UAAU,EAAE,GAAG,SAAS,CAAC,CAAC;IAE7C,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAC1D,IAAI,CAAC,UAAU;QAAE,OAAO,EAAE,CAAC;IAE3B,MAAM,UAAU,GAAG,MAAM,IAAA,sCAA6B,EACpD,MAAM,EACN,qBAAW,EACX,MAAM,CAAC,GAAG,CAAC,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AAC,MAAM,KAAK,IAAI,CAAC,MAAM,GAAG;YACjD,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,IAAI,EAAE,EAAE,MAAM,EAAE;YAChB,KAAK,EAAE,IAAA,+BAAc,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SAC1D,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"depositFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/whalesmarket/depositFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,6CAA4C;AAG5C,2CAAyD;AACzD,iDAAsD;AACtD,+CAI4B;AAC5B,uCAQmB;AACnB,uCAAyE;AACzE,qGAA6E;AAC7E,mCAA0C;AAE1C,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACpE,IAAA,iCAAwB,EAAC,MAAM,EAAE,qBAAW,EAAE,eAAG,EAAE,IAAA,qBAAW,EAAC,KAAK,CAAC,CAAC;QACtE,IAAA,iCAAwB,EAAC,MAAM,EAAE,qBAAW,EAAE,eAAG,EAAE,IAAA,wBAAc,EAAC,KAAK,CAAC,CAAC;QACzE,IAAA,iCAAwB,EAAC,MAAM,EAAE,qBAAW,EAAE,eAAG,EAAE,IAAA,y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BAAe,OAAO,CAAC"}
@@ -24,6 +24,8 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
24
24
  const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
25
25
  const element = elementRegistry.addElementMultiple({
26
26
  label: 'Deposit',
27
+ ref: userAccount.pubkey,
28
+ link: 'https://www.zelofi.io/dapp',
27
29
  });
28
30
  element.addAsset({
29
31
  address: portfolio_core_1.solanaNativeAddress,
@@ -1 +1 @@
1
- {"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zelo/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAA4E;AAC5E,6CAA4C;AAE5C,2CAAoD;AAEpD,iDAAsD;AACtD,uCAA6C;AAC7C,gFAA6E;AAC7E,kFAA+E;AAE/E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,WAAW,GAAG,MAAM,IAAA,2CAAoB,EAC5C,UAAU,EACV,0BAAgB,EAChB,mBAAS,CAAC,sBAAsB,CAC9B,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC,EACzD,qBAAS,CACV,CAAC,CAAC,CAAC,CACL,CAAC;IAEF,IAAI,CAAC,WAAW;QAAE,OAAO,EAAE,CAAC;IAE5B,MAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;IAC1E,MAAM,OAAO,GAAG,eAAe,CAAC,kBAAkB,CAAC;QACjD,KAAK,EAAE,SAAS;KACjB,CAAC,CAAC;IAEH,OAAO,CAAC,QAAQ,CAAC;QACf,OAAO,EAAE,oCAAmB;QAC5B,MAAM,EAAE,WAAW,CAAC,UAA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AC/B,CAAC,CAAC;IAEH,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"}
@@ -49,7 +49,11 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
49
49
  platformId: constants_1.platformId,
50
50
  name: `N° ${account.subaccountIndex.toString()}`,
51
51
  type: portfolio_core_1.PortfolioElementType.multiple,
52
- data: { assets: [asset] },
52
+ data: {
53
+ assets: [asset],
54
+ ref: account.pubkey.toString(),
55
+ link: 'https://dex.zeta.markets/portfolio',
56
+ },
53
57
  value: asset.value,
54
58
  });
55
59
  }
@@ -1 +1 @@
1
- {"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,6CAA4C;AAG5C,2CAAoD;AACpD,iDAAsD;AACtD,uCAAmD;AACnD,+CAG4B;AAC5B,uCAAqD;AACrD,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,cAAc,GAAG,MAAM,KAAK,CAAC,aAAa,CAC9C,uBAAc,EACd,0BAAS,CAAC,MAAM,CACjB,CAAC;IACF,IAAI,CAAC,cAAc;QAAE,OAAO,EAAE,CAAC;IAE/B,IAAI,EAAE,GAAG,CAAC,CAAC;IACX,MAAM,YAAY,GAAG,EAAE,CAAC;IACxB,IAAI,aAAa,CAAC;IAClB,GAAG,CAAC;QACF,MAAM,cAAc,GAAG,IAAA,gCAAsB,EAC3C,qBAAS,EACT,IAAI,mBAAS,C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;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,6CAA4C;AAG5C,2CAAoD;AACpD,iDAAsD;AACtD,uCAAmD;AACnD,+CAG4B;AAC5B,uCAAqD;AACrD,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,cAAc,GAAG,MAAM,KAAK,CAAC,aAAa,CAC9C,uBAAc,EACd,0BAAS,CAAC,MAAM,CACjB,CAAC;IACF,IAAI,CAAC,cAAc;QAAE,OAAO,EAAE,CAAC;IAE/B,IAAI,EAAE,GAAG,CAAC,CAAC;IACX,MAAM,YAAY,GAAG,EAAE,CAAC;IACxB,IAAI,aAAa,CAAC;IAClB,GAAG,CAAC;QACF,MAAM,cAAc,GAAG,IAAA,gCAAsB,EAC3C,qBAAS,EACT,IAAI,mBAAS,CAAC,KAAK,CAAC,EACpB,EAAE,EACF,EAAE,GAAG,CAAC,CACP,CAAC;QACF,aAAa,GAAG,MAAM,IAAA,sCAA6B,EACjD,MAAM,EACN,kCAAwB,EACxB,cAAc,CACf,CAAC;QACF,YAAY,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,CAAC;QACpC,EAAE,IAAI,CAAC,CAAC;IACV,CAAC,QAAQ,aAAa,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE;IAE9C,MAAM,QAAQ,GAAuB,EAAE,CAAC;IACxC,IAAI,CAAC,YAAY;QAAE,OAAO,QAAQ,CAAC;IAEnC,KAAK,MAAM,OAAO,IAAI,YAAY,EAAE,CAAC;QACnC,IAAI,CAAC,OAAO;YAAE,SAAS;QACvB,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE;YAAE,SAAS;QACvC,MAAM,KAAK,GAAmB,IAAA,gCAAsB,EAClD,uBAAc,EACd,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,SAAA,EAAE,EAAI,cAAc,CAAC,QAAQ,CAAA,CAAC,CAAC,QAAQ,EAAE,EACnE,0BAAS,CAAC,MAAM,EAChB,cAAc,CACf,CAAC;QACF,QAAQ,CAAC,IAAI,CAAC;YACZ,KAAK,EAAE,SAAS;YAChB,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,IAAI,EAAE,MAAM,OAAO,CAAC,eAAe,CAAC,QAAQ,EAAE,EAAE;YAChD,IAAI,EAAE,qCAAoB,CAAC,QAAQ;YACnC,IAAI,EAAE;gBACJ,MAAM,EAAE,CAAC,KAAK,CAAC;gBACf,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE;gBAC9B,IAAI,EAAE,oCAAoC;aAC3C;YACD,KAAK,EAAE,KAAK,CAAC,KAAK;SACnB,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { SolanaClient } from './types';
2
+ export default function getClientSolanaAlt(): SolanaClient;
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ const axios_1 = __importDefault(require("axios"));
16
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
17
+ const web3_js_1 = require("@solana/web3.js");
18
+ const node_http_1 = require("node:http");
19
+ const getBasicAuthHeaders_1 = require("../misc/getBasicAuthHeaders");
20
+ const constants_1 = require("./constants");
21
+ const sleep_1 = __importDefault(require("../misc/sleep"));
22
+ const agent = new node_http_1.Agent({
23
+ maxSockets: 100,
24
+ });
25
+ const axiosObject = axios_1.default.create({
26
+ httpsAgent: agent,
27
+ });
28
+ function axiosFetchWithRetries(input, init, retryAttempts = 0) {
29
+ return __awaiter(this, void 0, void 0, function* () {
30
+ let attempt = 0;
31
+ let fInit = init;
32
+ // Adding default headers
33
+ if (!fInit || !fInit.headers) {
34
+ fInit = Object.assign(Object.assign({}, fInit), { headers: Object.assign({ 'Content-Type': 'application/json' }, fInit === null || fInit === void 0 ? void 0 : fInit.headers) });
35
+ }
36
+ // console.log(' fInit:', fInit);
37
+ while (attempt < retryAttempts) {
38
+ try {
39
+ const axiosHeaders = {};
40
+ new Headers(fInit.headers).forEach((value, key) => {
41
+ axiosHeaders[key] = value;
42
+ });
43
+ const axiosConfig = {
44
+ data: fInit.body,
45
+ headers: axiosHeaders,
46
+ method: fInit.method,
47
+ baseURL: input.toString(),
48
+ validateStatus: () => true,
49
+ };
50
+ const axiosResponse = yield axiosObject.request(axiosConfig);
51
+ const { data, status, statusText, headers } = axiosResponse;
52
+ // Mapping headers from axios to fetch format
53
+ const headersArray = Object.entries(headers).map(([key, value]) => [key, value]);
54
+ const fetchHeaders = new Headers(headersArray);
55
+ const response = new Response(JSON.stringify(data), {
56
+ status,
57
+ statusText,
58
+ headers: fetchHeaders,
59
+ });
60
+ // Comment the above lines and uncomment the following one to switch from axios to fetch
61
+ // const response = await fetch(input, init);
62
+ // Traffic might get routed to backups or node restarts or if anything throws a 502, retry
63
+ if (response.status === 502) {
64
+ attempt += 1;
65
+ yield (0, sleep_1.default)(100 * attempt);
66
+ continue;
67
+ }
68
+ return yield Promise.resolve(response);
69
+ }
70
+ catch (e) {
71
+ attempt += 1;
72
+ continue;
73
+ }
74
+ }
75
+ return Promise.reject(new Error(`Max retries reached: ${retryAttempts}`));
76
+ });
77
+ }
78
+ function getClientSolanaAlt() {
79
+ const rpcEndpoint = (0, constants_1.getRpcEndpoint)(portfolio_core_1.NetworkId.solana);
80
+ const httpHeaders = rpcEndpoint.basicAuth
81
+ ? (0, getBasicAuthHeaders_1.getBasicAuthHeaders)(rpcEndpoint.basicAuth.username, rpcEndpoint.basicAuth.password)
82
+ : undefined;
83
+ return new web3_js_1.Connection(rpcEndpoint.url, {
84
+ httpHeaders,
85
+ fetch(input, init) {
86
+ return __awaiter(this, void 0, void 0, function* () {
87
+ return axiosFetchWithRetries(input, init, 5);
88
+ });
89
+ },
90
+ });
91
+ }
92
+ exports.default = getClientSolanaAlt;
93
+ //# sourceMappingURL=getClientSolanaAlt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getClientSolanaAlt.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/clients/getClientSolanaAlt.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,+DAAuD;AACvD,6CAA6C;AAE7C,yCAAkC;AAClC,qEAAkE;AAClE,2CAA6C;AAE7C,0DAAkC;AAElC,MAAM,KAAK,GAAG,IAAI,iBAAK,CAAC;IACtB,UAAU,EAAE,GAAG;CAChB,CAAC,CAAC;AAEH,MAAM,WAAW,GAAG,eAAK,CAAC,MAAM,CAAC;IAC/B,UAAU,EAAE,KAAK;CAClB,CAAC,CAAC;AAEH,SAAe,qBAAqB,CAClC,KAAwC,EACx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export declare class ElementRegistry {
20
20
  }): ElementConcentratedLiquidityBuilder;
21
21
  addElementBorrowlend(params: Omit<Params, 'type'>): ElementBorrowlendBuilder;
22
22
  addElementLeverage(params: Omit<Params, 'type'>): ElementLeverageBuilder;
23
- addElementTrade(elementParams?: Omit<Params, 'type' | 'label'> & {
24
- label?: PortfolioElementLabel;
25
- }): ElementTradeBuilder;
23
+ addElementTrade(params: Omit<Params, 'type'>): ElementTradeBuilder;
26
24
  getElements(cache: Cache): Promise<PortfolioElement[]>;
27
25
  }
@@ -48,11 +48,8 @@ class ElementRegistry {
48
48
  this.elements.push(elementBuilder);
49
49
  return elementBuilder;
50
50
  }
51
- addElementTrade(elementParams) {
52
- const elementBuilder = new ElementTradeBuilder_1.ElementTradeBuilder({
53
- type: portfolio_core_1.PortfolioElementType.trade,
54
- label: (elementParams === null || elementParams === void 0 ? void 0 : elementParams.label) || 'LimitOrder',
55
- });
51
+ addElementTrade(params) {
52
+ const elementBuilder = new ElementTradeBuilder_1.ElementTradeBuilder(Object.assign(Object.assign({}, params), { type: portfolio_core_1.PortfolioElementType.trade }));
56
53
  this.elements.push(elementBuilder);
57
54
  return elementBuilder;
58
55
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ElementRegistry.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/ElementRegistry.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAKoC;AAIpC,qEAAkE;AAClE,uEAAoE;AACpE,yEAAsE;AACtE,qEAAkE;AAClE,+FAA4F;AAC5F,+DAA4D;AAE5D,MAAa,eAAe;IAK1B,YAAY,SAAwB,EAAE,UAAkB;QACtD,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IACrB,CAAC;IAED,kBAAkB,CAAC,MAA4B;QAC7C,MAAM,cAAc,GAAG,IAAI,+CAAsB,iCAC5C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AO,cAAc,CAAC;IACxB,CAAC;IAED,eAAe,CACb,aAEC;QAED,MAAM,cAAc,GAAG,IAAI,yCAAmB,CAAC;YAC7C,IAAI,EAAE,qCAAoB,CAAC,KAAK;YAChC,KAAK,EAAE,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,KAAK,KAAI,YAAY;SAC5C,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACnC,OAAO,cAAc,CAAC;IACxB,CAAC;IAEK,WAAW,CAAC,KAAY;;YAC5B,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;YAClE,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,mBAAmB,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;YAE3E,OAAO,IAAI,CAAC,QAAQ;iBACjB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;iBAC/D,MAAM,CACL,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CACtB,CAAC;QAC5B,CAAC;KAAA;CACF;AArFD,0CAqFC"}
1
+ {"version":3,"file":"ElementRegistry.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/elementbuilder/ElementRegistry.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAKoC;AAIpC,qEAAkE;AAClE,uEAAoE;AACpE,yEAAsE;AACtE,qEAAkE;AAClE,+FAA4F;AAC5F,+DAA4D;AAE5D,MAAa,eAAe;IAK1B,YAAY,SAAwB,EAAE,UAAkB;QACtD,IAA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