@tinycloud/web-sdk 3.12.0-beta.24 → 3.12.0-beta.26

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.
@@ -35,9 +35,9 @@ export declare const SessionConfigSchema: z.ZodObject<{
35
35
  }, "strip", z.ZodTypeAny, {
36
36
  domain?: string;
37
37
  actions?: Record<string, Record<string, string[]>>;
38
- spaceId?: string;
39
- address?: string;
40
38
  chainId?: number;
39
+ address?: string;
40
+ spaceId?: string;
41
41
  issuedAt?: string;
42
42
  jwk?: Record<string, unknown>;
43
43
  notBefore?: string;
@@ -46,9 +46,9 @@ export declare const SessionConfigSchema: z.ZodObject<{
46
46
  }, {
47
47
  domain?: string;
48
48
  actions?: Record<string, Record<string, string[]>>;
49
- spaceId?: string;
50
- address?: string;
51
49
  chainId?: number;
50
+ address?: string;
51
+ spaceId?: string;
52
52
  issuedAt?: string;
53
53
  jwk?: Record<string, unknown>;
54
54
  notBefore?: string;
@@ -112,16 +112,16 @@ export declare const HostConfigSchema: z.ZodObject<{
112
112
  peerId: z.ZodString;
113
113
  }, "strip", z.ZodTypeAny, {
114
114
  domain?: string;
115
- spaceId?: string;
116
- address?: string;
117
115
  chainId?: number;
116
+ address?: string;
117
+ spaceId?: string;
118
118
  issuedAt?: string;
119
119
  peerId?: string;
120
120
  }, {
121
121
  domain?: string;
122
- spaceId?: string;
123
- address?: string;
124
122
  chainId?: number;
123
+ address?: string;
124
+ spaceId?: string;
125
125
  issuedAt?: string;
126
126
  peerId?: string;
127
127
  }>;
@@ -0,0 +1,13 @@
1
+ import { type PersistedSessionData } from "@tinycloud/sdk-core";
2
+ export declare class SessionAccountMismatchError extends Error {
3
+ readonly code = "ACCOUNT_MISMATCH";
4
+ constructor();
5
+ }
6
+ /** Address-only callers retain their existing chain selection; DID/CAIP callers pin it. */
7
+ export declare function requestedRestoreAccount(account: string): {
8
+ address: string;
9
+ chainId?: number;
10
+ };
11
+ /** Bind the request to the verified CACAO owner before restoring any session state. */
12
+ export declare function assertRequestedRestoreAccount(requested: string, session: Pick<PersistedSessionData, "address" | "chainId" | "tinycloudSession">): Promise<void>;
13
+ //# sourceMappingURL=restoreAccount.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinycloud/web-sdk",
3
- "version": "3.12.0-beta.24",
3
+ "version": "3.12.0-beta.26",
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",
@@ -67,7 +67,7 @@
67
67
  "@multiformats/multiaddr": "^13.0.1",
68
68
  "@multiformats/multiaddr-to-uri": "^12.0.0",
69
69
  "@noble/curves": "^1.9.7",
70
- "@tinycloud/node-sdk": "3.12.0-beta.24",
70
+ "@tinycloud/node-sdk": "3.12.0-beta.26",
71
71
  "@tinycloud/replica": "0.4.5-beta.6",
72
72
  "@tinycloud/sdk-core": "3.12.0-beta.24",
73
73
  "@tinycloud/share-envelope": "1.6.0-beta.1",