@scallop-io/sui-scallop-sdk 2.0.11 → 2.0.12

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.
package/dist/index.d.mts CHANGED
@@ -108,25 +108,9 @@ declare class ScallopCache {
108
108
  queryClient: QueryClient;
109
109
  suiKit: SuiKit;
110
110
  walletAddress: string;
111
- private tokensPerInterval;
112
- private interval;
113
- private tokens;
114
- private lastRefill;
111
+ private limiter;
115
112
  constructor(params?: ScallopCacheParams, instance?: ScallopCacheInstanceParams);
116
113
  private get client();
117
- private refill;
118
- private removeTokens;
119
- private callWithRateLimit;
120
- /**
121
- * @description Invalidate cache based on the refetchType parameter
122
- * @param refetchType Determines the type of queries to be refetched. Defaults to `active`.
123
- *
124
- * - `active`: Only queries that match the refetch predicate and are actively being rendered via useQuery and related functions will be refetched in the background.
125
- * - `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.
126
- * - `all`: All queries that match the refetch predicate will be refetched in the background.
127
- * - `none`: No queries will be refetched. Queries that match the refetch predicate will only be marked as invalid.
128
- */
129
- private retryFn;
130
114
  /**
131
115
  * @description Provides cache for inspectTxn of the SuiKit.
132
116
  * @param QueryInspectTxnParams
@@ -141,7 +125,7 @@ declare class ScallopCache {
141
125
  * @param QueryObjectParams
142
126
  * @returns Promise<SuiObjectResponse>
143
127
  */
144
- queryGetObject(objectId: string, options?: SuiObjectDataOptions): Promise<SuiObjectResponse | null>;
128
+ queryGetObject(objectId: string, options?: SuiObjectDataOptions): Promise<SuiObjectResponse>;
145
129
  /**
146
130
  * @description Provides cache for getObjects of the SuiKit.
147
131
  * @param objectIds
@@ -153,7 +137,7 @@ declare class ScallopCache {
153
137
  * @param input
154
138
  * @returns Promise<PaginatedObjectsResponse>
155
139
  */
156
- queryGetOwnedObjects(input: GetOwnedObjectsParams): Promise<_mysten_sui_dist_cjs_client.PaginatedObjectsResponse | null>;
140
+ queryGetOwnedObjects(input: GetOwnedObjectsParams): Promise<_mysten_sui_dist_cjs_client.PaginatedObjectsResponse>;
157
141
  queryGetDynamicFields(input: GetDynamicFieldsParams): Promise<DynamicFieldPage | null>;
158
142
  queryGetDynamicFieldObject(input: GetDynamicFieldObjectParams): Promise<SuiObjectResponse | null>;
159
143
  queryGetAllCoinBalances(owner: string): Promise<{
@@ -3042,6 +3026,7 @@ type ScallopCacheParams = {
3042
3026
  walletAddress?: string;
3043
3027
  cacheOptions?: QueryClientConfig;
3044
3028
  config?: ScallopCacheConfig;
3029
+ tokensPerSecond?: number;
3045
3030
  } & Partial<SuiKitParams>;
3046
3031
  type ScallopIndexerParams = ScallopCacheParams & {
3047
3032
  indexerApiUrl?: string;
package/dist/index.d.ts CHANGED
@@ -108,25 +108,9 @@ declare class ScallopCache {
108
108
  queryClient: QueryClient;
109
109
  suiKit: SuiKit;
110
110
  walletAddress: string;
111
- private tokensPerInterval;
112
- private interval;
113
- private tokens;
114
- private lastRefill;
111
+ private limiter;
115
112
  constructor(params?: ScallopCacheParams, instance?: ScallopCacheInstanceParams);
116
113
  private get client();
117
- private refill;
118
- private removeTokens;
119
- private callWithRateLimit;
120
- /**
121
- * @description Invalidate cache based on the refetchType parameter
122
- * @param refetchType Determines the type of queries to be refetched. Defaults to `active`.
123
- *
124
- * - `active`: Only queries that match the refetch predicate and are actively being rendered via useQuery and related functions will be refetched in the background.
125
- * - `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.
126
- * - `all`: All queries that match the refetch predicate will be refetched in the background.
127
- * - `none`: No queries will be refetched. Queries that match the refetch predicate will only be marked as invalid.
128
- */
129
- private retryFn;
130
114
  /**
131
115
  * @description Provides cache for inspectTxn of the SuiKit.
132
116
  * @param QueryInspectTxnParams
@@ -141,7 +125,7 @@ declare class ScallopCache {
141
125
  * @param QueryObjectParams
142
126
  * @returns Promise<SuiObjectResponse>
143
127
  */
144
- queryGetObject(objectId: string, options?: SuiObjectDataOptions): Promise<SuiObjectResponse | null>;
128
+ queryGetObject(objectId: string, options?: SuiObjectDataOptions): Promise<SuiObjectResponse>;
145
129
  /**
146
130
  * @description Provides cache for getObjects of the SuiKit.
147
131
  * @param objectIds
@@ -153,7 +137,7 @@ declare class ScallopCache {
153
137
  * @param input
154
138
  * @returns Promise<PaginatedObjectsResponse>
155
139
  */
156
- queryGetOwnedObjects(input: GetOwnedObjectsParams): Promise<_mysten_sui_dist_cjs_client.PaginatedObjectsResponse | null>;
140
+ queryGetOwnedObjects(input: GetOwnedObjectsParams): Promise<_mysten_sui_dist_cjs_client.PaginatedObjectsResponse>;
157
141
  queryGetDynamicFields(input: GetDynamicFieldsParams): Promise<DynamicFieldPage | null>;
158
142
  queryGetDynamicFieldObject(input: GetDynamicFieldObjectParams): Promise<SuiObjectResponse | null>;
159
143
  queryGetAllCoinBalances(owner: string): Promise<{
@@ -3042,6 +3026,7 @@ type ScallopCacheParams = {
3042
3026
  walletAddress?: string;
3043
3027
  cacheOptions?: QueryClientConfig;
3044
3028
  config?: ScallopCacheConfig;
3029
+ tokensPerSecond?: number;
3045
3030
  } & Partial<SuiKitParams>;
3046
3031
  type ScallopIndexerParams = ScallopCacheParams & {
3047
3032
  indexerApiUrl?: string;