@tinycloud/sdk-core 2.11.0-beta.0 → 2.11.0-beta.10

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
@@ -2,8 +2,8 @@ import { z } from 'zod';
2
2
  import { InvokeFunction, InvokeAnyFunction, ParsedNetworkId, ServiceError, Result, FetchFunction, ServiceConstructor, RetryPolicy, TelemetryConfig, IServiceContext, IService, IKVService, ISQLService, IDuckDbService, IHooksService, IDataVaultService, IEncryptionService, ISecretsService, ServiceSession, 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, DecryptTransportResponseError, 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, KVBatchReadResponse, 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, TinyCloudDebugEnableOptions, TinyCloudDebugEvent, TinyCloudDebugLevel, TinyCloudDebugLogger, TinyCloudDebugTimer, VaultCrypto, VaultEntry, VaultError, VaultGetOptions, VaultGrantOptions, VaultHeaders, VaultListOptions, VaultNetworkReadResult, VaultPublicSpaceKVActions, VaultPutOptions, VerifyDecryptResponseInput, ViewInfo, WasmVaultFunctions, WellKnownDescriptorFetcher, buildCanonicalDecryptRequest, buildDecryptAttenuation, buildDecryptFacts, buildDecryptInvocation, buildNetworkId, canonicalHashHex, canonicalSignedResponse, canonicalizeEncryptionJson, canonicalizeSecretScope, checkDecryptInvocationInput, clearTinyCloudDebugLogs, createVaultCrypto, decryptEnvelopeWithKey, defaultRetryPolicy, deriveSignedReceiverKey, disableTinyCloudDebug, discoverNetwork, enableTinyCloudDebug, encryptToNetwork, base64Decode as encryptionBase64Decode, base64Encode as encryptionBase64Encode, encryptionError, utf8Decode as encryptionUtf8Decode, utf8Encode as encryptionUtf8Encode, ensureNetworkUsableForDecrypt, err, generateRandomReceiverKey, getTinyCloudDebugLogs, hexDecode, hexEncode, installTinyCloudDebugGlobals, isNetworkId, networkDiscoveryKey, ok, openWrappedKey, parseNetworkId, resolveSecretListPrefix, resolveSecretPath, serviceError, tinyCloudDebugLogger, validateEnvelope, verifyDecryptResponse } from '@tinycloud/sdk-services';
4
4
  export { HOLDER_KEY_BINDING_PRESENTATION_SCHEMA, HolderKeyBindingPresentation, LISTEN_SQL_STATEMENT_CATALOG, ListenSqlStatementName, POLICY_ENGINE_CHALLENGE_REQUEST_SCHEMA, POLICY_ENGINE_CHALLENGE_RESPONSE_SCHEMA, POLICY_ENGINE_DENIAL_SCHEMA, POLICY_ENGINE_GRANT_PRESENTATION_DENIAL_CODES, POLICY_ENGINE_RESOLVE_REQUEST_SCHEMA, PORTABLE_DELEGATION_SCHEMA, PolicyEngineGrantPresentationDenialCode, PortableDelegation, REQUESTER_ENGINE_RETRY_ATTEMPTS, REQUESTER_ENGINE_RETRY_MAX_DELAY_MS, REQUESTER_NEAR_EXPIRY_SECONDS, RequesterEndpointResolution, RequesterHttpRequest, RequesterHttpResponse, RequesterInvocationCapability, RequesterSigningCapability, RequesterTransport, TranscriptRequester, TranscriptRequesterError, TranscriptRequesterErrorCode, TranscriptRequesterErrorState, TranscriptRequesterOptions, TranscriptRequesterReadKvResult, TranscriptRequesterReadSqlResult, createTranscriptRequester, deriveDelegationCid, parseNodeNativePortableDelegation } from './requester/index.js';
