@tinycloud/sdk-core 2.4.0-beta.1 → 2.4.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.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
 
@@ -959,6 +959,14 @@ declare const PersistedSessionDataSchema: z.ZodObject<{
959
959
  domain?: string | null | undefined;
960
960
  avatarUrl?: string | null | undefined;
961
961
  }>>;
962
+ /**
963
+ * TinyCloud hosts this session was created against. Persisted so a
964
+ * restored session resolves to the same node without re-running the
965
+ * registry/fallback resolution (or the wallet sign-in flow). Optional
966
+ * for backward compatibility with sessions persisted before this field
967
+ * existed — those restore and lazily re-resolve their hosts.
968
+ */
969
+ tinycloudHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
962
970
  }, "strip", z.ZodTypeAny, {
963
971
  chainId: number;
964
972
  address: string;
@@ -981,6 +989,7 @@ declare const PersistedSessionDataSchema: z.ZodObject<{
981
989
  verificationMethod: string;
982
990
  spaces?: Record<string, string> | undefined;
983
991
  } | undefined;
992
+ tinycloudHosts?: string[] | undefined;
984
993
  }, {
985
994
  chainId: number;
986
995
  address: string;
@@ -1003,6 +1012,7 @@ declare const PersistedSessionDataSchema: z.ZodObject<{
1003
1012
  verificationMethod: string;
1004
1013
  spaces?: Record<string, string> | undefined;
1005
1014
  } | undefined;
1015
+ tinycloudHosts?: string[] | undefined;
1006
1016
  }>;
1007
1017
  type PersistedSessionData = z.infer<typeof PersistedSessionDataSchema>;
1008
1018
  /**
@@ -3505,63 +3515,6 @@ declare class TinyCloud {
3505
3515
  static readPublicKey<T = unknown>(host: string, address: string, chainId: number, key: string, fetchFn?: FetchFunction): Promise<Result$1<T, ServiceError>>;
3506
3516
  }
3507
3517
 
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
3518
  /**
3566
3519
  * DelegationManager - Handles delegation CRUD operations.
3567
3520
  *
@@ -4312,6 +4265,8 @@ interface SpaceServiceConfig {
4312
4265
  * Required for space.delegations.create() to work.
4313
4266
  */
4314
4267
  createDelegation?: CreateDelegationFunction;
4268
+ /** Optional best-effort hook after the SDK discovers or creates a space. */
4269
+ onSpaceRegistered?: (space: SpaceInfo) => void | Promise<void>;
4315
4270
  }
4316
4271
  /**
4317
4272
  * Interface for SpaceService.
@@ -4432,6 +4387,7 @@ declare class SpaceService implements ISpaceService {
4432
4387
  private _userDid?;
4433
4388
  private sharingService?;
4434
4389
  private createDelegationFn?;
4390
+ private onSpaceRegisteredFn?;
4435
4391
  /** Cache of created Space objects */
4436
4392
  private spaceCache;
4437
4393
  /** Cache of space info */
