@scallop-io/sui-scallop-sdk 1.3.1-alpha.1 → 1.3.1

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.js CHANGED
@@ -1122,13 +1122,10 @@ function withIndexerFallback(method) {
1122
1122
  }
1123
1123
 
1124
1124
  // src/models/scallopCache.ts
1125
+ var DEFAULT_GC_TIME = 5 * 1e3;
1125
1126
  var ScallopCache = class {
1126
1127
  constructor(suiKit, walletAddress, cacheOptions, tokenBucket, queryClient) {
1127
1128
  this.queryClient = queryClient ?? new import_query_core.QueryClient(cacheOptions ?? DEFAULT_CACHE_OPTIONS);
1128
- if (queryClient && cacheOptions) {
1129
- if (cacheOptions.defaultOptions)
1130
- this.queryClient.setDefaultOptions(cacheOptions.defaultOptions);
1131
- }
1132
1129
  this._suiKit = suiKit;
1133
1130
  this.tokenBucket = tokenBucket ?? new TokenBucket(DEFAULT_TOKENS_PER_INTERVAL, DEFAULT_INTERVAL_IN_MS);
1134
1131
  this.walletAddress = walletAddress ?? suiKit.currentAddress();
@@ -1176,7 +1173,8 @@ var ScallopCache = class {
1176
1173
  this.tokenBucket,
1177
1174
  () => this.suiKit.inspectTxn(txBlock)
1178
1175
  );
1179
- }
1176
+ },
1177
+ gcTime: DEFAULT_GC_TIME
1180
1178
  });
1181
1179
  return query;
1182
1180
  }
@@ -1197,7 +1195,8 @@ var ScallopCache = class {
1197
1195
  options
1198
1196
  })
1199
1197
  );
1200
- }
1198
+ },
1199
+ gcTime: DEFAULT_GC_TIME
1201
1200
  });
1202
1201
  }
1203
1202
  /**
@@ -1221,7 +1220,8 @@ var ScallopCache = class {
1221
1220
  this.tokenBucket,
1222
1221
  () => this.suiKit.getObjects(objectIds, options)
1223
1222
  );
1224
- }
1223
+ },
1224
+ gcTime: DEFAULT_GC_TIME
1225
1225
  });
1226
1226
  }
1227
1227
  /**
@@ -1237,7 +1237,8 @@ var ScallopCache = class {
1237
1237
  this.tokenBucket,
1238
1238
  () => this.client.getOwnedObjects(input)
1239
1239
  );
1240
- }
1240
+ },
1241
+ gcTime: DEFAULT_GC_TIME
1241
1242
  });
1242
1243
  }
1243
1244
  async queryGetDynamicFields(input) {
@@ -1248,7 +1249,8 @@ var ScallopCache = class {
1248
1249
  this.tokenBucket,
1249
1250
  () => this.client.getDynamicFields(input)
1250
1251
  );
1251
- }
1252
+ },
1253
+ gcTime: DEFAULT_GC_TIME
1252
1254
  });
1253
1255
  }
1254
1256
  async queryGetDynamicFieldObject(input) {
@@ -1259,7 +1261,8 @@ var ScallopCache = class {
1259
1261
  this.tokenBucket,
1260
1262
  () => this.client.getDynamicFieldObject(input)
1261
1263
  );
1262
- }
1264
+ },
1265
+ gcTime: DEFAULT_GC_TIME
1263
1266
  });
1264
1267
  }
1265
1268
  async queryGetAllCoinBalances(owner) {