@sonarwatch/portfolio-plugins 0.12.182 → 0.12.184

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +8 -8
  3. package/src/plugins/cetus/dcaFetcher.js +2 -2
  4. package/src/plugins/cetus/dcaFetcher.js.map +1 -1
  5. package/src/plugins/cetus/helpers.js +1 -1
  6. package/src/plugins/cetus/helpers.js.map +1 -1
  7. package/src/plugins/cetus/limitFetcher.js +4 -4
  8. package/src/plugins/cetus/limitFetcher.js.map +1 -1
  9. package/src/plugins/deepbook/helpers.js +4 -4
  10. package/src/plugins/deepbook/helpers.js.map +1 -1
  11. package/src/plugins/haedal/vaultFetcher.js +2 -2
  12. package/src/plugins/haedal/vaultFetcher.js.map +1 -1
  13. package/src/plugins/jewel/stakedFetcher.js +1 -1
  14. package/src/plugins/jewel/stakedFetcher.js.map +1 -1
  15. package/src/plugins/mole/farmsFetcher.js +3 -3
  16. package/src/plugins/mole/farmsFetcher.js.map +1 -1
  17. package/src/plugins/navi/getAvailableRewards.js +5 -5
  18. package/src/plugins/navi/getAvailableRewards.js.map +1 -1
  19. package/src/plugins/pyth/stakingFetcher.js +3 -2
  20. package/src/plugins/pyth/stakingFetcher.js.map +1 -1
  21. package/src/plugins/pyth/structs.d.ts +2 -2
  22. package/src/plugins/pyth/structs.js +2 -2
  23. package/src/plugins/pyth/structs.js.map +1 -1
  24. package/src/plugins/scallop/lendingsFetcher.js +3 -5
  25. package/src/plugins/scallop/lendingsFetcher.js.map +1 -1
  26. package/src/plugins/scallop/obligationsFetcher.js +1 -1
  27. package/src/plugins/scallop/obligationsFetcher.js.map +1 -1
  28. package/src/plugins/scallop/poolsJob.js +1 -1
  29. package/src/plugins/scallop/poolsJob.js.map +1 -1
  30. package/src/plugins/scallop/types/coin.d.ts +1 -1
  31. package/src/plugins/tokens/fetchers/sui-nfts.js +5 -5
  32. package/src/plugins/tokens/fetchers/sui-nfts.js.map +1 -1
  33. package/src/plugins/typus/constants.js +30 -5
  34. package/src/plugins/typus/constants.js.map +1 -1
  35. package/src/plugins/typus/helpers.js +5 -6
  36. package/src/plugins/typus/helpers.js.map +1 -1
  37. package/src/plugins/typus/safu_helpers.js +14 -13
  38. package/src/plugins/typus/safu_helpers.js.map +1 -1
  39. package/src/utils/clients/getClientSui.js +1 -1
  40. package/src/utils/clients/getClientSui.js.map +1 -1
  41. package/src/utils/clients/types.d.ts +1 -1
  42. package/src/utils/sui/getDynamicFieldObject.d.ts +1 -1
  43. package/src/utils/sui/getDynamicFieldObjects.d.ts +1 -1
  44. package/src/utils/sui/getDynamicFieldObjects.js +1 -1
  45. package/src/utils/sui/getDynamicFieldObjects.js.map +1 -1
  46. package/src/utils/sui/getDynamicFieldObjectsSafe.d.ts +4 -0
  47. package/src/utils/sui/getDynamicFieldObjectsSafe.js +23 -0
  48. package/src/utils/sui/getDynamicFieldObjectsSafe.js.map +1 -0
  49. package/src/utils/sui/getDynamicFields.d.ts +1 -1
  50. package/src/utils/sui/getDynamicFields.js +1 -4
  51. package/src/utils/sui/getDynamicFields.js.map +1 -1
  52. package/src/utils/sui/getDynamicFieldsSafe.d.ts +3 -0
  53. package/src/utils/sui/getDynamicFieldsSafe.js +38 -0
  54. package/src/utils/sui/getDynamicFieldsSafe.js.map +1 -0
  55. package/src/utils/sui/getObject.d.ts +1 -1
  56. package/src/utils/sui/getObjectDeletedResponse.d.ts +1 -1
  57. package/src/utils/sui/getOwnedObjects.d.ts +1 -1
  58. package/src/utils/sui/mulitpleGetBalances.d.ts +1 -1
  59. package/src/utils/sui/multiGetObjects.d.ts +1 -1
  60. package/src/utils/sui/multipleGetDynamicFieldsObjects.d.ts +1 -1
  61. package/src/utils/sui/multipleGetDynamicFieldsObjects.js.map +1 -1
  62. package/src/utils/sui/multipleGetDynamicFieldsObjectsSafe.d.ts +4 -0
  63. package/src/utils/sui/multipleGetDynamicFieldsObjectsSafe.js +25 -0
  64. package/src/utils/sui/multipleGetDynamicFieldsObjectsSafe.js.map +1 -0
  65. package/src/utils/sui/queryEvents.d.ts +1 -1
  66. package/src/utils/sui/queryEventsSafe.d.ts +1 -1
  67. package/src/utils/sui/types.d.ts +7 -1
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
13
- const utils_1 = require("@mysten/sui.js/utils");
13
+ const utils_1 = require("@mysten/sui/utils");
14
14
  const constants_1 = require("./constants");
15
15
  const getObject_1 = require("../../utils/sui/getObject");
16
16
  const clients_1 = require("../../utils/clients");
