@tinycloud/sdk-core 2.4.0-beta.1 → 2.4.0-beta.6

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.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { InvokeFunction, InvokeAnyFunction, ParsedNetworkId, ServiceError, Result as Result$1, ServiceSession, FetchFunction, ServiceConstructor, RetryPolicy, TelemetryConfig, IServiceContext, IService, IKVService, ISQLService, IDuckDbService, IHooksService, IDataVaultService, IEncryptionService } from '@tinycloud/sdk-services';
2
+ import { InvokeFunction, InvokeAnyFunction, ParsedNetworkId, ServiceError, Result as Result$1, ServiceSession, FetchFunction, ServiceConstructor, RetryPolicy, TelemetryConfig, IServiceContext, IService, IKVService, ISQLService, IDuckDbService, IHooksService, IDataVaultService, IEncryptionService, IDatabaseHandle, SqlValue, QueryResponse } from '@tinycloud/sdk-services';
3
3
  export { BatchOptions, BatchResponse, BuildCanonicalDecryptRequestInput, BuildDecryptFactsInput, BuildDecryptInvocationInput, BuiltDecryptInvocation, CanonicalDecryptRequest, CanonicalJson, ColumnInfo, DECRYPT_ACTION, DECRYPT_FACT_TYPE, DECRYPT_RESULT_TYPE, DEFAULT_ENCRYPTION_ALG, DEFAULT_KEY_VERSION, DataVaultConfig, DataVaultService, DatabaseHandle, DecryptCapabilityProof, DecryptEnvelopeOptions, DecryptInvocationFact, DecryptInvocationSigner, DecryptRequestBody, DecryptResponseBody, DecryptTransport, DiscoverNetworkInput, DiscoveredNetwork, DiscoverySource, DuckDbAction, DuckDbActionType, DuckDbBatchOptions, DuckDbBatchResponse, DuckDbDatabaseHandle, DuckDbExecuteOptions, DuckDbExecuteResponse, DuckDbOptions, DuckDbQueryOptions, DuckDbQueryResponse, DuckDbService, DuckDbServiceConfig, DuckDbStatement, DuckDbValue, ENCRYPTION_NETWORK_URN_PREFIX, ENCRYPTION_SERVICE, ENCRYPTION_SERVICE_SHORT, ENVELOPE_VERSION, EncryptToNetworkInput, EncryptToNetworkOptions, EncryptToNetworkResult, EncryptionCrypto, EncryptionError, EncryptionErrorInput, EncryptionService, EncryptionServiceConfig, ErrorCode, ErrorCodes, ExecuteOptions, ExecuteResponse, FetchFunction, HookEvent, HookServiceName, HookStreamEvent, HookSubscription, HookWebhookListOptions, HookWebhookRecord, HookWebhookRegistration, HookWebhookScope, HookWebhookUnregisterOptions, HooksService, HooksServiceConfig, IDataVaultService, IDatabaseHandle, IDuckDbDatabaseHandle, IDuckDbService, IEncryptionService, IHooksService, IKVService, IPrefixedKVService, ISQLService, ISecretsService, IService, IServiceContext, InlineEncryptedEnvelope, InvokeAnyEntry, InvokeAnyFunction, InvokeFunction, KVCreateSignedReadUrlOptions, KVDeleteOptions, KVGetOptions, KVHeadOptions, KVListOptions, KVListResponse, KVPutOptions, KVResponse, KVResponseHeaders, KVService, KVServiceConfig, KVSignedReadUrlResponse, NETWORK_NAME_PATTERN, NetworkDescriptor, NetworkIdError, NodeDescriptorFetcher, ParsedNetworkId, PrefixedKVService, QueryOptions, QueryResponse, RandomReceiverKeyInput, ReceiverKeyPair, ReceiverKeySigner, ResolvedSecretPath, Result, RetryPolicy, SECRET_NAME_RE, SQLAction, SQLActionType, SQLService, SQLServiceConfig, SchemaInfo, SecretPayload, SecretScopeOptions, SecretsError, SecretsService, ServiceContext, ServiceContextConfig, ServiceError, ServiceSession, SignedReceiverKeyInput, SqlStatement, SqlValue, SubscribeOptions, TableInfo, TelemetryConfig, TelemetryEventHandler, VaultCrypto, VaultEntry, VaultError, VaultGetOptions, VaultGrantOptions, VaultHeaders, VaultListOptions, VaultPublicSpaceKVActions, VaultPutOptions, VerifyDecryptResponseInput, ViewInfo, WasmVaultFunctions, WellKnownDescriptorFetcher, buildCanonicalDecryptRequest, buildDecryptAttenuation, buildDecryptFacts, buildDecryptInvocation, buildNetworkId, canonicalHashHex, canonicalSignedResponse, canonicalizeEncryptionJson, canonicalizeSecretScope, checkDecryptInvocationInput, createVaultCrypto, decryptEnvelopeWithKey, defaultRetryPolicy, deriveSignedReceiverKey, discoverNetwork, encryptToNetwork, base64Decode as encryptionBase64Decode, base64Encode as encryptionBase64Encode, encryptionError, utf8Decode as encryptionUtf8Decode, utf8Encode as encryptionUtf8Encode, ensureNetworkUsableForDecrypt, err, generateRandomReceiverKey, hexDecode, hexEncode, isNetworkId, networkDiscoveryKey, ok, openWrappedKey, parseNetworkId, resolveSecretListPrefix, resolveSecretPath, serviceError, validateEnvelope, verifyDecryptResponse } from '@tinycloud/sdk-services';
4
4
  export { SiweMessage } from 'siwe';
5
5
 
@@ -3505,63 +3505,6 @@ declare class TinyCloud {
3505
3505
  static readPublicKey<T = unknown>(host: string, address: string, chainId: number, key: string, fetchFn?: FetchFunction): Promise<Result$1<T, ServiceError>>;
3506
3506
  }
3507
3507
 
