@sonarwatch/portfolio-plugins 0.11.97 → 0.11.99

Sign up to get free protection for your applications and to get access to all the features.
Files changed (144) hide show
  1. package/CHANGELOG.md +1095 -1087
  2. package/README.md +3 -3
  3. package/package.json +3 -3
  4. package/src/plugins/01/depostisFetcher.js +2 -1
  5. package/src/plugins/01/depostisFetcher.js.map +1 -1
  6. package/src/plugins/aave/helpers.js +2 -1
  7. package/src/plugins/aave/helpers.js.map +1 -1
  8. package/src/plugins/aftermath/poolsJob.js +22 -20
  9. package/src/plugins/aftermath/poolsJob.js.map +1 -1
  10. package/src/plugins/aptin/depositsFetcher.js +2 -1
  11. package/src/plugins/aptin/depositsFetcher.js.map +1 -1
  12. package/src/plugins/aries/depositsFetcher.js +2 -1
  13. package/src/plugins/aries/depositsFetcher.js.map +1 -1
  14. package/src/plugins/aurory/helpers.d.ts +1 -1
  15. package/src/plugins/aurory/helpers.js +1 -12
  16. package/src/plugins/aurory/helpers.js.map +1 -1
  17. package/src/plugins/aurory/stakingFetcher.js +1 -1
  18. package/src/plugins/aurory/stakingFetcher.js.map +1 -1
  19. package/src/plugins/balancer/helpers/pools.js +21 -21
  20. package/src/plugins/bucket/collateralFetcher.js +7 -9
  21. package/src/plugins/bucket/collateralFetcher.js.map +1 -1
  22. package/src/plugins/cetus/clmmsFetcher.js +5 -5
  23. package/src/plugins/cetus/clmmsFetcher.js.map +1 -1
  24. package/src/plugins/cetus/helpers.d.ts +4 -4
  25. package/src/plugins/cetus/helpers.js +23 -12
  26. package/src/plugins/cetus/helpers.js.map +1 -1
  27. package/src/plugins/cetus/poolsJob.js +5 -10
  28. package/src/plugins/cetus/poolsJob.js.map +1 -1
  29. package/src/plugins/compound/getPositionsV2Fetcher.js +2 -1
  30. package/src/plugins/compound/getPositionsV2Fetcher.js.map +1 -1
  31. package/src/plugins/compound/getPositionsV3Fetcher.js +2 -1
  32. package/src/plugins/compound/getPositionsV3Fetcher.js.map +1 -1
  33. package/src/plugins/drift/deposits.js +2 -1
  34. package/src/plugins/drift/deposits.js.map +1 -1
  35. package/src/plugins/flash/perpetualFetcher.js +2 -1
  36. package/src/plugins/flash/perpetualFetcher.js.map +1 -1
  37. package/src/plugins/flowmatic/stakingFetcher.js +2 -0
  38. package/src/plugins/flowmatic/stakingFetcher.js.map +1 -1
  39. package/src/plugins/genesysgo/stakingFetcher.js +2 -0
  40. package/src/plugins/genesysgo/stakingFetcher.js.map +1 -1
  41. package/src/plugins/jupiter/perpetualFetcher.js +2 -1
  42. package/src/plugins/jupiter/perpetualFetcher.js.map +1 -1
  43. package/src/plugins/kamino/lendsFetcher.js +6 -3
  44. package/src/plugins/kamino/lendsFetcher.js.map +1 -1
  45. package/src/plugins/maker/vaultsFetcher.js +2 -1
  46. package/src/plugins/maker/vaultsFetcher.js.map +1 -1
  47. package/src/plugins/mango/boostFetcher.js +2 -1
  48. package/src/plugins/mango/boostFetcher.js.map +1 -1
  49. package/src/plugins/mango/collateralFetcher.js +2 -1
  50. package/src/plugins/mango/collateralFetcher.js.map +1 -1
  51. package/src/plugins/mango/redeemFetcher.js +2 -1
  52. package/src/plugins/mango/redeemFetcher.js.map +1 -1
  53. package/src/plugins/maple/ethereumFetcher.js +2 -1
  54. package/src/plugins/maple/ethereumFetcher.js.map +1 -1
  55. package/src/plugins/marginfi/fetcherExecutor.js +2 -1
  56. package/src/plugins/marginfi/fetcherExecutor.js.map +1 -1
  57. package/src/plugins/morpho/aaveV3CollateralFetcher.js +2 -1
  58. package/src/plugins/morpho/aaveV3CollateralFetcher.js.map +1 -1
  59. package/src/plugins/navi/collateralFetcher.js +10 -8
  60. package/src/plugins/navi/collateralFetcher.js.map +1 -1
  61. package/src/plugins/navi/reservesJob.js +5 -4
  62. package/src/plugins/navi/reservesJob.js.map +1 -1
  63. package/src/plugins/port/obligationsFetcher.js +2 -1
  64. package/src/plugins/port/obligationsFetcher.js.map +1 -1
  65. package/src/plugins/scallop/helpers.d.ts +0 -49
  66. package/src/plugins/scallop/helpers.js +1 -39
  67. package/src/plugins/scallop/helpers.js.map +1 -1
  68. package/src/plugins/scallop/lendingsFetcher.js +19 -15
  69. package/src/plugins/scallop/lendingsFetcher.js.map +1 -1
  70. package/src/plugins/scallop/marketJob.js +16 -16
  71. package/src/plugins/scallop/marketJob.js.map +1 -1
  72. package/src/plugins/scallop/obligationsFetcher.js +27 -22
  73. package/src/plugins/scallop/obligationsFetcher.js.map +1 -1
  74. package/src/plugins/scallop/poolsJob.js +7 -12
  75. package/src/plugins/scallop/poolsJob.js.map +1 -1
  76. package/src/plugins/scallop/spoolsMarketJob.js +8 -15
  77. package/src/plugins/scallop/spoolsMarketJob.js.map +1 -1
  78. package/src/plugins/scallop/types/coin.d.ts +1 -1
  79. package/src/plugins/scallop/types/market.d.ts +3 -4
  80. package/src/plugins/scallop/types/market.js.map +1 -1
  81. package/src/plugins/solend/obligationsFetcher.js +2 -1
  82. package/src/plugins/solend/obligationsFetcher.js.map +1 -1
  83. package/src/plugins/sushiswap/helpers.js +24 -24
  84. package/src/plugins/thala/vaultsFetcher.js +2 -1
  85. package/src/plugins/thala/vaultsFetcher.js.map +1 -1
  86. package/src/plugins/tokens/fetchers/sui-nfts.js +47 -107
  87. package/src/plugins/tokens/fetchers/sui-nfts.js.map +1 -1
  88. package/src/plugins/tokens/types.d.ts +0 -48
  89. package/src/plugins/turbos/clmmsPositionsFetcher.js +18 -16
  90. package/src/plugins/turbos/clmmsPositionsFetcher.js.map +1 -1
  91. package/src/plugins/turbos/helper.d.ts +3 -3
  92. package/src/plugins/turbos/helper.js +6 -4
  93. package/src/plugins/turbos/helper.js.map +1 -1
  94. package/src/plugins/turbos/poolsJob.js +10 -10
  95. package/src/plugins/turbos/poolsJob.js.map +1 -1
  96. package/src/plugins/uniswap-v2/helpers.js +22 -22
  97. package/src/utils/clients/getClientSui.d.ts +2 -2
  98. package/src/utils/clients/getClientSui.js +8 -3
  99. package/src/utils/clients/getClientSui.js.map +1 -1
  100. package/src/utils/clients/types.d.ts +2 -0
  101. package/src/utils/sei/constants.js +8 -8
  102. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
  103. package/src/utils/sui/getDynamicFieldObject.d.ts +4 -0
  104. package/src/utils/sui/{getMultipleObjectsSafe.js → getDynamicFieldObject.js} +9 -13
  105. package/src/utils/sui/getDynamicFieldObject.js.map +1 -0
  106. package/src/utils/sui/getDynamicFields.d.ts +3 -0
  107. package/src/utils/sui/getDynamicFields.js +38 -0
  108. package/src/utils/sui/getDynamicFields.js.map +1 -0
  109. package/src/utils/sui/getObject.d.ts +4 -0
  110. package/src/utils/sui/{getDynamicFieldsSafe.js → getObject.js} +8 -16
  111. package/src/utils/sui/getObject.js.map +1 -0
  112. package/src/utils/sui/getObjectDeletedResponse.d.ts +3 -0
  113. package/src/utils/sui/getObjectDeletedResponse.js +19 -0
  114. package/src/utils/sui/getObjectDeletedResponse.js.map +1 -0
  115. package/src/utils/sui/getObjectNotExistsResponse.d.ts +2 -0
  116. package/src/utils/sui/getObjectNotExistsResponse.js +14 -0
  117. package/src/utils/sui/getObjectNotExistsResponse.js.map +1 -0
  118. package/src/utils/sui/getOwnedObjects.d.ts +4 -0
  119. package/src/utils/sui/getOwnedObjects.js +36 -0
  120. package/src/utils/sui/getOwnedObjects.js.map +1 -0
  121. package/src/utils/sui/multiGetObjects.d.ts +4 -0
  122. package/src/utils/sui/multiGetObjects.js +32 -0
  123. package/src/utils/sui/multiGetObjects.js.map +1 -0
  124. package/src/utils/sui/queryEvents.d.ts +4 -0
  125. package/src/utils/sui/{queryEventSafe.js → queryEvents.js} +16 -12
  126. package/src/utils/sui/queryEvents.js.map +1 -0
  127. package/src/utils/sui/structs/kiosk.d.ts +7 -0
  128. package/src/utils/sui/structs/kiosk.js +3 -0
  129. package/src/utils/sui/structs/kiosk.js.map +1 -0
  130. package/src/utils/sui/structs/nft.d.ts +41 -0
  131. package/src/utils/sui/structs/nft.js +3 -0
  132. package/src/utils/sui/structs/nft.js.map +1 -0
  133. package/src/utils/sui/types.d.ts +23 -0
  134. package/src/utils/sui/types.js +3 -0
  135. package/src/utils/sui/types.js.map +1 -0
  136. package/src/utils/sui/getDynamicFieldsSafe.d.ts +0 -13
  137. package/src/utils/sui/getDynamicFieldsSafe.js.map +0 -1
  138. package/src/utils/sui/getFormattedCollectionNameAndId.d.ts +0 -4
  139. package/src/utils/sui/getFormattedCollectionNameAndId.js +0 -19
  140. package/src/utils/sui/getFormattedCollectionNameAndId.js.map +0 -1
  141. package/src/utils/sui/getMultipleObjectsSafe.d.ts +0 -67
  142. package/src/utils/sui/getMultipleObjectsSafe.js.map +0 -1
  143. package/src/utils/sui/queryEventSafe.d.ts +0 -14
  144. package/src/utils/sui/queryEventSafe.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"obligationsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/solend/obligationsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gEAAqC;AACrC,6CAA4C;AAG5C,2CAOqB;AACrB,uCAA6D;AAE7D,+CAAmE;AACnE,iDAAsD;AACtD,uCAA6C;AAC7C,qGAA6E;AAC7E,6EAAqD;AACrD,qDAA8D;AAC9D,6DAA+D;AAE/D,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,mBAAmB,GAAG,EAAE,CAAC;IAC/B,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,WAAW,CAAa;QAClD,MAAM,EAAE,yBAAa;QACrB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;IACH,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACpC,MAAM,gBAAgB,GAA4B,IAAI,GAAG,EAAE,CAAC;IAC5D,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QACzB,gBAAgB,CAAC,GAAG,CAAC,MAAM,CAA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SAAS;QAEzE,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,GACxD,IAAA,wCAAuB,EACrB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,eAAe,CAChB,CAAC;QAEJ,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,qCAAoB,CAAC,UAAU;YACrC,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,SAAS;YAChB,KAAK;YACL,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,IAAI,EAAE;gBACJ,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,eAAe,EAAE,IAAI;gBAErB,WAAW;gBACX,YAAY;gBACZ,KAAK;aACN;SACF,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,cAAc;IAC/B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"obligationsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/solend/obligationsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,gEAAqC;AACrC,6CAA4C;AAG5C,2CAOqB;AACrB,uCAA6D;AAE7D,+CAAmE;AACnE,iDAAsD;AACtD,uCAA6C;AAC7C,qGAA6E;AAC7E,6EAAqD;AACrD,qDAA8D;AAC9D,6DAA+D;AAE/D,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,mBAAmB,GAAG,EAAE,CAAC;IAC/B,MAAM,OAAO,GAAG,MAAM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GAAG;yBACV;qBACF,CAAC;oBACF,cAAc,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;oBACrC,cAAc,CAAC,IAAI,CACjB,IAAA,gCAAsB,EACpB,KAAK,EACL,cAAc,EACd,0BAAS,CAAC,MAAM,EAChB,WAAW,EACX,KAAK,CACN,CACF,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;QACD,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QAEzE,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,GACrE,IAAA,wCAAuB,EACrB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,eAAe,CAChB,CAAC;QAEJ,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,qCAAoB,CAAC,UAAU;YACrC,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,SAAS;YAChB,KAAK;YACL,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,IAAI,EAAE;gBACJ,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,eAAe,EAAE,IAAI;gBAErB,WAAW;gBACX,YAAY;gBACZ,WAAW;gBACX,KAAK;aACN;SACF,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,cAAc;IAC/B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -54,30 +54,30 @@ function sushiV3PairToUniV2(pair) {
54
54
  }