@@ -1 +1 @@
1
- {"version":3,"file":"poolsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/scallop/poolsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AACvD,gDAAwE;AAIxE,2CAKqB;AAErB,yDAAsD;AACtD,iDAAmD;AAEnD,MAAM,QAAQ,GAAG,IAAA,0BAAkB,EAAC,oBAAY,CAAC,CAAC;AAElD,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;;IACnD,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,OAAO,CAAc,sBAAU,EAAE;QAC3D,MAAM,EAAE,yBAAa;QACrB,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CAAC,CAAC;IAEH,IAAI,CAAC,OAAO;QAAE,OAAO;IAErB,MAAM,SAAS,GAAU,EAAE,CAAC;IAC5B,MAAM,KAAK,GAAG,IAAI,GAAG,CACnB,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAC3C,CAAC;IACF,MAAM,SAAS,GAAa,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;IACrD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAC9B,KAAK,MAAM,QAAQ,IAAI,SAAS,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M,MAAM,GAAG,MAAM,IAAA,qBAAS,EAAe,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;YACtE,MAAM,OAAO,GAAG,IAAA,0BAAkB,EAAC,CAAA,MAAA,MAAM,CAAC,IAAI,0CAAE,IAAI,KAAI,EAAE,CAAC,CAAC;YAC5D,MAAM,SAAS,GAAG,MAAA,MAAA,MAAM,CAAC,IAAI,0CAAE,OAAO,0CAAE,MAAM,CAAC;YAC/C,IAAI,CAAC,OAAO,IAAI,CAAC,SAAS;gBAAE,OAAO;YACnC,SAAS,CAAC,QAAQ,CAAC,GAAG;gBACpB,QAAQ,EAAE,OAAO,CAAC,SAAS,CACzB,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EACxB,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CACrB;gBACD,QAAQ,EAAE,SAAS;aACpB,CAAC;QACJ,CAAC;IACH,CAAC;IAED,MAAM,KAAK,CAAC,OAAO,CAAC,oBAAQ,EAAE,SAAS,EAAE;QACvC,MAAM,EAAN,uBAAM;QACN,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,uBAAM;IACV,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -1,4 +1,4 @@
1
- import { CoinMetadata } from '@mysten/sui.js/client';
1
+ import { CoinMetadata } from '@mysten/sui/client';
2
2
  import { CoinNames, MARKET_COIN_NAMES } from '../constants';
3
3
  export declare const SUPPORTED_SPOOL_COIN_NAMES: readonly ["ssui", "susdc"];
4
4
  export type MarketCoinNames = (typeof MARKET_COIN_NAMES)[number];
@@ -14,7 +14,7 @@ const clients_1 = require("../../../utils/clients");
14
14
  const constants_1 = require("../constants");
15
15
  const constants_2 = require("../../../utils/sui/constants");
16
16
  const getOwnedObjects_1 = require("../../../utils/sui/getOwnedObjects");
17
- const getDynamicFields_1 = require("../../../utils/sui/getDynamicFields");
17
+ const getDynamicFieldsSafe_1 = require("../../../utils/sui/getDynamicFieldsSafe");
18
18
  const multiGetObjects_1 = require("../../../utils/sui/multiGetObjects");
19
19
  const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
20
20
  var _a;
@@ -29,14 +29,14 @@ const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
29
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
30
  const obKioskObject = ownedObjects.find((o) => { var _a; return ((_a = o.data) === null || _a === void 0 ? void 0 : _a.type) === constants_2.obKioskStructType; });
31
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);
32
+ const kioskDynamicObjects = yield (0, getDynamicFieldsSafe_1.getDynamicFieldsSafe)(client, ((_a = obKioskObject === null || obKioskObject === void 0 ? void 0 : obKioskObject.data) === null || _a === void 0 ? void 0 : _a.content).fields.kiosk, true);
33
33
  const ownerKioskObjects = yield (0, multiGetObjects_1.multiGetObjects)(client, kioskDynamicObjects.map((o) => o.objectId));
34
34
  nftObjects.push(...ownerKioskObjects);
35
35
  }
36
36
  // TODO add Kiosk objects
37
37
  const assets = [];
