@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.mjs CHANGED
@@ -1043,13 +1043,10 @@ function withIndexerFallback(method) {
1043
1043
  }
1044
1044
 
1045
1045
  // src/models/scallopCache.ts
1046
+ var DEFAULT_GC_TIME = 5 * 1e3;
1046
1047
  var ScallopCache = class {
1047
1048
  constructor(suiKit, walletAddress, cacheOptions, tokenBucket, queryClient) {
1048
1049
  this.queryClient = queryClient ?? new QueryClient(cacheOptions ?? DEFAULT_CACHE_OPTIONS);
1049
- if (queryClient && cacheOptions) {
1050
- if (cacheOptions.defaultOptions)
1051
- this.queryClient.setDefaultOptions(cacheOptions.defaultOptions);
1052
- }
1053
1050
  this._suiKit = suiKit;
1054
1051
  this.tokenBucket = tokenBucket ?? new TokenBucket(DEFAULT_TOKENS_PER_INTERVAL, DEFAULT_INTERVAL_IN_MS);
1055
1052
  this.walletAddress = walletAddress ?? suiKit.currentAddress();
@@ -1097,7 +1094,8 @@ var ScallopCache = class {
1097
1094
  this.tokenBucket,
1098
1095
  () => this.suiKit.inspectTxn(txBlock)
1099
1096
  );
1100
- }
1097
+ },
1098
+ gcTime: DEFAULT_GC_TIME
1101
1099
  });
1102
1100
  return query;
1103
1101
  }
@@ -1118,7 +1116,8 @@ var ScallopCache = class {
1118
1116
  options
1119
1117
  })
1120
1118
  );
1121
- }
1119
+ },
1120
+ gcTime: DEFAULT_GC_TIME
1122
1121
  });
1123
1122
  }
1124
1123
  /**
@@ -1142,7 +1141,8 @@ var ScallopCache = class {
1142
1141
  this.tokenBucket,
1143
1142
  () => this.suiKit.getObjects(objectIds, options)
1144
1143
  );
1145
- }
1144
+ },
1145
+ gcTime: DEFAULT_GC_TIME
1146
1146
  });
1147
1147
  }
1148
1148
  /**
@@ -1158,7 +1158,8 @@ var ScallopCache = class {
1158
1158
  this.tokenBucket,
1159
1159
  () => this.client.getOwnedObjects(input)
1160
1160
  );
1161
- }
1161
+ },
1162
+ gcTime: DEFAULT_GC_TIME
1162
1163
  });
1163
1164
  }
1164
1165
  async queryGetDynamicFields(input) {
@@ -1169,7 +1170,8 @@ var ScallopCache = class {
1169
1170
  this.tokenBucket,
1170
1171
  () => this.client.getDynamicFields(input)
1171
1172
  );
1172
- }
1173
+ },
1174
+ gcTime: DEFAULT_GC_TIME
1173
1175
  });
1174
1176
  }
1175
1177
  async queryGetDynamicFieldObject(input) {
@@ -1180,7 +1182,8 @@ var ScallopCache = class {
1180
1182
  this.tokenBucket,
1181
1183
  () => this.client.getDynamicFieldObject(input)
1182
1184
  );
1183
- }
1185
+ },
1186
+ gcTime: DEFAULT_GC_TIME
1184
1187
  });
1185
1188
  }
1186
1189
  async queryGetAllCoinBalances(owner) {