@scallop-io/sui-scallop-sdk 0.44.28 → 0.45.0

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.
@@ -5,3 +5,4 @@ export * from './scallopBuilder';
5
5
  export * from './scallopQuery';
6
6
  export * from './scallopUtils';
7
7
  export * from './scallopIndexer';
8
+ export * from './scallopCache';
@@ -6,7 +6,12 @@ import { ScallopQuery } from './scallopQuery';
6
6
  import { ScallopUtils } from './scallopUtils';
7
7
  import type { ScallopParams } from '../types/';
8
8
  import { ScallopIndexer } from './scallopIndexer';
9
+ import { ScallopCache } from './scallopCache';
10
+ import { QueryClientConfig } from '@tanstack/query-core';
9
11
  /**
12
+ * @argument params - The parameters for the Scallop instance.
13
+ * @argument cacheOptions - The cache options for the QueryClient.
14
+ *
10
15
  * @description
11
16
  * The main instance that controls interaction with the Scallop contract.
12
17
  *
@@ -23,8 +28,9 @@ import { ScallopIndexer } from './scallopIndexer';
23
28
  export declare class Scallop {
24
29
  params: ScallopParams;
25
30
  suiKit: SuiKit;
31
+ cache: ScallopCache;
26
32
  private _address;
27
- constructor(params: ScallopParams);
33
+ constructor(params: ScallopParams, cacheOptions?: QueryClientConfig);
28
34
  /**
29
35
  * Get a scallop address instance that already has read addresses.
30
36
  *
@@ -1,5 +1,6 @@
1
1
  import type { NetworkType } from '@scallop-io/sui-kit';
2
2
  import type { ScallopAddressParams, AddressesInterface, AddressStringPath } from '../types';
3
+ import { ScallopCache } from './scallopCache';
3
4
  /**
4
5
  * @description
5
6
  * It provides methods for managing addresses.
@@ -13,12 +14,13 @@ import type { ScallopAddressParams, AddressesInterface, AddressStringPath } from
13
14
  */