5
- import { m as Delegation, e as CreateDelegationParams, G as GenerateShareParams, az as ShareLink, b8 as SpaceInfo, I as ICapabilityKeyRegistry, y as ISharingService, D as DelegationManager, b as AccountDelegationQueryOptions, A as AccountDelegationPage, w as DelegationRevocationReceipt } from './recipient-types.schema-B2wH53_t.js';
6
- export { c as AccountDelegationRecord, d as AccountDelegationResource, C as CapabilityEntry, bH as CapabilityKeyRegistry, bI as CapabilityKeyRegistryErrorCode, bJ as CapabilityKeyRegistryErrorCodes, f as CreateDelegationWasmParams, g as CreateDelegationWasmResult, h as CreateOwnerDelegationParams, i as DelegateReceivedShareParams, j as DelegatedResource, k as DelegatedShareAccess, l as DelegatedShareKey, n as DelegationApiResponse, o as DelegationChain, p as DelegationChainV2, q as DelegationDirection, a as DelegationError, r as DelegationErrorCode, s as DelegationErrorCodes, t as DelegationFilters, u as DelegationManagerConfig, v as DelegationRecord, R as DelegationResult, x as DelegationStatus, E as EncodedShareData, z as IngestOptions, J as JWK, K as KeyInfo, B as KeyProvider, F as KeyType, M as MAX_CONTENT_BYTES, H as MAX_SEALED_SHARE_CONTENT_BYTES, L as MAX_SHARE_ARTIFACT_BYTES, N as MAX_SHARE_CONTENT_BYTES, O as MemorySenderShareKeyStorage, P as MemorySenderShareRecordStorage, Q as MemoryShareCache, S as OwnerDelegationReceipt, T as OwnerShareAction, U as OwnerShareMatcher, V as OwnerSharePolicyRegistration, W as OwnerSharePolicyRegistrationReceipt, X as OwnerSharePolicyV2, Y as ReceiveOptions, Z as RegisterOwnerSharePolicyParams, _ as SHARE_DELIVERY_AUTHORIZATION_DOMAIN, $ as SenderShareKeyStorage, a0 as SenderShareRecord, a1 as SenderShareRecordStorage, a2 as SenderShareRevocationScope, a3 as SenderShareStore, a4 as ShareAccess, a5 as ShareAccessError, a6 as ShareAccessV2, a7 as ShareAction, a9 as ShareAddressedDelegationEnvelopeV2, aa as ShareAddressedDelegationEnvelopeV2Schema, ab as ShareAddressedDelegationRequestV2, ac as ShareAddressedDelegationRequestV2Schema, ad as ShareAddressedDelegationResponseV2, ae as ShareAddressedDelegationResponseV2Schema, af as ShareAddressedRecipientMatcher, ag as ShareArtifactInput, ah as ShareArtifactResult, ai as ShareArtifactV2, aj as ShareCache, ak as ShareCacheEntry, al as ShareCacheKey, am as ShareCacheMetadata, an as ShareCapabilityLike, ao as ShareConflict, ap as ShareContentMetadata, aq as ShareContentSource, ar as ShareDeliveryAuthorization, as as ShareDeliveryAuthorizationReceipt, at as ShareDeliveryAuthorizationRequest, au as ShareDetachedProof, av as ShareEnvelopeError, aw as ShareEnvelopeV2, ax as ShareExpiryBounds, ay as ShareKvContentSource, aA as ShareLinkData, aB as ShareLinkLocation, aC as ShareListEntry, aD as ShareListResult, aE as ShareNativeAction, aF as ShareNativeInvokeEnvelopeV1, aG as ShareNativeInvokeErrorResult, aH as ShareNativeInvokeInput, aI as ShareNativeInvokeResult, aJ as ShareNativeInvokeSuccessResult, aK as ShareNativeResponse, aL as ShareNativeResponseSchema, aM as SharePolicy, aN as SharePolicyBinding, aO as SharePolicySession, aP as SharePolicySessionV1, aQ as SharePolicySessionWireV1, aR as ShareReadInvocationV1, aS as ShareReadResult, aT as ShareRecipientClient, aU as ShareRecipientClientOptions, aW as ShareRecipientPolicy, aY as ShareRecipientResult, aZ as ShareRecipientTarget, a$ as ShareResource, b1 as ShareSaveOptions, b2 as ShareSchema, b3 as ShareSqlContentSource, b4 as ShareWireAction, b5 as SharingService, b6 as SharingServiceConfig, b7 as SignedDelegation, b9 as SpaceOwnership, bK as StoredDelegationChain, ba as ValidateShareDeliveryAuthorizationExpected, bb as VerifyShareEnvelopeOptions, bc as canonicalOwnerSharePolicy, bd as computeOwnerShareRegistrationCid, be as computeShareCid, bL as createCapabilityKeyRegistry, bf as createDelegatedShareKey, bg as createPolicyEnforcementDelegation, bh as createShareArtifact, bi as createShareArtifactAsync, bj as createSharePolicy, bk as createSharingService, bl as decryptShareBytesAsync, bm as encodeInlineShareUrl, bn as encodeShareArtifact, bo as encodeShareUrl, bp as encryptShareBytes, bq as encryptShareBytesAsync, br as intersectShareCapabilities, bs as isV2ShareLink, bt as normalizeShareActions, bu as normalizeShareRecipientTarget, bv as normalizeShareResource, bw as parseShareArtifact, bx as parseShareUrl, by as restoreDelegatedShareKey, bz as shareCapabilityAllows, bA as shareDeliveryTrustedKid, bB as signShareEnvelope, bC as validateOwnerSharePolicyRegistration, bD as validateOwnerSharePolicyRegistrationBytes, bE as validateShareDeliveryAuthorizationBytes, bF as verifyShareCid, bG as verifyShareEnvelope } from './recipient-types.schema-B2wH53_t.js';
5
+ import { m as Delegation, e as CreateDelegationParams, G as GenerateShareParams, aB as ShareLink, ba as SpaceInfo, I as ICapabilityKeyRegistry, y as ISharingService, D as DelegationManager, b as AccountDelegationQueryOptions, A as AccountDelegationPage, w as DelegationRevocationReceipt } from './recipient-types.schema-D5pDlIqn.js';
6
+ export { c as AccountDelegationRecord, d as AccountDelegationResource, C as CapabilityEntry, bJ as CapabilityKeyRegistry, bK as CapabilityKeyRegistryErrorCode, bL as CapabilityKeyRegistryErrorCodes, f as CreateDelegationWasmParams, g as CreateDelegationWasmResult, h as CreateOwnerDelegationParams, i as DelegateReceivedShareParams, j as DelegatedResource, k as DelegatedShareAccess, l as DelegatedShareKey, n as DelegationApiResponse, o as DelegationChain, p as DelegationChainV2, q as DelegationDirection, a as DelegationError, r as DelegationErrorCode, s as DelegationErrorCodes, t as DelegationFilters, u as DelegationManagerConfig, v as DelegationRecord, R as DelegationResult, x as DelegationStatus, E as EncodedShareData, z as IngestOptions, J as JWK, K as KeyInfo, B as KeyProvider, F as KeyType, M as MAX_CONTENT_BYTES, H as MAX_SEALED_SHARE_CONTENT_BYTES, L as MAX_SHARE_ARTIFACT_BYTES, N as MAX_SHARE_CONTENT_BYTES, O as MemorySenderShareKeyStorage, P as MemorySenderShareRecordStorage, Q as MemoryShareCache, S as OwnerDelegationPermission, T as OwnerDelegationReceipt, U as OwnerShareAction, V as OwnerShareDecryption, W as OwnerShareMatcher, X as OwnerSharePolicyRegistration, Y as OwnerSharePolicyRegistrationReceipt, Z as OwnerSharePolicyV2, _ as ReceiveOptions, $ as RegisterOwnerSharePolicyParams, a0 as SHARE_DELIVERY_AUTHORIZATION_DOMAIN, a1 as SenderShareKeyStorage, a2 as SenderShareRecord, a3 as SenderShareRecordStorage, a4 as SenderShareRevocationScope, a5 as SenderShareStore, a6 as ShareAccess, a7 as ShareAccessError, a8 as ShareAccessV2, a9 as ShareAction, ab as ShareAddressedDelegationEnvelopeV2, ac as ShareAddressedDelegationEnvelopeV2Schema, ad as ShareAddressedDelegationRequestV2, ae as ShareAddressedDelegationRequestV2Schema, af as ShareAddressedDelegationResponseV2, ag as ShareAddressedDelegationResponseV2Schema, ah as ShareAddressedRecipientMatcher, ai as ShareArtifactInput, aj as ShareArtifactResult, ak as ShareArtifactV2, al as ShareCache, am as ShareCacheEntry, an as ShareCacheKey, ao as ShareCacheMetadata, ap as ShareCapabilityLike, aq as ShareConflict, ar as ShareContentMetadata, as as ShareContentSource, at as ShareDeliveryAuthorization, au as ShareDeliveryAuthorizationReceipt, av as ShareDeliveryAuthorizationRequest, aw as ShareDetachedProof, ax as ShareEnvelopeError, ay as ShareEnvelopeV2, az as ShareExpiryBounds, aA as ShareKvContentSource, aC as ShareLinkData, aD as ShareLinkLocation, aE as ShareListEntry, aF as ShareListResult, aG as ShareNativeAction, aH as ShareNativeInvokeEnvelopeV1, aI as ShareNativeInvokeErrorResult, aJ as ShareNativeInvokeInput, aK as ShareNativeInvokeResult, aL as ShareNativeInvokeSuccessResult, aM as ShareNativeResponse, aN as ShareNativeResponseSchema, aO as SharePolicy, aP as SharePolicyBinding, aQ as SharePolicySession, aR as SharePolicySessionV1, aS as SharePolicySessionWireV1, aT as ShareReadInvocationV1, aU as ShareReadResult, aV as ShareRecipientClient, aW as ShareRecipientClientOptions, aY as ShareRecipientPolicy, a_ as ShareRecipientResult, a$ as ShareRecipientTarget, b1 as ShareResource, b3 as ShareSaveOptions, b4 as ShareSchema, b5 as ShareSqlContentSource, b6 as ShareWireAction, b7 as SharingService, b8 as SharingServiceConfig, b9 as SignedDelegation, bb as SpaceOwnership, bM as StoredDelegationChain, bc as ValidateShareDeliveryAuthorizationExpected, bd as VerifyShareEnvelopeOptions, be as canonicalOwnerSharePolicy, bf as computeOwnerShareRegistrationCid, bg as computeShareCid, bN as createCapabilityKeyRegistry, bh as createDelegatedShareKey, bi as createPolicyEnforcementDelegation, bj as createShareArtifact, bk as createShareArtifactAsync, bl as createSharePolicy, bm as createSharingService, bn as decryptShareBytesAsync, bo as encodeInlineShareUrl, bp as encodeShareArtifact, bq as encodeShareUrl, br as encryptShareBytes, bs as encryptShareBytesAsync, bt as intersectShareCapabilities, bu as isV2ShareLink, bv as normalizeShareActions, bw as normalizeShareRecipientTarget, bx as normalizeShareResource, by as parseShareArtifact, bz as parseShareUrl, bA as restoreDelegatedShareKey, bB as shareCapabilityAllows, bC as shareDeliveryTrustedKid, bD as signShareEnvelope, bE as validateOwnerSharePolicyRegistration, bF as validateOwnerSharePolicyRegistrationBytes, bG as validateShareDeliveryAuthorizationBytes, bH as verifyShareCid, bI as verifyShareEnvelope } from './recipient-types.schema-D5pDlIqn.js';
7
7
  export { ACCOUNT_INDEX_SCHEMA, BOOTSTRAP_ALLOWLIST, BOOTSTRAP_DEFAULT_SPACE, BOOTSTRAP_ENCRYPTION_NETWORK_NAME, BOOTSTRAP_ENCRYPTION_NETWORK_RESOURCE_TEMPLATE, BOOTSTRAP_MANIFEST, BOOTSTRAP_PERSISTED_APPLICATION_MANIFESTS, BOOTSTRAP_PUBLIC_SPACE, BOOTSTRAP_SESSION_REQUESTS, BOOTSTRAP_SPACE_MANIFESTS, BOOTSTRAP_SPACE_NAMES, BootstrapAllowlistEntry, BootstrapAllowlistKind, BootstrapEncryptionNetworkStep, BootstrapManifest, BootstrapRawAbilityAllowlistEntry, BootstrapSchemaStep, BootstrapSeedApplicationsStep, BootstrapSeedSpacesStep, BootstrapSpaceDescriptor, BootstrapSpaceName, BootstrapSpaceStep, BootstrapStep, BootstrapStepKind, CAPABILITIES, CAPABILITY_REGISTRY, CapabilityRegistryEntry, CapabilityStatus, DUCKDB, ENCRYPTION, HOOKS, KV, SECRET_RECORDS_SCHEMA, SPACE, SQL, TINYCLOUD_ACCOUNT_SPACE_MANIFEST, TINYCLOUD_APPLICATIONS_SPACE_MANIFEST, TINYCLOUD_DEFAULT_SPACE_MANIFEST, TINYCLOUD_PUBLIC_SPACE_MANIFEST, TINYCLOUD_SECRETS_BOOTSTRAP_MANIFEST, bootstrapEncryptionNetworkId, bootstrapSpaceId, bootstrapSteps, composeBootstrapSpaceManifest } from '@tinycloud/bootstrap';