38
38
  nftObjects.forEach((object) => {
39
- var _a, _b, _c;
39
+ var _a, _b, _c, _d, _e, _f;
40
40
  if (!object.data)
41
41
  return;
42
42
  if (object.data.type === obKioskObject)
@@ -44,8 +44,8 @@ const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
44
44
  const display = (_a = object.data.display) === null || _a === void 0 ? void 0 : _a.data;
45
45
  const content = object.data.content;
46
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) => ({
47
+ if ((_e = (_d = (_c = (_b = content.fields) === null || _b === void 0 ? void 0 : _b.attributes) === null || _c === void 0 ? void 0 : _c.fields.map) === null || _d === void 0 ? void 0 : _d.fields) === null || _e === void 0 ? void 0 : _e.contents) {
48
+ attributes = (_f = content.fields.attributes.fields.map.fields.contents) === null || _f === void 0 ? void 0 : _f.map((c) => ({
49
49
  trait_type: c.fields.key,
50
50
  value: c.fields.value,
51
51
  }));
@@ -1 +1 @@
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;AACjE,wEAAqE;AAIrE,0EAAuE;AACvE,wEAAqE;AAErE,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,EAAE;;IACxD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAC9B,MAAM,YAAY,GAAG,MAAM,IAAA,iCAAe,EAAC,MAAM,EAAE,KAAK,EAAE;QACxD,OAAO,EAAE;YACP,WAAW,EAAE,IAAI;SAClB;KACF,CAAC,CAAC;IACH,IAAI,YAAY,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACzC,MAAM,UAAU,GAAG,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,eAAC,OAAA,MAAA,MAAA,CAAC,CAAC,IAAI,0CAAE,OAAO,0CAAE,IAAI,CAAA,EAAA,CAAC,CAAC,CAAC;IAE1E,MAAM,aAAa,GAAG,YAAY,CAAC,IAAI,CACrC,CAAC,CAAC,EAAE,EAAE,WAAC,OAAA,CAAA,MAAA,CAAC,CAAC,IAAI,0CAAE,IAAI,MAAK,6BAAiB,CAAA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AS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -20,11 +20,36 @@ exports.safuPackage = '0x8bde4eedabbdaf0c4c463c4eb35f00456dbac5fdccb94ce9c2d7a77
20
20
  exports.frameworkPackage = '0x5c6648fb219c046256488486d23d4af7bc562d5ab5c382e1f4b558066a327fe8';
21
21
  exports.safuRegistryId = '0xdc970d638d1489385e49ddb76889748011bac4616b95a51aa63633972b841706';
22
22
  exports.safuVaultsKey = 'safu-vaults';
23
- exports.vaultsIndexes = ['0', '1', '2', '3'];
23
+ exports.vaultsIndexes = [
24
+ '0',
25
+ '1',
26
+ '2',
27
+ '3',
28
+ '4',
29
+ '5',
30
+ '6',
31
+ '7',
32
+ '8',
33
+ '9',
34
+ '10',
35
+ '11',
36
+ '12',
37
+ '13',
38
+ ];
24
39
  exports.safuVaultsNames = {
25
- '0': 'Bull',
26
- '1': 'Bear',
27
- '2': 'All Weather SUI',
28
- '3': 'All Weather USDC',
40
+ '0': 'SUI Daily Bull',
41
+ '1': 'SUI Daily Bear',
42
+ '2': 'Daily All Weather',
43
+ '3': 'Daily All Weather',
44
+ '4': 'SUI Hourly Bull',
45
+ '5': 'SUI Hourly Bear',
46
+ '6': 'BTC Daily Bull',
47
+ '7': 'BTC Daily Bear',
48
+ '8': 'ETH Daily Bull',
49
+ '9': 'ETH Daily Bear',
50
+ '10': 'SOL Daily Bull',
51
+ '11': 'SOL Daily Bear',
52
+ '12': 'SUI Daily Bull',
53
+ '13': 'SUI Daily Bull',
29
54
  };
30
55
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/typus/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,8CAA8C;IACrD,WAAW,EAAE,sBAAsB,EAAE,sCAAsC;IAC3E,OAAO,EAAE,wBAAwB;IACjC,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AACW,QAAA,SAAS,GACpB,oEAAoE,CAAC;AAC1D,QAAA,kBAAkB,GAAG,GAAG,iBAAS,8BAA8B,CAAC;AAChE,QAAA,MAAM,GACjB,oEAAoE,CAAC;AAC1D,QAAA,gBAAgB,GAC3B,oEAAoE,CAAC;AAC1D,QAAA,iBAAiB,GAC5B,oEAAoE,CAAC;AAC1D,QAAA,qBAAqB,GAAG,GAAG,wBAAgB,6CAA6C,CAAC;AAEzF,QAAA,WAAW,GACtB,oEAAoE,CAAC;AAC1D,QAAA,gBAAgB,GAC3B,oEAAoE,CAAC;AAC1D,QAAA,cAAc,GACzB,oEAAoE,CAAC;AAC1D,QAAA,aAAa,GAAG,aAAa,CAAC;AAE9B,QAAA,aAAa,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACrC,QAAA,eAAe,GAA8B;IACxD,GAAG,EAAE,MAAM;IACX,GAAG,EAAE,MAAM;IACX,GAAG,EAAE,iBAAiB;IACtB,GAAG,EAAE,kBAAkB;CACxB,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/typus/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,8CAA8C;IACrD,WAAW,EAAE,sBAAsB,EAAE,sCAAsC;IAC3E,OAAO,EAAE,wBAAwB;IACjC,OAAO,EAAE,kCAAkC;CAC5C,CAAC;AACW,QAAA,SAAS,GACpB,oEAAoE,CAAC;AAC1D,QAAA,kBAAkB,GAAG,GAAG,iBAAS,8BAA8B,CAAC;AAChE,QAAA,MAAM,GACjB,oEAAoE,CAAC;AAC1D,QAAA,gBAAgB,GAC3B,oEAAoE,CAAC;AAC1D,QAAA,iBAAiB,GAC5B,oEAAoE,CAAC;AAC1D,QAAA,qBAAqB,GAAG,GAAG,wBAAgB,6CAA6C,CAAC;AAEzF,QAAA,WAAW,GACtB,oEAAoE,CAAC;AAC1D,QAAA,gBAAgB,GAC3B,oEAAoE,CAAC;AAC1D,QAAA,cAAc,GACzB,oEAAoE,CAAC;AAC1D,QAAA,aAAa,GAAG,aAAa,CAAC;AAE9B,QAAA,aAAa,GAAG;IAC3B,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;CACL,CAAC;AACW,QAAA,eAAe,GAA8B;IACxD,GAAG,EAAE,gBAAgB;IACrB,GAAG,EAAE,gBAAgB;IACrB,GAAG,EAAE,mBAAmB;IACxB,GAAG,EAAE,mBAAmB;IACxB,GAAG,EAAE,iBAAiB;IACtB,GAAG,EAAE,iBAAiB;IACtB,GAAG,EAAE,gBAAgB;IACrB,GAAG,EAAE,gBAAgB;IACrB,GAAG,EAAE,gBAAgB;IACrB,GAAG,EAAE,gBAAgB;IACrB,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,gBAAgB;CACvB,CAAC"}
@@ -11,17 +11,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.getDepositShares = void 0;
13
13
  const bcs_1 = require("@mysten/bcs");
14
- const transactions_1 = require("@mysten/sui.js/transactions");
14
+ const transactions_1 = require("@mysten/sui/transactions");
15
15
  const constants_1 = require("./constants");
16
16
  function getDepositShares(provider, receipts) {
17
17
  return __awaiter(this, void 0, void 0, function* () {
18
- const transactionBlock = new transactions_1.TransactionBlock();
18
+ const transactionBlock = new transactions_1.Transaction();
19
19
  const target = constants_1.viewDepositSharesType;
20
20
  const transactionBlockArguments = [
21
- transactionBlock.pure(constants_1.registryDovSingle),
21
+ transactionBlock.object(constants_1.registryDovSingle),
22
22
  transactionBlock.makeMoveVec({
23
23
  type: constants_1.depositReceiptType,
24
- objects: receipts.map((id) => transactionBlock.object(id)),
24
+ elements: receipts.map((id) => transactionBlock.object(id)),
25
25
  }),
26
26
  ];
27
27
  transactionBlock.moveCall({
@@ -40,7 +40,7 @@ function getDepositShares(provider, receipts) {
40
40
  return undefined;
41
41
  const bytes = returnValues[0][0];
42
42
  const reader = new bcs_1.BcsReader(new Uint8Array(bytes));
43
- const res = reader.readVec((bcsReader) => {
43
+ return reader.readVec((bcsReader) => {
44
44
  bcsReader.read8();
45
45
  const index = bcsReader.read64();
46
46
  const activeSubVaultUserShare = bcsReader.read64();
@@ -59,7 +59,6 @@ function getDepositShares(provider, receipts) {
59
59
  incentiveShare,
60
60
  };
61
61
  });
62
- return res;
63
62
  });
64
63
  }
65
64
  exports.getDepositShares = getDepositShares;
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/typus/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAwC;AACxC,8DAA+D;AAG/D,2CAKqB;AAErB,SAAsB,gBAAgB,CACpC,QAAmB,EACnB,QAAkB;;QAElB,MAAM,gBAAgB,GAAG,IAAI,+BAAgB,EAAE,CAAC;QAChD,MAAM,MAAM,GAAG,iCAA0D,CAAC;QAC1E,MAAM,yBAAyB,GAAG;YAChC,gBAAgB,CAAC,IAAI,CAAC,6BAAiB,CAAC;YACxC,gBAAgB,CAAC,WAAW,CAAC;gBAC3B,IAAI,EAAE,8BAAkB;gBACxB,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;a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AM,MAAM,GAAG,IAAI,eAAS,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;QACpD,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;YAClC,SAAS,CAAC,KAAK,EAAE,CAAC;YAClB,MAAM,KAAK,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC;YACjC,MAAM,uBAAuB,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC;YACnD,MAAM,6BAA6B,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC;YACzD,MAAM,yBAAyB,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC;YACrD,MAAM,uBAAuB,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC;YACnD,MAAM,wBAAwB,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC;YACpD,MAAM,cAAc,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC;YAC1C,OAAO;gBACL,KAAK;gBACL,uBAAuB;gBACvB,6BAA6B;gBAC7B,yBAAyB;gBACzB,uBAAuB;gBACvB,wBAAwB;gBACxB,cAAc;aACC,CAAC;QACpB,CAAC,CAAC,CAAC;IACL,CAAC;CAAA;AAhDD,4CAgDC"}
@@ -10,30 +10,31 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.getShareData = exports.getVaultData = void 0;
13
- const transactions_1 = require("@mysten/sui.js/transactions");
13
+ const transactions_1 = require("@mysten/sui/transactions");
14
14
  const constants_1 = require("./constants");
15
- const bcs_1 = require("@mysten/bcs");
15
+ const bcs_1 = require("@mysten/sui/bcs");
16
+ const bcs_2 = require("@mysten/bcs");
16
17
  const SENDER = '0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
17
18
  function getVaultData(provider) {
18
19
  return __awaiter(this, void 0, void 0, function* () {
19
- let transactionBlock = new transactions_1.TransactionBlock();
20
- transactionBlock.moveCall({
20
+ let transaction = new transactions_1.Transaction();
21
+ transaction.moveCall({
21
22
  target: `${constants_1.safuPackage}::view_function::get_vault_data_bcs`,
22
23
  typeArguments: [`${constants_1.frameworkPackage}::vault::TypusBidReceipt`],
23
24
  arguments: [
24
- transactionBlock.pure(constants_1.safuRegistryId),
25
- transactionBlock.pure(constants_1.vaultsIndexes),
25
+ transaction.object(constants_1.safuRegistryId),
26
+ transaction.pure(bcs_1.bcs.vector(bcs_1.bcs.U64).serialize(constants_1.vaultsIndexes)),
26
27
  ],
27
28
  });
28
29
  let results = (yield provider.devInspectTransactionBlock({
29
30
  sender: SENDER,
30
- transactionBlock,
31
+ transactionBlock: transaction,
31
32
  })).results;
32
33
  // console.log(JSON.stringify(results));
33
34
  // @ts-ignore
34
35
  let bytes = results[results.length - 1].returnValues[0][0];
35
36
  // console.log(JSON.stringify(bytes));
36
- let reader = new bcs_1.BcsReader(new Uint8Array(bytes));
37
+ let reader = new bcs_2.BcsReader(new Uint8Array(bytes));
37
38
  let result = {};
38
39
  reader.readVec((reader) => {
39
40
  reader.readULEB();
@@ -148,15 +149,15 @@ function AddressFromBytes(x) {
148
149
  }
149
150
  function getShareData(provider, owner) {
150
151
  return __awaiter(this, void 0, void 0, function* () {
151
- let transactionBlock = new transactions_1.TransactionBlock();
152
+ let transactionBlock = new transactions_1.Transaction();
152
153
  const indexes = constants_1.vaultsIndexes.slice();
153
154
  transactionBlock.moveCall({
154
155
  target: `${constants_1.safuPackage}::view_function::get_share_data_bcs`,
155
156
  typeArguments: [],
156
157
  arguments: [
157
- transactionBlock.pure(constants_1.safuRegistryId),
158
- transactionBlock.pure(owner),
159
- transactionBlock.pure(indexes),
158
+ transactionBlock.object(constants_1.safuRegistryId),
159
+ transactionBlock.pure.address(owner),
160
+ transactionBlock.pure(bcs_1.bcs.vector(bcs_1.bcs.U64).serialize(indexes)),
160
161
  ],
161
162
  });
162
163
  let results = (yield provider.devInspectTransactionBlock({
@@ -167,7 +168,7 @@ function getShareData(provider, owner) {
167
168
  // @ts-ignore
168
169
  let bytes = results[results.length - 1].returnValues[0][0];
169
170
  // console.log(JSON.stringify(bytes));
170
- let reader = new bcs_1.BcsReader(new Uint8Array(bytes));
171
+ let reader = new bcs_2.BcsReader(new Uint8Array(bytes));
171
172
  let result = {};
172
173
  reader.readVec((reader, i) => {
173
174
  reader.read8();
@@ -1 +1 @@
1
- {"version":3,"file":"safu_helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/typus/safu_helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,8DAA+D;AAE/D,2CAKqB;AACrB,qCAAwC;AAExC,MAAM,MAAM,GACV,oEAAoE,CAAC;AAEvE,SAAsB,YAAY,CAChC,QAAmB;;QAEnB,IAAI,gBAAgB,GAAG,IAAI,+BAAgB,EAAE,CAAC;QAC9C,gBAAgB,CAAC,QAAQ,CAAC;YACxB,MAAM,EAAE,GAAG,uBAAW,qCAAqC;YAC3D,aAAa,EAAE,CAAC,GAAG,4BAAgB,0BAA0B,CAAC;YAC9D,SAAS,EAAE;gBACT,gBAAgB,CAAC,IAAI,CAAC,0BAAc,CAAC;gBACrC,gBAAgB,CAAC,IAAI,CAAC,yBAAa,CAAC;aACrC;SACF,CAAC,CAAC;QACH,IAAI,OAAO,GAAG,CACZ,MAAM,QAAQ,CAAC,0BAA0B,CAAC;YACxC,MAAM,EAAE,MAAM;YACd,gBAAgB;SACjB,CAAC,CACH,CAAC,OAAO,CAAC;QACV,wCAAwC;QACxC,aAAa;QACb,IAAI,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3D,sCAAsC;QACtC,IAAI,MAAM,GAAG,IAAI,eAAS,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;QAClD,IAAI,MAAM,GAEN,EAAE,CAAC;QACP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OAAO,MAAM,CAAC,KAAK,EAAE,CAAC;oBACxB,CAAC,CAAC;iBACH,CAAC;YACJ,CAAC,CAAC,CAAC;YACH,IAAI,KAAK,GAAG,OAAO,CAAC,GAAG,EAAG,CAAC;YAC3B,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;QACxB,CAAC,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC;IAChB,CAAC;CAAA;AA5DD,oCA4DC"}
1
+ {"version":3,"file":"safu_helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/typus/safu_helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,2DAAuD;AAEvD,2CAKqB;AACrB,yCAAsC;AACtC,qCAAwC;AAExC,MAAM,MAAM,GACV,oEAAoE,CAAC;AAEvE,SAAsB,YAAY,CAChC,QAAmB;;QAEnB,IAAI,WAAW,GAAG,IAAI,0BAAW,EAAE,CAAC;QACpC,WAAW,CAAC,QAAQ,CAAC;YACnB,MAAM,EAAE,GAAG,uBAAW,qCAAqC;YAC3D,aAAa,EAAE,CAAC,GAAG,4BAAgB,0BAA0B,CAAC;YAC9D,SAAS,EAAE;gBACT,WAAW,CAAC,MAAM,CAAC,0BAAc,CAAC;gBAClC,WAAW,CAAC,IAAI,CAAC,SAAG,CAAC,MAAM,CAAC,SAAG,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,yBAAa,CAAC,CAAC;aAC/D;SACF,CAAC,CAAC;QACH,IAAI,OAAO,GAAG,CACZ,MAAM,QAAQ,CAAC,0BAA0B,CAAC;YACxC,MAAM,EAAE,MAAM;YACd,gBAAgB,EAAE,WAAW;SAC9B,CAAC,CACH,CAAC,OAAO,CAAC;QACV,wCAAwC;QACxC,aAAa;QACb,IAAI,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3D,sCAAsC;QACtC,IAAI,MAAM,GAA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AAM,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;wBACpC,OAAO,MAAM,CAAC,MAAM,EAAE,CAAC;oBACzB,CAAC,CAAC;oBACF,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;wBACpC,OAAO,MAAM,CAAC,KAAK,EAAE,CAAC;oBACxB,CAAC,CAAC;iBACH,CAAC;YACJ,CAAC,CAAC,CAAC;YACH,IAAI,KAAK,GAAG,OAAO,CAAC,GAAG,EAAG,CAAC;YAC3B,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;QACxB,CAAC,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC;IAChB,CAAC;CAAA;AA5DD,oCA4DC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const client_1 = require("@mysten/sui.js/client");
3
+ const client_1 = require("@mysten/sui/client");
4
4
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
5
5
  const getBasicAuthHeaders_1 = require("../misc/getBasicAuthHeaders");
6
6
  const constants_1 = require("./constants");
@@ -1 +1 @@
1
- {"version":3,"file":"getClientSui.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/clients/getClientSui.ts"],"names":[],"mappings":";;AAAA,kDAG+B;AAC/B,+DAAuD;AACvD,qEAAkE;AAClE,2CAA6C;AAG7C,SAAwB,YAAY;IAClC,MAAM,WAAW,GAAG,IAAA,0BAAc,EAAC,0BAAS,CAAC,GAAG,CAAC,CAAC;IAClD,MAAM,WAAW,GAAG,WAAW,CAAC,SAAS;QACvC,CAAC,CAAC,IAAA,yCAAmB,EACjB,WAAW,CAAC,SAAS,CAAC,QAAQ,EAC9B,WAAW,CAAC,SAAS,CAAC,QAAQ,CAC/B;QACH,CAAC,CAAC,SAAS,CAAC;IAEd,OAAO,IAAI,kBAAe,CAAC;QACzB,SAAS,EAAE,IAAI,yBAAgB,CAAC;YAC9B,GAAG,EAAE,WAAW,CAAC,GAAG;YACpB,GAAG,EAAE;gBACH,OAAO,EAAE,WAAW;aACrB;SACF,CAAC;KACH,CAAC,CAAC;AACL,CAAC;AAjBD,+BAiBC"}
1
+ {"version":3,"file":"getClientSui.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/clients/getClientSui.ts"],"names":[],"mappings":";;AAAA,+CAG4B;AAC5B,+DAAuD;AACvD,qEAAkE;AAClE,2CAA6C;AAG7C,SAAwB,YAAY;IAClC,MAAM,WAAW,GAAG,IAAA,0BAAc,EAAC,0BAAS,CAAC,GAAG,CAAC,CAAC;IAClD,MAAM,WAAW,GAAG,WAAW,CAAC,SAAS;QACvC,CAAC,CAAC,IAAA,yCAAmB,EACjB,WAAW,CAAC,SAAS,CAAC,QAAQ,EAC9B,WAAW,CAAC,SAAS,CAAC,QAAQ,CAC/B;QACH,CAAC,CAAC,SAAS,CAAC;IAEd,OAAO,IAAI,kBAAe,CAAC;QACzB,SAAS,EAAE,IAAI,yBAAgB,CAAC;YAC9B,GAAG,EAAE,WAAW,CAAC,GAAG;YACpB,GAAG,EAAE;gBACH,OAAO,EAAE,WAAW;aACrB;SACF,CAAC;KACH,CAAC,CAAC;AACL,CAAC;AAjBD,+BAiBC"}
@@ -1,5 +1,5 @@
1
1
  import { Aptos } from '@aptos-labs/ts-sdk';
2
- import { SuiClient as MystenSuiClient } from '@mysten/sui.js/client';
2
+ import { SuiClient as MystenSuiClient } from '@mysten/sui/client';
3
3
  import { Connection } from '@solana/web3.js';
4
4
  import { PublicClient } from 'viem';
5
5
  export type EvmClient = PublicClient;
@@ -1,4 +1,4 @@
1
- import { GetDynamicFieldObjectParams } from '@mysten/sui.js/client';
1
+ import { GetDynamicFieldObjectParams } from '@mysten/sui/client';
2
2
  import { SuiClient } from '../clients/types';
3
3
  import { ObjectResponse } from './types';
4
4
  export declare function getDynamicFieldObject<K>(client: SuiClient, params: GetDynamicFieldObjectParams): Promise<ObjectResponse<K>>;
@@ -1,4 +1,4 @@
1
- import { SuiObjectDataOptions } from '@mysten/sui.js/client';
1
+ import { SuiObjectDataOptions } from '@mysten/sui/client';
2
2
  import { SuiClient } from '../clients/types';
3
3
  import { ObjectResponse } from './types';
4
4
  export declare function getDynamicFieldObjects<K>(client: SuiClient, parentId: string, options?: SuiObjectDataOptions): Promise<ObjectResponse<K>[]>;
@@ -10,8 +10,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.getDynamicFieldObjects = void 0;
13
- const getDynamicFields_1 = require("./getDynamicFields");
14
13
  const multiGetObjects_1 = require("./multiGetObjects");
14
+ const getDynamicFields_1 = require("./getDynamicFields");
15
15
  function getDynamicFieldObjects(client, parentId, options) {
16
16
  return __awaiter(this, void 0, void 0, function* () {
17
17
  const res = yield (0, getDynamicFields_1.getDynamicFields)(client, parentId);
@@ -1 +1 @@
1
- {"version":3,"file":"getDynamicFieldObjects.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/sui/getDynamicFieldObjects.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,yDAAsD;AACtD,uDAAoD;AAEpD,SAAsB,sBAAsB,CAC1C,MAAiB,EACjB,QAAgB,EAChB,OAA8B;;QAE9B,MAAM,GAAG,GAAG,MAAM,IAAA,mCAAgB,EAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACrD,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;QACvC,OAAO,IAAA,iCAAe,EAAI,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;CAAA;AARD,wDAQC"}
1
+ {"version":3,"file":"getDynamicFieldObjects.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/sui/getDynamicFieldObjects.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,uDAAoD;AACpD,yDAAsD;AAEtD,SAAsB,sBAAsB,CAC1C,MAAiB,EACjB,QAAgB,EAChB,OAA8B;;QAE9B,MAAM,GAAG,GAAG,MAAM,IAAA,mCAAgB,EAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACrD,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;QACvC,OAAO,IAAA,iCAAe,EAAI,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;CAAA;AARD,wDAQC"}
@@ -0,0 +1,4 @@
1
+ import { SuiObjectDataOptions } from '@mysten/sui/client';
2
+ import { SuiClient } from '../clients/types';
3
+ import { ObjectResponse } from './types';
4
+ export declare function getDynamicFieldObjectsSafe<K>(client: SuiClient, parentId: string, options?: SuiObjectDataOptions): Promise<ObjectResponse<K>[]>;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.getDynamicFieldObjectsSafe = void 0;
13
+ const getDynamicFieldsSafe_1 = require("./getDynamicFieldsSafe");
14
+ const multiGetObjects_1 = require("./multiGetObjects");
15
+ function getDynamicFieldObjectsSafe(client, parentId, options) {
16
+ return __awaiter(this, void 0, void 0, function* () {
17
+ const res = yield (0, getDynamicFieldsSafe_1.getDynamicFieldsSafe)(client, parentId);
18
+ const ids = res.map((r) => r.objectId);
19
+ return (0, multiGetObjects_1.multiGetObjects)(client, ids, options);
20
+ });
21
+ }
22
+ exports.getDynamicFieldObjectsSafe = getDynamicFieldObjectsSafe;
23
+ //# sourceMappingURL=getDynamicFieldObjectsSafe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDynamicFieldObjectsSafe.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/sui/getDynamicFieldObjectsSafe.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,iEAA8D;AAC9D,uDAAoD;AAEpD,SAAsB,0BAA0B,CAC9C,MAAiB,EACjB,QAAgB,EAChB,OAA8B;;QAE9B,MAAM,GAAG,GAAG,MAAM,IAAA,2CAAoB,EAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACzD,MAAM,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;QACvC,OAAO,IAAA,iCAAe,EAAI,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;CAAA;AARD,gEAQC"}
@@ -1,3 +1,3 @@
1
- import { DynamicFieldInfo } from '@mysten/sui.js/client';
1
+ import { DynamicFieldInfo } from '@mysten/sui/client';
2
2
  import { SuiClient } from '../clients/types';
3
3
  export declare function getDynamicFields(client: SuiClient, parentId: string, objectOnly?: boolean): Promise<DynamicFieldInfo[]>;
@@ -10,10 +10,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.getDynamicFields = void 0;
13
- const maxPage = 25;
14
13
  function getDynamicFields(client, parentId, objectOnly) {
15
14
  return __awaiter(this, void 0, void 0, function* () {
16
- let page = 0;
17
15
  let hasNextPage = true;
18
16
  let cursor;
19
17
  const objects = [];
@@ -29,8 +27,7 @@ function getDynamicFields(client, parentId, objectOnly) {
29
27
  });
30
28
  cursor = res.nextCursor;
31
29
  hasNextPage = res.hasNextPage;
32
- page += 1;
33
- } while (hasNextPage && page <= maxPage);
30
+ } while (hasNextPage);
34
31
  return objects;
35
32
  });
36
33
  }
@@ -1 +1 @@
1
- {"version":3,"file":"getDynamicFields.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/sui/getDynamicFields.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,MAAM,OAAO,GAAG,EAAE,CAAC;AACnB,SAAsB,gBAAgB,CACpC,MAAiB,EACjB,QAAgB,EAChB,UAAoB;;QAEpB,IAAI,IAAI,GAAG,CAAC,CAAC;QACb,IAAI,WAAW,GAAG,IAAI,CAAC;QACvB,IAAI,MAAiC,CAAC;QAEtC,MAAM,OAAO,GAAuB,EAAE,CAAC;QACvC,GAAG,CAAC;YACF,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC;gBACxC,QAAQ;gBACR,MAAM;aACP,CAAC,CAAC;YACH,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;gBACrB,IAAI,UAAU,IAAI,CAAC,CAAC,IAAI,KAAK,eAAe;oBAAE,OAAO;gBACrD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC,CAAC,CAAC;YACH,MAAM,GAAG,GAAG,CAAC,UAAU,CAAC;YACxB,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC;YAC9B,IAAI,IAAI,CAAC,CAAC;QACZ,CAAC,QAAQ,WAAW,IAAI,IAAI,IAAI,OAAO,EAAE;QACzC,OAAO,OAAO,CAAC;IACjB,CAAC;CAAA;AAxBD,4CAwBC"}
1
+ {"version":3,"file":"getDynamicFields.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/sui/getDynamicFields.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,SAAsB,gBAAgB,CACpC,MAAiB,EACjB,QAAgB,EAChB,UAAoB;;QAEpB,IAAI,WAAW,GAAG,IAAI,CAAC;QACvB,IAAI,MAAiC,CAAC;QAEtC,MAAM,OAAO,GAAuB,EAAE,CAAC;QACvC,GAAG,CAAC;YACF,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC;gBACxC,QAAQ;gBACR,MAAM;aACP,CAAC,CAAC;YACH,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;gBACrB,IAAI,UAAU,IAAI,CAAC,CAAC,IAAI,KAAK,eAAe;oBAAE,OAAO;gBACrD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC,CAAC,CAAC;YACH,MAAM,GAAG,GAAG,CAAC,UAAU,CAAC;YACxB,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC;QAChC,CAAC,QAAQ,WAAW,EAAE;QACtB,OAAO,OAAO,CAAC;IACjB,CAAC;CAAA;AAtBD,4CAsBC"}
@@ -0,0 +1,3 @@
1
+ import { DynamicFieldInfo } from '@mysten/sui/client';
2
+ import { SuiClient } from '../clients/types';
3
+ export declare function getDynamicFieldsSafe(client: SuiClient, parentId: string, objectOnly?: boolean): Promise<DynamicFieldInfo[]>;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.getDynamicFieldsSafe = void 0;
13
+ const maxPage = 25;
14
+ function getDynamicFieldsSafe(client, parentId, objectOnly) {
15
+ return __awaiter(this, void 0, void 0, function* () {
16
+ let page = 0;
17
+ let hasNextPage = true;
18
+ let cursor;
19
+ const objects = [];
20
+ do {
21
+ const res = yield client.getDynamicFields({
22
+ parentId,
23
+ cursor,
24
+ });
25
+ res.data.forEach((o) => {
26
+ if (objectOnly && o.type !== 'DynamicObject')
27
+ return;
28
+ objects.push(o);
29
+ });
30
+ cursor = res.nextCursor;
31
+ hasNextPage = res.hasNextPage;
32
+ page += 1;
33
+ } while (hasNextPage && page <= maxPage);
34
+ return objects;
35
+ });
36
+ }
37
+ exports.getDynamicFieldsSafe = getDynamicFieldsSafe;
38
+ //# sourceMappingURL=getDynamicFieldsSafe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getDynamicFieldsSafe.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/sui/getDynamicFieldsSafe.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,MAAM,OAAO,GAAG,EAAE,CAAC;AACnB,SAAsB,oBAAoB,CACxC,MAAiB,EACjB,QAAgB,EAChB,UAAoB;;QAEpB,IAAI,IAAI,GAAG,CAAC,CAAC;QACb,IAAI,WAAW,GAAG,IAAI,CAAC;QACvB,IAAI,MAAiC,CAAC;QAEtC,MAAM,OAAO,GAAuB,EAAE,CAAC;QACvC,GAAG,CAAC;YACF,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,gBAAgB,CAAC;gBACxC,QAAQ;gBACR,MAAM;aACP,CAAC,CAAC;YACH,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;gBACrB,IAAI,UAAU,IAAI,CAAC,CAAC,IAAI,KAAK,eAAe;oBAAE,OAAO;gBACrD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC,CAAC,CAAC;YACH,MAAM,GAAG,GAAG,CAAC,UAAU,CAAC;YACxB,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC;YAC9B,IAAI,IAAI,CAAC,CAAC;QACZ,CAAC,QAAQ,WAAW,IAAI,IAAI,IAAI,OAAO,EAAE;QACzC,OAAO,OAAO,CAAC;IACjB,CAAC;CAAA;AAxBD,oDAwBC"}
@@ -1,4 +1,4 @@
1
- import { SuiObjectDataOptions } from '@mysten/sui.js/client';
1
+ import { SuiObjectDataOptions } from '@mysten/sui/client';
2
2
  import { SuiClient } from '../clients/types';
3
3
  import { ObjectResponse } from './types';
4
4
  export declare function getObject<K>(client: SuiClient, id: string, options?: SuiObjectDataOptions): Promise<ObjectResponse<K>>;
@@ -1,3 +1,3 @@
1
- import { SuiObjectRef } from '@mysten/sui.js/client';
1
+ import { SuiObjectRef } from '@mysten/sui/client';
2
2
  import { ObjectResponse } from './types';
3
3
  export declare function getObjectDeletedResponse<K>(resp: ObjectResponse<K>): SuiObjectRef | undefined;
@@ -1,4 +1,4 @@
1
- import { SuiObjectResponseQuery } from '@mysten/sui.js/client';
1
+ import { SuiObjectResponseQuery } from '@mysten/sui/client';
2
2
  import { SuiClient } from '../clients/types';
3
3
  import { ObjectResponse } from './types';
4
4
  export declare function getOwnedObjects<K>(client: SuiClient, owner: string, query?: SuiObjectResponseQuery): Promise<ObjectResponse<K>[]>;
@@ -1,3 +1,3 @@
1
- import { CoinBalance } from '@mysten/sui.js/dist/cjs/client';
1
+ import { CoinBalance } from '@mysten/sui/client';
2
2
  import { SuiClient } from '../clients/types';
3
3
  export declare function getMultipleBalances(client: SuiClient, owner: string, coinsTypes: string[]): Promise<CoinBalance[]>;
@@ -1,4 +1,4 @@
1
- import { SuiObjectDataOptions } from '@mysten/sui.js/client';
1
+ import { SuiObjectDataOptions } from '@mysten/sui/client';
2
2
  import { SuiClient } from '../clients/types';
3
3
  import { ObjectResponse } from './types';
4
4
  export declare function multiGetObjects<K>(client: SuiClient, ids: string[], options?: SuiObjectDataOptions): Promise<ObjectResponse<K>[]>;
@@ -1,4 +1,4 @@
1
- import { SuiObjectDataOptions } from '@mysten/sui.js/dist/cjs/client';
1
+ import { SuiObjectDataOptions } from '@mysten/sui/client';
2
2
  import { SuiClient } from '../clients/types';
3
3
  import { ObjectResponse } from './types';
4
4
  export declare function multipleGetDynamicFieldsObjects<K>(client: SuiClient, parentIds: string[], options?: SuiObjectDataOptions): Promise<ObjectResponse<K>[][]>;
@@ -1 +1 @@
1
- {"version":3,"file":"multipleGetDynamicFieldsObjects.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/sui/multipleGetDynamicFieldsObjects.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEA,oEAA4C;AAC5C,qEAAkE;AAGlE,SAAsB,+BAA+B,CACnD,MAAiB,EACjB,SAAmB,EACnB,OAA8B;;QAE9B,MAAM,MAAM,GAAG,MAAM,IAAA,oBAAU,EAC7B,SAAS,CAAC,GAAG,CACX,CAAC,QAAQ,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,IAAA,+CAAsB,EAAI,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CACzE,EACD,EAAE,CACH,CAAC;QAEF,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC5E,CAAC;CAAA;AAbD,0EAaC"}
1
+ {"version":3,"file":"multipleGetDynamicFieldsObjects.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/sui/multipleGetDynamicFieldsObjects.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEA,oEAA4C;AAE5C,qEAAkE;AAElE,SAAsB,+BAA+B,CACnD,MAAiB,EACjB,SAAmB,EACnB,OAA8B;;QAE9B,MAAM,MAAM,GAAG,MAAM,IAAA,oBAAU,EAC7B,SAAS,CAAC,GAAG,CACX,CAAC,QAAQ,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC,IAAA,+CAAsB,EAAI,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CACzE,EACD,EAAE,CACH,CAAC;QAEF,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC5E,CAAC;CAAA;AAbD,0EAaC"}
@@ -0,0 +1,4 @@
1
+ import { SuiObjectDataOptions } from '@mysten/sui/client';
2
+ import { SuiClient } from '../clients/types';
3
+ import { ObjectResponse } from './types';
4
+ export declare function multipleGetDynamicFieldsObjectsSafe<K>(client: SuiClient, parentIds: string[], options?: SuiObjectDataOptions): Promise<ObjectResponse<K>[][]>;
@@ -0,0 +1,25 @@
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
+ exports.multipleGetDynamicFieldsObjectsSafe = void 0;
16
+ const runInBatch_1 = __importDefault(require("../misc/runInBatch"));
17
+ const getDynamicFieldObjectsSafe_1 = require("./getDynamicFieldObjectsSafe");
18
+ function multipleGetDynamicFieldsObjectsSafe(client, parentIds, options) {
19
+ return __awaiter(this, void 0, void 0, function* () {
20
+ const result = yield (0, runInBatch_1.default)(parentIds.map((parentId) => () => (0, getDynamicFieldObjectsSafe_1.getDynamicFieldObjectsSafe)(client, parentId, options)), 10);
21
+ return result.flatMap((r) => (r.status === 'fulfilled' ? [r.value] : []));
22
+ });
23
+ }
24
+ exports.multipleGetDynamicFieldsObjectsSafe = multipleGetDynamicFieldsObjectsSafe;
25
+ //# sourceMappingURL=multipleGetDynamicFieldsObjectsSafe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"multipleGetDynamicFieldsObjectsSafe.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/sui/multipleGetDynamicFieldsObjectsSafe.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEA,oEAA4C;AAC5C,6EAA0E;AAG1E,SAAsB,mCAAmC,CACvD,MAAiB,EACjB,SAAmB,EACnB,OAA8B;;QAE9B,MAAM,MAAM,GAAG,MAAM,IAAA,oBAAU,EAC7B,SAAS,CAAC,GAAG,CACX,CAAC,QAAQ,EAAE,EAAE,CAAC,GAAG,EAAE,CACjB,IAAA,uDAA0B,EAAI,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAC3D,EACD,EAAE,CACH,CAAC;QAEF,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC5E,CAAC;CAAA;AAdD,kFAcC"}
@@ -1,4 +1,4 @@
1
- import { SuiEventFilter } from '@mysten/sui.js/client';
1
+ import { SuiEventFilter } from '@mysten/sui/client';
2
2
  import { SuiClient } from '../clients/types';
3
3
  import { Event } from './types';
4
4
  export declare function queryEvents<K>(client: SuiClient, query: SuiEventFilter): Promise<Event<K>[]>;
@@ -1,4 +1,4 @@
1
- import { SuiEventFilter } from '@mysten/sui.js/client';
1
+ import { SuiEventFilter } from '@mysten/sui/client';
2
2
  import { SuiClient } from '../clients/types';
3
3
  import { Event } from './types';
4
4
  export declare function queryEventsSafe<K>(client: SuiClient, query: SuiEventFilter): Promise<Event<K>[]>;
@@ -1,4 +1,4 @@
1
- import { SuiEvent, SuiObjectData, SuiObjectResponse } from '@mysten/sui.js/client';
1
+ import { SuiEvent, SuiObjectData, SuiObjectResponse } from '@mysten/sui/client';
2
2
  import { ID } from './structs/id';
3
3
  export type ParsedData<K> = {
4
4
  hasPublicTransfer: boolean;
@@ -26,3 +26,9 @@ export type AirdropWrapperNFT = {
26
26
  balance: string;
27
27
  id: ID;
28
28
  };
29
+ export type StructTag = {
30
+ address: string;
31
+ module: string;
32
+ name: string;
33
+ typeParams: (string | StructTag)[];
34
+ };