3508
- /**
3509
- * Shared space utilities for TinyCloud.
3510
- *
3511
- * These functions are platform-agnostic and can be used by both
3512
- * web-sdk and node-sdk for space hosting and session activation.
3513
- */
3514
- /**
3515
- * Result of a space hosting or session activation attempt.
3516
- */
3517
- interface SpaceHostResult {
3518
- /** Whether the operation succeeded (2xx status) */
3519
- success: boolean;
3520
- /** HTTP status code */
3521
- status: number;
3522
- /** Error message if failed */
3523
- error?: string;
3524
- /** Space IDs that were successfully activated */
3525
- activated?: string[];
3526
- /** Space IDs that were skipped (e.g., space doesn't exist yet) */
3527
- skipped?: string[];
3528
- }
3529
- /**
3530
- * Fetch the peer ID from TinyCloud server for space hosting.
3531
- *
3532
- * The peer ID identifies the TinyCloud server instance that will host the space.
3533
- *
3534
- * @param host - TinyCloud server URL (e.g., "https://node.tinycloud.xyz")
3535
- * @param spaceId - The space ID to host
3536
- * @returns The peer ID string
3537
- * @throws Error if the request fails
3538
- */
3539
- declare function fetchPeerId(host: string, spaceId: string): Promise<string>;
3540
- /**
3541
- * Submit a space hosting delegation to TinyCloud server.
3542
- *
3543
- * This registers a new space with the server, allowing the user
3544
- * to store data in it.
3545
- *
3546
- * @param host - TinyCloud server URL
3547
- * @param headers - Delegation headers (from siweToDelegationHeaders)
3548
- * @returns Result indicating success/failure
3549
- */
3550
- declare function submitHostDelegation(host: string, headers: Record<string, string>): Promise<SpaceHostResult>;
3551
- /**
3552
- * Activate a session with TinyCloud server.
3553
- *
3554
- * This submits the session delegation to the server, enabling the session
3555
- * key to perform operations on behalf of the user.
3556
- *
3557
- * @param host - TinyCloud server URL
3558
- * @param delegationHeader - Session delegation header (from session.delegationHeader)
3559
- * @returns Result indicating success/failure (404 means space doesn't exist)
3560
- */
3561
- declare function activateSessionWithHost(host: string, delegationHeader: {
3562
- Authorization: string;
3563
- }): Promise<SpaceHostResult>;
3564
-
3565
3508
  /**
3566
3509
  * DelegationManager - Handles delegation CRUD operations.
3567
3510
  *
@@ -4535,6 +4478,145 @@ declare class SpaceService implements ISpaceService {
4535
4478
  */
4536
4479
  declare function createSpaceService(config: SpaceServiceConfig): ISpaceService;
4537
4480
 
