@tinycloud/node-sdk 2.7.0-beta.2 → 2.7.0-beta.3

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.
@@ -1,4 +1,4 @@
1
- import { ISessionStorage, PersistedSessionData, AutoSignStrategy, AutoRejectStrategy, CallbackStrategy, IUserAuthorization, ISigner, ISpaceCreationHandler, IWasmBindings, ISessionManager, SiweConfig, Manifest, ComposedManifestRequest, ClientSession, TinyCloudSession, Extension, SignRequest, SignInOptions, Delegation, DelegatedResource, PermissionEntry, TelemetryConfig, IKVService, ISQLService, IDuckDbService, IHooksService, INotificationHandler, IENSResolver, AccountService, IDataVaultService, IEncryptionService, NetworkDescriptor, ISecretsService, ICapabilityKeyRegistry, DelegationManager, ISpaceService, ISpace, ISharingService, CreateDelegationParams, DelegationResult, DelegationStatus, ResolvedDelegate, KeyProvider, JWK } from '@tinycloud/sdk-core';
1
+ import { ISessionStorage, PersistedSessionData, AutoSignStrategy, AutoRejectStrategy, CallbackStrategy, IUserAuthorization, ISigner, ISpaceCreationHandler, IWasmBindings, ISessionManager, SiweConfig, Manifest, ComposedManifestRequest, ClientSession, TinyCloudSession, Extension, SignRequest, SignInOptions, Delegation, DelegatedResource, PermissionEntry, TelemetryConfig, IKVService, ISQLService, IDuckDbService, IHooksService, INotificationHandler, IENSResolver, AccountService, IDataVaultService, IEncryptionService, NetworkDescriptor, ISecretsService, ICapabilityKeyRegistry, DelegationManager, ISpaceService, ISpace, ISharingService, CreateDelegationParams, DelegationResult, DelegationRevocationReceipt, DelegationStatus, ResolvedDelegate, KeyProvider, JWK } from '@tinycloud/sdk-core';
2
2
  import { EventEmitter } from 'events';
3
3
  import { InvokeFunction, InvokeAnyFunction } from '@tinycloud/sdk-services';
4
4
 
@@ -1647,7 +1647,7 @@ declare class TinyCloudNode {
1647
1647
  * @param cid - The CID of the delegation to revoke
1648
1648
  * @returns Result indicating success or failure
1649
1649
  */
1650
- revokeDelegation(cid: string): Promise<DelegationResult<void>>;
1650
+ revokeDelegation(cid: string): Promise<DelegationResult<DelegationRevocationReceipt>>;
1651
1651
  /** Read node-confirmed lifecycle state for one delegation. */
1652
1652
  getDelegationStatus(cid: string): Promise<DelegationResult<DelegationStatus>>;
1653
1653
  /** Compute the canonical CID of a compact delegation authorization. */
@@ -1,4 +1,4 @@
1
- import { ISessionStorage, PersistedSessionData, AutoSignStrategy, AutoRejectStrategy, CallbackStrategy, IUserAuthorization, ISigner, ISpaceCreationHandler, IWasmBindings, ISessionManager, SiweConfig, Manifest, ComposedManifestRequest, ClientSession, TinyCloudSession, Extension, SignRequest, SignInOptions, Delegation, DelegatedResource, PermissionEntry, TelemetryConfig, IKVService, ISQLService, IDuckDbService, IHooksService, INotificationHandler, IENSResolver, AccountService, IDataVaultService, IEncryptionService, NetworkDescriptor, ISecretsService, ICapabilityKeyRegistry, DelegationManager, ISpaceService, ISpace, ISharingService, CreateDelegationParams, DelegationResult, DelegationStatus, ResolvedDelegate, KeyProvider, JWK } from '@tinycloud/sdk-core';
1
+ import { ISessionStorage, PersistedSessionData, AutoSignStrategy, AutoRejectStrategy, CallbackStrategy, IUserAuthorization, ISigner, ISpaceCreationHandler, IWasmBindings, ISessionManager, SiweConfig, Manifest, ComposedManifestRequest, ClientSession, TinyCloudSession, Extension, SignRequest, SignInOptions, Delegation, DelegatedResource, PermissionEntry, TelemetryConfig, IKVService, ISQLService, IDuckDbService, IHooksService, INotificationHandler, IENSResolver, AccountService, IDataVaultService, IEncryptionService, NetworkDescriptor, ISecretsService, ICapabilityKeyRegistry, DelegationManager, ISpaceService, ISpace, ISharingService, CreateDelegationParams, DelegationResult, DelegationRevocationReceipt, DelegationStatus, ResolvedDelegate, KeyProvider, JWK } from '@tinycloud/sdk-core';
2
2
  import { EventEmitter } from 'events';
3
3
  import { InvokeFunction, InvokeAnyFunction } from '@tinycloud/sdk-services';
4
4
 
@@ -1647,7 +1647,7 @@ declare class TinyCloudNode {
1647
1647
  * @param cid - The CID of the delegation to revoke
1648
1648
  * @returns Result indicating success or failure
1649
1649
  */
1650
- revokeDelegation(cid: string): Promise<DelegationResult<void>>;
1650
+ revokeDelegation(cid: string): Promise<DelegationResult<DelegationRevocationReceipt>>;
1651
1651
  /** Read node-confirmed lifecycle state for one delegation. */
1652
1652
  getDelegationStatus(cid: string): Promise<DelegationResult<DelegationStatus>>;
1653
1653
  /** Compute the canonical CID of a compact delegation authorization. */
package/dist/core.cjs CHANGED
@@ -2119,6 +2119,7 @@ var _TinyCloudNode = class _TinyCloudNode {
2119
2119
  getPrimarySpaceId: () => this.spaceId,
2120
2120
  getAccountSpaceId: () => this.accountSpaceId,
2121
2121
  getSpaces: () => this.spaces,
2122
+ getDelegationManager: () => this.delegationManager,
2122
2123
  getAccountDb: () => this.accountSpaceId ? this.sqlForSpace(this.accountSpaceId).db("account") : void 0,
2123
2124
  ensureAccountSpaceHosted: async () => {
2124
2125
  if (this.accountSpaceId && this.auth) {
@@ -3393,6 +3394,7 @@ var _TinyCloudNode = class _TinyCloudNode {
3393
3394
  }
3394
3395
  this._delegationManager = new import_sdk_core8.DelegationManager({
3395
3396
  hosts: [this.config.host],
3397
+ accountSpaceId: this.accountSpaceId,
3396
3398
  session: serviceSession,
3397
3399
  invoke: this.invokeWithRuntimePermissions,
3398
3400
  invokeAny: this.invokeAnyWithRuntimePermissions,