@sonarwatch/portfolio-plugins 0.12.183 → 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 +1534 -1530
  2. package/README.md +3 -3
  3. package/package.json +8 -8
  4. package/src/plugins/balancer/helpers/pools.js +21 -21
  5. package/src/plugins/cetus/dcaFetcher.js +2 -2
  6. package/src/plugins/cetus/dcaFetcher.js.map +1 -1
  7. package/src/plugins/cetus/helpers.js +1 -1
  8. package/src/plugins/cetus/helpers.js.map +1 -1
  9. package/src/plugins/cetus/limitFetcher.js +4 -4
  10. package/src/plugins/cetus/limitFetcher.js.map +1 -1
  11. package/src/plugins/deepbook/helpers.js +4 -4
  12. package/src/plugins/deepbook/helpers.js.map +1 -1
  13. package/src/plugins/haedal/vaultFetcher.js +2 -2
  14. package/src/plugins/haedal/vaultFetcher.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/scallop/lendingsFetcher.js +3 -5
  20. package/src/plugins/scallop/lendingsFetcher.js.map +1 -1
  21. package/src/plugins/scallop/obligationsFetcher.js +1 -1
  22. package/src/plugins/scallop/obligationsFetcher.js.map +1 -1
  23. package/src/plugins/scallop/poolsJob.js +1 -1
  24. package/src/plugins/scallop/poolsJob.js.map +1 -1
  25. package/src/plugins/scallop/types/coin.d.ts +1 -1
  26. package/src/plugins/sushiswap/helpers.js +24 -24
  27. package/src/plugins/tokens/fetchers/sui-nfts.js +2 -2
  28. package/src/plugins/tokens/fetchers/sui-nfts.js.map +1 -1
  29. package/src/plugins/typus/constants.js +30 -5
  30. package/src/plugins/typus/constants.js.map +1 -1
  31. package/src/plugins/typus/helpers.js +5 -6
  32. package/src/plugins/typus/helpers.js.map +1 -1
  33. package/src/plugins/typus/safu_helpers.js +14 -13
  34. package/src/plugins/typus/safu_helpers.js.map +1 -1
  35. package/src/plugins/uniswap-v2/helpers.js +22 -22
  36. package/src/plugins/zeta/airdropFetcher.js +14 -14
  37. package/src/utils/clients/getClientSui.js +1 -1
  38. package/src/utils/clients/getClientSui.js.map +1 -1
  39. package/src/utils/clients/types.d.ts +1 -1
  40. package/src/utils/sei/constants.js +8 -8
  41. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
  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
@@ -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
+ };