@tinycloud/web-sdk 3.0.0-beta.7 → 3.0.0-beta.9
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.
|
@@ -26,6 +26,7 @@ export declare class WebSecretsService implements ISecretsService {
|
|
|
26
26
|
put(name: string, value: string, options?: SecretScopeOptions): ReturnType<ISecretsService["put"]>;
|
|
27
27
|
delete(name: string, options?: SecretScopeOptions): ReturnType<ISecretsService["delete"]>;
|
|
28
28
|
list(options?: SecretScopeOptions): ReturnType<ISecretsService["list"]>;
|
|
29
|
+
listAll(): ReturnType<ISecretsService["listAll"]>;
|
|
29
30
|
private get service();
|
|
30
31
|
private ensureMutationPermission;
|
|
31
32
|
private restoreUnlockAfterEscalation;
|
package/dist/modules/tcw.d.ts
CHANGED
|
@@ -137,6 +137,8 @@ export interface ShareReceiveResult<T = unknown> {
|
|
|
137
137
|
delegation: Delegation;
|
|
138
138
|
path: string;
|
|
139
139
|
spaceId: string;
|
|
140
|
+
/** Owner Node named by the link; that node independently verifies the accompanying delegation. */
|
|
141
|
+
host: string;
|
|
140
142
|
}
|
|
141
143
|
export declare class TinyCloudWeb {
|
|
142
144
|
/** The connected wallet's raw EIP-1193 provider. */
|
|
@@ -233,6 +235,13 @@ export declare class TinyCloudWeb {
|
|
|
233
235
|
get accountSpaceId(): string | undefined;
|
|
234
236
|
get account(): AccountService;
|
|
235
237
|
get hosts(): string[];
|
|
238
|
+
/** Registry-resolved owner Node identity used to bind native share targets. */
|
|
239
|
+
activeNodeIdentity(): Promise<{
|
|
240
|
+
readonly origin: string;
|
|
241
|
+
readonly nodeDid: string;
|
|
242
|
+
}>;
|
|
243
|
+
/** Publish the active owner Node as a session-signed registry record. */
|
|
244
|
+
publishActiveNodeLocation(registryUrl: string, fetchFn?: typeof fetch): Promise<import("@tinycloud/sdk-core").LocationRecord>;
|
|
236
245
|
get sessionRestoreStatus(): SessionRestoreStatus;
|
|
237
246
|
/** Holder-bound OpenCredentials issuance using the active TinyCloud session. */
|
|
238
247
|
get credentials(): CredentialsService;
|
|
@@ -312,8 +321,6 @@ export declare class TinyCloudWeb {
|
|
|
312
321
|
} : never : never): Promise<OwnerDelegationReceipt>;
|
|
313
322
|
/** Register signed policy material through the Node-owned Policy/v3 runtime. */
|
|
314
323
|
registerPolicy(params: Omit<RegisterPolicyV3Input, "nodeOrigin" | "fetch">): Promise<RegisterPolicyV3Receipt>;
|
|
315
|
-
/** @deprecated Policy/v2 delivery transport is retired. Use authorizeShareDeliveryV3. */
|
|
316
|
-
authorizeShareDelivery(input: Parameters<TinyCloudNode["authorizeShareDelivery"]>[0]): ReturnType<TinyCloudNode["authorizeShareDelivery"]>;
|
|
317
324
|
/** Authorize a short-lived, one-use v3 delivery against the signed envelope and roots. */
|
|
318
325
|
authorizeShareDeliveryV3(input: Parameters<TinyCloudNode["authorizeShareDeliveryV3"]>[0]): ReturnType<TinyCloudNode["authorizeShareDeliveryV3"]>;
|
|
319
326
|
/**
|
|
@@ -386,9 +393,11 @@ export declare class TinyCloudWeb {
|
|
|
386
393
|
listDelegations(): Promise<Result<Delegation[], DelegationError>>;
|
|
387
394
|
checkPermission(path: string, action: string): Promise<Result<boolean, DelegationError>>;
|
|
388
395
|
/**
|
|
389
|
-
* Receive and retrieve data from a
|
|
396
|
+
* Receive and retrieve data from a native TinyCloud bearer delegation.
|
|
390
397
|
* Static method — no auth required. Uses browser WASM.
|
|
391
398
|
*/
|
|
392
|
-
static receiveShare<T = unknown>(link: string, key?: string
|
|
399
|
+
static receiveShare<T = unknown>(link: string, key?: string, options?: {
|
|
400
|
+
readonly binary?: boolean;
|
|
401
|
+
}): Promise<Result<ShareReceiveResult<T>, DelegationError>>;
|
|
393
402
|
}
|
|
394
403
|
//# sourceMappingURL=tcw.d.ts.map
|
|
@@ -54,8 +54,8 @@ export declare const ToastSchema: z.ZodObject<{
|
|
|
54
54
|
timestamp: z.ZodNumber;
|
|
55
55
|
}, "strip", z.ZodTypeAny, {
|
|
56
56
|
description?: string;
|
|
57
|
-
id?: string;
|
|
58
57
|
type?: "error" | "success" | "warning" | "info" | "loading";
|
|
58
|
+
id?: string;
|
|
59
59
|
title?: string;
|
|
60
60
|
duration?: number;
|
|
61
61
|
action?: {
|
|
@@ -65,8 +65,8 @@ export declare const ToastSchema: z.ZodObject<{
|
|
|
65
65
|
timestamp?: number;
|
|
66
66
|
}, {
|
|
67
67
|
description?: string;
|
|
68
|
-
id?: string;
|
|
69
68
|
type?: "error" | "success" | "warning" | "info" | "loading";
|
|
69
|
+
id?: string;
|
|
70
70
|
title?: string;
|
|
71
71
|
duration?: number;
|
|
72
72
|
action?: {
|
package/dist/share/service.d.ts
CHANGED
|
@@ -9,23 +9,11 @@ export interface ShareReceiverServiceOptions {
|
|
|
9
9
|
readonly credentialDiscoveryUrl?: string;
|
|
10
10
|
/** Out-of-band Share application origin allowed to supply invitation URLs. */
|
|
11
11
|
readonly expectedShareOrigin: string;
|
|
12
|
-
/**
|
|
13
|
-
readonly
|
|
14
|
-
/** Pinned Node identity used by recipient response verification. */
|
|
15
|
-
readonly trustedNode: {
|
|
16
|
-
readonly invitationKid: string;
|
|
17
|
-
readonly invitationPublicKey: Uint8Array;
|
|
18
|
-
};
|
|
19
|
-
/** Exact Ed25519 enforcer DID committed as the signed envelope target. */
|
|
20
|
-
readonly expectedEnforcerDid: string;
|
|
12
|
+
/** Registry containing the share owner's signed TinyCloud location record. */
|
|
13
|
+
readonly registryOrigin: string;
|
|
21
14
|
readonly fetch?: typeof fetch;
|
|
22
15
|
}
|
|
23
|
-
export declare function validateShareReceiverServiceTrust(envelope: Pick<ShareEnvelopeV3, "target"
|
|
24
|
-
readonly invitationKid: string;
|
|
25
|
-
readonly invitationPublicKey: Uint8Array;
|
|
26
|
-
};
|
|
27
|
-
/** @internal */
|
|
28
|
-
export declare function validateShareReceiverRegistryBaseUrl(value: string): string;
|
|
16
|
+
export declare function validateShareReceiverServiceTrust(envelope: Pick<ShareEnvelopeV3, "target" | "attestedEnforcerBinding">): void;
|
|
29
17
|
/** @internal */
|
|
30
18
|
export declare function validateShareReceiverExpectedOrigin(shareUrl: string, expectedOrigin: string): string;
|
|
31
19
|
/** @internal */
|
|
@@ -40,13 +28,9 @@ export declare class ReceivedShareImpl implements ReceivedShare {
|
|
|
40
28
|
private readonly options;
|
|
41
29
|
private readonly fetchFn;
|
|
42
30
|
private readonly credentialDiscoveryUrl;
|
|
43
|
-
private readonly trustedNode;
|
|
44
31
|
private content?;
|
|
45
32
|
private getPromise?;
|
|
46
|
-
constructor(identity: ShareReceiverIdentity, metadata: ShareMetadata, envelope: ShareEnvelopeV3, credentials: CredentialsService, sign: (bytes: Uint8Array) => Promise<Uint8Array>, options: ShareReceiveOptions, fetchFn: typeof fetch, credentialDiscoveryUrl: string
|
|
47
|
-
readonly invitationKid: string;
|
|
48
|
-
readonly invitationPublicKey: Uint8Array;
|
|
49
|
-
});
|
|
33
|
+
constructor(identity: ShareReceiverIdentity, metadata: ShareMetadata, envelope: ShareEnvelopeV3, credentials: CredentialsService, sign: (bytes: Uint8Array) => Promise<Uint8Array>, options: ShareReceiveOptions, fetchFn: typeof fetch, credentialDiscoveryUrl: string);
|
|
50
34
|
get shareId(): string;
|
|
51
35
|
get(): Promise<ShareReceivedContent>;
|
|
52
36
|
private load;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinycloud/web-sdk",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.9",
|
|
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",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@multiformats/multiaddr": "^13.0.1",
|
|
45
45
|
"@multiformats/multiaddr-to-uri": "^12.0.0",
|
|
46
|
-
"@tinycloud/node-sdk": "3.0.0-beta.
|
|
47
|
-
"@tinycloud/sdk-core": "3.0.0-beta.
|
|
48
|
-
"@tinycloud/share-envelope": "0.
|
|
49
|
-
"@tinycloud/share-sdk": "0.
|
|
46
|
+
"@tinycloud/node-sdk": "3.0.0-beta.9",
|
|
47
|
+
"@tinycloud/sdk-core": "3.0.0-beta.9",
|
|
48
|
+
"@tinycloud/share-envelope": "1.0.0-beta.3",
|
|
49
|
+
"@tinycloud/share-sdk": "1.0.0-beta.3",
|
|
50
50
|
"@tinycloud/web-sdk-wasm": "1.7.6",
|
|
51
51
|
"axios": "^1.7.9",
|
|
52
52
|
"viem": "^2.45.0",
|