4481
+ interface AccountApplication {
4482
+ appId: string;
4483
+ manifests: Manifest[];
4484
+ updatedAt?: string;
4485
+ name?: string;
4486
+ description?: string;
4487
+ }
4488
+ interface AccountDelegation {
4489
+ cid: string;
4490
+ direction: "granted" | "received";
4491
+ spaceId: string;
4492
+ spaceName?: string;
4493
+ counterpartyDid: string;
4494
+ delegateDid: string;
4495
+ delegatorDid?: string;
4496
+ path: string;
4497
+ actions: string[];
4498
+ expiry: Date;
4499
+ status: "active" | "expired" | "revoked";
4500
+ createdAt?: Date;
4501
+ }
4502
+ interface AccountStatus {
4503
+ did: string;
4504
+ host: string;
4505
+ primarySpaceId?: string;
4506
+ accountSpaceId?: string;
4507
+ applications: number;
4508
+ grantedDelegations: number;
4509
+ receivedDelegations: number;
4510
+ }
4511
+ interface AccountIndexRebuildResult {
4512
+ database: string;
4513
+ applications: number;
4514
+ delegations: number;
4515
+ syncedAt: string;
4516
+ }
4517
+ interface AccountDelegationListOptions {
4518
+ direction?: "granted" | "received" | "all";
4519
+ space?: string;
4520
+ }
4521
+ interface AccountDelegationRevokeOptions {
4522
+ cid: string;
4523
+ space: string;
4524
+ }
4525
+ interface AccountServiceConfig {
4526
+ getDid: () => string;
4527
+ getHost: () => string;
4528
+ getPrimarySpaceId: () => string | undefined;
4529
+ getAccountSpaceId: () => string | undefined;
4530
+ getSpaces: () => ISpaceService;
4531
+ getAccountDb?: () => IDatabaseHandle | undefined;
4532
+ ensureAccountSpaceHosted?: () => Promise<void>;
4533
+ }
4534
+ declare class AccountService {
4535
+ private readonly config;
4536
+ constructor(config: AccountServiceConfig);
4537
+ status(): Promise<Result$1<AccountStatus>>;
4538
+ readonly applications: {
4539
+ list: () => Promise<Result$1<AccountApplication[]>>;
4540
+ get: (appId: string) => Promise<Result$1<AccountApplication>>;
4541
+ register: (manifest: Manifest | Manifest[]) => Promise<Result$1<AccountApplication>>;
4542
+ remove: (appId: string) => Promise<Result$1<void>>;
4543
+ };
4544
+ readonly delegations: {
4545
+ list: (options?: AccountDelegationListOptions) => Promise<Result$1<AccountDelegation[]>>;
4546
+ revoke: (options: AccountDelegationRevokeOptions) => Promise<Result$1<void>>;
4547
+ };
4548
+ readonly index: {
4549
+ rebuild: () => Promise<Result$1<AccountIndexRebuildResult>>;
4550
+ applications: {
4551
+ list: () => Promise<Result$1<AccountApplication[]>>;
4552
+ };
4553
+ delegations: {
4554
+ list: (options?: AccountDelegationListOptions) => Promise<Result$1<AccountDelegation[]>>;
4555
+ };
4556
+ query: <T = Record<string, unknown>>(sql: string, params?: SqlValue[]) => Promise<Result$1<QueryResponse<T>>>;
4557
+ };
4558
+ private accountKV;
4559
+ private accountDb;
4560
+ private resolveSpace;
4561
+ }
4562
+
4563
+ /**
4564
+ * Shared space utilities for TinyCloud.
4565
+ *
4566
+ * These functions are platform-agnostic and can be used by both
4567
+ * web-sdk and node-sdk for space hosting and session activation.
4568
+ */
4569
+ /**
4570
+ * Result of a space hosting or session activation attempt.
4571
+ */
4572
+ interface SpaceHostResult {
4573
+ /** Whether the operation succeeded (2xx status) */
4574
+ success: boolean;
4575
+ /** HTTP status code */
4576
+ status: number;
4577
+ /** Error message if failed */
4578
+ error?: string;
4579
+ /** Space IDs that were successfully activated */
4580
+ activated?: string[];
4581
+ /** Space IDs that were skipped (e.g., space doesn't exist yet) */
4582
+ skipped?: string[];
4583
+ }
4584
+ /**
4585
+ * Fetch the peer ID from TinyCloud server for space hosting.
4586
+ *
4587
+ * The peer ID identifies the TinyCloud server instance that will host the space.
4588
+ *
4589
+ * @param host - TinyCloud server URL (e.g., "https://node.tinycloud.xyz")
4590
+ * @param spaceId - The space ID to host
4591
+ * @returns The peer ID string
4592
+ * @throws Error if the request fails
4593
+ */
4594
+ declare function fetchPeerId(host: string, spaceId: string): Promise<string>;
4595
+ /**
4596
+ * Submit a space hosting delegation to TinyCloud server.
4597
+ *
4598
+ * This registers a new space with the server, allowing the user
4599
+ * to store data in it.
4600
+ *
4601
+ * @param host - TinyCloud server URL
4602
+ * @param headers - Delegation headers (from siweToDelegationHeaders)
4603
+ * @returns Result indicating success/failure
4604
+ */
4605
+ declare function submitHostDelegation(host: string, headers: Record<string, string>): Promise<SpaceHostResult>;
4606
+ /**
4607
+ * Activate a session with TinyCloud server.
4608
+ *
4609
+ * This submits the session delegation to the server, enabling the session
4610
+ * key to perform operations on behalf of the user.
4611
+ *
4612
+ * @param host - TinyCloud server URL
4613
+ * @param delegationHeader - Session delegation header (from session.delegationHeader)
4614
+ * @returns Result indicating success/failure (404 means space doesn't exist)
4615
+ */
4616
+ declare function activateSessionWithHost(host: string, delegationHeader: {
4617
+ Authorization: string;
4618
+ }): Promise<SpaceHostResult>;
4619
+
4538
4620
  /**
4539
4621
  * Protocol version checking for SDK-to-node compatibility.
4540
4622
  *
@@ -4697,4 +4779,4 @@ declare const EXPIRY: {
4697
4779
  declare const DEFAULT_SIGNED_READ_URL_EXPIRY_MS: number;
4698
4780
  type ExpiryTier = keyof typeof EXPIRY;
4699
4781
 
4700
- export { ACCOUNT_REGISTRY_PATH, ACCOUNT_REGISTRY_SPACE, type AbilitiesMap, AutoApproveSpaceCreationHandler, type AutoRejectStrategy, type AutoSignStrategy, type Bytes, type CallbackStrategy, type CanonicalAddress, type CanonicalParsedNetworkId, type CapabilityEntry, CapabilityKeyRegistry, type CapabilityKeyRegistryErrorCode, CapabilityKeyRegistryErrorCodes, type ClientSession, ClientSessionSchema, CloudLocationResolutionError, type ComposeManifestOptions, type ComposedManifestRequest, type CreateDelegationFunction, type CreateDelegationParams, type CreateDelegationWasmParams, type CreateDelegationWasmResult, DEFAULT_DEFAULTS, DEFAULT_EXPIRY, DEFAULT_MANIFEST_SPACE, DEFAULT_MANIFEST_VERSION, DEFAULT_SIGNED_READ_URL_EXPIRY_MS, DEFAULT_TINYCLOUD_FALLBACK_HOST, DEFAULT_TINYCLOUD_LOCATION_REGISTRY_URL, type DelegatedResource, type Delegation, type DelegationApiResponse, type DelegationChain, type DelegationChainV2, type DelegationDirection, type DelegationError, type DelegationErrorCode, DelegationErrorCodes, type DelegationFilters, DelegationManager, type DelegationManagerConfig, type DelegationRecord, type Result as DelegationResult, type DidCacheKeyOptions, type DidEqualsOptions, ENCRYPTION_MANIFEST_SPACE, ENCRYPTION_PERMISSION_SERVICE, EXPIRY, type EncodedShareData, type EnsData, EnsDataSchema, type EventEmitterStrategy, type ExpiryTier, type Extension, type GenerateShareParams, type ICapabilityKeyRegistry, type IENSResolver, type INotificationHandler, type ISessionManager, type ISessionStorage, type ISharingService, type ISigner, type ISpace, type ISpaceCreationHandler, type ISpaceScopedDelegations, type ISpaceScopedSharing, type ISpaceService, type IUserAuthorization, type IWasmBindings, IdentityParseError, type IngestOptions, type JWK, type KeyInfo, type KeyProvider, type KeyType, type LocationCandidate, type LocationCandidateInput, type LocationRecord, type LocationRecordPayload, type LocationRecordSigner, LocationRecordValidationError, type LocationResolutionAttempt, type LocationSource, type Manifest, type ManifestDefaults, type ManifestRegistryRecord, type ManifestSecretActions, ManifestValidationError, type NodeInfo, type ParseRecapFromSiwe, type PartialSiweMessage, type PermissionEntry, PermissionNotInManifestError, type PersistedSessionData, type PersistedTinyCloudSession, type PkhDidParts, ProtocolMismatchError, type ReceiveOptions, type ResolveCloudLocationOptions, type ResolveTinyCloudHostsOptions, type ResolvedCapabilities, type ResolvedCloudLocation, type ResolvedDelegate, type ResolvedTinyCloudHosts, type ResourceCapability, SERVICE_LONG_TO_SHORT, SERVICE_SHORT_TO_LONG, type ServerHost, SessionExpiredError, type ShareAccess, type ShareLink, type ShareLinkData, type ShareSchema, SharingService, type SharingServiceConfig, type SignCallback, type SignInOptions, type SignRequest, type SignResponse, type SignStrategy, SilentNotificationHandler, type SiweConfig, SiweConfigSchema, Space, type SpaceAbilitiesMap, type SpaceConfig, type SpaceCreationContext, type SpaceDelegationParams, type SpaceErrorCode, SpaceErrorCodes, type SpaceHostResult, type SpaceInfo, type SpaceOwnership, SpaceService, type SpaceServiceConfig, type StoredDelegationChain, type SubsetCheckResult, TinyCloud, type TinyCloudConfig, type TinyCloudSession, UnsupportedFeatureError, type UserAuthorizationConfig, VAULT_PERMISSION_SERVICE, type ValidationError, VersionCheckError, type WasmRecapEntry, activateSessionWithHost, addressStorageKey, applyPrefix, buildSpaceUri, canonicalLocationPayload, canonicalizeAddress, canonicalizeDid, canonicalizeDidUrl, canonicalizeNetworkId, checkNodeInfo, composeManifestRequest, createCapabilityKeyRegistry, createSharingService, createSpaceService, defaultSignStrategy, defaultSpaceCreationHandler, didCacheKey, didEquals, expandActionShortNames, expandPermissionEntries, expandPermissionEntry, fetchLocationRecord, fetchPeerId, httpUrlToMultiaddr, isCapabilitySubset, isEvmAddress, loadManifest, locationPayloadForRecord, makePkhSpaceId, makePublicSpaceId, manifestAbilitiesUnion, multiaddrToHttpUrl, normalizeDefaults, parseCanonicalNetworkId, parseExpiry, parsePkhDid, parseRecapCapabilities, parseSpaceUri, pkhDid, principalDid, principalDidEquals, resolveCloudLocation, resolveManifest, resolveTinyCloudHosts, resourceCapabilitiesToAbilitiesMap, resourceCapabilitiesToSpaceAbilitiesMap, signLocationRecord, submitHostDelegation, validateClientSession, validateLocationRecord, validateLocationRecordPayload, validateManifest, validatePersistedSessionData, verifyDidKeyEd25519Signature, verifyLocationRecord };
4782
+ export { ACCOUNT_REGISTRY_PATH, ACCOUNT_REGISTRY_SPACE, type AbilitiesMap, type AccountApplication, type AccountDelegation, type AccountDelegationListOptions, type AccountDelegationRevokeOptions, type AccountIndexRebuildResult, AccountService, type AccountServiceConfig, type AccountStatus, AutoApproveSpaceCreationHandler, type AutoRejectStrategy, type AutoSignStrategy, type Bytes, type CallbackStrategy, type CanonicalAddress, type CanonicalParsedNetworkId, type CapabilityEntry, CapabilityKeyRegistry, type CapabilityKeyRegistryErrorCode, CapabilityKeyRegistryErrorCodes, type ClientSession, ClientSessionSchema, CloudLocationResolutionError, type ComposeManifestOptions, type ComposedManifestRequest, type CreateDelegationFunction, type CreateDelegationParams, type CreateDelegationWasmParams, type CreateDelegationWasmResult, DEFAULT_DEFAULTS, DEFAULT_EXPIRY, DEFAULT_MANIFEST_SPACE, DEFAULT_MANIFEST_VERSION, DEFAULT_SIGNED_READ_URL_EXPIRY_MS, DEFAULT_TINYCLOUD_FALLBACK_HOST, DEFAULT_TINYCLOUD_LOCATION_REGISTRY_URL, type DelegatedResource, type Delegation, type DelegationApiResponse, type DelegationChain, type DelegationChainV2, type DelegationDirection, type DelegationError, type DelegationErrorCode, DelegationErrorCodes, type DelegationFilters, DelegationManager, type DelegationManagerConfig, type DelegationRecord, type Result as DelegationResult, type DidCacheKeyOptions, type DidEqualsOptions, ENCRYPTION_MANIFEST_SPACE, ENCRYPTION_PERMISSION_SERVICE, EXPIRY, type EncodedShareData, type EnsData, EnsDataSchema, type EventEmitterStrategy, type ExpiryTier, type Extension, type GenerateShareParams, type ICapabilityKeyRegistry, type IENSResolver, type INotificationHandler, type ISessionManager, type ISessionStorage, type ISharingService, type ISigner, type ISpace, type ISpaceCreationHandler, type ISpaceScopedDelegations, type ISpaceScopedSharing, type ISpaceService, type IUserAuthorization, type IWasmBindings, IdentityParseError, type IngestOptions, type JWK, type KeyInfo, type KeyProvider, type KeyType, type LocationCandidate, type LocationCandidateInput, type LocationRecord, type LocationRecordPayload, type LocationRecordSigner, LocationRecordValidationError, type LocationResolutionAttempt, type LocationSource, type Manifest, type ManifestDefaults, type ManifestRegistryRecord, type ManifestSecretActions, ManifestValidationError, type NodeInfo, type ParseRecapFromSiwe, type PartialSiweMessage, type PermissionEntry, PermissionNotInManifestError, type PersistedSessionData, type PersistedTinyCloudSession, type PkhDidParts, ProtocolMismatchError, type ReceiveOptions, type ResolveCloudLocationOptions, type ResolveTinyCloudHostsOptions, type ResolvedCapabilities, type ResolvedCloudLocation, type ResolvedDelegate, type ResolvedTinyCloudHosts, type ResourceCapability, SERVICE_LONG_TO_SHORT, SERVICE_SHORT_TO_LONG, type ServerHost, SessionExpiredError, type ShareAccess, type ShareLink, type ShareLinkData, type ShareSchema, SharingService, type SharingServiceConfig, type SignCallback, type SignInOptions, type SignRequest, type SignResponse, type SignStrategy, SilentNotificationHandler, type SiweConfig, SiweConfigSchema, Space, type SpaceAbilitiesMap, type SpaceConfig, type SpaceCreationContext, type SpaceDelegationParams, type SpaceErrorCode, SpaceErrorCodes, type SpaceHostResult, type SpaceInfo, type SpaceOwnership, SpaceService, type SpaceServiceConfig, type StoredDelegationChain, type SubsetCheckResult, TinyCloud, type TinyCloudConfig, type TinyCloudSession, UnsupportedFeatureError, type UserAuthorizationConfig, VAULT_PERMISSION_SERVICE, type ValidationError, VersionCheckError, type WasmRecapEntry, activateSessionWithHost, addressStorageKey, applyPrefix, buildSpaceUri, canonicalLocationPayload, canonicalizeAddress, canonicalizeDid, canonicalizeDidUrl, canonicalizeNetworkId, checkNodeInfo, composeManifestRequest, createCapabilityKeyRegistry, createSharingService, createSpaceService, defaultSignStrategy, defaultSpaceCreationHandler, didCacheKey, didEquals, expandActionShortNames, expandPermissionEntries, expandPermissionEntry, fetchLocationRecord, fetchPeerId, httpUrlToMultiaddr, isCapabilitySubset, isEvmAddress, loadManifest, locationPayloadForRecord, makePkhSpaceId, makePublicSpaceId, manifestAbilitiesUnion, multiaddrToHttpUrl, normalizeDefaults, parseCanonicalNetworkId, parseExpiry, parsePkhDid, parseRecapCapabilities, parseSpaceUri, pkhDid, principalDid, principalDidEquals, resolveCloudLocation, resolveManifest, resolveTinyCloudHosts, resourceCapabilitiesToAbilitiesMap, resourceCapabilitiesToSpaceAbilitiesMap, signLocationRecord, submitHostDelegation, validateClientSession, validateLocationRecord, validateLocationRecordPayload, validateManifest, validatePersistedSessionData, verifyDidKeyEd25519Signature, verifyLocationRecord };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { InvokeFunction, InvokeAnyFunction, ParsedNetworkId, ServiceError, Result as Result$1, ServiceSession, FetchFunction, ServiceConstructor, RetryPolicy, TelemetryConfig, IServiceContext, IService, IKVService, ISQLService, IDuckDbService, IHooksService, IDataVaultService, IEncryptionService } from '@tinycloud/sdk-services';
2
+ import { InvokeFunction, InvokeAnyFunction, ParsedNetworkId, ServiceError, Result as Result$1, ServiceSession, FetchFunction, ServiceConstructor, RetryPolicy, TelemetryConfig, IServiceContext, IService, IKVService, ISQLService, IDuckDbService, IHooksService, IDataVaultService, IEncryptionService, IDatabaseHandle, SqlValue, QueryResponse } from '@tinycloud/sdk-services';
3
3
  export { BatchOptions, BatchResponse, BuildCanonicalDecryptRequestInput, BuildDecryptFactsInput, BuildDecryptInvocationInput, BuiltDecryptInvocation, CanonicalDecryptRequest, CanonicalJson, ColumnInfo, DECRYPT_ACTION, DECRYPT_FACT_TYPE, DECRYPT_RESULT_TYPE, DEFAULT_ENCRYPTION_ALG, DEFAULT_KEY_VERSION, DataVaultConfig, DataVaultService, DatabaseHandle, DecryptCapabilityProof, DecryptEnvelopeOptions, DecryptInvocationFact, DecryptInvocationSigner, DecryptRequestBody, DecryptResponseBody, DecryptTransport, DiscoverNetworkInput, DiscoveredNetwork, DiscoverySource, DuckDbAction, DuckDbActionType, DuckDbBatchOptions, DuckDbBatchResponse, DuckDbDatabaseHandle, DuckDbExecuteOptions, DuckDbExecuteResponse, DuckDbOptions, DuckDbQueryOptions, DuckDbQueryResponse, DuckDbService, DuckDbServiceConfig, DuckDbStatement, DuckDbValue, ENCRYPTION_NETWORK_URN_PREFIX, ENCRYPTION_SERVICE, ENCRYPTION_SERVICE_SHORT, ENVELOPE_VERSION, EncryptToNetworkInput, EncryptToNetworkOptions, EncryptToNetworkResult, EncryptionCrypto, EncryptionError, EncryptionErrorInput, EncryptionService, EncryptionServiceConfig, ErrorCode, ErrorCodes, ExecuteOptions, ExecuteResponse, FetchFunction, HookEvent, HookServiceName, HookStreamEvent, HookSubscription, HookWebhookListOptions, HookWebhookRecord, HookWebhookRegistration, HookWebhookScope, HookWebhookUnregisterOptions, HooksService, HooksServiceConfig, IDataVaultService, IDatabaseHandle, IDuckDbDatabaseHandle, IDuckDbService, IEncryptionService, IHooksService, IKVService, IPrefixedKVService, ISQLService, ISecretsService, IService, IServiceContext, InlineEncryptedEnvelope, InvokeAnyEntry, InvokeAnyFunction, InvokeFunction, KVCreateSignedReadUrlOptions, KVDeleteOptions, KVGetOptions, KVHeadOptions, KVListOptions, KVListResponse, KVPutOptions, KVResponse, KVResponseHeaders, KVService, KVServiceConfig, KVSignedReadUrlResponse, NETWORK_NAME_PATTERN, NetworkDescriptor, NetworkIdError, NodeDescriptorFetcher, ParsedNetworkId, PrefixedKVService, QueryOptions, QueryResponse, RandomReceiverKeyInput, ReceiverKeyPair, ReceiverKeySigner, ResolvedSecretPath, Result, RetryPolicy, SECRET_NAME_RE, SQLAction, SQLActionType, SQLService, SQLServiceConfig, SchemaInfo, SecretPayload, SecretScopeOptions, SecretsError, SecretsService, ServiceContext, ServiceContextConfig, ServiceError, ServiceSession, SignedReceiverKeyInput, SqlStatement, SqlValue, SubscribeOptions, TableInfo, TelemetryConfig, TelemetryEventHandler, VaultCrypto, VaultEntry, VaultError, VaultGetOptions, VaultGrantOptions, VaultHeaders, VaultListOptions, VaultPublicSpaceKVActions, VaultPutOptions, VerifyDecryptResponseInput, ViewInfo, WasmVaultFunctions, WellKnownDescriptorFetcher, buildCanonicalDecryptRequest, buildDecryptAttenuation, buildDecryptFacts, buildDecryptInvocation, buildNetworkId, canonicalHashHex, canonicalSignedResponse, canonicalizeEncryptionJson, canonicalizeSecretScope, checkDecryptInvocationInput, createVaultCrypto, decryptEnvelopeWithKey, defaultRetryPolicy, deriveSignedReceiverKey, discoverNetwork, encryptToNetwork, base64Decode as encryptionBase64Decode, base64Encode as encryptionBase64Encode, encryptionError, utf8Decode as encryptionUtf8Decode, utf8Encode as encryptionUtf8Encode, ensureNetworkUsableForDecrypt, err, generateRandomReceiverKey, hexDecode, hexEncode, isNetworkId, networkDiscoveryKey, ok, openWrappedKey, parseNetworkId, resolveSecretListPrefix, resolveSecretPath, serviceError, validateEnvelope, verifyDecryptResponse } from '@tinycloud/sdk-services';
4
4
  export { SiweMessage } from 'siwe';
5
5
 
@@ -3505,63 +3505,6 @@ declare class TinyCloud {
3505
3505
  static readPublicKey<T = unknown>(host: string, address: string, chainId: number, key: string, fetchFn?: FetchFunction): Promise<Result$1<T, ServiceError>>;
3506
3506
  }
3507
3507
 
3508
- /**
3509
- * Shared space utilities for TinyCloud.
3510
- *
3511
- * These functions are platform-agnostic and can be used by both
3512
- * web-sdk and node-sdk for space hosting and session activation.
3513
- */
3514
- /**
3515
- * Result of a space hosting or session activation attempt.
3516
- */
3517
- interface SpaceHostResult {
3518
- /** Whether the operation succeeded (2xx status) */
3519
- success: boolean;
3520
- /** HTTP status code */
3521
- status: number;
3522
- /** Error message if failed */
3523
- error?: string;
3524
- /** Space IDs that were successfully activated */
3525
- activated?: string[];
3526
- /** Space IDs that were skipped (e.g., space doesn't exist yet) */
3527
- skipped?: string[];
3528
- }
3529
- /**
3530
- * Fetch the peer ID from TinyCloud server for space hosting.
3531
- *
3532
- * The peer ID identifies the TinyCloud server instance that will host the space.
3533
- *
3534
- * @param host - TinyCloud server URL (e.g., "https://node.tinycloud.xyz")
3535
- * @param spaceId - The space ID to host
3536
- * @returns The peer ID string
3537
- * @throws Error if the request fails
3538
- */
3539
- declare function fetchPeerId(host: string, spaceId: string): Promise<string>;
3540
- /**
3541
- * Submit a space hosting delegation to TinyCloud server.
3542
- *
3543
- * This registers a new space with the server, allowing the user
3544
- * to store data in it.
3545
- *
3546
- * @param host - TinyCloud server URL
3547
- * @param headers - Delegation headers (from siweToDelegationHeaders)
3548
- * @returns Result indicating success/failure
3549
- */
3550
- declare function submitHostDelegation(host: string, headers: Record<string, string>): Promise<SpaceHostResult>;
3551
- /**
3552
- * Activate a session with TinyCloud server.
3553
- *
3554
- * This submits the session delegation to the server, enabling the session
3555
- * key to perform operations on behalf of the user.
3556
- *
3557
- * @param host - TinyCloud server URL
3558
- * @param delegationHeader - Session delegation header (from session.delegationHeader)
3559
- * @returns Result indicating success/failure (404 means space doesn't exist)
3560
- */
3561
- declare function activateSessionWithHost(host: string, delegationHeader: {
3562
- Authorization: string;
3563
- }): Promise<SpaceHostResult>;
3564
-
3565
3508
  /**
3566
3509
  * DelegationManager - Handles delegation CRUD operations.
3567
3510
  *
@@ -4535,6 +4478,145 @@ declare class SpaceService implements ISpaceService {
4535
4478
  */
