@tinycloud/node-sdk 1.2.0 → 1.3.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.
- package/dist/index.cjs +239 -34
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +62 -7
- package/dist/index.d.ts +62 -7
- package/dist/index.js +227 -17
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export { AutoRejectStrategy, AutoSignStrategy, BatchOptions, BatchResponse, CallbackStrategy, CapabilityEntry, CapabilityKeyRegistry, CapabilityKeyRegistryErrorCode, CapabilityKeyRegistryErrorCodes, ClientSession, CreateDelegationParams, DatabaseHandle, Delegation, DelegationChain, DelegationChainV2, DelegationDirection, DelegationError, DelegationErrorCode, DelegationErrorCodes, DelegationFilters, DelegationManager, DelegationManagerConfig, DelegationRecord, DelegationResult, EncodedShareData, ExecuteOptions, ExecuteResponse, Extension, FetchFunction, GenerateShareParams, ICapabilityKeyRegistry, IDatabaseHandle, IKVService, IPrefixedKVService, ISQLService, ISessionStorage, ISharingService, ISigner, ISpace, ISpaceScopedDelegations, ISpaceScopedSharing, ISpaceService, IUserAuthorization, IngestOptions, InvokeFunction, JWK, KVResponse, KVService, KVServiceConfig, KeyInfo, KeyProvider, KeyType, PersistedSessionData, PrefixedKVService, ProtocolMismatchError, QueryOptions, QueryResponse, ReceiveOptions, SQLAction, SQLActionType, SQLService, SQLServiceConfig, ServiceContext, ServiceContextConfig, ServiceSession, ShareAccess, ShareLink, ShareLinkData, ShareSchema, SharingService, SharingServiceConfig, SignCallback, SignRequest, SignResponse, Space, SpaceConfig, SpaceErrorCode, SpaceErrorCodes, SpaceInfo, SpaceOwnership, SpaceService, SpaceServiceConfig, SqlStatement, SqlValue, StoredDelegationChain, TinyCloud, TinyCloudConfig, TinyCloudSession, VersionCheckError, buildSpaceUri, checkNodeVersion, createCapabilityKeyRegistry, createSharingService, createSpaceService, makePublicSpaceId, parseSpaceUri } from '@tinycloud/sdk-core';
|
|
1
|
+
import { ISigner, Bytes, ISessionStorage, PersistedSessionData, AutoSignStrategy, AutoRejectStrategy, CallbackStrategy, IUserAuthorization, ClientSession, TinyCloudSession, Extension, Delegation, IKVService, ISQLService, IDataVaultService, ICapabilityKeyRegistry, DelegationManager, ISpaceService, ISharingService, CreateDelegationParams, DelegationResult, KeyProvider, JWK } from '@tinycloud/sdk-core';
|
|
2
|
+
export { AutoRejectStrategy, AutoSignStrategy, BatchOptions, BatchResponse, CallbackStrategy, CapabilityEntry, CapabilityKeyRegistry, CapabilityKeyRegistryErrorCode, CapabilityKeyRegistryErrorCodes, ClientSession, CreateDelegationParams, DataVaultConfig, DataVaultService, DatabaseHandle, Delegation, DelegationChain, DelegationChainV2, DelegationDirection, DelegationError, DelegationErrorCode, DelegationErrorCodes, DelegationFilters, DelegationManager, DelegationManagerConfig, DelegationRecord, DelegationResult, EncodedShareData, ExecuteOptions, ExecuteResponse, Extension, FetchFunction, GenerateShareParams, ICapabilityKeyRegistry, IDataVaultService, IDatabaseHandle, IKVService, IPrefixedKVService, ISQLService, ISessionStorage, ISharingService, ISigner, ISpace, ISpaceScopedDelegations, ISpaceScopedSharing, ISpaceService, IUserAuthorization, IngestOptions, InvokeFunction, JWK, KVResponse, KVService, KVServiceConfig, KeyInfo, KeyProvider, KeyType, PersistedSessionData, PrefixedKVService, ProtocolMismatchError, QueryOptions, QueryResponse, ReceiveOptions, SQLAction, SQLActionType, SQLService, SQLServiceConfig, ServiceContext, ServiceContextConfig, ServiceSession, ShareAccess, ShareLink, ShareLinkData, ShareSchema, SharingService, SharingServiceConfig, SignCallback, SignRequest, SignResponse, Space, SpaceConfig, SpaceErrorCode, SpaceErrorCodes, SpaceInfo, SpaceOwnership, SpaceService, SpaceServiceConfig, SqlStatement, SqlValue, StoredDelegationChain, TinyCloud, TinyCloudConfig, TinyCloudSession, VaultAction, VaultCrypto, VaultEntry, VaultError, VaultGetOptions, VaultGrantOptions, VaultHeaders, VaultListOptions, VaultPutOptions, VersionCheckError, WasmVaultFunctions, buildSpaceUri, checkNodeVersion, createCapabilityKeyRegistry, createSharingService, createSpaceService, createVaultCrypto, makePublicSpaceId, parseSpaceUri } from '@tinycloud/sdk-core';
|
|
4
3
|
import { EventEmitter } from 'events';
|
|
5
4
|
import { TCWSessionManager } from '@tinycloud/node-sdk-wasm';
|
|
6
5
|
|
|
@@ -237,6 +236,8 @@ interface NodeUserAuthorizationConfig {
|
|
|
237
236
|
autoCreateSpace?: boolean;
|
|
238
237
|
/** TinyCloud server endpoints (default: ["https://node.tinycloud.xyz"]) */
|
|
239
238
|
tinycloudHosts?: string[];
|
|
239
|
+
/** Whether to include public space capabilities in the session (default: true) */
|
|
240
|
+
enablePublicSpace?: boolean;
|
|
240
241
|
}
|
|
241
242
|
/**
|
|
242
243
|
* Node.js implementation of IUserAuthorization.
|
|
@@ -284,6 +285,7 @@ declare class NodeUserAuthorization implements IUserAuthorization {
|
|
|
284
285
|
private readonly sessionExpirationMs;
|
|
285
286
|
private readonly autoCreateSpace;
|
|
286
287
|
private readonly tinycloudHosts;
|
|
288
|
+
private readonly enablePublicSpace;
|
|
287
289
|
private sessionManager;
|
|
288
290
|
private extensions;
|
|
289
291
|
private _session?;
|
|
@@ -313,6 +315,11 @@ declare class NodeUserAuthorization implements IUserAuthorization {
|
|
|
313
315
|
* This registers the user as the owner of the space.
|
|
314
316
|
*/
|
|
315
317
|
private hostSpace;
|
|
318
|
+
/**
|
|
319
|
+
* Create a specific space on the server via host delegation.
|
|
320
|
+
* Used for lazy creation of additional spaces (e.g., public).
|
|
321
|
+
*/
|
|
322
|
+
hostPublicSpace(spaceId: string): Promise<boolean>;
|
|
316
323
|
/**
|
|
317
324
|
* Ensure the user's space exists on the TinyCloud server.
|
|
318
325
|
* Creates the space if it doesn't exist and autoCreateSpace is enabled.
|
|
@@ -479,6 +486,39 @@ declare class DelegatedAccess {
|
|
|
479
486
|
get sql(): ISQLService;
|
|
480
487
|
}
|
|
481
488
|
|
|
489
|
+
/**
|
|
490
|
+
* TinyCloudNode - High-level API for Node.js users.
|
|
491
|
+
*
|
|
492
|
+
* Each user has their own TinyCloudNode instance with their own key.
|
|
493
|
+
* This class provides a simplified interface for:
|
|
494
|
+
* - Signing in and managing sessions
|
|
495
|
+
* - Key-value storage operations on own space
|
|
496
|
+
* - Creating and using delegations
|
|
497
|
+
*
|
|
498
|
+
* @example
|
|
499
|
+
* ```typescript
|
|
500
|
+
* const alice = new TinyCloudNode({
|
|
501
|
+
* privateKey: process.env.ALICE_PRIVATE_KEY,
|
|
502
|
+
* host: "https://node.tinycloud.xyz",
|
|
503
|
+
* prefix: "myapp",
|
|
504
|
+
* });
|
|
505
|
+
*
|
|
506
|
+
* await alice.signIn();
|
|
507
|
+
* await alice.kv.put("greeting", "Hello, world!");
|
|
508
|
+
*
|
|
509
|
+
* // Delegate access to Bob
|
|
510
|
+
* const delegation = await alice.createDelegation({
|
|
511
|
+
* path: "shared/",
|
|
512
|
+
* actions: ["tinycloud.kv/get", "tinycloud.kv/put"],
|
|
513
|
+
* delegateDID: bob.did,
|
|
514
|
+
* });
|
|
515
|
+
*
|
|
516
|
+
* // Bob uses the delegation
|
|
517
|
+
* const access = await bob.useDelegation(delegation);
|
|
518
|
+
* const data = await access.kv.get("shared/data");
|
|
519
|
+
* ```
|
|
520
|
+
*/
|
|
521
|
+
|
|
482
522
|
/**
|
|
483
523
|
* Configuration for TinyCloudNode.
|
|
484
524
|
* All fields are optional - TinyCloudNode can work with zero configuration.
|
|
@@ -498,6 +538,10 @@ interface TinyCloudNodeConfig {
|
|
|
498
538
|
autoCreateSpace?: boolean;
|
|
499
539
|
/** Custom session storage implementation (default: MemorySessionStorage) */
|
|
500
540
|
sessionStorage?: ISessionStorage;
|
|
541
|
+
/** Whether to include public space capabilities in the session (default: true).
|
|
542
|
+
* When true, signIn() automatically includes capabilities for the user's public space,
|
|
543
|
+
* accessible via spaces.get('public').kv */
|
|
544
|
+
enablePublicSpace?: boolean;
|
|
501
545
|
}
|
|
502
546
|
/**
|
|
503
547
|
* High-level TinyCloud API for Node.js environments.
|
|
@@ -518,6 +562,9 @@ declare class TinyCloudNode {
|
|
|
518
562
|
private _serviceContext?;
|
|
519
563
|
private _kv?;
|
|
520
564
|
private _sql?;
|
|
565
|
+
private _vault?;
|
|
566
|
+
/** Cached public KV with proper delegation (set by ensurePublicSpace) */
|
|
567
|
+
private _publicKV?;
|
|
521
568
|
/** Session key ID - always available */
|
|
522
569
|
private sessionKeyId;
|
|
523
570
|
/** Session key JWK as object - always available */
|
|
@@ -655,6 +702,11 @@ declare class TinyCloudNode {
|
|
|
655
702
|
* SQL database operations on this user's space.
|
|
656
703
|
*/
|
|
657
704
|
get sql(): ISQLService;
|
|
705
|
+
/**
|
|
706
|
+
* Data Vault operations - client-side encrypted KV storage.
|
|
707
|
+
* Call `vault.unlock(signer)` after signIn() to derive encryption keys.
|
|
708
|
+
*/
|
|
709
|
+
get vault(): IDataVaultService;
|
|
658
710
|
/**
|
|
659
711
|
* Get the CapabilityKeyRegistry for managing keys and their capabilities.
|
|
660
712
|
*
|
|
@@ -790,11 +842,12 @@ declare class TinyCloudNode {
|
|
|
790
842
|
*/
|
|
791
843
|
get sharingService(): ISharingService;
|
|
792
844
|
/**
|
|
793
|
-
* Ensure the user's public space exists.
|
|
794
|
-
* Creates
|
|
795
|
-
*
|
|
845
|
+
* Ensure the user's public space exists and is accessible.
|
|
846
|
+
* Creates the space and activates a session delegation for it.
|
|
847
|
+
* This is the trigger for lazy public space creation — call it
|
|
848
|
+
* before writing to spaces.get('public').kv.
|
|
796
849
|
*/
|
|
797
|
-
ensurePublicSpace(): Promise<
|
|
850
|
+
ensurePublicSpace(): Promise<void>;
|
|
798
851
|
/**
|
|
799
852
|
* Get a KVService scoped to the user's own public space.
|
|
800
853
|
* Writes require authentication (owner/delegate).
|
|
@@ -865,6 +918,8 @@ declare class TinyCloudNode {
|
|
|
865
918
|
disableSubDelegation?: boolean;
|
|
866
919
|
/** Expiration time in milliseconds from now (default: 1 hour) */
|
|
867
920
|
expiryMs?: number;
|
|
921
|
+
/** Override space ID (for creating delegations to non-primary spaces like public) */
|
|
922
|
+
spaceIdOverride?: string;
|
|
868
923
|
}): Promise<PortableDelegation>;
|
|
869
924
|
/**
|
|
870
925
|
* Use a delegation received from another user.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export { AutoRejectStrategy, AutoSignStrategy, BatchOptions, BatchResponse, CallbackStrategy, CapabilityEntry, CapabilityKeyRegistry, CapabilityKeyRegistryErrorCode, CapabilityKeyRegistryErrorCodes, ClientSession, CreateDelegationParams, DatabaseHandle, Delegation, DelegationChain, DelegationChainV2, DelegationDirection, DelegationError, DelegationErrorCode, DelegationErrorCodes, DelegationFilters, DelegationManager, DelegationManagerConfig, DelegationRecord, DelegationResult, EncodedShareData, ExecuteOptions, ExecuteResponse, Extension, FetchFunction, GenerateShareParams, ICapabilityKeyRegistry, IDatabaseHandle, IKVService, IPrefixedKVService, ISQLService, ISessionStorage, ISharingService, ISigner, ISpace, ISpaceScopedDelegations, ISpaceScopedSharing, ISpaceService, IUserAuthorization, IngestOptions, InvokeFunction, JWK, KVResponse, KVService, KVServiceConfig, KeyInfo, KeyProvider, KeyType, PersistedSessionData, PrefixedKVService, ProtocolMismatchError, QueryOptions, QueryResponse, ReceiveOptions, SQLAction, SQLActionType, SQLService, SQLServiceConfig, ServiceContext, ServiceContextConfig, ServiceSession, ShareAccess, ShareLink, ShareLinkData, ShareSchema, SharingService, SharingServiceConfig, SignCallback, SignRequest, SignResponse, Space, SpaceConfig, SpaceErrorCode, SpaceErrorCodes, SpaceInfo, SpaceOwnership, SpaceService, SpaceServiceConfig, SqlStatement, SqlValue, StoredDelegationChain, TinyCloud, TinyCloudConfig, TinyCloudSession, VersionCheckError, buildSpaceUri, checkNodeVersion, createCapabilityKeyRegistry, createSharingService, createSpaceService, makePublicSpaceId, parseSpaceUri } from '@tinycloud/sdk-core';
|
|
1
|
+
import { ISigner, Bytes, ISessionStorage, PersistedSessionData, AutoSignStrategy, AutoRejectStrategy, CallbackStrategy, IUserAuthorization, ClientSession, TinyCloudSession, Extension, Delegation, IKVService, ISQLService, IDataVaultService, ICapabilityKeyRegistry, DelegationManager, ISpaceService, ISharingService, CreateDelegationParams, DelegationResult, KeyProvider, JWK } from '@tinycloud/sdk-core';
|
|
2
|
+
export { AutoRejectStrategy, AutoSignStrategy, BatchOptions, BatchResponse, CallbackStrategy, CapabilityEntry, CapabilityKeyRegistry, CapabilityKeyRegistryErrorCode, CapabilityKeyRegistryErrorCodes, ClientSession, CreateDelegationParams, DataVaultConfig, DataVaultService, DatabaseHandle, Delegation, DelegationChain, DelegationChainV2, DelegationDirection, DelegationError, DelegationErrorCode, DelegationErrorCodes, DelegationFilters, DelegationManager, DelegationManagerConfig, DelegationRecord, DelegationResult, EncodedShareData, ExecuteOptions, ExecuteResponse, Extension, FetchFunction, GenerateShareParams, ICapabilityKeyRegistry, IDataVaultService, IDatabaseHandle, IKVService, IPrefixedKVService, ISQLService, ISessionStorage, ISharingService, ISigner, ISpace, ISpaceScopedDelegations, ISpaceScopedSharing, ISpaceService, IUserAuthorization, IngestOptions, InvokeFunction, JWK, KVResponse, KVService, KVServiceConfig, KeyInfo, KeyProvider, KeyType, PersistedSessionData, PrefixedKVService, ProtocolMismatchError, QueryOptions, QueryResponse, ReceiveOptions, SQLAction, SQLActionType, SQLService, SQLServiceConfig, ServiceContext, ServiceContextConfig, ServiceSession, ShareAccess, ShareLink, ShareLinkData, ShareSchema, SharingService, SharingServiceConfig, SignCallback, SignRequest, SignResponse, Space, SpaceConfig, SpaceErrorCode, SpaceErrorCodes, SpaceInfo, SpaceOwnership, SpaceService, SpaceServiceConfig, SqlStatement, SqlValue, StoredDelegationChain, TinyCloud, TinyCloudConfig, TinyCloudSession, VaultAction, VaultCrypto, VaultEntry, VaultError, VaultGetOptions, VaultGrantOptions, VaultHeaders, VaultListOptions, VaultPutOptions, VersionCheckError, WasmVaultFunctions, buildSpaceUri, checkNodeVersion, createCapabilityKeyRegistry, createSharingService, createSpaceService, createVaultCrypto, makePublicSpaceId, parseSpaceUri } from '@tinycloud/sdk-core';
|
|
4
3
|
import { EventEmitter } from 'events';
|
|
5
4
|
import { TCWSessionManager } from '@tinycloud/node-sdk-wasm';
|
|
6
5
|
|
|
@@ -237,6 +236,8 @@ interface NodeUserAuthorizationConfig {
|
|
|
237
236
|
autoCreateSpace?: boolean;
|
|
238
237
|
/** TinyCloud server endpoints (default: ["https://node.tinycloud.xyz"]) */
|
|
239
238
|
tinycloudHosts?: string[];
|
|
239
|
+
/** Whether to include public space capabilities in the session (default: true) */
|
|
240
|
+
enablePublicSpace?: boolean;
|
|
240
241
|
}
|
|
241
242
|
/**
|
|
242
243
|
* Node.js implementation of IUserAuthorization.
|
|
@@ -284,6 +285,7 @@ declare class NodeUserAuthorization implements IUserAuthorization {
|
|
|
284
285
|
private readonly sessionExpirationMs;
|
|
285
286
|
private readonly autoCreateSpace;
|
|
286
287
|
private readonly tinycloudHosts;
|
|
288
|
+
private readonly enablePublicSpace;
|
|
287
289
|
private sessionManager;
|
|
288
290
|
private extensions;
|
|
289
291
|
private _session?;
|
|
@@ -313,6 +315,11 @@ declare class NodeUserAuthorization implements IUserAuthorization {
|
|
|
313
315
|
* This registers the user as the owner of the space.
|
|
314
316
|
*/
|
|
315
317
|
private hostSpace;
|
|
318
|
+
/**
|
|
319
|
+
* Create a specific space on the server via host delegation.
|
|
320
|
+
* Used for lazy creation of additional spaces (e.g., public).
|
|
321
|
+
*/
|
|
322
|
+
hostPublicSpace(spaceId: string): Promise<boolean>;
|
|
316
323
|
/**
|
|
317
324
|
* Ensure the user's space exists on the TinyCloud server.
|
|
318
325
|
* Creates the space if it doesn't exist and autoCreateSpace is enabled.
|
|
@@ -479,6 +486,39 @@ declare class DelegatedAccess {
|
|
|
479
486
|
get sql(): ISQLService;
|
|
480
487
|
}
|
|
481
488
|
|
|
489
|
+
/**
|
|
490
|
+
* TinyCloudNode - High-level API for Node.js users.
|
|
491
|
+
*
|
|
492
|
+
* Each user has their own TinyCloudNode instance with their own key.
|
|
493
|
+
* This class provides a simplified interface for:
|
|
494
|
+
* - Signing in and managing sessions
|
|
495
|
+
* - Key-value storage operations on own space
|
|
496
|
+
* - Creating and using delegations
|
|
497
|
+
*
|
|
498
|
+
* @example
|
|
499
|
+
* ```typescript
|
|
500
|
+
* const alice = new TinyCloudNode({
|
|
501
|
+
* privateKey: process.env.ALICE_PRIVATE_KEY,
|
|
502
|
+
* host: "https://node.tinycloud.xyz",
|
|
503
|
+
* prefix: "myapp",
|
|
504
|
+
* });
|
|
505
|
+
*
|
|
506
|
+
* await alice.signIn();
|
|
507
|
+
* await alice.kv.put("greeting", "Hello, world!");
|
|
508
|
+
*
|
|
509
|
+
* // Delegate access to Bob
|
|
510
|
+
* const delegation = await alice.createDelegation({
|
|
511
|
+
* path: "shared/",
|
|
512
|
+
* actions: ["tinycloud.kv/get", "tinycloud.kv/put"],
|
|
513
|
+
* delegateDID: bob.did,
|
|
514
|
+
* });
|
|
515
|
+
*
|
|
516
|
+
* // Bob uses the delegation
|
|
517
|
+
* const access = await bob.useDelegation(delegation);
|
|
518
|
+
* const data = await access.kv.get("shared/data");
|
|
519
|
+
* ```
|
|
520
|
+
*/
|
|
521
|
+
|
|
482
522
|
/**
|
|
483
523
|
* Configuration for TinyCloudNode.
|
|
484
524
|
* All fields are optional - TinyCloudNode can work with zero configuration.
|
|
@@ -498,6 +538,10 @@ interface TinyCloudNodeConfig {
|
|
|
498
538
|
autoCreateSpace?: boolean;
|
|
499
539
|
/** Custom session storage implementation (default: MemorySessionStorage) */
|
|
500
540
|
sessionStorage?: ISessionStorage;
|
|
541
|
+
/** Whether to include public space capabilities in the session (default: true).
|
|
542
|
+
* When true, signIn() automatically includes capabilities for the user's public space,
|
|
543
|
+
* accessible via spaces.get('public').kv */
|
|
544
|
+
enablePublicSpace?: boolean;
|
|
501
545
|
}
|
|
502
546
|
/**
|
|
503
547
|
* High-level TinyCloud API for Node.js environments.
|
|
@@ -518,6 +562,9 @@ declare class TinyCloudNode {
|
|
|
518
562
|
private _serviceContext?;
|
|
519
563
|
private _kv?;
|
|
520
564
|
private _sql?;
|
|
565
|
+
private _vault?;
|
|
566
|
+
/** Cached public KV with proper delegation (set by ensurePublicSpace) */
|
|
567
|
+
private _publicKV?;
|
|
521
568
|
/** Session key ID - always available */
|
|
522
569
|
private sessionKeyId;
|
|
523
570
|
/** Session key JWK as object - always available */
|
|
@@ -655,6 +702,11 @@ declare class TinyCloudNode {
|
|
|
655
702
|
* SQL database operations on this user's space.
|
|
656
703
|
*/
|
|
657
704
|
get sql(): ISQLService;
|
|
705
|
+
/**
|
|
706
|
+
* Data Vault operations - client-side encrypted KV storage.
|
|
707
|
+
* Call `vault.unlock(signer)` after signIn() to derive encryption keys.
|
|
708
|
+
*/
|
|
709
|
+
get vault(): IDataVaultService;
|
|
658
710
|
/**
|
|
659
711
|
* Get the CapabilityKeyRegistry for managing keys and their capabilities.
|
|
660
712
|
*
|
|
@@ -790,11 +842,12 @@ declare class TinyCloudNode {
|
|
|
790
842
|
*/
|
|
791
843
|
get sharingService(): ISharingService;
|
|
792
844
|
/**
|
|
793
|
-
* Ensure the user's public space exists.
|
|
794
|
-
* Creates
|
|
795
|
-
*
|
|
845
|
+
* Ensure the user's public space exists and is accessible.
|
|
846
|
+
* Creates the space and activates a session delegation for it.
|
|
847
|
+
* This is the trigger for lazy public space creation — call it
|
|
848
|
+
* before writing to spaces.get('public').kv.
|
|
796
849
|
*/
|
|
797
|
-
ensurePublicSpace(): Promise<
|
|
850
|
+
ensurePublicSpace(): Promise<void>;
|
|
798
851
|
/**
|
|
799
852
|
* Get a KVService scoped to the user's own public space.
|
|
800
853
|
* Writes require authentication (owner/delegate).
|
|
@@ -865,6 +918,8 @@ declare class TinyCloudNode {
|
|
|
865
918
|
disableSubDelegation?: boolean;
|
|
866
919
|
/** Expiration time in milliseconds from now (default: 1 hour) */
|
|
867
920
|
expiryMs?: number;
|
|
921
|
+
/** Override space ID (for creating delegations to non-primary spaces like public) */
|
|
922
|
+
spaceIdOverride?: string;
|
|
868
923
|
}): Promise<PortableDelegation>;
|
|
869
924
|
/**
|
|
870
925
|
* Use a delegation received from another user.
|