55
55
  function getV3PairsAddresses(url, length = 300) {
56
56
  return __awaiter(this, void 0, void 0, function* () {
57
- const query = (0, graphql_request_1.gql) `
58
- {
59
- pools(
60
- orderBy: totalValueLockedUSD
61
- first: ${length}
62
- orderDirection: desc
63
- where: { volumeUSD_not: "0", liquidity_not: "0" }
64
- ) {
65
- id
66
- token0Price
67
- token1Price
68
- liquidity
69
- token0 {
70
- id
71
- totalSupply
72
- decimals
73
- }
74
- token1 {
75
- id
76
- totalSupply
77
- decimals
78
- }
79
- }
80
- }
57
+ const query = (0, graphql_request_1.gql) `
58
+ {
59
+ pools(
60
+ orderBy: totalValueLockedUSD
61
+ first: ${length}
62
+ orderDirection: desc
63
+ where: { volumeUSD_not: "0", liquidity_not: "0" }
64
+ ) {
65
+ id
66
+ token0Price
67
+ token1Price
68
+ liquidity
69
+ token0 {
70
+ id
71
+ totalSupply
72
+ decimals
73
+ }
74
+ token1 {
75
+ id
76
+ totalSupply
77
+ decimals
78
+ }
79
+ }
80
+ }
81
81
  `;
82
82
  const res = yield (0, graphql_request_1.default)(url, query);
83
83
  const pools = res.pools;
@@ -48,7 +48,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
48
48
  suppliedAssets.push((0, tokenPriceToAssetToken_1.default)(suppliedAsset, suppliedAmount, portfolio_core_1.NetworkId.aptos, suppliedTokenPrice));
49
49
  const borrowedAmount = vaultData.debt / Math.pow(10, borrowedTokenPrice.decimals);
50
50
  borrowedAssets.push((0, tokenPriceToAssetToken_1.default)(borrowedAsset, borrowedAmount, portfolio_core_1.NetworkId.aptos, borrowedTokenPrice));
51
- const { borrowedValue, suppliedValue, value, healthRatio } = (0, portfolio_core_1.getElementLendingValues)(suppliedAssets, borrowedAssets, rewardAssets);
51
+ const { borrowedValue, suppliedValue, value, healthRatio, rewardValue } = (0, portfolio_core_1.getElementLendingValues)(suppliedAssets, borrowedAssets, rewardAssets);
52
52
  elements.push({
53
53
  type: portfolio_core_1.PortfolioElementType.borrowlend,
54
54
  networkId: portfolio_core_1.NetworkId.aptos,
@@ -65,6 +65,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
65
65
  collateralRatio: null,
66
66
  healthRatio,
67
67
  rewardAssets,
68
+ rewardValue,
68
69
  value,
69
70
  },
70
71
  });
@@ -1 +1 @@
1
- {"version":3,"file":"vaultsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/thala/vaultsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AAGpC,2CAA+D;AAC/D,iDAAqD;AACrD,6CAAuE;AAEvE,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,wBAAc,GAAE,CAAC;IAEpC,MAAM,SAAS,GAAG,MAAM,IAAA,2BAAmB,EAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IAC/D,IAAI,CAAC,SAAS;QAAE,OAAO,EAAE,CAAC;IAE1B,MAAM,aAAa,GAAG,mBAAO,CAAC;IAC9B,MAAM,kBAAkB,GAAG,MAAM,KAAK,CAAC,aAAa,CAClD,aAAa,EACb,0BAAS,CAAC,KAAK,CAChB,CAAC;IACF,IAAI,CAAC,kBAAkB;QAAE,OAAO,EAAE,CAAC;IAEnC,MAAM,QAAQ,GAAuB,EAAE,CAAC;IACxC,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC;QACtD,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;QAClC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,uBAAW,CAAC;YAAE,SAAS;QAErD,MAAM,cAAc,GAAqB,EAAE,CAAC;QAC5C,MAAM,cAAc,GAAc,EAAE,CAAC;QACrC,MAAM,cAAc,GAAqB,EAAE,CAAC;QAC5C,MAAM,cAAc,GAAc,EAAE,CAAC;QACrC,MAAM,YAAY,GAAqB,EAAE,CAAC;QAE1C,MAAM,SAAS,GAAG,Q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IAAI;gBAErB,WAAW;gBACX,YAAY;gBACZ,KAAK;aACN;SACF,CAAC,CAAC;QACH,MAAM,iBAAiB,GAAG,MAAM,KAAK,CAAC,OAAO,CAAS,aAAa,EAAE;YACnE,MAAM,EAAE,sBAAU;SACnB,CAAC,CAAC;QACH,IAAI,CAAC,iBAAiB,IAAI,iBAAiB,KAAK,CAAC;YAAE,SAAS;QAE5D,MAAM,oBAAoB,GAAY;YACpC;gBACE,GAAG,EAAE,CAAC,IAAA,yBAAQ,EAAC,iBAAiB,CAAC;gBACjC,GAAG,EAAE,CAAC,iBAAiB;aACxB;SACF,CAAC;QACF,cAAc,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;IAC5C,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,SAAS;IAC1B,SAAS,EAAE,0BAAS,CAAC,KAAK;IAC1B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"vaultsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/thala/vaultsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AAGpC,2CAA+D;AAC/D,iDAAqD;AACrD,6CAAuE;AAEvE,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,wBAAc,GAAE,CAAC;IAEpC,MAAM,SAAS,GAAG,MAAM,IAAA,2BAAmB,EAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IAC/D,IAAI,CAAC,SAAS;QAAE,OAAO,EAAE,CAAC;IAE1B,MAAM,aAAa,GAAG,mBAAO,CAAC;IAC9B,MAAM,kBAAkB,GAAG,MAAM,KAAK,CAAC,aAAa,CAClD,aAAa,EACb,0BAAS,CAAC,KAAK,CAChB,CAAC;IACF,IAAI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&& 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
- };
14
11
  Object.defineProperty(exports, "__esModule", { value: true });
15
12
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
16
- const sui_js_1 = require("@mysten/sui.js");
17
13
  const clients_1 = require("../../../utils/clients");
18
- const getFormattedCollectionNameAndId_1 = __importDefault(require("../../../utils/sui/getFormattedCollectionNameAndId"));
19
14
  const constants_1 = require("../constants");
20
15
  const constants_2 = require("../../../utils/sui/constants");
21
- const getMultipleObjectsSafe_1 = __importDefault(require("../../../utils/sui/getMultipleObjectsSafe"));
16
+ const getOwnedObjects_1 = require("../../../utils/sui/getOwnedObjects");
17
+ const getDynamicFields_1 = require("../../../utils/sui/getDynamicFields");
18
+ const multiGetObjects_1 = require("../../../utils/sui/multiGetObjects");
22
19
  const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
20
+ var _a;
23
21
  const client = (0, clients_1.getClientSui)();
22
+ const ownedObjects = yield (0, getOwnedObjects_1.getOwnedObjects)(client, owner, {
23
+ options: {
24
+ showDisplay: true,
25
+ },
26
+ });
27
+ if (ownedObjects.length === 0)
28
+ return [];
29
+ const nftObjects = [...ownedObjects.filter((o) => { var _a, _b; return (_b = (_a = o.data) === null || _a === void 0 ? void 0 : _a.display) === null || _b === void 0 ? void 0 : _b.data; })];
30
+ const obKioskObject = ownedObjects.find((o) => { var _a; return ((_a = o.data) === null || _a === void 0 ? void 0 : _a.type) === constants_2.obKioskStructType; });
31
+ if (obKioskObject) {
32
+ const kioskDynamicObjects = yield (0, getDynamicFields_1.getDynamicFields)(client, ((_a = obKioskObject === null || obKioskObject === void 0 ? void 0 : obKioskObject.data) === null || _a === void 0 ? void 0 : _a.content).fields.kiosk, true);
33
+ const ownerKioskObjects = yield (0, multiGetObjects_1.multiGetObjects)(client, kioskDynamicObjects.map((o) => o.objectId));
34
+ nftObjects.push(...ownerKioskObjects);
35
+ }
36
+ // TODO add Kiosk objects
24
37
  const assets = [];
25
- let obKioskObjects;
26
- let ownedNFTsObjects;
27
- let cursor;
28
- const kioskItemsAddresses = new Set();
29
- do {
30
- obKioskObjects = yield client.getOwnedObjects({
31
- owner,
32
- filter: {
33
- StructType: constants_2.obKioskStructType,
34
- },
35
- options: {
36
- showContent: true,
37
- },
38
- cursor,
39
- });
40
- cursor = obKioskObjects.nextCursor;
41
- for (const obKioskObject of obKioskObjects.data) {
42
- if (!obKioskObject.data || !obKioskObject.data.content)
43
- continue;
44
- const contentObject = obKioskObject.data.content;
45
- if (!contentObject.fields.kiosk)
46
- continue;
47
- const dynamicFields = yield client.getDynamicFields({
48
- parentId: contentObject.fields.kiosk,
49
- });
50
- if (dynamicFields.data.length === 0)
51
- continue;
52
- const dynamicObjects = dynamicFields.data.filter((field) => field.type === 'DynamicObject');
53
- if (dynamicObjects.length !== 1 ||
54
- dynamicObjects[0].name.type !== constants_2.kioskItemType)
55
- continue;
56
- kioskItemsAddresses.add(dynamicObjects[0].objectId);
38
+ nftObjects.forEach((object) => {
39
+ var _a, _b, _c;
40
+ if (!object.data)
41
+ return;
42
+ if (object.data.type === obKioskObject)
43
+ return;
44
+ const display = (_a = object.data.display) === null || _a === void 0 ? void 0 : _a.data;
45
+ const content = object.data.content;
46
+ let attributes;
47
+ if ((_b = content.fields.attributes) === null || _b === void 0 ? void 0 : _b.fields.map.fields.contents) {
48
+ attributes = (_c = content.fields.attributes) === null || _c === void 0 ? void 0 : _c.fields.map.fields.contents.map((c) => ({
49
+ trait_type: c.fields.key,
50
+ value: c.fields.value,
51
+ }));
57
52
  }
58
- } while (obKioskObjects.hasNextPage);
59
- let nftKioskObjects = yield (0, getMultipleObjectsSafe_1.default)(client, Array.from(kioskItemsAddresses), {
60
- showContent: true,
61
- showDisplay: true,
62
- showType: true,
63
- showOwner: true,
64
- });
65
- cursor = undefined;
66
- do {
67
- ownedNFTsObjects = yield client.getOwnedObjects({
68
- owner,
69
- options: {
70
- showContent: true,
71
- showType: true,
72
- showDisplay: true,
73
- showOwner: true,
53
+ assets.push({
54
+ networkId: portfolio_core_1.NetworkId.sui,
55
+ type: portfolio_core_1.PortfolioAssetType.collectible,
56
+ value: null,
57
+ attributes: {},
58
+ data: {
59
+ address: object.data.type,
60
+ amount: Number(content.fields.amount || 1),
61
+ price: null,
62
+ description: (display === null || display === void 0 ? void 0 : display.description) || content.fields.description,
63
+ imageUri: (display === null || display === void 0 ? void 0 : display.image_url) || content.fields.url,
64
+ name: (display === null || display === void 0 ? void 0 : display.name) || content.fields.name || content.fields.tick,
65
+ attributes,
74
66
  },
75
- cursor,
76
67
  });
77
- cursor = ownedNFTsObjects.nextCursor;
78
- const ownedObjects = nftKioskObjects.length > 0
79
- ? [...ownedNFTsObjects.data, ...nftKioskObjects]
80
- : ownedNFTsObjects.data;
81
- for (const ownedObject of ownedObjects) {
82
- if (!ownedObject.data || !ownedObject.data.content)
83
- continue;
84
- const type = (0, sui_js_1.getObjectType)(ownedObject);
85
- if (!type)
86
- continue;
87
- const object = ownedObject.data.content;
88
- const display = (0, sui_js_1.getObjectDisplay)(ownedObject);
89
- const displayData = display.data;
90
- const metadatas = (0, sui_js_1.getObjectFields)(object);
91
- if (displayData === null && metadatas === null)
92
- continue;
93
- const objectId = (0, sui_js_1.getObjectId)(ownedObject);
94
- const { collectionName, collectionId } = (0, getFormattedCollectionNameAndId_1.default)(type);
95
- let imageUri;
96
- let name;
97
- if (displayData && displayData.image_url) {
98
- imageUri = displayData.image_url;
99
- name = displayData.name;
100
- }
101
- else if (metadatas && (metadatas.image_url || metadatas.url)) {
102
- imageUri = metadatas.image_url || metadatas.url;
103
- name = metadatas.name;
104
- }
105
- else
106
- continue;
107
- assets.push({
108
- networkId: portfolio_core_1.NetworkId.sui,
109
- type: portfolio_core_1.PortfolioAssetType.collectible,
110
- value: null,
111
- attributes: {},
112
- data: {
113
- address: objectId,
114
- amount: 1,
115
- price: null,
116
- imageUri,
117
- name,
118
- collection: {
119
- floorPrice: null,
120
- id: collectionId || '',
121
- name: collectionName || '',
122
- },
123
- },
124
- });
125
- continue;
126
- }
127
- nftKioskObjects = [];
128
- } while (ownedNFTsObjects.hasNextPage);
68
+ });
129
69
  if (assets.length === 0)
130
70
  return [];
131
71
  const element = {
@@ -1 +1 @@
1
- {"version":3,"file":"sui-nfts.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/tokens/fetchers/sui-nfts.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAMoC;AACpC,2CAMwB;AAExB,oDAAsD;AAEtD,yHAAiG;AACjG,4CAAkD;AAClD,4DAAgF;AAChF,uGAAkF;AAElF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,EAAE;IACxD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,MAAM,GAAgC,EAAE,CAAC;IAC/C,IAAI,cAAc,CAAC;IACnB,IAAI,gBAAgB,CAAC;IACrB,IAAI,MAAM,CAAC;IACX,MAAM,mBAAmB,GAAgB,IAAI,GAAG,EAAE,CAAC;IAEnD,GAAG,CAAC;QACF,cAAc,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC;YAC5C,KAAK;YACL,MAAM,EAAE;gBACN,UAAU,EAAE,6BAAiB;aAC9B;YACD,OAAO,EAAE;gBACP,WAAW,EAAE,IAAI;aAClB;YACD,MAAM;SACP,CAAC,CAAC;QACH,MAAM,GAAG,cAAc,CAAC,UAAU,CAAC;QAEnC,KAAK,MAAM,aAAa,IAAI,cAAc,CAAC,IAAI,EAAE,CAAC;YAChD,IAAI,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,OAAO;gBAAE,SAAS;YAEjE,MAAM,aAAa,GAAG,aAAa,CAAC,IAAI,CAAC,OAAuB,CAAC;YACjE,IAAI,CAAC,aAAa,CAAC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C,IAAI,CAAC;gBACV,SAAS,EAAE,0BAAS,CAAC,GAAG;gBACxB,IAAI,EAAE,mCAAkB,CAAC,WAAW;gBACpC,KAAK,EAAE,IAAI;gBACX,UAAU,EAAE,EAAE;gBACd,IAAI,EAAE;oBACJ,OAAO,EAAE,QAAQ;oBACjB,MAAM,EAAE,CAAC;oBACT,KAAK,EAAE,IAAI;oBACX,QAAQ;oBACR,IAAI;oBACJ,UAAU,EAAE;wBACV,UAAU,EAAE,IAAI;wBAChB,EAAE,EAAE,YAAY,IAAI,EAAE;wBACtB,IAAI,EAAE,cAAc,IAAI,EAAE;qBAC3B;iBACF;aACF,CAAC,CAAC;YACH,SAAS;QACX,CAAC;QACD,eAAe,GAAG,EAAE,CAAC;IACvB,CAAC,QAAQ,gBAAgB,CAAC,WAAW,EAAE;IAEvC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACnC,MAAM,OAAO,GAA6B;QACxC,IAAI,EAAE,qCAAoB,CAAC,QAAQ;QACnC,SAAS,EAAE,0BAAS,CAAC,GAAG;QACxB,UAAU,EAAE,8BAAkB,CAAC,EAAE;QACjC,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,IAAI;QACX,IAAI,EAAE;YACJ,MAAM;SACP;KACF,CAAC;IACF,OAAO,CAAC,OAAO,CAAC,CAAC;AACnB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,8BAAkB,CAAC,EAAE,IAAI,0BAAS,CAAC,GAAG,EAAE;IAC/C,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"sui-nfts.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/tokens/fetchers/sui-nfts.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAOoC;AAEpC,oDAAsD;AACtD,4CAAkD;AAClD,4DAAiE;A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G;gBAClD,IAAI,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,KAAI,OAAO,CAAC,MAAM,CAAC,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI;gBACjE,UAAU;aACX;SACF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACnC,MAAM,OAAO,GAA6B;QACxC,IAAI,EAAE,qCAAoB,CAAC,QAAQ;QACnC,SAAS,EAAE,0BAAS,CAAC,GAAG;QACxB,UAAU,EAAE,8BAAkB,CAAC,EAAE;QACjC,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,IAAI;QACX,IAAI,EAAE;YACJ,MAAM;SACP;KACF,CAAC;IACF,OAAO,CAAC,OAAO,CAAC,CAAC;AACnB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,8BAAkB,CAAC,EAAE,IAAI,0BAAS,CAAC,GAAG,EAAE;IAC/C,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -33,51 +33,3 @@ export type Token = {
33
33
  index?: string;
34
34
  };
35
35
  };
36
- export type SuiNFTMetadata = {
37
- attributes?: {
38
- type: string;
39
- fields: {
40
- map: {
41
- type: string;
42
- fields: {
43
- contents: Attribute[];
44
- };
45
- };
46
- };
47
- };
48
- id: {
49
- id: string;
50
- };
51
- name: string;
52
- description?: string;
53
- url?: string;
54
- image_url?: string;
55
- index?: string;
56
- };
57
- export type Attribute = {
58
- [key: number]: {
59
- type: string;
60
- fields: {
61
- key: string;
62
- value: string;
63
- };
64
- };
65
- };
66
- export type DisplayInfo = {
67
- description: string;
68
- image_url: string;
69
- link: string;
70
- name: string;
71
- };
72
- export type KioskContent = {
73
- dataType: string;
74
- type: string;
75
- hasPublicTransfer: boolean;
76
- fields: {
77
- id: {
78
- id: string;
79
- };
80
- kiosk: string;
81
- owner: string;
82
- };
83
- };
@@ -13,17 +13,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
16
- const sui_js_1 = require("@mysten/sui.js");
17
16
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
18
17
  const constants_1 = require("./constants");
19
18
  const clients_1 = require("../../utils/clients");
20
19
  const tokenAmountFromLiquidity_1 = require("../../utils/clmm/tokenAmountFromLiquidity");
21
20
  const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
22
21
  const helper_1 = require("./helper");
22
+ const getOwnedObjects_1 = require("../../utils/sui/getOwnedObjects");
23
+ const multiGetObjects_1 = require("../../utils/sui/multiGetObjects");
23
24
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
25
+ var _a, _b;
24
26
  const client = (0, clients_1.getClientSui)();
25
- const nftsPositionsRes = yield client.getOwnedObjects({
26
- owner,
27
+ const nftsPositionsRes = yield (0, getOwnedObjects_1.getOwnedObjects)(client, owner, {
27
28
  options: {
28
29
  showType: true,
29
30
  showContent: true,
@@ -32,18 +33,20 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
32
33
  },
33
34
  filter: { Package: constants_1.packageIdOriginal },
34
35
  });
35
- if (!nftsPositionsRes.data)
36
+ if (nftsPositionsRes.length === 0)
36
37
  return [];
37
38
  const clmmPoolsIds = [];
38
39
  const clmmPositionsIds = [];
39
40
  const nftPositionByPositionId = new Map();
40
- for (let i = 0; i < nftsPositionsRes.data.length; i++) {
41
- const nftData = nftsPositionsRes.data[i].data;
41
+ for (let i = 0; i < nftsPositionsRes.length; i++) {
42
+ const nftData = nftsPositionsRes[i].data;
42
43
  if (!nftData)
43
44
  continue;
44
45
  if (nftData.type !== constants_1.clmmNftType)
45
46
  continue;
46
- const nftPositionFields = (0, sui_js_1.getObjectFields)(nftData);
47
+ if (!nftData.content)
48
+ continue;
49
+ const nftPositionFields = nftData.content.fields;
47
50
  clmmPoolsIds.push(nftPositionFields.pool_id);
48
51
  clmmPositionsIds.push(nftPositionFields.position_id);
49
52
  nftPositionByPositionId.set(nftPositionFields.position_id, nftPositionFields);
@@ -60,19 +63,18 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
60
63
  poolsById.set(pool.objectId, pool);
61
64
  }
62
65
  });
63
- const clmmPositionsRes = yield client.multiGetObjects({
64
- ids: clmmPositionsIds,
65
- options: {
66
- showType: true,
67
- showContent: true,
68
- showDisplay: true,
69
- showOwner: true,
70
- },
66
+ const clmmPositionsRes = yield (0, multiGetObjects_1.multiGetObjects)(client, clmmPositionsIds, {
67
+ showType: true,
68
+ showContent: true,
69
+ showDisplay: true,
70
+ showOwner: true,
71
71
  });
72
72
  const assets = [];
73
73
  let totalLiquidityValue = 0;
74
74
  for (let i = 0; i < clmmPositionsRes.length; i++) {
75
- const clmmPosition = (0, sui_js_1.getObjectFields)(clmmPositionsRes[i]);
75
+ const clmmPosition = (_b = (_a = clmmPositionsRes[i].data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields;
76
+ if (!clmmPosition)
77
+ continue;
76
78
  const nftPosition = nftPositionByPositionId.get(clmmPosition.id.id);
77
79
  if (!nftPosition)
78
80
  continue;
@@ -1 +1 @@
1
- {"version":3,"file":"clmmsPositionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/turbos/clmmsPositionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AACpC,2CAAiD;AACjD,gEAAqC;AAGrC,2CAKqB;AACrB,iDAAmD;AAEnD,wFAAyF;AACzF,qGAA6E;AAC7E,qCAAyD;AAEzD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,I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AC;YAClC,WAAW,EAAE,KAAK;YAClB,YAAY,EAAE,EAAE;YAChB,iBAAiB,EAAE,CAAC;YACpB,KAAK;YACL,MAAM,EAAE,EAAE;SACX,CAAC,CAAC;QACH,mBAAmB,IAAI,KAAK,CAAC;IAC/B,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEnC,OAAO;QACL;YACE,IAAI,EAAE,qCAAoB,CAAC,SAAS;YACpC,SAAS,EAAE,0BAAS,CAAC,GAAG;YACxB,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,eAAe;YACtB,IAAI,EAAE,CAAC,cAAc,CAAC;YACtB,KAAK,EAAE,mBAAmB;YAC1B,IAAI,EAAE;gBACJ,WAAW,EAAE,MAAM;aACpB;SACF;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,kBAAkB;IACnC,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"clmmsPositionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/turbos/clmmsPositionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AACpC,gEAAqC;AAGrC,2CAKqB;AACrB,iDAAmD;AAEnD,wFAAyF;AACzF,qGAA6E;AAC7E,qCAAyD;AACzD,qEAAkE;AAClE,qEAAkE;AAElE,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAC9B,MAAM,gBAAgB,GAAG,MAAM,IAAA,iCAAe,EAAC,MAAM,EAAE,KAAK,EAAE;QAC5D,OAAO,EAAE;YACP,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,IAAI;YACjB,WAAW,EAAE,IAAI;YACjB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,CAAC;QACH,mBAAmB,IAAI,KAAK,CAAC;IAC/B,CAAC;IACD,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEnC,OAAO;QACL;YACE,IAAI,EAAE,qCAAoB,CAAC,SAAS;YACpC,SAAS,EAAE,0BAAS,CAAC,GAAG;YACxB,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,eAAe;YACtB,IAAI,EAAE,CAAC,cAAc,CAAC;YACtB,KAAK,EAAE,mBAAmB;YAC1B,IAAI,EAAE;gBACJ,WAAW,EAAE,MAAM;aACpB;SACF;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,kBAAkB;IACnC,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -1,8 +1,8 @@
1
- import { SuiObjectResponse } from '@mysten/sui.js';
2
- import { Bits, Pool, Types } from './types';
1
+ import { Bits, Pool, PoolFields, Types } from './types';
2
+ import { ObjectResponse } from '../../utils/sui/types';
3
3
  export declare function parsePoolType(type: string, length: 2): [string, string];
4
4
  export declare function parsePoolType(type: string, length: 3): Types;
5
5
  export declare function parsePoolType(type: string): string[];
6
- export declare function parsePool(pool: SuiObjectResponse): Pool;
6
+ export declare function parsePool(pool: ObjectResponse<PoolFields>): Pool;
7
7
  export declare function formatForNative(coin: string): string;
8
8
  export declare function bitsToNumber(bits: Bits): number;
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.bitsToNumber = exports.formatForNative = exports.parsePool = exports.parsePoolType = void 0;
4
- const sui_js_1 = require("@mysten/sui.js");
5
4
  const helpers_1 = require("../cetus/helpers");
6
5
  function parsePoolType(type, length) {
7
6
  var _a;
@@ -13,9 +12,12 @@ function parsePoolType(type, length) {
13
12
  }
14
13
  exports.parsePoolType = parsePoolType;
15
14
  function parsePool(pool) {
16
- const fields = (0, sui_js_1.getObjectFields)(pool);
17
- const objectId = (0, sui_js_1.getObjectId)(pool);
18
- const type = (0, sui_js_1.getObjectType)(pool);
15
+ var _a, _b, _c, _d, _e;
16
+ if (!((_a = pool.data) === null || _a === void 0 ? void 0 : _a.content))
17
+ throw new Error('turbos parsePool error');
18
+ const fields = (_c = (_b = pool.data) === null || _b === void 0 ? void 0 : _b.content) === null || _c === void 0 ? void 0 : _c.fields;
19
+ const objectId = (_d = pool.data) === null || _d === void 0 ? void 0 : _d.objectId;
20
+ const type = (_e = pool.data) === null || _e === void 0 ? void 0 : _e.type;
19
21
  return Object.assign(Object.assign({}, fields), { objectId,
20
22
  type, types: parsePoolType(type, 3) });
21
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/turbos/helper.ts"],"names":[],"mappings":";;;AAAA,2CAKwB;AAExB,8CAA0C;AAK1C,SAAgB,aAAa,CAAC,IAAY,EAAE,MAAe;;IACzD,MAAM,KAAK,GAAG,CAAA,MAAA,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,0CAAE,KAAK,CAAC,MAAM,CAAC,KAAI,EAAE,CAAC;IAEvE,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,KAAK,CAAC,MAAM,EAAE,CAAC;QACpD,MAAM,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;IACvC,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AARD,sCAQC;AACD,SAAgB,SAAS,CAAC,IAAuB;IAC/C,MAAM,MAAM,GAAG,IAAA,wBAAe,EAAC,IAAI,CAAe,CAAC;IACnD,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;IACnC,MAAM,IAAI,GAAG,IAAA,sBAAa,EAAC,IAAI,CA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I,0CAAE,QAAQ,CAAC;IACrC,MAAM,IAAI,GAAG,MAAA,IAAI,CAAC,IAAI,0CAAE,IAAI,CAAC;IAC7B,uCACK,MAAM,KACT,QAAQ;QACR,IAAI,EACJ,KAAK,EAAE,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC,IAC7B;AACJ,CAAC;AAXD,8BAWC;AAED,SAAgB,eAAe,CAAC,IAAY;IAC1C,OAAO,IAAI;QACT,8EAA8E;QAC9E,CAAC,CAAC,eAAe;QACjB,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AALD,0CAKC;AAED,SAAgB,YAAY,CAAC,IAAU;IACrC,OAAO,IAAA,gBAAM,EAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AAC1C,CAAC;AAFD,oCAEC"}
@@ -12,31 +12,31 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- const sui_js_1 = require("@mysten/sui.js");
16
15
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
17
16
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
18
17
  const constants_1 = require("./constants");
19
18
  const clients_1 = require("../../utils/clients");
20
19
  const helper_1 = require("./helper");
21
20
  const tokenPricesFromSqrt_1 = __importDefault(require("../../utils/clmm/tokenPricesFromSqrt"));
22
- const getDynamicFieldsSafe_1 = __importDefault(require("../../utils/sui/getDynamicFieldsSafe"));
23
- const getMultipleObjectsSafe_1 = __importDefault(require("../../utils/sui/getMultipleObjectsSafe"));
21
+ const getDynamicFields_1 = require("../../utils/sui/getDynamicFields");
22
+ const multiGetObjects_1 = require("../../utils/sui/multiGetObjects");
24
23
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
25
24
  const client = (0, clients_1.getClientSui)();
26
- const poolFactories = yield (0, getDynamicFieldsSafe_1.default)(client, constants_1.poolTableId);
27
- const poolFactoryIds = poolFactories.map(sui_js_1.getObjectId);
25
+ const poolFactories = yield (0, getDynamicFields_1.getDynamicFields)(client, constants_1.poolTableId);
26
+ const poolFactoryIds = poolFactories.map((p) => p.objectId);
28
27
  if (!poolFactoryIds.length)
29
28
  return;
30
- const poolFactoryInfos = yield (0, getMultipleObjectsSafe_1.default)(client, poolFactoryIds, { showContent: true });
29
+ const poolFactoryInfos = yield (0, multiGetObjects_1.multiGetObjects)(client, poolFactoryIds, {
30
+ showContent: true,
31
+ });
31
32
  const poolIds = poolFactoryInfos.map((info) => {
32
- const fields = (0, sui_js_1.getObjectFields)(info);
33
+ var _a, _b;
34
+ const fields = (_b = (_a = info.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields;
33
35
  return fields.value.fields.pool_id;
34
36
  });
35
37
  if (!poolIds.length)
36
38
  return;
37
- const pools = yield (0, getMultipleObjectsSafe_1.default)(client, poolIds, {
38
- showContent: true,
39
- });
39
+ const pools = yield (0, multiGetObjects_1.multiGetObjects)(client, poolIds);
40
40
  const promises = [];
41
41
  for (const pool of pools) {
42
42
  const parsedPool = (0, helper_1.parsePool)(pool);
@@ -1 +1 @@
1
- {"version":3,"file":"poolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/turbos/poolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,2CAA8D;AAC9D,+DAAuD;AACvD,gEAAqC;AAGrC,2CAAuE;AACvE,iDAAmD;AACnD,qCAAqC;AACrC,+FAA4E;AAC5E,gGAAwE;AACxE,oGAA+E;AAE/E,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAC9B,MAAM,aAAa,GAAG,MAAM,IAAA,8BAAoB,EAAC,MAAM,EAAE,uBAAW,CAAC,CAAC;IACtE,MAAM,cAAc,GAAG,aAAa,CAAC,GAAG,CAAC,oBAAW,CAAC,CAAC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