4536
4479
  declare function createSpaceService(config: SpaceServiceConfig): ISpaceService;
4537
4480
 
4481
+ interface AccountApplication {
4482
+ appId: string;
4483
+ manifests: Manifest[];
4484
+ updatedAt?: string;
4485
+ name?: string;
4486
+ description?: string;
4487
+ }
4488
+ interface AccountDelegation {
4489
+ cid: string;
4490
+ direction: "granted" | "received";
4491
+ spaceId: string;
4492
+ spaceName?: string;
4493
+ counterpartyDid: string;
4494
+ delegateDid: string;
4495
+ delegatorDid?: string;
4496
+ path: string;
4497
+ actions: string[];
4498
+ expiry: Date;
4499
+ status: "active" | "expired" | "revoked";
4500
+ createdAt?: Date;
4501
+ }
4502
+ interface AccountStatus {
4503
+ did: string;
4504
+ host: string;
4505
+ primarySpaceId?: string;
4506
+ accountSpaceId?: string;
4507
+ applications: number;
4508
+ grantedDelegations: number;
4509
+ receivedDelegations: number;
4510
+ }
4511
+ interface AccountIndexRebuildResult {
4512
+ database: string;
4513
+ applications: number;
4514
+ delegations: number;
4515
+ syncedAt: string;
4516
+ }
4517
+ interface AccountDelegationListOptions {
4518
+ direction?: "granted" | "received" | "all";
4519
+ space?: string;
4520
+ }
4521
+ interface AccountDelegationRevokeOptions {
4522
+ cid: string;
4523
+ space: string;
4524
+ }
4525
+ interface AccountServiceConfig {
4526
+ getDid: () => string;
4527
+ getHost: () => string;
4528
+ getPrimarySpaceId: () => string | undefined;
4529
+ getAccountSpaceId: () => string | undefined;
4530
+ getSpaces: () => ISpaceService;
4531
+ getAccountDb?: () => IDatabaseHandle | undefined;
4532
+ ensureAccountSpaceHosted?: () => Promise<void>;
4533
+ }
4534
+ declare class AccountService {
4535
+ private readonly config;
4536
+ constructor(config: AccountServiceConfig);
4537
+ status(): Promise<Result$1<AccountStatus>>;
4538
+ readonly applications: {
4539
+ list: () => Promise<Result$1<AccountApplication[]>>;
4540
+ get: (appId: string) => Promise<Result$1<AccountApplication>>;
4541
+ register: (manifest: Manifest | Manifest[]) => Promise<Result$1<AccountApplication>>;
4542
+ remove: (appId: string) => Promise<Result$1<void>>;
4543
+ };
4544
+ readonly delegations: {
4545
+ list: (options?: AccountDelegationListOptions) => Promise<Result$1<AccountDelegation[]>>;
4546
+ revoke: (options: AccountDelegationRevokeOptions) => Promise<Result$1<void>>;
4547
+ };
4548
+ readonly index: {
4549
+ rebuild: () => Promise<Result$1<AccountIndexRebuildResult>>;
4550
+ applications: {
4551
+ list: () => Promise<Result$1<AccountApplication[]>>;
4552
+ };
4553
+ delegations: {
4554
+ list: (options?: AccountDelegationListOptions) => Promise<Result$1<AccountDelegation[]>>;
4555
+ };
4556
+ query: <T = Record<string, unknown>>(sql: string, params?: SqlValue[]) => Promise<Result$1<QueryResponse<T>>>;
4557
+ };
4558
+ private accountKV;
4559
+ private accountDb;
4560
+ private resolveSpace;
4561
+ }
4562
+
4563
+ /**
4564
+ * Shared space utilities for TinyCloud.
4565
+ *
4566
+ * These functions are platform-agnostic and can be used by both
4567
+ * web-sdk and node-sdk for space hosting and session activation.
4568
+ */
4569
+ /**
4570
+ * Result of a space hosting or session activation attempt.
4571
+ */
4572
+ interface SpaceHostResult {
4573
+ /** Whether the operation succeeded (2xx status) */
4574
+ success: boolean;
4575
+ /** HTTP status code */
4576
+ status: number;
4577
+ /** Error message if failed */
4578
+ error?: string;
4579
+ /** Space IDs that were successfully activated */
4580
+ activated?: string[];
4581
+ /** Space IDs that were skipped (e.g., space doesn't exist yet) */
4582
+ skipped?: string[];
4583
+ }
4584
+ /**
4585
+ * Fetch the peer ID from TinyCloud server for space hosting.
4586
+ *
4587
+ * The peer ID identifies the TinyCloud server instance that will host the space.
4588
+ *
4589
+ * @param host - TinyCloud server URL (e.g., "https://node.tinycloud.xyz")
4590
+ * @param spaceId - The space ID to host
4591
+ * @returns The peer ID string
4592
+ * @throws Error if the request fails
4593
+ */
4594
+ declare function fetchPeerId(host: string, spaceId: string): Promise<string>;
4595
+ /**
4596
+ * Submit a space hosting delegation to TinyCloud server.
4597
+ *
4598
+ * This registers a new space with the server, allowing the user
4599
+ * to store data in it.
4600
+ *
4601
+ * @param host - TinyCloud server URL
4602
+ * @param headers - Delegation headers (from siweToDelegationHeaders)
4603
+ * @returns Result indicating success/failure
4604
+ */
4605
+ declare function submitHostDelegation(host: string, headers: Record<string, string>): Promise<SpaceHostResult>;
4606
+ /**
4607
+ * Activate a session with TinyCloud server.
4608
+ *
4609
+ * This submits the session delegation to the server, enabling the session
4610
+ * key to perform operations on behalf of the user.
4611
+ *
4612
+ * @param host - TinyCloud server URL
4613
+ * @param delegationHeader - Session delegation header (from session.delegationHeader)
4614
+ * @returns Result indicating success/failure (404 means space doesn't exist)
4615
+ */
4616
+ declare function activateSessionWithHost(host: string, delegationHeader: {
4617
+ Authorization: string;
4618
+ }): Promise<SpaceHostResult>;
4619
+
4538
4620
  /**
4539
4621
  * Protocol version checking for SDK-to-node compatibility.
4540
4622
  *
@@ -4697,4 +4779,4 @@ declare const EXPIRY: {
4697
4779
  declare const DEFAULT_SIGNED_READ_URL_EXPIRY_MS: number;
4698
4780
  type ExpiryTier = keyof typeof EXPIRY;
4699
4781
 
4700
- export { ACCOUNT_REGISTRY_PATH, ACCOUNT_REGISTRY_SPACE, type AbilitiesMap, AutoApproveSpaceCreationHandler, type AutoRejectStrategy, type AutoSignStrategy, type Bytes, type CallbackStrategy, type CanonicalAddress, type CanonicalParsedNetworkId, type CapabilityEntry, CapabilityKeyRegistry, type CapabilityKeyRegistryErrorCode, CapabilityKeyRegistryErrorCodes, type ClientSession, ClientSessionSchema, CloudLocationResolutionError, type ComposeManifestOptions, type ComposedManifestRequest, type CreateDelegationFunction, type CreateDelegationParams, type CreateDelegationWasmParams, type CreateDelegationWasmResult, DEFAULT_DEFAULTS, DEFAULT_EXPIRY, DEFAULT_MANIFEST_SPACE, DEFAULT_MANIFEST_VERSION, DEFAULT_SIGNED_READ_URL_EXPIRY_MS, DEFAULT_TINYCLOUD_FALLBACK_HOST, DEFAULT_TINYCLOUD_LOCATION_REGISTRY_URL, type DelegatedResource, type Delegation, type DelegationApiResponse, type DelegationChain, type DelegationChainV2, type DelegationDirection, type DelegationError, type DelegationErrorCode, DelegationErrorCodes, type DelegationFilters, DelegationManager, type DelegationManagerConfig, type DelegationRecord, type Result as DelegationResult, type DidCacheKeyOptions, type DidEqualsOptions, ENCRYPTION_MANIFEST_SPACE, ENCRYPTION_PERMISSION_SERVICE, EXPIRY, type EncodedShareData, type EnsData, EnsDataSchema, type EventEmitterStrategy, type ExpiryTier, type Extension, type GenerateShareParams, type ICapabilityKeyRegistry, type IENSResolver, type INotificationHandler, type ISessionManager, type ISessionStorage, type ISharingService, type ISigner, type ISpace, type ISpaceCreationHandler, type ISpaceScopedDelegations, type ISpaceScopedSharing, type ISpaceService, type IUserAuthorization, type IWasmBindings, IdentityParseError, type IngestOptions, type JWK, type KeyInfo, type KeyProvider, type KeyType, type LocationCandidate, type LocationCandidateInput, type LocationRecord, type LocationRecordPayload, type LocationRecordSigner, LocationRecordValidationError, type LocationResolutionAttempt, type LocationSource, type Manifest, type ManifestDefaults, type ManifestRegistryRecord, type ManifestSecretActions, ManifestValidationError, type NodeInfo, type ParseRecapFromSiwe, type PartialSiweMessage, type PermissionEntry, PermissionNotInManifestError, type PersistedSessionData, type PersistedTinyCloudSession, type PkhDidParts, ProtocolMismatchError, type ReceiveOptions, type ResolveCloudLocationOptions, type ResolveTinyCloudHostsOptions, type ResolvedCapabilities, type ResolvedCloudLocation, type ResolvedDelegate, type ResolvedTinyCloudHosts, type ResourceCapability, SERVICE_LONG_TO_SHORT, SERVICE_SHORT_TO_LONG, type ServerHost, SessionExpiredError, type ShareAccess, type ShareLink, type ShareLinkData, type ShareSchema, SharingService, type SharingServiceConfig, type SignCallback, type SignInOptions, type SignRequest, type SignResponse, type SignStrategy, SilentNotificationHandler, type SiweConfig, SiweConfigSchema, Space, type SpaceAbilitiesMap, type SpaceConfig, type SpaceCreationContext, type SpaceDelegationParams, type SpaceErrorCode, SpaceErrorCodes, type SpaceHostResult, type SpaceInfo, type SpaceOwnership, SpaceService, type SpaceServiceConfig, type StoredDelegationChain, type SubsetCheckResult, TinyCloud, type TinyCloudConfig, type TinyCloudSession, UnsupportedFeatureError, type UserAuthorizationConfig, VAULT_PERMISSION_SERVICE, type ValidationError, VersionCheckError, type WasmRecapEntry, activateSessionWithHost, addressStorageKey, applyPrefix, buildSpaceUri, canonicalLocationPayload, canonicalizeAddress, canonicalizeDid, canonicalizeDidUrl, canonicalizeNetworkId, checkNodeInfo, composeManifestRequest, createCapabilityKeyRegistry, createSharingService, createSpaceService, defaultSignStrategy, defaultSpaceCreationHandler, didCacheKey, didEquals, expandActionShortNames, expandPermissionEntries, expandPermissionEntry, fetchLocationRecord, fetchPeerId, httpUrlToMultiaddr, isCapabilitySubset, isEvmAddress, loadManifest, locationPayloadForRecord, makePkhSpaceId, makePublicSpaceId, manifestAbilitiesUnion, multiaddrToHttpUrl, normalizeDefaults, parseCanonicalNetworkId, parseExpiry, parsePkhDid, parseRecapCapabilities, parseSpaceUri, pkhDid, principalDid, principalDidEquals, resolveCloudLocation, resolveManifest, resolveTinyCloudHosts, resourceCapabilitiesToAbilitiesMap, resourceCapabilitiesToSpaceAbilitiesMap, signLocationRecord, submitHostDelegation, validateClientSession, validateLocationRecord, validateLocationRecordPayload, validateManifest, validatePersistedSessionData, verifyDidKeyEd25519Signature, verifyLocationRecord };
4782
+ export { ACCOUNT_REGISTRY_PATH, ACCOUNT_REGISTRY_SPACE, type AbilitiesMap, type AccountApplication, type AccountDelegation, type AccountDelegationListOptions, type AccountDelegationRevokeOptions, type AccountIndexRebuildResult, AccountService, type AccountServiceConfig, type AccountStatus, AutoApproveSpaceCreationHandler, type AutoRejectStrategy, type AutoSignStrategy, type Bytes, type CallbackStrategy, type CanonicalAddress, type CanonicalParsedNetworkId, type CapabilityEntry, CapabilityKeyRegistry, type CapabilityKeyRegistryErrorCode, CapabilityKeyRegistryErrorCodes, type ClientSession, ClientSessionSchema, CloudLocationResolutionError, type ComposeManifestOptions, type ComposedManifestRequest, type CreateDelegationFunction, type CreateDelegationParams, type CreateDelegationWasmParams, type CreateDelegationWasmResult, DEFAULT_DEFAULTS, DEFAULT_EXPIRY, DEFAULT_MANIFEST_SPACE, DEFAULT_MANIFEST_VERSION, DEFAULT_SIGNED_READ_URL_EXPIRY_MS, DEFAULT_TINYCLOUD_FALLBACK_HOST, DEFAULT_TINYCLOUD_LOCATION_REGISTRY_URL, type DelegatedResource, type Delegation, type DelegationApiResponse, type DelegationChain, type DelegationChainV2, type DelegationDirection, type DelegationError, type DelegationErrorCode, DelegationErrorCodes, type DelegationFilters, DelegationManager, type DelegationManagerConfig, type DelegationRecord, type Result as DelegationResult, type DidCacheKeyOptions, type DidEqualsOptions, ENCRYPTION_MANIFEST_SPACE, ENCRYPTION_PERMISSION_SERVICE, EXPIRY, type EncodedShareData, type EnsData, EnsDataSchema, type EventEmitterStrategy, type ExpiryTier, type Extension, type GenerateShareParams, type ICapabilityKeyRegistry, type IENSResolver, type INotificationHandler, type ISessionManager, type ISessionStorage, type ISharingService, type ISigner, type ISpace, type ISpaceCreationHandler, type ISpaceScopedDelegations, type ISpaceScopedSharing, type ISpaceService, type IUserAuthorization, type IWasmBindings, IdentityParseError, type IngestOptions, type JWK, type KeyInfo, type KeyProvider, type KeyType, type LocationCandidate, type LocationCandidateInput, type LocationRecord, type LocationRecordPayload, type LocationRecordSigner, LocationRecordValidationError, type LocationResolutionAttempt, type LocationSource, type Manifest, type ManifestDefaults, type ManifestRegistryRecord, type ManifestSecretActions, ManifestValidationError, type NodeInfo, type ParseRecapFromSiwe, type PartialSiweMessage, type PermissionEntry, PermissionNotInManifestError, type PersistedSessionData, type PersistedTinyCloudSession, type PkhDidParts, ProtocolMismatchError, type ReceiveOptions, type ResolveCloudLocationOptions, type ResolveTinyCloudHostsOptions, type ResolvedCapabilities, type ResolvedCloudLocation, type ResolvedDelegate, type ResolvedTinyCloudHosts, type ResourceCapability, SERVICE_LONG_TO_SHORT, SERVICE_SHORT_TO_LONG, type ServerHost, SessionExpiredError, type ShareAccess, type ShareLink, type ShareLinkData, type ShareSchema, SharingService, type SharingServiceConfig, type SignCallback, type SignInOptions, type SignRequest, type SignResponse, type SignStrategy, SilentNotificationHandler, type SiweConfig, SiweConfigSchema, Space, type SpaceAbilitiesMap, type SpaceConfig, type SpaceCreationContext, type SpaceDelegationParams, type SpaceErrorCode, SpaceErrorCodes, type SpaceHostResult, type SpaceInfo, type SpaceOwnership, SpaceService, type SpaceServiceConfig, type StoredDelegationChain, type SubsetCheckResult, TinyCloud, type TinyCloudConfig, type TinyCloudSession, UnsupportedFeatureError, type UserAuthorizationConfig, VAULT_PERMISSION_SERVICE, type ValidationError, VersionCheckError, type WasmRecapEntry, activateSessionWithHost, addressStorageKey, applyPrefix, buildSpaceUri, canonicalLocationPayload, canonicalizeAddress, canonicalizeDid, canonicalizeDidUrl, canonicalizeNetworkId, checkNodeInfo, composeManifestRequest, createCapabilityKeyRegistry, createSharingService, createSpaceService, defaultSignStrategy, defaultSpaceCreationHandler, didCacheKey, didEquals, expandActionShortNames, expandPermissionEntries, expandPermissionEntry, fetchLocationRecord, fetchPeerId, httpUrlToMultiaddr, isCapabilitySubset, isEvmAddress, loadManifest, locationPayloadForRecord, makePkhSpaceId, makePublicSpaceId, manifestAbilitiesUnion, multiaddrToHttpUrl, normalizeDefaults, parseCanonicalNetworkId, parseExpiry, parsePkhDid, parseRecapCapabilities, parseSpaceUri, pkhDid, principalDid, principalDidEquals, resolveCloudLocation, resolveManifest, resolveTinyCloudHosts, resourceCapabilitiesToAbilitiesMap, resourceCapabilitiesToSpaceAbilitiesMap, signLocationRecord, submitHostDelegation, validateClientSession, validateLocationRecord, validateLocationRecordPayload, validateManifest, validatePersistedSessionData, verifyDidKeyEd25519Signature, verifyLocationRecord };