8
8
  export { E as ED25519_JCS_SIGNATURE_SUITE, b as EIP191_JCS_SIGNATURE_SUITE, J as JsonObject, c as POLICY_ENGINE_RECORD_SCHEMA, d as POLICY_SCHEMA, e as POLICY_STATUS_SCHEMA, a as Policy, P as PolicyEngineRecord, f as PolicyStatus, g as SignatureMaterialError, h as SignatureSuite, i as SignatureVerificationError, j as SignedObjectCanonicalizationError, k as SignedObjectDigestError, l as SignedObjectErrorCode, m as SignedObjectIdError, n as SignedObjectKind, o as SignedObjectMaterial, p as SignedObjectProfileError, q as SignedObjectSchemaError, r as SignedObjectSignature, S as SignedObjectSigner, s as SignedObjectVerificationResult, t as SignedPolicyObject, u as SigningKeyBindingError, v as UnsignedPolicy, U as UnsignedPolicyEngineRecord, w as UnsignedPolicyObject, x as UnsignedPolicyStatus, y as UnsupportedSignatureSuiteError, z as canonicalizeSignedObjectUnsigned, A as createAndSignPolicy, B as createAndSignPolicyEngineRecord, C as createAndSignPolicyStatus, D as createAndSignSignedObject, F as deriveSignedObjectMaterial, G as signedObjectIdFor, H as toSignedObjectError, I as validatePolicyEngineRecordSigned, K as validatePolicyEngineRecordSignedShape, L as validatePolicyEngineRecordUnsigned, M as validatePolicySigned, N as validatePolicySignedShape, O as validatePolicyStatusSigned, Q as validatePolicyStatusSignedShape, R as validatePolicyStatusUnsigned, T as validatePolicyUnsigned, V as verifyPolicy, W as verifyPolicyEngineRecord, X as verifyPolicyStatus, Y as verifySignedObject } from './signed-object-C6mWbTbB.js';
9
9
  export { a as JsonValue, j as jcsCanonicalize, n as normalizeJson, s as serializeJcsJson } from './capability-BjzXwtNw.js';
