@tinycloud/web-sdk 3.12.0-beta.20 → 3.12.0-beta.21
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/adapters/BrowserSessionStorage.d.ts +10 -3
- package/dist/adapters/BrowserWasmBindings.d.ts +2 -0
- package/dist/delegations-issued.cjs +1 -1
- package/dist/delegations-issued.mjs +1 -1
- package/dist/delegations-renewal-entry.d.ts +3 -0
- package/dist/delegations-renewal.cjs +2 -0
- package/dist/delegations-renewal.cjs.LICENSE.txt +21 -0
- package/dist/delegations-renewal.mjs +2 -0
- package/dist/delegations-renewal.mjs.LICENSE.txt +21 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/modules/Storage/tinycloud/module.d.ts +1 -0
- package/dist/modules/tcw.d.ts +11 -0
- package/package.json +4 -4
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ISessionStorage, PersistedSessionData } from "@tinycloud/sdk-core";
|
|
2
2
|
import type { PortableDelegation } from "@tinycloud/node-sdk/core";
|
|
3
|
-
export type BrowserSessionLoadStatus = "loaded" | "missing" | "expired" | "corrupt" | "storage-unavailable";
|
|
3
|
+
export type BrowserSessionLoadStatus = "loaded" | "renewal-candidate" | "missing" | "expired" | "corrupt" | "storage-unavailable";
|
|
4
4
|
export type BrowserSessionLoadResult = {
|
|
5
|
-
status: "loaded";
|
|
5
|
+
status: "loaded" | "renewal-candidate";
|
|
6
6
|
data: PersistedSessionData;
|
|
7
7
|
} | {
|
|
8
|
-
status: Exclude<BrowserSessionLoadStatus, "loaded">;
|
|
8
|
+
status: Exclude<BrowserSessionLoadStatus, "loaded" | "renewal-candidate">;
|
|
9
9
|
data: null;
|
|
10
10
|
};
|
|
11
11
|
export interface BrowserSessionStorageOptions {
|
|
@@ -37,9 +37,16 @@ export declare class BrowserSessionStorage implements ISessionStorage {
|
|
|
37
37
|
save(address: string, data: PersistedSessionData): Promise<void>;
|
|
38
38
|
/** Most recently saved, still-valid session address for provider-free reloads. */
|
|
39
39
|
activeAddress(): string | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Returns the saved address for a renewal restore without discarding an expired candidate.
|
|
42
|
+
* The session and renewal authority still require full verification before restore.
|
|
43
|
+
*/
|
|
44
|
+
activeAddressForRenewal(): string | undefined;
|
|
40
45
|
load(address: string): Promise<PersistedSessionData | null>;
|
|
41
46
|
private validateForNetworkRestore;
|
|
42
47
|
loadWithStatus(address: string): Promise<BrowserSessionLoadResult>;
|
|
48
|
+
loadRenewalCandidate(address: string): Promise<BrowserSessionLoadResult>;
|
|
49
|
+
private loadForRestore;
|
|
43
50
|
clear(address: string): Promise<void>;
|
|
44
51
|
private grantsKey;
|
|
45
52
|
/**
|
|
@@ -4,9 +4,11 @@ export declare class BrowserWasmBindings implements IWasmBindings {
|
|
|
4
4
|
ensureInitialized(): Promise<void>;
|
|
5
5
|
get invoke(): import("sdk-services/dist").InvokeFunction;
|
|
6
6
|
get invokeAny(): typeof tinycloud.invokeAny;
|
|
7
|
+
get invokeDelegationStatus(): typeof tinycloud.invokeDelegationStatus;
|
|
7
8
|
get prepareSession(): typeof tinycloud.prepareSession;
|
|
8
9
|
get completeSessionSetup(): typeof tinycloud.completeSessionSetup;
|
|
9
10
|
validatePersistedSession(proof: PersistedSessionProof): any;
|
|
11
|
+
validatePersistedSessionForRenewal(proof: PersistedSessionProof): any;
|
|
10
12
|
computeCid(data: Uint8Array, codec: bigint): string;
|
|
11
13
|
ensureEip55(address: string): string;
|
|
12
14
|
makeSpaceId(address: string, chainId: number, prefix: string): string;
|