@@ -4489,6 +4445,7 @@ declare class SpaceService implements ISpaceService {
4489
4445
  * @param name - The name for the new space
4490
4446
  */
4491
4447
  create(name: string): Promise<Result$1<SpaceInfo, ServiceError>>;
4448
+ private notifySpaceRegistered;
4492
4449
  /**
4493
4450
  * Get a Space object by name or full URI.
4494
4451
  *
@@ -4535,6 +4492,200 @@ declare class SpaceService implements ISpaceService {
4535
4492
  */
4536
4493
  declare function createSpaceService(config: SpaceServiceConfig): ISpaceService;
4537
4494
 
4495
+ interface AccountApplication {
4496
+ appId: string;
4497
+ manifests: Manifest[];
4498
+ updatedAt?: string;
4499
+ name?: string;
4500
+ description?: string;
4501
+ manifestHash?: string;
4502
+ }
4503
+ interface AccountSpace {
4504
+ spaceId: string;
4505
+ name: string;
4506
+ ownerDid: string;
4507
+ type: "owned" | "delegated" | "discovered";
4508
+ permissions: string[];
4509
+ status: "active" | "archived";
4510
+ registeredAt?: string;
4511
+ updatedAt?: string;
4512
+ expiresAt?: Date;
4513
+ }
4514
+ interface AccountDelegation {
4515
+ cid: string;
4516
+ direction: "granted" | "received";
4517
+ spaceId: string;
4518
+ spaceName?: string;
4519
+ counterpartyDid: string;
4520
+ delegateDid: string;
4521
+ delegatorDid?: string;
4522
+ path: string;
4523
+ actions: string[];
4524
+ expiry: Date;
4525
+ status: "active" | "expired" | "revoked";
4526
+ createdAt?: Date;
4527
+ }
4528
+ interface AccountStatus {
4529
+ did: string;
4530
+ host: string;
4531
+ primarySpaceId?: string;
4532
+ accountSpaceId?: string;
4533
+ applications: number;
4534
+ spaces: number;
4535
+ grantedDelegations: number;
4536
+ receivedDelegations: number;
4537
+ }
4538
+ interface AccountIndexRebuildResult {
4539
+ database: string;
4540
+ applications: number;
4541
+ spaces: number;
4542
+ delegations: number;
4543
+ syncedAt: string;
4544
+ }
4545
+ interface AccountIndexedReadOptions {
4546
+ preferIndex?: boolean;
4547
+ refreshIndex?: boolean;
4548
+ }
4549
+ type AccountApplicationListOptions = AccountIndexedReadOptions;
4550
+ type AccountSpaceListOptions = AccountIndexedReadOptions;
4551
+ interface AccountDelegationListOptions {
4552
+ direction?: "granted" | "received" | "all";
4553
+ space?: string;
4554
+ preferIndex?: boolean;
4555
+ refreshIndex?: boolean;
4556
+ }
4557
+ interface AccountDelegationRevokeOptions {
4558
+ cid: string;
4559
+ space: string;
4560
+ }
4561
+ interface AccountServiceConfig {
4562
+ getDid: () => string;
4563
+ getHost: () => string;
4564
+ getPrimarySpaceId: () => string | undefined;
4565
+ getAccountSpaceId: () => string | undefined;
4566
+ getSpaces: () => ISpaceService;
4567
+ getAccountDb?: () => IDatabaseHandle | undefined;
4568
+ ensureAccountSpaceHosted?: () => Promise<void>;
4569
+ }
4570
+ declare class AccountService {
4571
+ private readonly config;
4572
+ constructor(config: AccountServiceConfig);
4573
+ status(): Promise<Result$1<AccountStatus>>;
4574
+ readonly applications: {
4575
+ list: (options?: AccountApplicationListOptions) => Promise<Result$1<AccountApplication[]>>;
4576
+ get: (appId: string) => Promise<Result$1<AccountApplication>>;
4577
+ register: (manifest: Manifest | Manifest[]) => Promise<Result$1<AccountApplication>>;
4578
+ remove: (appId: string) => Promise<Result$1<void>>;
4579
+ };
4580
+ readonly spaces: {
4581
+ list: (options?: AccountSpaceListOptions) => Promise<Result$1<AccountSpace[]>>;
4582
+ get: (spaceId: string) => Promise<Result$1<AccountSpace>>;
4583
+ register: (space: SpaceInfo | AccountSpace) => Promise<Result$1<AccountSpace>>;
4584
+ syncAccessible: () => Promise<Result$1<AccountSpace[]>>;
4585
+ remove: (spaceId: string) => Promise<Result$1<void>>;
4586
+ };
4587
+ readonly delegations: {
4588
+ list: (options?: AccountDelegationListOptions) => Promise<Result$1<AccountDelegation[]>>;
4589
+ revoke: (options: AccountDelegationRevokeOptions) => Promise<Result$1<void>>;
4590
+ };
4591
+ readonly index: {
4592
+ rebuild: () => Promise<Result$1<AccountIndexRebuildResult>>;
4593
+ applications: {
4594
+ list: () => Promise<Result$1<AccountApplication[]>>;
4595
+ };
4596
+ spaces: {
4597
+ list: () => Promise<Result$1<AccountSpace[]>>;
4598
+ };
4599
+ delegations: {
4600
+ list: (options?: AccountDelegationListOptions) => Promise<Result$1<AccountDelegation[]>>;
4601
+ };
4602
+ query: <T = Record<string, unknown>>(sql: string, params?: SqlValue[]) => Promise<Result$1<QueryResponse<T>>>;
4603
+ status: () => Promise<Result$1<AccountIndexStatus>>;
4604
+ };
4605
+ private accountKV;
4606
+ private accountDb;
4607
+ private indexHasApplicationHash;
4608
+ private upsertApplicationIndexQuietly;
4609
+ private upsertApplicationIndex;
4610
+ private deleteApplicationIndexQuietly;
4611
+ private deleteApplicationIndex;
4612
+ private upsertSpaceIndexQuietly;
4613
+ private upsertSpaceIndex;
4614
+ private deleteSpaceIndexQuietly;
4615
+ private deleteSpaceIndex;
4616
+ private resolveSpace;
4617
+ private replaceApplicationsIndexQuietly;
4618
+ private replaceSpacesIndexQuietly;
4619
+ private replaceDelegationsIndexQuietly;
4620
+ private ensureAccountIndex;
4621
+ }
4622
+ interface AccountIndexStatus {
4623
+ database: string;
4624
+ state: "ready" | "missing";
4625
+ sources: Array<{
4626
+ source: string;
4627
+ syncedAt: string;
4628
+ count: number;
4629
+ }>;
4630
+ }
4631
+
4632
+ /**
4633
+ * Shared space utilities for TinyCloud.
4634
+ *
4635
+ * These functions are platform-agnostic and can be used by both
4636
+ * web-sdk and node-sdk for space hosting and session activation.
4637
+ */
4638
+ /**
4639
+ * Result of a space hosting or session activation attempt.
4640
+ */
4641
+ interface SpaceHostResult {
4642
+ /** Whether the operation succeeded (2xx status) */
4643
+ success: boolean;
4644
+ /** HTTP status code */
4645
+ status: number;
4646
+ /** Error message if failed */
4647
+ error?: string;
4648
+ /** Space IDs that were successfully activated */
4649
+ activated?: string[];
4650
+ /** Space IDs that were skipped (e.g., space doesn't exist yet) */
4651
+ skipped?: string[];
4652
+ }
4653
+ /**
4654
+ * Fetch the peer ID from TinyCloud server for space hosting.
4655
+ *
4656
+ * The peer ID identifies the TinyCloud server instance that will host the space.
4657
+ *
4658
+ * @param host - TinyCloud server URL (e.g., "https://node.tinycloud.xyz")
4659
+ * @param spaceId - The space ID to host
4660
+ * @returns The peer ID string
4661
+ * @throws Error if the request fails
4662
+ */
4663
+ declare function fetchPeerId(host: string, spaceId: string): Promise<string>;
4664
+ /**
4665
+ * Submit a space hosting delegation to TinyCloud server.
4666
+ *
4667
+ * This registers a new space with the server, allowing the user
4668
+ * to store data in it.
4669
+ *
4670
+ * @param host - TinyCloud server URL
4671
+ * @param headers - Delegation headers (from siweToDelegationHeaders)
4672
+ * @returns Result indicating success/failure
4673
+ */
4674
+ declare function submitHostDelegation(host: string, headers: Record<string, string>): Promise<SpaceHostResult>;
4675
+ /**
4676
+ * Activate a session with TinyCloud server.
4677
+ *
4678
+ * This submits the session delegation to the server, enabling the session
4679
+ * key to perform operations on behalf of the user.
4680
+ *
4681
+ * @param host - TinyCloud server URL
4682
+ * @param delegationHeader - Session delegation header (from session.delegationHeader)
4683
+ * @returns Result indicating success/failure (404 means space doesn't exist)
4684
+ */
4685
+ declare function activateSessionWithHost(host: string, delegationHeader: {
4686
+ Authorization: string;
4687
+ }): Promise<SpaceHostResult>;
4688
+
4538
4689
  /**
4539
4690
  * Protocol version checking for SDK-to-node compatibility.
4540
4691
  *
@@ -4697,4 +4848,4 @@ declare const EXPIRY: {
4697
4848
  declare const DEFAULT_SIGNED_READ_URL_EXPIRY_MS: number;
4698
4849
  type ExpiryTier = keyof typeof EXPIRY;
4699
4850
 
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 };
4851
+ export { ACCOUNT_REGISTRY_PATH, ACCOUNT_REGISTRY_SPACE, type AbilitiesMap, type AccountApplication, type AccountApplicationListOptions, type AccountDelegation, type AccountDelegationListOptions, type AccountDelegationRevokeOptions, type AccountIndexRebuildResult, type AccountIndexStatus, type AccountIndexedReadOptions, AccountService, type AccountServiceConfig, type AccountSpace, type AccountSpaceListOptions, 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 };