@@ -680,8 +680,11 @@ interface SubsetCheckResult {
680
680
  * - Action containment: every requested URN must be matched exactly or by a
681
681
  * service-scoped wildcard such as `tinycloud.kv/*`.
682
682
  *
683
- * Any `requested` entry that does not find a matching `granted` entry is
684
- * added to `missing` and the overall result is non-subset.
683
+ * Grant entries with the same service, space, path coverage, and caveats are
684
+ * considered together. This matters because ReCap parsers may return one
685
+ * entry per action even when the original manifest grouped those actions.
686
+ * Any `requested` entry whose actions are not collectively covered is added
687
+ * to `missing` and the overall result is non-subset.
685
688
  *
686
689
  * Both sides are expected to be in the canonical long-form shape (service
687
690
  * starts with `tinycloud.`, actions are full URNs). Use {@link parseRecapCapabilities}
@@ -1559,6 +1562,259 @@ declare class AutoApproveSpaceCreationHandler implements ISpaceCreationHandler {
1559
1562
  */
1560
1563
  declare const defaultSpaceCreationHandler: ISpaceCreationHandler;
1561
1564
 
1565
+ interface TinyCloudAuthorizationRequestV1 {
1566
+ protocolVersion: 1;
1567
+ /** The suggested SIWE. OpenKey may narrow this before signing. */
1568
+ siwe: string;
1569
+ /** Which OpenKey keyId to sign with. Optional; user may pick. */
1570
+ keyId?: string;
1571
+ /** Optional presentation envelope for the review page. */
1572
+ presentation?: CapabilityPresentationEnvelopeV1;
1573
+ }
1574
+ interface TinyCloudAuthorizationResultV1 {
1575
+ protocolVersion: 1;
1576
+ /** EIP-55 encoded signer address. */
1577
+ address: string;
1578
+ /** Signature over `signedMessage`, hex-encoded (0x…). */
1579
+ signature: string;
1580
+ /**
1581
+ * The EXACT bytes the signature verifies against. When the user narrows
1582
+ * capabilities in the review, this is the regenerated SIWE — not the
1583
+ * caller's original request.
1584
+ */
1585
+ signedMessage: string;
1586
+ /** Action IDs the user selected (or default consent). Opaque strings. */
1587
+ selectedActionKeys: string[];
1588
+ /** Effective grant set after narrowing. */
1589
+ permissions: Array<TinyCloudEffectiveGrantV1>;
1590
+ }
1591
+ interface TinyCloudEffectiveGrantV1 {
1592
+ service: string;
1593
+ space: string;
1594
+ path: string;
1595
+ actions: string[];
1596
+ }
1597
+ interface CapabilityPresentationEnvelopeV1 {
1598
+ protocolVersion: 1;
1599
+ displayName?: string;
1600
+ /**
1601
+ * Reason string the caller supplied for the delegation. Rendered as
1602
+ * caller-supplied context — NEVER treated as verified metadata unless
1603
+ * the receiving side origin-binds a manifest that carries the same
1604
+ * text. The OpenKey widget marks this as "reason provided by caller".
1605
+ */
1606
+ reason?: string;
1607
+ manifestId?: string;
1608
+ manifestDigest?: string;
1609
+ /**
1610
+ * Full manifest payload(s) the SDK forwards so the OpenKey review UI
1611
+ * can render honest provenance labels. Display-only:
1612
+ * - The envelope MUST NEVER expand authority; the ReCap payload is
1613
+ * the sole gate for what the user can approve.
1614
+ * - The widget transport size-bounds and validates the envelope
1615
+ * before use; oversized/malformed envelopes are dropped.
1616
+ * - The OpenKey server's /authorize-sign-prepare route decides trust
1617
+ * — even a well-formed envelope stays `unsigned` unless the
1618
+ * browser origin is verifiable and its well-known manifest
1619
+ * content-digest matches `manifestDigest`.
1620
+ */
1621
+ manifests?: Array<{
1622
+ name?: string;
1623
+ appId?: string;
1624
+ payload?: Record<string, unknown>;
1625
+ }>;
1626
+ }
1627
+ /**
1628
+ * Runtime validator for a TinyCloudAuthorizationResultV1. Returns null when
1629
+ * the payload matches the expected shape; returns an error message string
1630
+ * otherwise. Designed for use at the js-sdk trust boundary (browser-auth,
1631
+ * NodeUserAuthorization) so a compromised OpenKey response cannot inject
1632
+ * unexpected fields into a session.
1633
+ */
1634
+ declare function validateAuthorizationResultV1(value: unknown): {
1635
+ ok: true;
1636
+ value: TinyCloudAuthorizationResultV1;
1637
+ } | {
1638
+ ok: false;
1639
+ error: string;
1640
+ };
1641
+ /**
1642
+ * Selected action ID rules. The OpenKey side builds these with the exact
1643
+ * separator convention below (mirror of `packages/capability-review/src/ids`).
1644
+ * Consumers should treat them as opaque; only equality comparisons and set
1645
+ * membership are guaranteed to be stable.
1646
+ */
1647
+ declare const OPENKEY_ACTION_ID_SEPARATOR = "\0";
1648
+ declare function isPlausibleOpenKeyActionId(id: unknown): id is string;
1649
+ /**
1650
+ * Canonical decomposition of a ReCap `att` resource URI into `{ space, path }`
1651
+ * matching the SEMANTIC the WASM `parseRecapFromSiwe` emitter uses.
1652
+ *
1653
+ * Sol final continuation contract requirement 1: every producer AND consumer
1654
+ * of canonical four-part action IDs must parse resources the same way. The
1655
+ * on-wire structure of a TinyCloud ReCap resource is:
1656
+ *
1657
+ * `<space>/<short-service>[/<sub-path>]`
1658
+ *
1659
+ * where `<space>` is a `tinycloud:pkh:...` URN and `<short-service>` is the
1660
+ * unqualified service name (`kv`, `sql`, `capabilities`, …). WASM's
1661
+ * `parseRecapFromSiwe` returns `{ service: <short>, space: <space>, path: <sub-path OR "">}`
1662
+ * — the service segment is NEVER part of the `path`. Prior consumer parsing
1663
+ * left the service segment INSIDE `path`, which produced a four-part ID
1664
+ * different from what OpenKey emits (which uses WASM's `entry.path`
1665
+ * directly). That divergence caused every real production round-trip to
1666
+ * fail the `grantedFourPartIndex.get(rawKey)` lookup silently — Sol
1667
+ * explicitly cited this as blocking approval.
1668
+ *
1669
+ * Behaviour:
1670
+ * - Non-`tinycloud:` URIs are returned unchanged as `{ space: uri, path: "" }`.
1671
+ * - `tinycloud:<...>` without any `/` → `{ space: uri, path: "" }`.
1672
+ * - `tinycloud:<...>/short` → `{ space, path: "" }` (service segment stripped).
1673
+ * - `tinycloud:<...>/short/rest...` → `{ space, path: "rest..." }`.
1674
+ *
1675
+ * This makes the consumer's canonical `path` byte-for-byte equal to WASM's
1676
+ * `entry.path`, and therefore byte-for-byte equal to the `path` OpenKey's
1677
+ * `computeActionKey` uses when emitting four-part IDs.
1678
+ */
1679
+ declare function parseCanonicalRecapResource(resource: string): {
1680
+ space: string;
1681
+ path: string;
1682
+ };
1683
+ /**
1684
+ * Immutable SIWE header fields the OpenKey widget is NOT allowed to alter.
1685
+ * The user may narrow capabilities (which changes the ReCap `urn:recap:`
1686
+ * resource AND — because the WASM statement is a human-readable rendering of
1687
+ * the ReCap — the statement text along with it). But domain/address/URI/
1688
+ * version/chainId/nonce/issuedAt bind the message to a specific relying party
1689
+ * plus a specific session-key request and MUST come back identical byte-for-byte.
1690
+ *
1691
+ * `statement` is intentionally NOT part of the immutable set: it derives from
1692
+ * the ReCap and MUST be allowed to change when the ReCap changes. The
1693
+ * capability-subset check (via `unauthorizedRecapCapabilities`) is the
1694
+ * authoritative gate for what the widget was allowed to change.
1695
+ */
1696
+ interface ImmutableSiweFields {
1697
+ domain?: string;
1698
+ address?: string;
1699
+ uri?: string;
1700
+ version?: string;
1701
+ chainId?: string;
1702
+ nonce?: string;
1703
+ issuedAt?: string;
1704
+ expirationTime?: string;
1705
+ notBefore?: string;
1706
+ requestId?: string;
1707
+ statement?: string;
1708
+ nonRecapResources?: string;
1709
+ }
1710
+ /**
1711
+ * Extract the header fields that must be preserved byte-for-byte between the
1712
+ * caller's original prepared SIWE and the bytes OpenKey actually signed. Uses
1713
+ * line-based parsing tolerant of the specific format the WASM emitter uses:
1714
+ *
1715
+ * <domain> wants you to sign in with your Ethereum account:
1716
+ * <address>
1717
+ *
1718
+ * <statement>
1719
+ *
1720
+ * URI: <uri>
1721
+ * Version: <n>
1722
+ * Chain ID: <n>
1723
+ * Nonce: <hex>
1724
+ * Issued At: <iso8601>
1725
+ * Resources:
1726
+ * - <resource1>
1727
+ * ...
1728
+ *
1729
+ * Returns fields it was able to identify; downstream comparison is field-by-field
1730
+ * so a missing field on both sides is treated as equal.
1731
+ */
1732
+ declare function extractImmutableSiweFields(siwe: string): ImmutableSiweFields;
1733
+ /**
1734
+ * Diff two SIWE header field sets. Returns the field names that differ. An
1735
+ * empty array means the caller's prepared header and the signed header agree
1736
+ * on every immutable field.
1737
+ *
1738
+ * Sol final continuation contract requirement 2: `statement` is
1739
+ * ReCap-DERIVED whenever the SIWE carries a `urn:recap:` resource — the
1740
+ * WASM `prepareSession` emitter renders "I further authorize the stated URI
1741
+ * to perform the following actions..." from the ReCap contents and DROPS
1742
+ * any caller-supplied `statement`. Narrowing the ReCap therefore ALWAYS
1743
+ * changes the statement, and treating statement as byte-immutable made
1744
+ * every legitimate narrowing fail immediate rejection — the exact
1745
+ * production round-trip failure Sol cited as blocking approval.
1746
+ *
1747
+ * Correct semantics:
1748
+ * - For ReCap-bearing SIWEs, statement is validated indirectly via the
1749
+ * `unauthorizedRecapCapabilities` subset check (the ReCap the
1750
+ * statement renders is the true authoritative narrowing check).
1751
+ * - For plain (no-ReCap) SIWEs, statement IS caller-authored and MUST
1752
+ * remain byte-for-byte identical.
1753
+ *
1754
+ * Callers signal which regime applies via `options.originalHasRecap`.
1755
+ * When omitted (legacy callers), statement is included in the diff — the
1756
+ * safer default for non-ReCap flows.
1757
+ */
1758
+ declare function diffImmutableSiweFields(original: ImmutableSiweFields, signed: ImmutableSiweFields, options?: {
1759
+ originalHasRecap?: boolean;
1760
+ }): string[];
1761
+ /**
1762
+ * Parsed ReCap attenuation payload. Keyed by resource URI ("space/service/path"),
1763
+ * each value is a map of action -> list of caveat objects. Consumers care about
1764
+ * subset comparisons on (resource, action) pairs; caveats are compared shallowly
1765
+ * (any narrowing of caveats is treated as still a subset when the parent grants
1766
+ * the same action).
1767
+ */
1768
+ interface RecapAttenuation {
1769
+ [resource: string]: {
1770
+ [action: string]: unknown[];
1771
+ };
1772
+ }
1773
+ /**
1774
+ * Extract the union of `att` maps from every `urn:recap:` resource in a SIWE
1775
+ * message. Returns an empty object if the SIWE contains no ReCap resources
1776
+ * (which is legal — a plain SIWE grants nothing beyond the message itself).
1777
+ *
1778
+ * Throws if a `urn:recap:` payload is present but cannot be decoded as
1779
+ * base64url JSON with an `att` object. Silent tolerance would let a compromised
1780
+ * OpenKey response bypass the subset check by returning garbage.
1781
+ */
1782
+ declare function extractRecapAttenuations(siwe: string): RecapAttenuation;
1783
+ /**
1784
+ * Prove that `child` grants are a subset of `parent` grants. Returns a list of
1785
+ * unauthorized (resource, action) pairs — empty means every capability in
1786
+ * `child` was authorized by `parent`.
1787
+ *
1788
+ * "Subset" here means:
1789
+ * 1. Every (resource, action) pair the child grants must appear in the parent.
1790
+ * 2. Every caveat object in the child's caveat list for a given (resource,
1791
+ * action) must be present (by deep-equality with sorted-key canonicalization)
1792
+ * in the parent's caveat list for the same pair. That is: child caveats ⊆
1793
+ * parent caveats as sets of caveat objects.
1794
+ *
1795
+ * ReCap caveat semantics: a caveat list is a DISJUNCTION of alternatives — the
1796
+ * caller may exercise the ability under ANY listed caveat. Broadening a list
1797
+ * (adding a new alternative not in parent) is a violation. Removing an
1798
+ * alternative is fine (narrowing). Replacing a restrictive alternative with a
1799
+ * less-restrictive one is a violation (the replacement is a different object).
1800
+ *
1801
+ * The conservative safe rule: reject if child has ANY caveat not present in the
1802
+ * parent's caveat set. This catches:
1803
+ * - Removed caveats (parent had 1+, child has 0): the empty list is "no
1804
+ * restriction" which is broader than any restriction — reject.
1805
+ * - Broadened caveats (parent had caveat X, child has caveat Y not equal to
1806
+ * X): Y is a new alternative — reject.
1807
+ * - Incompatible duplicate caveats (child adds a new caveat alongside a
1808
+ * parent one): the new caveat is unauthorized — reject.
1809
+ *
1810
+ * Special case: when both parent and child have empty caveat lists, that means
1811
+ * neither imposes restrictions, and the child is a subset.
1812
+ */
1813
+ declare function unauthorizedRecapCapabilities(child: RecapAttenuation, parent: RecapAttenuation): Array<{
1814
+ resource: string;
1815
+ action: string;
1816
+ }>;
1817
+
1562
1818
  /**
1563
1819
  * Interface for an extension to TCW.
1564
1820
  * This is the platform-agnostic subset — browser-coupled extensions
@@ -2484,6 +2740,13 @@ interface AccountSpace {
2484
2740
  updatedAt?: string;
2485
2741
  expiresAt?: Date;
2486
2742
  }
2743
+ interface RegisterBatchSuccess {
2744
+ spaces: AccountSpace[];
2745
+ /** Present iff the batch write failed ambiguously and per-space
2746
+ * reconciliation recovered it. The original batch error verbatim, so
2747
+ * callers can record the degradation structurally (TC-361). */
2748
+ recoveredFromBatchError?: ServiceError;
2749
+ }
2487
2750
  interface AccountDelegation {
2488
2751
  cid: string;
2489
2752
  direction: "granted" | "received";
@@ -2523,6 +2786,20 @@ interface AccountIndexedReadOptions {
2523
2786
  refreshIndex?: boolean;
2524
2787
  }
2525
2788
  type AccountApplicationListOptions = AccountIndexedReadOptions;
2789
+ interface AccountApplicationRegisterOptions {
2790
+ /**
2791
+ * Skip the `application_state` manifest-hash pre-read that normally
2792
+ * short-circuits a redundant write.
2793
+ *
2794
+ * The pre-read is a saving only when the application is already registered
2795
+ * with the same manifest hash. On a freshly bootstrapped account it is
2796
+ * definitionally a miss, so it costs a round trip and buys nothing — and the
2797
+ * write it guards is an `INSERT OR REPLACE`, so performing it unconditionally
2798
+ * is idempotent. Set this only when the caller knows the record cannot
2799
+ * already be current (i.e. the account bootstrap path).
2800
+ */
2801
+ assumeUnregistered?: boolean;
2802
+ }
2526
2803
  type AccountSpaceListOptions = AccountIndexedReadOptions;
2527
2804
  interface AccountDelegationListOptions {
2528
2805
  direction?: "granted" | "received" | "all";
@@ -2546,18 +2823,45 @@ interface AccountServiceConfig {
2546
2823
  }
2547
2824
  declare class AccountService {
2548
2825
  private readonly config;
2826
+ /**
2827
+ * Per-account-space memo for {@link ensureAccountIndex}.
2828
+ *
2829
+ * Applying the index migration is a no-op once the schema exists, but the
2830
+ * SQL service still spends two round trips discovering that (create the
2831
+ * migrations table, then read the applied-migration rows). Account bootstrap
2832
+ * touches the index eight times, so without a memo that is ~14 wasted
2833
+ * requests on the cold sign-in path. The in-flight dedupe inside SQLService
2834
+ * never helps here: the node SDK builds a fresh SQLService per
2835
+ * `getAccountDb()` call, so its lock map is always empty.
2836
+ *
2837
+ * Keyed by account space id, so a different account never reuses this entry.
2838
+ * Failures are evicted so a later call retries instead of inheriting a
2839
+ * permanently poisoned result.
2840
+ */
2841
+ private readonly accountIndexReady;
2549
2842
  constructor(config: AccountServiceConfig);
2550
2843
  status(): Promise<Result<AccountStatus>>;
2551
2844
  readonly applications: {
2552
2845
  list: (options?: AccountApplicationListOptions) => Promise<Result<AccountApplication[]>>;
2553
2846
  get: (appId: string) => Promise<Result<AccountApplication>>;
2554
- register: (manifest: Manifest | Manifest[]) => Promise<Result<AccountApplication>>;
2847
+ register: (manifest: Manifest | Manifest[], options?: AccountApplicationRegisterOptions) => Promise<Result<AccountApplication>>;
2555
2848
  remove: (appId: string) => Promise<Result<void>>;
2556
2849
  };
2557
2850
  readonly spaces: {
2558
2851
  list: (options?: AccountSpaceListOptions) => Promise<Result<AccountSpace[]>>;
2559
2852
  get: (spaceId: string) => Promise<Result<AccountSpace>>;
2560
2853
  register: (space: SpaceInfo | AccountSpace) => Promise<Result<AccountSpace>>;
2854
+ /**
2855
+ * Register multiple spaces in one KV batch write + one multi-row index
2856
+ * write, instead of one `register()` round trip per space (TC-373).
2857
+ *
2858
+ * The stored records are computed exactly once and reused for both the
2859
+ * batch attempt and any reconciliation below, so a fallback never mints a
2860
+ * fresh timestamp for a space that already has a written record — a
2861
+ * second `spaceRecordFromInput` call would produce a new content hash and
2862
+ * leave the first attempt's blocks orphaned.
2863
+ */
2864
+ registerBatch: (spaces: readonly (SpaceInfo | AccountSpace)[]) => Promise<Result<RegisterBatchSuccess>>;
2561
2865
  syncAccessible: () => Promise<Result<AccountSpace[]>>;
2562
2866
  remove: (spaceId: string) => Promise<Result<void>>;
2563
2867
  };
@@ -2590,13 +2894,35 @@ declare class AccountService {
2590
2894
  private deleteApplicationIndex;
2591
2895
  private upsertSpaceIndexQuietly;
2592
2896
  private upsertSpaceIndex;
2897
+ private upsertSpacesIndexQuietly;
2898
+ /**
2899
+ * Upsert multiple space index rows in ONE multi-row `INSERT OR REPLACE`
2900
+ * statement (TC-373), rather than one statement per space. This matters
2901
+ * because `IDatabaseHandle.batch()` executes its statement list as a plain
2902
+ * loop, not a single database transaction — an N-statement batch is not
2903
+ * atomic. A single multi-row INSERT is one SQLite statement, so it applies
2904
+ * atomically: all rows or none.
2905
+ */
2906
+ private upsertSpacesIndex;
2593
2907
  private deleteSpaceIndexQuietly;
2594
2908
  private deleteSpaceIndex;
2595
2909
  private resolveSpace;
2596
2910
  private replaceApplicationsIndexQuietly;
2597
2911
  private replaceSpacesIndexQuietly;
2598
2912
  private replaceDelegationsIndexQuietly;
2913
+ /**
2914
+ * Apply the account index schema at most once per account space.
2915
+ *
2916
+ * The index is a cache over canonical KV state, and every caller already
2917
+ * tolerates it being absent (`ignoreIndexFailure` / `isMissingIndexError`),
2918
+ * so a memo that is wrong in the "already applied" direction degrades to a
2919
+ * `no such table` read that the caller handles. A memo that is wrong in the
2920
+ * other direction would be a real bug, so failures are never cached.
2921
+ */
2599
2922
  private ensureAccountIndex;
2923
+ /** Drop the memo so the next {@link ensureAccountIndex} re-applies the schema. */
2924
+ private invalidateAccountIndexMemo;
2925
+ private applyAccountIndex;
2600
2926
  }
2601
2927
  interface AccountIndexStatus {
2602
2928
  database: string;
@@ -2731,7 +3057,7 @@ interface LocationRecord extends LocationRecordPayload {
2731
3057
  type LocationSource = "explicit" | "local-loopback" | "local-link" | "blockchain" | "centralized" | "fallback";
2732
3058
  declare const DEFAULT_TINYCLOUD_LOCATION_REGISTRY_URL = "https://registry.tinycloud.xyz";
2733
3059
  declare const DEFAULT_TINYCLOUD_FALLBACK_HOST = "https://node.tinycloud.xyz";
2734
- /** Default local loopback node URL probed before registry/fallback resolution. */
3060
+ /** Conventional local loopback node URL. Probed only when explicitly configured. */
2735
3061
  declare const DEFAULT_LOCAL_NODE_URL = "http://127.0.0.1:8000";
2736
3062
  /** Probe timeout for the local loopback candidate. No retries. */
2737
3063
  declare const LOCAL_LOOPBACK_PROBE_TIMEOUT_MS = 250;
@@ -2818,7 +3144,7 @@ interface DiscoverLocalTinyCloudNodeOptions {
2818
3144
  subject?: string;
2819
3145
  /** Enable local-node auto-discovery. Default true. */
2820
3146
  autoDiscoverLocalNode?: boolean;
2821
- /** Local loopback node URL to probe. Default http://127.0.0.1:8000. */
3147
+ /** Local loopback node URL to probe. Omit to avoid probing loopback. */
2822
3148
  localNodeUrl?: string;
2823
3149
  /** Known `*.local.tinycloud.link` subdomain name, probed directly. */
2824
3150
  localLinkName?: string;
@@ -2852,12 +3178,12 @@ interface ResolveTinyCloudHostsOptions {
2852
3178
  /** Verify centralized/blockchain record signatures. Default true. */
2853
3179
  verifyRecords?: boolean;
2854
3180
  /**
2855
- * Probe for a locally-running TinyCloud node before falling back to
2856
- * registry/hosted resolution. Default true. Setting false restores the
2857
- * exact pre-TC-106 resolution order (registry → fallback).
3181
+ * Probe configured and registered local TinyCloud node endpoints before
3182
+ * falling back to registry/hosted resolution. Default true. The loopback
3183
+ * URL is probed only when `localNodeUrl` is explicitly configured.
2858
3184
  */
2859
3185
  autoDiscoverLocalNode?: boolean;
2860
- /** Local loopback node URL to probe. Default http://127.0.0.1:8000. */
3186
+ /** Local loopback node URL to probe. Omit to avoid probing loopback. */
2861
3187
  localNodeUrl?: string;
2862
3188
  /** Known `*.local.tinycloud.link` subdomain name, probed directly. */
2863
3189
  localLinkName?: string;
@@ -2943,4 +3269,4 @@ declare const EXPIRY: {
2943
3269
  declare const DEFAULT_SIGNED_READ_URL_EXPIRY_MS: number;
2944
3270
  type ExpiryTier = keyof typeof EXPIRY;
2945
3271
 
2946
- export { ACCOUNT_REGISTRY_PATH, ACCOUNT_REGISTRY_SPACE, type AbilitiesMap, type AccountApplication, type AccountApplicationListOptions, type AccountDelegation, type AccountDelegationListOptions, AccountDelegationPage, AccountDelegationQueryOptions, type AccountDelegationRevokeOptions, type AccountIndexEnsureResult, 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, CaveatedDelegationUnsupportedError, type ClientSession, ClientSessionSchema, CloudLocationResolutionError, type ComposeManifestOptions, type ComposedManifestRequest, type CreateDelegationFunction, CreateDelegationParams, DEFAULT_DEFAULTS, DEFAULT_EXPIRY, DEFAULT_KNOWLEDGE_ROOT, DEFAULT_LOCAL_NODE_PIN_STORAGE_KEY, DEFAULT_LOCAL_NODE_URL, DEFAULT_MANIFEST_SPACE, DEFAULT_MANIFEST_VERSION, DEFAULT_SIGNED_READ_URL_EXPIRY_MS, DEFAULT_TINYCLOUD_FALLBACK_HOST, DEFAULT_TINYCLOUD_LOCATION_REGISTRY_URL, Delegation, DelegationManager, DelegationRevocationReceipt, type DidCacheKeyOptions, type DidEqualsOptions, type DiscoverLocalTinyCloudNodeOptions, type DiscoveredLocalTinyCloudNode, ENCRYPTION_MANIFEST_SPACE, ENCRYPTION_PERMISSION_SERVICE, EXPIRY, type EnsData, EnsDataSchema, type EventEmitterStrategy, type ExpiryTier, type Extension, GenerateShareParams, ICapabilityKeyRegistry, type IENSResolver, type INotificationHandler, type ISessionManager, type ISessionStorage, ISharingService, type ISigner, type ISpace, type ISpaceCreationHandler, type ISpaceScopedDelegations, type ISpaceScopedSharing, type ISpaceService, type IUserAuthorization, type IWasmBindings, IdentityParseError, LOCAL_LINK_HOST_SUFFIX, LOCAL_LINK_PROBE_TIMEOUT_MS, LOCAL_LOOPBACK_PROBE_TIMEOUT_MS, type LocalNodeIdentityStore, type LocationCandidate, type LocationCandidateInput, type LocationRecord, type LocationRecordPayload, type LocationRecordSigner, LocationRecordValidationError, type LocationResolutionAttempt, type LocationSource, type Manifest, type ManifestDefaults, type ManifestKnowledge, type ManifestRegistryRecord, type ManifestSecretActions, ManifestValidationError, type NodeInfo, type OpenKeyCallbackStrategy, type OpenKeySigningRequestBody, type OpenKeySigningResponseBody, type OpenKeySigningStrategyOptions, type ParseRecapFromSiwe, type PartialSiweMessage, type PermissionEntry, PermissionNotInManifestError, type PersistedSessionData, type PersistedSessionProof, type PersistedTinyCloudSession, type PkhDidParts, ProtocolMismatchError, type ResolveCloudLocationOptions, type ResolveTinyCloudHostsOptions, type ResolvedCapabilities, type ResolvedCloudLocation, type ResolvedDelegate, type ResolvedTinyCloudHosts, type ResourceCapability, SECRETS_SPACE, SERVICE_LONG_TO_SHORT, SERVICE_SHORT_TO_LONG, type ServerHost, SessionExpiredError, ShareLink, 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, SpaceInfo, SpaceService, type SpaceServiceConfig, type SubsetCheckResult, TinyCloud, type TinyCloudConfig, type TinyCloudSession, UnsupportedFeatureError, type UserAuthorizationConfig, VAULT_PERMISSION_SERVICE, type ValidatedPersistedSessionProof, type ValidationError, VersionCheckError, type WasmRecapEntry, type WebStorageLike, actionContains, activateSessionWithHost, addressStorageKey, applyPrefix, buildSpaceUri, canonicalLocationPayload, canonicalizeAddress, canonicalizeDid, canonicalizeDidUrl, canonicalizeNetworkId, canonicalizeRecapCaveats, checkNodeInfo, composeManifestRequest, createInMemoryLocalNodeIdentityStore, createLocalStorageLocalNodeIdentityStore, createOpenKeyCallbackSigningStrategy, createSpaceService, defaultSignStrategy, defaultSpaceCreationHandler, didCacheKey, didEquals, discoverLocalTinyCloudNode, expandActionShortNames, expandPermissionEntries, expandPermissionEntry, fetchLocationRecord, fetchPeerId, httpUrlToMultiaddr, isCapabilitySubset, isEvmAddress, loadManifest, locationPayloadForRecord, makePkhSpaceId, makePublicSpaceId, manifestAbilitiesUnion, multiaddrToHttpUrl, normalizeDefaults, parseCanonicalNetworkId, parseExpiry, parsePkhDid, parseRecapCapabilities, parseSpaceUri, pkhDid, principalDid, principalDidEquals, recapCaveatsEqual, resolveCloudLocation, resolveManifest, resolveManifestKnowledgeRoot, resolveTinyCloudHosts, resourceCapabilitiesToAbilitiesMap, resourceCapabilitiesToSpaceAbilitiesMap, signLocationRecord, submitHostDelegation, validateClientSession, validateLocationRecord, validateLocationRecordPayload, validateManifest, validatePersistedSessionData, verifyDidKeyEd25519Signature, verifyLocationRecord };
3272
+ export { ACCOUNT_REGISTRY_PATH, ACCOUNT_REGISTRY_SPACE, type AbilitiesMap, type AccountApplication, type AccountApplicationListOptions, type AccountApplicationRegisterOptions, type AccountDelegation, type AccountDelegationListOptions, AccountDelegationPage, AccountDelegationQueryOptions, type AccountDelegationRevokeOptions, type AccountIndexEnsureResult, 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 CapabilityPresentationEnvelopeV1, CaveatedDelegationUnsupportedError, type ClientSession, ClientSessionSchema, CloudLocationResolutionError, type ComposeManifestOptions, type ComposedManifestRequest, type CreateDelegationFunction, CreateDelegationParams, DEFAULT_DEFAULTS, DEFAULT_EXPIRY, DEFAULT_KNOWLEDGE_ROOT, DEFAULT_LOCAL_NODE_PIN_STORAGE_KEY, DEFAULT_LOCAL_NODE_URL, DEFAULT_MANIFEST_SPACE, DEFAULT_MANIFEST_VERSION, DEFAULT_SIGNED_READ_URL_EXPIRY_MS, DEFAULT_TINYCLOUD_FALLBACK_HOST, DEFAULT_TINYCLOUD_LOCATION_REGISTRY_URL, Delegation, DelegationManager, DelegationRevocationReceipt, type DidCacheKeyOptions, type DidEqualsOptions, type DiscoverLocalTinyCloudNodeOptions, type DiscoveredLocalTinyCloudNode, ENCRYPTION_MANIFEST_SPACE, ENCRYPTION_PERMISSION_SERVICE, EXPIRY, type EnsData, EnsDataSchema, type EventEmitterStrategy, type ExpiryTier, type Extension, GenerateShareParams, ICapabilityKeyRegistry, type IENSResolver, type INotificationHandler, type ISessionManager, type ISessionStorage, ISharingService, type ISigner, type ISpace, type ISpaceCreationHandler, type ISpaceScopedDelegations, type ISpaceScopedSharing, type ISpaceService, type IUserAuthorization, type IWasmBindings, IdentityParseError, type ImmutableSiweFields, LOCAL_LINK_HOST_SUFFIX, LOCAL_LINK_PROBE_TIMEOUT_MS, LOCAL_LOOPBACK_PROBE_TIMEOUT_MS, type LocalNodeIdentityStore, type LocationCandidate, type LocationCandidateInput, type LocationRecord, type LocationRecordPayload, type LocationRecordSigner, LocationRecordValidationError, type LocationResolutionAttempt, type LocationSource, type Manifest, type ManifestDefaults, type ManifestKnowledge, type ManifestRegistryRecord, type ManifestSecretActions, ManifestValidationError, type NodeInfo, OPENKEY_ACTION_ID_SEPARATOR, type OpenKeyCallbackStrategy, type OpenKeySigningRequestBody, type OpenKeySigningResponseBody, type OpenKeySigningStrategyOptions, type ParseRecapFromSiwe, type PartialSiweMessage, type PermissionEntry, PermissionNotInManifestError, type PersistedSessionData, type PersistedSessionProof, type PersistedTinyCloudSession, type PkhDidParts, ProtocolMismatchError, type RecapAttenuation, type RegisterBatchSuccess, type ResolveCloudLocationOptions, type ResolveTinyCloudHostsOptions, type ResolvedCapabilities, type ResolvedCloudLocation, type ResolvedDelegate, type ResolvedTinyCloudHosts, type ResourceCapability, SECRETS_SPACE, SERVICE_LONG_TO_SHORT, SERVICE_SHORT_TO_LONG, type ServerHost, SessionExpiredError, ShareLink, 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, SpaceInfo, SpaceService, type SpaceServiceConfig, type SubsetCheckResult, TinyCloud, type TinyCloudAuthorizationRequestV1, type TinyCloudAuthorizationResultV1, type TinyCloudConfig, type TinyCloudEffectiveGrantV1, type TinyCloudSession, UnsupportedFeatureError, type UserAuthorizationConfig, VAULT_PERMISSION_SERVICE, type ValidatedPersistedSessionProof, type ValidationError, VersionCheckError, type WasmRecapEntry, type WebStorageLike, actionContains, activateSessionWithHost, addressStorageKey, applyPrefix, buildSpaceUri, canonicalLocationPayload, canonicalizeAddress, canonicalizeDid, canonicalizeDidUrl, canonicalizeNetworkId, canonicalizeRecapCaveats, checkNodeInfo, composeManifestRequest, createInMemoryLocalNodeIdentityStore, createLocalStorageLocalNodeIdentityStore, createOpenKeyCallbackSigningStrategy, createSpaceService, defaultSignStrategy, defaultSpaceCreationHandler, didCacheKey, didEquals, diffImmutableSiweFields, discoverLocalTinyCloudNode, expandActionShortNames, expandPermissionEntries, expandPermissionEntry, extractImmutableSiweFields, extractRecapAttenuations, fetchLocationRecord, fetchPeerId, httpUrlToMultiaddr, isCapabilitySubset, isEvmAddress, isPlausibleOpenKeyActionId, loadManifest, locationPayloadForRecord, makePkhSpaceId, makePublicSpaceId, manifestAbilitiesUnion, multiaddrToHttpUrl, normalizeDefaults, parseCanonicalNetworkId, parseCanonicalRecapResource, parseExpiry, parsePkhDid, parseRecapCapabilities, parseSpaceUri, pkhDid, principalDid, principalDidEquals, recapCaveatsEqual, resolveCloudLocation, resolveManifest, resolveManifestKnowledgeRoot, resolveTinyCloudHosts, resourceCapabilitiesToAbilitiesMap, resourceCapabilitiesToSpaceAbilitiesMap, signLocationRecord, submitHostDelegation, unauthorizedRecapCapabilities, validateAuthorizationResultV1, validateClientSession, validateLocationRecord, validateLocationRecordPayload, validateManifest, validatePersistedSessionData, verifyDidKeyEd25519Signature, verifyLocationRecord };