14
15
  export declare class ScallopAddress {
15
16
  private readonly _auth?;
16
- private _requestClient;
17
+ private readonly _requestClient;
17
18
  private _id?;
18
19
  private _network;
19
20
  private _currentAddresses?;
20
21
  private _addressesMap;
21
- constructor(params: ScallopAddressParams);
22
+ private _cache;
23
+ constructor(params: ScallopAddressParams, cache?: ScallopCache);
22
24
  /**
23
25
  * Get addresses API id.
24
26
  *
@@ -6,6 +6,7 @@ import type { SuiTransactionBlockResponse } from '@mysten/sui.js/client';
6
6
  import type { TransactionBlock } from '@mysten/sui.js/transactions';
7
7
  import type { SuiTxBlock as SuiKitTxBlock } from '@scallop-io/sui-kit';
8
8
  import type { ScallopInstanceParams, ScallopBuilderParams, ScallopTxBlock, SupportMarketCoins, SupportAssetCoins } from '../types';
9
+ import { ScallopCache } from './scallopCache';
9
10
  /**
10
11
  * @description
11
12
  * It provides methods for operating the transaction block, making it more convenient to organize transaction combinations.
@@ -25,6 +26,7 @@ export declare class ScallopBuilder {
25
26
  query: ScallopQuery;
26
27
  utils: ScallopUtils;
27
28
  walletAddress: string;
29
+ cache: ScallopCache;
28
30
  constructor(params: ScallopBuilderParams, instance?: ScallopInstanceParams);
29
31
  /**
30
32
  * Request the scallop API to initialize data.
@@ -0,0 +1,71 @@
1
+ import { QueryClient, QueryClientConfig } from '@tanstack/query-core';
2
+ import { SuiTxArg } from '@scallop-io/sui-kit';
3
+ import { SuiKit } from '@scallop-io/sui-kit';
4
+ import type { SuiObjectResponse, SuiObjectDataOptions, SuiObjectData, PaginatedObjectsResponse, GetOwnedObjectsParams, DevInspectResults, GetDynamicFieldsParams, DynamicFieldPage, GetDynamicFieldObjectParams } from '@mysten/sui.js/client';
5
+ type QueryInspectTxnParams = {
6
+ queryTarget: string;
7
+ args: SuiTxArg[];
8
+ typeArgs?: any[];
9
+ };
10
+ /**
11
+ * @description
12
+ * It provides caching for moveCall, RPC Request, and API Request.
13
+ *
14
+ *
15
+ * @example
16
+ * ```typescript
17
+ * const scallopCache = new scallopCache(<parameters>);
18
+ * scallopCache.<indexer functions>();
19
+ * await scallopCache.<indexer async functions>();
20
+ * ```
21
+ */
22
+ export declare class ScallopCache {
23
+ readonly queryClient: QueryClient;
24
+ readonly _suiKit?: SuiKit;
25
+ constructor(cacheOptions?: QueryClientConfig, suiKit?: SuiKit);
26
+ private get suiKit();
27
+ /**
28
+ * @description Invalidate cache based on the refetchType parameter
29
+ * @param refetchType Determines the type of queries to be refetched. Defaults to `active`.
30
+ *
31
+ * - `active`: Only queries that match the refetch predicate and are actively being rendered via useQuery and related functions will be refetched in the background.
32
+ * - `inactive`: Only queries that match the refetch predicate and are NOT actively being rendered via useQuery and related functions will be refetched in the background.
33
+ * - `all`: All queries that match the refetch predicate will be refetched in the background.
34
+ * - `none`: No queries will be refetched. Queries that match the refetch predicate will only be marked as invalid.
35
+ */
36
+ invalidateAndRefetchAllCache(refetchType: 'all' | 'active' | 'inactive' | 'none'): Promise<void>;
37
+ /**
38
+ * @description Cache protocol config call for 60 seconds.
39
+ * @returns Promise<ProtocolConfig>
40
+ */
41
+ private getProtocolConfig;
42
+ /**
43
+ * @description Provides cache for inspectTxn of the SuiKit.
44
+ * @param QueryInspectTxnParams
45
+ * @param txBlock
46
+ * @returns Promise<DevInspectResults>
47
+ */
48
+ queryInspectTxn({ queryTarget, args, typeArgs, }: QueryInspectTxnParams): Promise<DevInspectResults>;
49
+ /**
50
+ * @description Provides cache for getObject of the SuiKit.
51
+ * @param objectId
52
+ * @param QueryObjectParams
53
+ * @returns Promise<SuiObjectResponse>
54
+ */
55
+ queryGetObject(objectId: string, options?: SuiObjectDataOptions): Promise<SuiObjectResponse>;
56
+ /**
57
+ * @description Provides cache for getObjects of the SuiKit.
58
+ * @param objectIds
59
+ * @returns Promise<SuiObjectData[]>
60
+ */
61
+ queryGetObjects(objectIds: string[], options?: SuiObjectDataOptions): Promise<SuiObjectData[]>;
62
+ /**
63
+ * @description Provides cache for getOwnedObjects of the SuiKit.
64
+ * @param input
65
+ * @returns Promise<PaginatedObjectsResponse>
66
+ */
67
+ queryGetOwnedObjects(input: GetOwnedObjectsParams): Promise<PaginatedObjectsResponse>;
68
+ queryGetDynamicFields(input: GetDynamicFieldsParams): Promise<DynamicFieldPage>;
69
+ queryGetDynamicFieldObject(input: GetDynamicFieldObjectParams): Promise<SuiObjectResponse>;
70
+ }
71
+ export {};
@@ -7,6 +7,7 @@ import type { SuiTransactionBlockResponse } from '@mysten/sui.js/client';
7
7
  import type { TransactionObjectArgument } from '@mysten/sui.js/transactions';
8
8
  import type { SuiObjectArg } from '@scallop-io/sui-kit';
9
9
  import type { ScallopClientFnReturnType, ScallopInstanceParams, ScallopClientParams, SupportPoolCoins, SupportCollateralCoins, SupportAssetCoins, SupportStakeCoins, SupportStakeMarketCoins, SupportBorrowIncentiveCoins, ScallopTxBlock } from '../types';
10
+ import { ScallopCache } from './scallopCache';
10
11
  /**
11
12
  * @description
12
13
  * It provides contract interaction operations for general users.
@@ -26,6 +27,7 @@ export declare class ScallopClient {
26
27
  builder: ScallopBuilder;
27
28
  query: ScallopQuery;
28
29
  utils: ScallopUtils;
30
+ cache: ScallopCache;
29
31
  walletAddress: string;
30
32
  constructor(params: ScallopClientParams, instance?: ScallopInstanceParams);
31
33
  /**
@@ -1,4 +1,4 @@
1
- import type { Market, MarketPools, MarketPool, MarketCollaterals, MarketCollateral, Spools, Spool, BorrowIncentivePools, BorrowIncentivePool, SupportPoolCoins, SupportCollateralCoins, SupportStakeMarketCoins, SupportBorrowIncentiveCoins, TotalValueLocked } from '../types';
1
+ import type { Market, MarketPools, MarketPool, MarketCollaterals, MarketCollateral, Spools, Spool, BorrowIncentivePools, BorrowIncentivePool, SupportPoolCoins, SupportCollateralCoins, SupportStakeMarketCoins, SupportBorrowIncentiveCoins, TotalValueLocked, ScallopQueryParams, ScallopParams, ScallopInstanceParams } from '../types';
2
2
  /**
3
3
  * @description
4
4
  * It provides methods to obtain sdk index data from mainnet.
@@ -12,8 +12,10 @@ import type { Market, MarketPools, MarketPool, MarketCollaterals, MarketCollater
12
12
  * ```
13
13
  */
14
14
  export declare class ScallopIndexer {
15
- private _requestClient;
16
- constructor();
15
+ private readonly _cache;
16
+ readonly params: ScallopQueryParams;
17
+ private readonly _requestClient;
18
+ constructor(params: ScallopParams, instance?: ScallopInstanceParams);
17
19
  /**
18
20
  * Get market index data.
19
21
  *
@@ -3,6 +3,7 @@ import { ScallopQueryParams, ScallopInstanceParams, SupportStakeMarketCoins, Sup
3
3
  import { ScallopAddress } from './scallopAddress';
4
4
  import { ScallopUtils } from './scallopUtils';
5
5
  import { ScallopIndexer } from './scallopIndexer';
6
+ import { ScallopCache } from './scallopCache';
6
7
  /**
7
8
  * @description
8
9
  * It provides methods for getting on-chain data from the Scallop contract.
@@ -21,6 +22,7 @@ export declare class ScallopQuery {
21
22
  address: ScallopAddress;
22
23
  utils: ScallopUtils;
23
24
  indexer: ScallopIndexer;
25
+ cache: ScallopCache;
24
26
  constructor(params: ScallopQueryParams, instance?: ScallopInstanceParams);
25
27
  /**
26
28
  * Request the scallop API to initialize data.
@@ -20,6 +20,7 @@ export declare class ScallopUtils {
20
20
  private _address;
21
21
  private _query;
22
22
  private _priceMap;
23
+ private _cache;
23
24
  constructor(params: ScallopUtilsParams, instance?: ScallopInstanceParams);
24
25
  /**
25
26
  * Request the scallop API to initialize data.
@@ -2,6 +2,7 @@ import type { SuiTransactionBlockResponse } from '@mysten/sui.js/client';
2
2
  import type { TransactionBlock } from '@mysten/sui.js/transactions';
3
3
  import type { SuiKit, SuiKitParams, NetworkType } from '@scallop-io/sui-kit';
4
4
  import type { ScallopAddress, ScallopQuery, ScallopUtils, ScallopBuilder } from '../models';
5
+ import { ScallopCache } from 'src/models/scallopCache';
5
6
  export type ScallopClientFnReturnType<T extends boolean> = T extends true ? SuiTransactionBlockResponse : TransactionBlock;
6
7
  export type ScallopInstanceParams = {
7
8
  suiKit?: SuiKit;
@@ -9,6 +10,7 @@ export type ScallopInstanceParams = {
9
10
  query?: ScallopQuery;
10
11
  utils?: ScallopUtils;
11
12
  builder?: ScallopBuilder;
13
+ cache: ScallopCache;
12
14
  };
13
15
  export type ScallopAddressParams = {
14
16
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scallop-io/sui-scallop-sdk",
3
- "version": "0.44.28",
3
+ "version": "0.45.0",
4
4
  "description": "Typescript sdk for interacting with Scallop contract on SUI",
5
5
  "keywords": [
6
6
  "sui",
@@ -46,6 +46,7 @@
46
46
  "@pythnetwork/pyth-sui-js": "^1.2.4",
47
47
  "@scallop-io/sui-kit": "^0.44.2",
48
48
  "@scure/bip39": "^1.2.1",
49
+ "@tanstack/query-core": "^5.28.0",
49
50
  "axios": "^1.6.0",
50
51
  "bignumber.js": "^9.1.2",
51
52
  "superstruct": "^1.0.3",
@@ -1,7 +1,6 @@
1
1
  import { TransactionBlock } from '@mysten/sui.js/transactions';
2
2
  import { SUI_CLOCK_OBJECT_ID } from '@mysten/sui.js/utils';
3
3
  import { SuiTxBlock as SuiKitTxBlock } from '@scallop-io/sui-kit';
4
- import { borrowIncentiveRewardCoins } from '../constants/enum';
5
4
  import {
6
5
  getObligations,
7
6
  getObligationLocked,
@@ -160,7 +159,8 @@ const generateBorrowIncentiveNormalMethod: GenerateBorrowIncentiveNormalMethod =
160
159
  coinName,
161
160
  rewardCoinName
162
161
  ) => {
163
- const rewardCoinNames = borrowIncentiveRewardCoins[coinName];
162
+ const rewardCoinNames =
163
+ builder.utils.getBorrowIncentiveRewardCoinName(coinName);
164
164
  if (rewardCoinNames.includes(rewardCoinName) === false) {
165
165
  throw new Error(`Invalid reward coin name ${rewardCoinName}`);
166
166
  }
@@ -0,0 +1,15 @@
1
+ import { QueryClientConfig } from '@tanstack/query-core';
2
+
3
+ /**
4
+ * Default cache options for the QueryClient.
5
+ * @type {QueryClientConfig}
6
+ * @description Default cache options for the QueryClient
7
+ * We set the default to 5s to prevent duplicate requests from being requested (e.g. query MarketObject, etc.)
8
+ */
9
+ export const DEFAULT_CACHE_OPTIONS: QueryClientConfig = {
10
+ defaultOptions: {
11
+ queries: {
12
+ staleTime: 3000,
13
+ },
14
+ },
15
+ };
@@ -5,3 +5,4 @@ export * from './scallopBuilder';
5
5
  export * from './scallopQuery';
6
6
  export * from './scallopUtils';
7
7
  export * from './scallopIndexer';
8
+ export * from './scallopCache';
@@ -7,8 +7,14 @@ import { ScallopUtils } from './scallopUtils';
7
7
  import { ADDRESSES_ID } from '../constants';
8
8
  import type { ScallopParams } from '../types/';
9
9
  import { ScallopIndexer } from './scallopIndexer';
10
+ import { ScallopCache } from './scallopCache';
11
+ import { QueryClientConfig } from '@tanstack/query-core';
12
+ import { DEFAULT_CACHE_OPTIONS } from 'src/constants/cache';
10
13
 
11
14
  /**
15
+ * @argument params - The parameters for the Scallop instance.
16
+ * @argument cacheOptions - The cache options for the QueryClient.
17
+ *
12
18
  * @description
13
19
  * The main instance that controls interaction with the Scallop contract.
14
20
  *
@@ -25,16 +31,24 @@ import { ScallopIndexer } from './scallopIndexer';
25
31
  export class Scallop {
26
32
  public params: ScallopParams;
27
33
  public suiKit: SuiKit;
34
+ public cache: ScallopCache;
28
35
 
29
36
  private _address: ScallopAddress;
30
37
 
31
- public constructor(params: ScallopParams) {
38
+ public constructor(params: ScallopParams, cacheOptions?: QueryClientConfig) {
32
39
  this.params = params;
33
40
  this.suiKit = new SuiKit(params);
34
- this._address = new ScallopAddress({
35
- id: params?.addressesId || ADDRESSES_ID,
36
- network: params?.networkType,
37
- });
41
+ this.cache = new ScallopCache(
42
+ cacheOptions ?? DEFAULT_CACHE_OPTIONS,
43
+ this.suiKit
44
+ );
45
+ this._address = new ScallopAddress(
46
+ {
47
+ id: params?.addressesId || ADDRESSES_ID,
48
+ network: params?.networkType,
49
+ },
50
+ this.cache
51
+ );
38
52
  }
39
53
 
40
54
  /**
@@ -59,6 +73,7 @@ export class Scallop {
59
73
  const scallopBuilder = new ScallopBuilder(this.params, {
60
74
  suiKit: this.suiKit,
61
75
  address: this._address,
76
+ cache: this.cache,
62
77
  });
63
78
 
64
79
  return scallopBuilder;
@@ -74,7 +89,7 @@ export class Scallop {
74
89
  if (!this._address.getAddresses()) await this._address.read();
75
90
  const scallopClient = new ScallopClient(
76
91
  { ...this.params, walletAddress },
77
- { suiKit: this.suiKit, address: this._address }
92
+ { suiKit: this.suiKit, address: this._address, cache: this.cache }
78
93
  );
79
94
 
80
95
  return scallopClient;
@@ -90,6 +105,7 @@ export class Scallop {
90
105
  const scallopQuery = new ScallopQuery(this.params, {
91
106
  suiKit: this.suiKit,
92
107
  address: this._address,
108
+ cache: this.cache,
93
109
  });
94
110
 
95
111
  return scallopQuery;
@@ -101,7 +117,9 @@ export class Scallop {
101
117
  * @return Scallop Indexer.
102
118
  */
103
119
  public async createScallopIndexer() {
104
- const scallopIndexer = new ScallopIndexer();
120
+ const scallopIndexer = new ScallopIndexer(this.params, {
121
+ cache: this.cache,
122
+ });
105
123
 
106
124
  return scallopIndexer;
107
125
  }
@@ -116,6 +134,7 @@ export class Scallop {
116
134
  const scallopUtils = new ScallopUtils(this.params, {
117
135
  suiKit: this.suiKit,
118
136
  address: this._address,
137
+ cache: this.cache,
119
138
  });
120
139
 
121
140
  return scallopUtils;
@@ -1,4 +1,3 @@
1
- import axios, { AxiosInstance } from 'axios';
2
1
  import { API_BASE_URL } from '../constants';
3
2
  import type { NetworkType } from '@scallop-io/sui-kit';
4
3
  import type {
@@ -6,6 +5,9 @@ import type {
6
5
  AddressesInterface,
7
6
  AddressStringPath,
8
7
  } from '../types';
8
+ import { ScallopCache } from './scallopCache';
9
+ import { DEFAULT_CACHE_OPTIONS } from 'src/constants/cache';
10
+ import axios, { AxiosInstance } from 'axios';
9
11
 
10
12
  const EMPTY_ADDRESSES: AddressesInterface = {
11
13
  core: {
@@ -270,20 +272,17 @@ const EMPTY_ADDRESSES: AddressesInterface = {
270
272
  */
271
273
  export class ScallopAddress {
272
274
  private readonly _auth?: string;
275
+ private readonly _requestClient: AxiosInstance;
273
276
 
274
- private _requestClient: AxiosInstance;
275
277
  private _id?: string;
276
278
  private _network: NetworkType;
277
279
  private _currentAddresses?: AddressesInterface;
278
280
  private _addressesMap: Map<NetworkType, AddressesInterface>;
281
+ private _cache: ScallopCache;
279
282
 
280
- public constructor(params: ScallopAddressParams) {
283
+ public constructor(params: ScallopAddressParams, cache?: ScallopCache) {
281
284
  const { id, auth, network } = params;
282
-
283
- if (auth) this._auth = auth;
284
- this._id = id;
285
- this._network = network || 'mainnet';
286
- this._addressesMap = new Map();
285
+ this._cache = cache ?? new ScallopCache(DEFAULT_CACHE_OPTIONS);
287
286
  this._requestClient = axios.create({
288
287
  baseURL: API_BASE_URL,
289
288
  headers: {
@@ -292,6 +291,10 @@ export class ScallopAddress {
292
291
  },
293
292
  timeout: 30000,
294
293
  });
294
+ if (auth) this._auth = auth;
295
+ this._id = id;
296
+ this._network = network || 'mainnet';
297
+ this._addressesMap = new Map();
295
298
  }
296
299
 
297
300
  /**
@@ -437,7 +440,7 @@ export class ScallopAddress {
437
440
  this._addressesMap.clear();
438
441
  this.setAddresses(targetAddresses, targetNetwork);
439
442
  const response = await this._requestClient.post(
440
- `${API_BASE_URL}/addresses`,
443
+ `/addresses`,
441
444
  JSON.stringify({ ...Object.fromEntries(this._addressesMap), memo }),
442
445
  {
443
446
  headers: {
@@ -475,14 +478,16 @@ export class ScallopAddress {
475
478
  public async read(id?: string) {
476
479
  const addressesId = id || this._id || undefined;
477
480
  if (addressesId !== undefined) {
478
- const response = await this._requestClient.get(
479
- `${API_BASE_URL}/addresses/${addressesId}`,
480
- {
481
- headers: {
482
- 'Content-Type': 'application/json',
483
- },
484
- }
485
- );
481
+ const response = await this._cache.queryClient.fetchQuery({
482
+ queryKey: ['api-getAddresses', addressesId],
483
+ queryFn: async () => {
484
+ return await this._requestClient.get(`/addresses/${addressesId}`, {
485
+ headers: {
486
+ 'Content-Type': 'application/json',
487
+ },
488
+ });
489
+ },
490
+ });
486
491
 
487
492
  if (response.status === 200) {
488
493
  for (const [network, addresses] of Object.entries<AddressesInterface>(
@@ -548,7 +553,7 @@ export class ScallopAddress {
548
553
  }
549
554
  this.setAddresses(targetAddresses, targetNetwork);
550
555
  const response = await this._requestClient.put(
551
- `${API_BASE_URL}/addresses/${targetId}`,
556
+ `/addresses/${targetId}`,
552
557
  JSON.stringify({ ...Object.fromEntries(this._addressesMap), memo }),
553
558
  {
554
559
  headers: {
@@ -592,7 +597,7 @@ export class ScallopAddress {
592
597
  throw Error('Require specific addresses id to be deleted.');
593
598
  if (apiKey !== undefined) {
594
599
  const response = await this._requestClient.delete(
595
- `${API_BASE_URL}/addresses/${targetId}`,
600
+ `/addresses/${targetId}`,
596
601
  {
597
602
  headers: {
598
603
  'Content-Type': 'application/json',
@@ -15,6 +15,8 @@ import type {
15
15
  SupportMarketCoins,
16
16
  SupportAssetCoins,
17
17
  } from '../types';
18
+ import { ScallopCache } from './scallopCache';
19
+ import { DEFAULT_CACHE_OPTIONS } from 'src/constants/cache';
18
20
 
19
21
  /**
20
22
  * @description
@@ -36,6 +38,7 @@ export class ScallopBuilder {
36
38
  public query: ScallopQuery;
37
39
  public utils: ScallopUtils;
38
40
  public walletAddress: string;
41
+ public cache: ScallopCache;
39
42
 
40
43
  public constructor(
41
44
  params: ScallopBuilderParams,
@@ -43,17 +46,23 @@ export class ScallopBuilder {
43
46
  ) {
44
47
  this.params = params;
45
48
  this.suiKit = instance?.suiKit ?? new SuiKit(params);
49
+ this.cache =
50
+ instance?.cache ?? new ScallopCache(DEFAULT_CACHE_OPTIONS, this.suiKit);
46
51
  this.address =
47
52
  instance?.address ??
48
- new ScallopAddress({
49
- id: params?.addressesId || ADDRESSES_ID,
50
- network: params?.networkType,
51
- });
53
+ new ScallopAddress(
54
+ {
55
+ id: params?.addressesId || ADDRESSES_ID,
56
+ network: params?.networkType,
57
+ },
58
+ this.cache
59
+ );
52
60
  this.query =
53
61
  instance?.query ??
54
62
  new ScallopQuery(params, {
55
63
  suiKit: this.suiKit,
56
64
  address: this.address,
65
+ cache: this.cache,
57
66
  });
58
67
  this.utils =
59
68
  instance?.utils ??
@@ -61,6 +70,7 @@ export class ScallopBuilder {
61
70
  suiKit: this.suiKit,
62
71
  address: this.address,
63
72
  query: this.query,
73
+ cache: this.cache,
64
74
  });
65
75
  this.walletAddress = normalizeSuiAddress(
66
76
  params?.walletAddress || this.suiKit.currentAddress()