@tinycloud/web-sdk 3.11.0 → 3.11.1-beta.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.
@@ -181,6 +181,11 @@ export interface SessionRestoreResult {
181
181
  session?: ClientSession;
182
182
  error?: Error;
183
183
  }
184
+ /** A session storage that can fence a signed-out session (BrowserSessionStorage); others rely on the in-memory block. */
185
+ export type FenceCapableStorage = ISessionStorage & {
186
+ markSignedOut?: (address: string, signature: string) => void;
187
+ isSignedOut?: (address: string, signature: string) => boolean;
188
+ };
184
189
  /**
185
190
  * Result of receiving a share link.
186
191
  */
@@ -231,6 +236,7 @@ export declare class TinyCloudWeb {
231
236
  private signOutInFlight;
232
237
  private persistedRestoreBlocked;
233
238
  private signOutCleanupFailed;
239
+ private remoteSignOutTimeoutMs;
234
240
  private readonly pendingRestoreAddresses;
235
241
  private _secrets;
236
242
  private _credentialsService?;
@@ -399,6 +405,12 @@ export declare class TinyCloudWeb {
399
405
  * unavailable until a fresh sign-in; prior persisted sessions cannot restore.
400
406
  */
401
407
  signOut: () => Promise<void>;
408
+ /**
409
+ * Clears the stored session for `address` only while it is the signing-out session (`ownSignature`); a newer
410
+ * session saved for the same address is left alone. The session is fenced first, so that a clear that fails
411
+ * cannot let a reload restore it.
412
+ */
413
+ private clearOwnPersistedSession;
402
414
  session: () => ClientSession | undefined;
403
415
  address: () => string | undefined;
404
416
  chainId: () => number | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinycloud/web-sdk",
3
- "version": "3.11.0",
3
+ "version": "3.11.1-beta.0",
4
4
  "description": "A set of tools and utilities to help you build your app with TinyCloud.",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -66,7 +66,7 @@
66
66
  "@multiformats/multiaddr": "^13.0.1",
67
67
  "@multiformats/multiaddr-to-uri": "^12.0.0",
68
68
  "@noble/curves": "^1.9.7",
69
- "@tinycloud/node-sdk": "3.11.0",
69
+ "@tinycloud/node-sdk": "3.11.1-beta.0",
70
70
  "@tinycloud/replica": "0.4.4",
71
71
  "@tinycloud/sdk-core": "3.11.0",
72
72
  "@tinycloud/share-envelope": "1.5.0",