@tinycloud/web-sdk 3.8.0-beta.10 → 3.8.0-beta.11
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.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/modules/tcw.d.ts +18 -1
- package/package.json +2 -2
package/dist/modules/tcw.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @packageDocumentation
|
|
11
11
|
*/
|
|
12
|
-
import { TinyCloudNode, TinyCloudNodeConfig, type BootstrapWarning, type DelegateToOptions, type DelegateToResult, type ISessionStorage, type SignStrategy, type ValidatedRuntimeDelegation, type UnifiedOwnerRootInput, type UnifiedOwnerRootReceipt, type RegisterPolicyV3Input, type RegisterPolicyV3Receipt } from "@tinycloud/node-sdk/core";
|
|
12
|
+
import { TinyCloudNode, TinyCloudNodeConfig, type OpenKeyAuthorizeTinyCloud, type BootstrapWarning, type DelegateToOptions, type DelegateToResult, type ISessionStorage, type SignStrategy, type ValidatedRuntimeDelegation, type UnifiedOwnerRootInput, type UnifiedOwnerRootReceipt, type RegisterPolicyV3Input, type RegisterPolicyV3Receipt } from "@tinycloud/node-sdk/core";
|
|
13
13
|
import { type LocalCopyPurgeFailedEvent } from "./replica-wiring";
|
|
14
14
|
import { IKVService, ISQLService, IDuckDbService, IDataVaultService, ISecretsService, ISpaceService, ISpace, ISharingService, ICapabilityKeyRegistry, IHooksService, IEncryptionService, DelegationManager, Delegation, DelegationRevocationReceipt, Result, DelegationError, ClientSession, Extension, type TelemetryConfig, type RetryPolicy, ISpaceCreationHandler, type Manifest, type ComposedManifestRequest, type AccountService, type ResolvedDelegate, type PermissionEntry, type NetworkDescriptor, type CreateOwnerDelegationParams, type OwnerDelegationReceipt, type LocalNodeIdentityStore, type OnNodeNotFound, type RegistryPolicy, type RegistrySequenceStore, SignInOptions, type StorageFullEvent, type IStorageService } from "@tinycloud/sdk-core";
|
|
15
15
|
import { type RequestPermissionsOptions } from "./requestPermissionsCore";
|
|
@@ -31,6 +31,11 @@ declare global {
|
|
|
31
31
|
* Extends ClientConfig with browser-specific options.
|
|
32
32
|
*/
|
|
33
33
|
export interface Config extends ClientConfig {
|
|
34
|
+
/** OpenKey authorize-sign client. Requires @openkey/sdk >=0.12.2; popup is the default mode. */
|
|
35
|
+
openkey?: {
|
|
36
|
+
client: OpenKeyAuthorizeTinyCloud;
|
|
37
|
+
mode?: "iframe" | "popup" | "redirect";
|
|
38
|
+
};
|
|
34
39
|
/** Notifications. `throwErrors` rethrows each error's raw message asynchronously, once per burst of identical errors (200 ms window). It applies unless `ui: false` or `ui.toasts: false`, which turn off toasts and throws together, as the old `popups: false` did; `ui.button: false` leaves throws on. Toast placement and visibility are set through `ui`. */
|
|
35
40
|
notifications?: NotificationConfig;
|
|
36
41
|
/** Optional prefix for KV service keys */
|
|
@@ -170,6 +175,10 @@ export interface ShareReceiveResult<T = unknown> {
|
|
|
170
175
|
host: string;
|
|
171
176
|
}
|
|
172
177
|
export declare class TinyCloudWeb {
|
|
178
|
+
private openkeySignInInFlight;
|
|
179
|
+
private prepareSignInToken;
|
|
180
|
+
private preparedSignIn?;
|
|
181
|
+
private invalidatePreparedSignIn;
|
|
173
182
|
/** The connected wallet's raw EIP-1193 provider. */
|
|
174
183
|
provider: BrowserProvider;
|
|
175
184
|
/** The normalized EIP-1193 provider used by the SDK. */
|
|
@@ -348,7 +357,15 @@ export declare class TinyCloudWeb {
|
|
|
348
357
|
restoreSession(address?: string): Promise<SessionRestoreResult>;
|
|
349
358
|
clearPersistedSession(address?: string): Promise<void>;
|
|
350
359
|
private configuredManifestPermissions;
|
|
360
|
+
/**
|
|
361
|
+
* Prepare an OpenKey SIWE before showing an approval button. Call after
|
|
362
|
+
* OpenKey connect(), then call signIn() from the button's click handler.
|
|
363
|
+
* A prepared request is single-use and valid for five minutes; call this
|
|
364
|
+
* method again if the approval button remains visible longer.
|
|
365
|
+
*/
|
|
366
|
+
prepareSignIn(): Promise<void>;
|
|
351
367
|
signIn: (options?: SignInOptions) => Promise<ClientSession>;
|
|
368
|
+
private performSignIn;
|
|
352
369
|
/**
|
|
353
370
|
* Sign out: end the session on this instance and clear the persisted
|
|
354
371
|
* session. Afterwards accessors return `undefined` and service calls remain
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinycloud/web-sdk",
|
|
3
|
-
"version": "3.8.0-beta.
|
|
3
|
+
"version": "3.8.0-beta.11",
|
|
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.8.0-beta.
|
|
69
|
+
"@tinycloud/node-sdk": "3.8.0-beta.11",
|
|
70
70
|
"@tinycloud/replica": "0.4.0-beta.3",
|
|
71
71
|
"@tinycloud/sdk-core": "3.8.0-beta.9",
|
|
72
72
|
"@tinycloud/share-envelope": "1.3.1-beta.0",
|