@scallop-io/sui-scallop-sdk 1.3.0 → 1.3.1-alpha.2

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
@@ -394,7 +394,8 @@ import {
394
394
  var DEFAULT_CACHE_OPTIONS = {
395
395
  defaultOptions: {
396
396
  queries: {
397
- staleTime: 2e3
397
+ staleTime: 5e3,
398
+ gcTime: 5e3
398
399
  }
399
400
  }
400
401
  };
@@ -1042,6 +1043,7 @@ function withIndexerFallback(method) {
1042
1043
  }
1043
1044
 
1044
1045
  // src/models/scallopCache.ts
1046
+ var DEFAULT_GC_TIME = 5 * 1e3;
1045
1047
  var ScallopCache = class {
1046
1048
  constructor(suiKit, walletAddress, cacheOptions, tokenBucket, queryClient) {
1047
1049
  this.queryClient = queryClient ?? new QueryClient(cacheOptions ?? DEFAULT_CACHE_OPTIONS);
@@ -1092,7 +1094,8 @@ var ScallopCache = class {
1092
1094
  this.tokenBucket,
1093
1095
  () => this.suiKit.inspectTxn(txBlock)
1094
1096
  );
1095
- }
1097
+ },
1098
+ gcTime: DEFAULT_GC_TIME
1096
1099
  });
1097
1100
  return query;
1098
1101
  }
@@ -1113,7 +1116,8 @@ var ScallopCache = class {
1113
1116
  options
1114
1117
  })
1115
1118
  );
1116
- }
1119
+ },
1120
+ gcTime: DEFAULT_GC_TIME
1117
1121
  });
1118
1122
  }
1119
1123
  /**
@@ -1137,7 +1141,8 @@ var ScallopCache = class {
1137
1141
  this.tokenBucket,
1138
1142
  () => this.suiKit.getObjects(objectIds, options)
1139
1143
  );
1140
- }
1144
+ },
1145
+ gcTime: DEFAULT_GC_TIME
1141
1146
  });
1142
1147
  }
1143
1148
  /**
@@ -1153,7 +1158,8 @@ var ScallopCache = class {
1153
1158
  this.tokenBucket,
1154
1159
  () => this.client.getOwnedObjects(input)
1155
1160
  );
1156
- }
1161
+ },
1162
+ gcTime: DEFAULT_GC_TIME
1157
1163
  });
1158
1164
  }
1159
1165
  async queryGetDynamicFields(input) {
@@ -1164,7 +1170,8 @@ var ScallopCache = class {
1164
1170
  this.tokenBucket,
1165
1171
  () => this.client.getDynamicFields(input)
1166
1172
  );
1167
- }
1173
+ },
1174
+ gcTime: DEFAULT_GC_TIME
1168
1175
  });
1169
1176
  }
1170
1177
  async queryGetDynamicFieldObject(input) {
@@ -1175,7 +1182,8 @@ var ScallopCache = class {
1175
1182
  this.tokenBucket,
1176
1183
  () => this.client.getDynamicFieldObject(input)
1177
1184
  );
1178
- }
1185
+ },
1186
+ gcTime: DEFAULT_GC_TIME
1179
1187
  });
1180
1188
  }
1181
1189
  async queryGetAllCoinBalances(owner) {