@tinycloud/sdk-core 2.6.3 → 2.7.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,10 @@
1
1
  import { z } from 'zod';
2
2
  import { InvokeFunction, InvokeAnyFunction, ParsedNetworkId, ServiceError, Result as Result$1, ServiceSession, FetchFunction, ServiceConstructor, RetryPolicy, TelemetryConfig, IServiceContext, IService, IKVService, ISQLService, IDuckDbService, IHooksService, IDataVaultService, IEncryptionService, ISecretsService, 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, TinyCloudDebugEnableOptions, TinyCloudDebugEvent, TinyCloudDebugLevel, TinyCloudDebugLogger, TinyCloudDebugTimer, VaultCrypto, VaultEntry, VaultError, VaultGetOptions, VaultGrantOptions, VaultHeaders, VaultListOptions, 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
+ 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';
4
5
  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';
6
+ 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-BHkLbCXI.js';
7
+ export { b as JsonValue, j as jcsCanonicalize, n as normalizeJson, s as serializeJcsJson } from './capability-DpdAwc1W.js';
5
8
  export { SiweMessage } from 'siwe';
6
9
 
7
10
  /**
@@ -659,8 +662,8 @@ interface SubsetCheckResult {
659
662
  * - If `granted.path` ends with `/`, it covers any `requested.path` that
660
663
  * starts with `granted.path`.
661
664
  * - Otherwise, the paths must match exactly.
662
- * - Action containment: every URN in `requested.actions` must appear in
663
- * `granted.actions` (set subset).
665
+ * - Action containment: every requested URN must be matched exactly or by a
666
+ * service-scoped wildcard such as `tinycloud.kv/*`.
664
667
  *
665
668
  * Any `requested` entry that does not find a matching `granted` entry is
666
669
  * added to `missing` and the overall result is non-subset.
@@ -670,6 +673,8 @@ interface SubsetCheckResult {
670
673
  * or `expandActionShortNames` to normalize inputs first.
671
674
  */
672
675
  declare function isCapabilitySubset(requested: readonly PermissionEntry[], granted: readonly PermissionEntry[]): SubsetCheckResult;
676
+ /** Return whether a granted action pattern covers one requested action. */
677
+ declare function actionContains(grantedAction: string, requestedAction: string): boolean;
673
678
  /**
674
679
  * The raw shape returned from the WASM `parseRecapFromSiwe` export. The
675
680
  * Rust layer encodes the service in the short form (e.g. `"kv"`) because
@@ -891,19 +896,19 @@ declare const PersistedTinyCloudSessionSchema: z.ZodObject<{
891
896
  /** The verification method DID */
892
897
  verificationMethod: z.ZodString;
893
898
  }, "strip", z.ZodTypeAny, {
899
+ spaceId: string;
894
900
  delegationHeader: {
895
901
  Authorization: string;
896
902
  };
897
903
  delegationCid: string;
898
- spaceId: string;
899
904
  verificationMethod: string;
900
905
  spaces?: Record<string, string> | undefined;
901
906
  }, {
907
+ spaceId: string;
902
908
  delegationHeader: {
903
909
  Authorization: string;
904
910
  };
905
911
  delegationCid: string;
906
- spaceId: string;
907
912
  verificationMethod: string;
908
913
  spaces?: Record<string, string> | undefined;
909
914
  }>;
@@ -943,19 +948,19 @@ declare const PersistedSessionDataSchema: z.ZodObject<{
943
948
  /** The verification method DID */
944
949
  verificationMethod: z.ZodString;
945
950
  }, "strip", z.ZodTypeAny, {
951
+ spaceId: string;
946
952
  delegationHeader: {
947
953
  Authorization: string;
948
954
  };
949
955
  delegationCid: string;
950
- spaceId: string;
951
956
  verificationMethod: string;
952
957
  spaces?: Record<string, string> | undefined;
953
958
  }, {
959
+ spaceId: string;
954
960
  delegationHeader: {
955
961
  Authorization: string;
956
962
  };
957
963
  delegationCid: string;
958
- spaceId: string;
959
964
  verificationMethod: string;
960
965
  spaces?: Record<string, string> | undefined;
961
966
  }>>;
@@ -992,19 +997,19 @@ declare const PersistedSessionDataSchema: z.ZodObject<{
992
997
  sessionKey: string;
993
998
  siwe: string;
994
999
  signature: string;
995
- expiresAt: string;
996
1000
  createdAt: string;
1001
+ expiresAt: string;
997
1002
  version: string;
998
1003
  ens?: {
999
1004
  domain?: string | null | undefined;
1000
1005
  avatarUrl?: string | null | undefined;
1001
1006
  } | undefined;
1002
1007
  tinycloudSession?: {
1008
+ spaceId: string;
1003
1009
  delegationHeader: {
1004
1010
  Authorization: string;
1005
1011
  };
1006
1012
  delegationCid: string;
1007
- spaceId: string;
1008
1013
  verificationMethod: string;
1009
1014
  spaces?: Record<string, string> | undefined;
1010
1015
  } | undefined;
@@ -1015,19 +1020,19 @@ declare const PersistedSessionDataSchema: z.ZodObject<{
1015
1020
  sessionKey: string;
1016
1021
  siwe: string;
1017
1022
  signature: string;
1018
- expiresAt: string;
1019
1023
  createdAt: string;
1024
+ expiresAt: string;
1020
1025
  version: string;
1021
1026
  ens?: {
1022
1027
  domain?: string | null | undefined;
1023
1028
  avatarUrl?: string | null | undefined;
1024
1029
  } | undefined;
1025
1030
  tinycloudSession?: {
1031
+ spaceId: string;
1026
1032
  delegationHeader: {
1027
1033
  Authorization: string;
1028
1034
  };
1029
1035
  delegationCid: string;
1030
- spaceId: string;
1031
1036
  verificationMethod: string;
1032
1037
  spaces?: Record<string, string> | undefined;
1033
1038
  } | undefined;
@@ -1074,11 +1079,11 @@ declare const TinyCloudSessionSchema: z.ZodObject<{
1074
1079
  sessionKey: string;
1075
1080
  siwe: string;
1076
1081
  signature: string;
1082
+ spaceId: string;
1077
1083
  delegationHeader: {
1078
1084
  Authorization: string;
1079
1085
  };
1080
1086
  delegationCid: string;
1081
- spaceId: string;
1082
1087
  verificationMethod: string;
1083
1088
  jwk: {} & {
1084
1089
  [k: string]: unknown;
@@ -1090,11 +1095,11 @@ declare const TinyCloudSessionSchema: z.ZodObject<{
1090
1095
  sessionKey: string;
1091
1096
  siwe: string;
1092
1097
  signature: string;
1098
+ spaceId: string;
1093
1099
  delegationHeader: {
1094
1100
  Authorization: string;
1095
1101
  };
1096
1102
  delegationCid: string;
1097
- spaceId: string;
1098
1103
  verificationMethod: string;
1099
1104
  jwk: {} & {
1100
1105
  [k: string]: unknown;
@@ -1459,6 +1464,265 @@ declare const DelegationSchema: z.ZodObject<{
1459
1464
  authHeader?: string | undefined;
1460
1465
  }>;
1461
1466
  type Delegation = z.infer<typeof DelegationSchema>;
1467
+ /** Node-confirmed lifecycle state for one delegation. */
1468
+ declare const DelegationStatusSchema: z.ZodEffects<z.ZodObject<{
1469
+ cid: z.ZodString;
1470
+ status: z.ZodEnum<["active", "revoked", "expired", "unavailable", "not_found"]>;
1471
+ exists: z.ZodBoolean;
1472
+ active: z.ZodBoolean;
1473
+ revoked: z.ZodBoolean;
1474
+ expired: z.ZodBoolean;
1475
+ }, "strict", z.ZodTypeAny, {
1476
+ status: "active" | "revoked" | "expired" | "unavailable" | "not_found";
1477
+ active: boolean;
1478
+ revoked: boolean;
1479
+ cid: string;
1480
+ expired: boolean;
1481
+ exists: boolean;
1482
+ }, {
1483
+ status: "active" | "revoked" | "expired" | "unavailable" | "not_found";
1484
+ active: boolean;
1485
+ revoked: boolean;
1486
+ cid: string;
1487
+ expired: boolean;
1488
+ exists: boolean;
1489
+ }>, {
1490
+ status: "active" | "revoked" | "expired" | "unavailable" | "not_found";
1491
+ active: boolean;
1492
+ revoked: boolean;
1493
+ cid: string;
1494
+ expired: boolean;
1495
+ exists: boolean;
1496
+ }, {
1497
+ status: "active" | "revoked" | "expired" | "unavailable" | "not_found";
1498
+ active: boolean;
1499
+ revoked: boolean;
1500
+ cid: string;
1501
+ expired: boolean;
1502
+ exists: boolean;
1503
+ }>;
1504
+ type DelegationStatus = z.infer<typeof DelegationStatusSchema>;
1505
+ declare const DelegationRevocationReceiptSchema: z.ZodObject<{
1506
+ revoked: z.ZodLiteral<true>;
1507
+ cid: z.ZodString;
1508
+ }, "strict", z.ZodTypeAny, {
1509
+ revoked: true;
1510
+ cid: string;
1511
+ }, {
1512
+ revoked: true;
1513
+ cid: string;
1514
+ }>;
1515
+ type DelegationRevocationReceipt = z.infer<typeof DelegationRevocationReceiptSchema>;
1516
+ declare const AccountDelegationResourceSchema: z.ZodObject<{
1517
+ resource: z.ZodString;
1518
+ actions: z.ZodArray<z.ZodString, "many">;
1519
+ caveats: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
1520
+ }, "strict", z.ZodTypeAny, {
1521
+ actions: string[];
1522
+ caveats: Record<string, unknown>[];
1523
+ resource: string;
1524
+ }, {
1525
+ actions: string[];
1526
+ caveats: Record<string, unknown>[];
1527
+ resource: string;
1528
+ }>;
1529
+ declare const AccountDelegationRecordSchema: z.ZodObject<{
1530
+ cid: z.ZodString;
1531
+ direction: z.ZodEnum<["granted", "received"]>;
1532
+ delegatorDid: z.ZodString;
1533
+ delegateDid: z.ZodString;
1534
+ resources: z.ZodArray<z.ZodObject<{
1535
+ resource: z.ZodString;
1536
+ actions: z.ZodArray<z.ZodString, "many">;
1537
+ caveats: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
1538
+ }, "strict", z.ZodTypeAny, {
1539
+ actions: string[];
1540
+ caveats: Record<string, unknown>[];
1541
+ resource: string;
1542
+ }, {
1543
+ actions: string[];
1544
+ caveats: Record<string, unknown>[];
1545
+ resource: string;
1546
+ }>, "many">;
1547
+ parents: z.ZodArray<z.ZodString, "many">;
1548
+ issuedAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
1549
+ notBefore: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
1550
+ expiresAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
1551
+ status: z.ZodEnum<["active", "pending", "expired", "revoked", "ancestor_revoked"]>;
1552
+ revokedAt: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>>;
1553
+ revokedBy: z.ZodOptional<z.ZodString>;
1554
+ revokedAncestorCid: z.ZodOptional<z.ZodString>;
1555
+ }, "strict", z.ZodTypeAny, {
1556
+ status: "active" | "revoked" | "expired" | "pending" | "ancestor_revoked";
1557
+ notBefore: Date | null;
1558
+ resources: {
1559
+ actions: string[];
1560
+ caveats: Record<string, unknown>[];
1561
+ resource: string;
1562
+ }[];
1563
+ expiresAt: Date | null;
1564
+ issuedAt: Date | null;
1565
+ cid: string;
1566
+ direction: "received" | "granted";
1567
+ delegatorDid: string;
1568
+ delegateDid: string;
1569
+ parents: string[];
1570
+ revokedAt?: Date | null | undefined;
1571
+ revokedBy?: string | undefined;
1572
+ revokedAncestorCid?: string | undefined;
1573
+ }, {
1574
+ status: "active" | "revoked" | "expired" | "pending" | "ancestor_revoked";
1575
+ notBefore: string | null;
1576
+ resources: {
1577
+ actions: string[];
1578
+ caveats: Record<string, unknown>[];
1579
+ resource: string;
1580
+ }[];
1581
+ expiresAt: string | null;
1582
+ issuedAt: string | null;
1583
+ cid: string;
1584
+ direction: "received" | "granted";
1585
+ delegatorDid: string;
1586
+ delegateDid: string;
1587
+ parents: string[];
1588
+ revokedAt?: string | null | undefined;
1589
+ revokedBy?: string | undefined;
1590
+ revokedAncestorCid?: string | undefined;
1591
+ }>;
1592
+ declare const AccountDelegationPageSchema: z.ZodObject<{
1593
+ schemaVersion: z.ZodLiteral<2>;
1594
+ items: z.ZodArray<z.ZodObject<{
1595
+ cid: z.ZodString;
1596
+ direction: z.ZodEnum<["granted", "received"]>;
1597
+ delegatorDid: z.ZodString;
1598
+ delegateDid: z.ZodString;
1599
+ resources: z.ZodArray<z.ZodObject<{
1600
+ resource: z.ZodString;
1601
+ actions: z.ZodArray<z.ZodString, "many">;
1602
+ caveats: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">;
1603
+ }, "strict", z.ZodTypeAny, {
1604
+ actions: string[];
1605
+ caveats: Record<string, unknown>[];
1606
+ resource: string;
1607
+ }, {
1608
+ actions: string[];
1609
+ caveats: Record<string, unknown>[];
1610
+ resource: string;
1611
+ }>, "many">;
1612
+ parents: z.ZodArray<z.ZodString, "many">;
1613
+ issuedAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
1614
+ notBefore: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
1615
+ expiresAt: z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>;
1616
+ status: z.ZodEnum<["active", "pending", "expired", "revoked", "ancestor_revoked"]>;
1617
+ revokedAt: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, Date, string>>>;
1618
+ revokedBy: z.ZodOptional<z.ZodString>;
1619
+ revokedAncestorCid: z.ZodOptional<z.ZodString>;
1620
+ }, "strict", z.ZodTypeAny, {
1621
+ status: "active" | "revoked" | "expired" | "pending" | "ancestor_revoked";
1622
+ notBefore: Date | null;
1623
+ resources: {
1624
+ actions: string[];
1625
+ caveats: Record<string, unknown>[];
1626
+ resource: string;
1627
+ }[];
1628
+ expiresAt: Date | null;
1629
+ issuedAt: Date | null;
1630
+ cid: string;
1631
+ direction: "received" | "granted";
1632
+ delegatorDid: string;
1633
+ delegateDid: string;
1634
+ parents: string[];
1635
+ revokedAt?: Date | null | undefined;
1636
+ revokedBy?: string | undefined;
1637
+ revokedAncestorCid?: string | undefined;
1638
+ }, {
1639
+ status: "active" | "revoked" | "expired" | "pending" | "ancestor_revoked";
1640
+ notBefore: string | null;
1641
+ resources: {
1642
+ actions: string[];
1643
+ caveats: Record<string, unknown>[];
1644
+ resource: string;
1645
+ }[];
1646
+ expiresAt: string | null;
1647
+ issuedAt: string | null;
1648
+ cid: string;
1649
+ direction: "received" | "granted";
1650
+ delegatorDid: string;
1651
+ delegateDid: string;
1652
+ parents: string[];
1653
+ revokedAt?: string | null | undefined;
1654
+ revokedBy?: string | undefined;
1655
+ revokedAncestorCid?: string | undefined;
1656
+ }>, "many">;
1657
+ nextCursor: z.ZodOptional<z.ZodString>;
1658
+ }, "strict", z.ZodTypeAny, {
1659
+ schemaVersion: 2;
1660
+ items: {
1661
+ status: "active" | "revoked" | "expired" | "pending" | "ancestor_revoked";
1662
+ notBefore: Date | null;
1663
+ resources: {
1664
+ actions: string[];
1665
+ caveats: Record<string, unknown>[];
1666
+ resource: string;
1667
+ }[];
1668
+ expiresAt: Date | null;
1669
+ issuedAt: Date | null;
1670
+ cid: string;
1671
+ direction: "received" | "granted";
1672
+ delegatorDid: string;
1673
+ delegateDid: string;
1674
+ parents: string[];
1675
+ revokedAt?: Date | null | undefined;
1676
+ revokedBy?: string | undefined;
1677
+ revokedAncestorCid?: string | undefined;
1678
+ }[];
1679
+ nextCursor?: string | undefined;
1680
+ }, {
1681
+ schemaVersion: 2;
1682
+ items: {
1683
+ status: "active" | "revoked" | "expired" | "pending" | "ancestor_revoked";
1684
+ notBefore: string | null;
1685
+ resources: {
1686
+ actions: string[];
1687
+ caveats: Record<string, unknown>[];
1688
+ resource: string;
1689
+ }[];
1690
+ expiresAt: string | null;
1691
+ issuedAt: string | null;
1692
+ cid: string;
1693
+ direction: "received" | "granted";
1694
+ delegatorDid: string;
1695
+ delegateDid: string;
1696
+ parents: string[];
1697
+ revokedAt?: string | null | undefined;
1698
+ revokedBy?: string | undefined;
1699
+ revokedAncestorCid?: string | undefined;
1700
+ }[];
1701
+ nextCursor?: string | undefined;
1702
+ }>;
1703
+ type AccountDelegationResource = z.infer<typeof AccountDelegationResourceSchema>;
1704
+ type AccountDelegationRecord = z.infer<typeof AccountDelegationRecordSchema>;
1705
+ type AccountDelegationPage = z.infer<typeof AccountDelegationPageSchema>;
1706
+ declare const AccountDelegationQueryOptionsSchema: z.ZodObject<{
1707
+ direction: z.ZodOptional<z.ZodEnum<["granted", "received", "all"]>>;
1708
+ status: z.ZodOptional<z.ZodEnum<["active", "pending", "expired", "revoked", "ancestor_revoked"]>>;
1709
+ space: z.ZodOptional<z.ZodString>;
1710
+ limit: z.ZodOptional<z.ZodNumber>;
1711
+ cursor: z.ZodOptional<z.ZodString>;
1712
+ }, "strict", z.ZodTypeAny, {
1713
+ status?: "active" | "revoked" | "expired" | "pending" | "ancestor_revoked" | undefined;
1714
+ space?: string | undefined;
1715
+ direction?: "received" | "all" | "granted" | undefined;
1716
+ limit?: number | undefined;
1717
+ cursor?: string | undefined;
1718
+ }, {
1719
+ status?: "active" | "revoked" | "expired" | "pending" | "ancestor_revoked" | undefined;
1720
+ space?: string | undefined;
1721
+ direction?: "received" | "all" | "granted" | undefined;
1722
+ limit?: number | undefined;
1723
+ cursor?: string | undefined;
1724
+ }>;
1725
+ type AccountDelegationQueryOptions = z.infer<typeof AccountDelegationQueryOptionsSchema>;
1462
1726
  /**
1463
1727
  * Entry in the capability registry mapping a capability to available keys.
1464
1728
  */
@@ -1725,8 +1989,8 @@ declare const DelegationRecordSchema: z.ZodObject<{
1725
1989
  }, "strip", z.ZodTypeAny, {
1726
1990
  path: string;
1727
1991
  actions: string[];
1728
- spaceId: string;
1729
1992
  createdAt: Date;
1993
+ spaceId: string;
1730
1994
  cid: string;
1731
1995
  isRevoked: boolean;
1732
1996
  delegator: string;
@@ -1738,8 +2002,8 @@ declare const DelegationRecordSchema: z.ZodObject<{
1738
2002
  }, {
1739
2003
  path: string;
1740
2004
  actions: string[];
1741
- spaceId: string;
1742
2005
  createdAt: Date;
2006
+ spaceId: string;
1743
2007
  cid: string;
1744
2008
  isRevoked: boolean;
1745
2009
  delegator: string;
@@ -2119,23 +2383,23 @@ declare const DelegationFiltersSchema: z.ZodObject<{
2119
2383
  }, "strip", z.ZodTypeAny, {
2120
2384
  path?: string | undefined;
2121
2385
  actions?: string[] | undefined;
2386
+ direction?: "received" | "all" | "granted" | undefined;
2387
+ limit?: number | undefined;
2388
+ cursor?: string | undefined;
2122
2389
  delegator?: string | undefined;
2123
2390
  delegatee?: string | undefined;
2124
- direction?: "received" | "all" | "granted" | undefined;
2125
2391
  includeRevoked?: boolean | undefined;
2126
2392
  validAt?: Date | undefined;
2127
- limit?: number | undefined;
2128
- cursor?: string | undefined;
2129
2393
  }, {
2130
2394
  path?: string | undefined;
2131
2395
  actions?: string[] | undefined;
2396
+ direction?: "received" | "all" | "granted" | undefined;
2397
+ limit?: number | undefined;
2398
+ cursor?: string | undefined;
2132
2399
  delegator?: string | undefined;
2133
2400
  delegatee?: string | undefined;
2134
- direction?: "received" | "all" | "granted" | undefined;
2135
2401
  includeRevoked?: boolean | undefined;
2136
2402
  validAt?: Date | undefined;
2137
- limit?: number | undefined;
2138
- cursor?: string | undefined;
2139
2403
  }>;
2140
2404
  type DelegationFilters = z.infer<typeof DelegationFiltersSchema>;
2141
2405
  /**
@@ -2248,8 +2512,6 @@ declare const ShareLinkSchema: z.ZodObject<{
2248
2512
  /** Human-readable description of what is being shared */
2249
2513
  description: z.ZodOptional<z.ZodString>;
2250
2514
  }, "strip", z.ZodTypeAny, {
2251
- schema: "base64" | "compact" | "ipfs";
2252
- url: string;
2253
2515
  delegation: {
2254
2516
  path: string;
2255
2517
  expiry: Date;
@@ -2264,12 +2526,12 @@ declare const ShareLinkSchema: z.ZodObject<{
2264
2526
  allowSubDelegation?: boolean | undefined;
2265
2527
  authHeader?: string | undefined;
2266
2528
  };
2529
+ schema: "base64" | "compact" | "ipfs";
2530
+ url: string;
2267
2531
  token: string;
2268
2532
  description?: string | undefined;
2269
2533
  expiresAt?: Date | undefined;
2270
2534
  }, {
2271
- schema: "base64" | "compact" | "ipfs";
2272
- url: string;
2273
2535
  delegation: {
2274
2536
  path: string;
2275
2537
  expiry: Date;
@@ -2284,6 +2546,8 @@ declare const ShareLinkSchema: z.ZodObject<{
2284
2546
  allowSubDelegation?: boolean | undefined;
2285
2547
  authHeader?: string | undefined;
2286
2548
  };
2549
+ schema: "base64" | "compact" | "ipfs";
2550
+ url: string;
2287
2551
  token: string;
2288
2552
  description?: string | undefined;
2289
2553
  expiresAt?: Date | undefined;
@@ -2362,20 +2626,28 @@ type GenerateShareParams = z.infer<typeof GenerateShareParamsSchema>;
2362
2626
  declare const DelegationManagerConfigSchema: z.ZodObject<{
2363
2627
  /** TinyCloud host URLs */
2364
2628
  hosts: z.ZodArray<z.ZodString, "many">;
2629
+ /** Account space used by account-wide delegation history queries */
2630
+ accountSpaceId: z.ZodOptional<z.ZodString>;
2365
2631
  /** Active session for authentication */
2366
2632
  session: z.ZodEffects<z.ZodUnknown, ServiceSession, unknown>;
2367
2633
  /** Platform-specific invoke function */
2368
2634
  invoke: z.ZodEffects<z.ZodUnknown, InvokeFunction, unknown>;
2635
+ /** Platform-specific invoke function for raw resource URIs */
2636
+ invokeAny: z.ZodOptional<z.ZodEffects<z.ZodUnknown, InvokeAnyFunction, unknown>>;
2369
2637
  /** Optional custom fetch implementation */
2370
2638
  fetch: z.ZodOptional<z.ZodEffects<z.ZodUnknown, FetchFunction, unknown>>;
2371
2639
  }, "strip", z.ZodTypeAny, {
2372
2640
  session: ServiceSession;
2373
2641
  hosts: string[];
2374
2642
  invoke: InvokeFunction;
2643
+ invokeAny?: InvokeAnyFunction | undefined;
2644
+ accountSpaceId?: string | undefined;
2375
2645
  fetch?: FetchFunction | undefined;
2376
2646
  }, {
2377
2647
  hosts: string[];
2648
+ invokeAny?: unknown;
2378
2649
  session?: unknown;
2650
+ accountSpaceId?: string | undefined;
2379
2651
  invoke?: unknown;
2380
2652
  fetch?: unknown;
2381
2653
  }>;
@@ -2562,8 +2834,8 @@ declare const CreateDelegationWasmResultSchema: z.ZodObject<{
2562
2834
  space: string;
2563
2835
  service: string;
2564
2836
  }[];
2565
- expiry: Date;
2566
2837
  delegation: string;
2838
+ expiry: Date;
2567
2839
  cid: string;
2568
2840
  delegateDID: string;
2569
2841
  }, {
@@ -2573,8 +2845,8 @@ declare const CreateDelegationWasmResultSchema: z.ZodObject<{
2573
2845
  space: string;
2574
2846
  service: string;
2575
2847
  }[];
2576
- expiry: Date;
2577
2848
  delegation: string;
2849
+ expiry: Date;
2578
2850
  cid: string;
2579
2851
  delegateDID: string;
2580
2852
  }>;
@@ -3630,7 +3902,9 @@ declare class DelegationManager {
3630
3902
  private hosts;
3631
3903
  private session;
3632
3904
  private invoke;
3905
+ private invokeAny?;
3633
3906
  private fetchFn;
3907
+ private accountSpaceId?;
3634
3908
  /**
3635
3909
  * Creates a new DelegationManager instance.
3636
3910
  *
@@ -3689,7 +3963,14 @@ declare class DelegationManager {
3689
3963
  * }
3690
3964
  * ```
3691
3965
  */
3692
- revoke(cid: string): Promise<Result<void>>;
3966
+ revoke(cid: string): Promise<Result<DelegationRevocationReceipt>>;
3967
+ /**
3968
+ * Reads the node-confirmed lifecycle state of one delegation without
3969
+ * exposing delegation metadata.
3970
+ */
3971
+ status(cid: string): Promise<Result<DelegationStatus>>;
3972
+ /** Query lifecycle-complete delegation history for the authenticated account. */
3973
+ query(options?: AccountDelegationQueryOptions): Promise<Result<AccountDelegationPage>>;
3693
3974
  /**
3694
3975
  * Lists all delegations for the current session's space.
3695
3976
  *
@@ -3821,6 +4102,55 @@ interface ShareAccess {
3821
4102
  /** The path prefix for this share */
3822
4103
  path: string;
3823
4104
  }
4105
+ /**
4106
+ * Parameters for attenuating a received share to another principal.
4107
+ *
4108
+ * Omitted path/actions/expiry inherit the received share's exact values. Any
4109
+ * supplied value must be equal to or an attenuated subset of the parent.
4110
+ */
4111
+ interface DelegateReceivedShareParams {
4112
+ /** DID that may exercise the child delegation. */
4113
+ delegateDID: string;
4114
+ /** Equal to or below the shared path. Defaults to the shared path. */
4115
+ path?: string;
4116
+ /** Subset of the shared actions. Defaults to all shared actions. */
4117
+ actions?: string[];
4118
+ /** No later than the sharing-link expiry. Defaults to the parent expiry. */
4119
+ expiry?: Date;
4120
+ /** Optional node origin that further narrows the configured-host allowlist. */
4121
+ expectedHost?: string;
4122
+ }
4123
+ /**
4124
+ * A transport-ready child delegation with non-secret source lineage.
4125
+ *
4126
+ * `delegation.delegationHeader` is a live bearer credential. Treat it like a
4127
+ * secret: do not log it or persist it outside secure credential storage.
4128
+ * Only `source` is safe to retain as non-secret lineage metadata.
4129
+ */
4130
+ interface DelegatedShareAccess {
4131
+ delegation: Delegation & {
4132
+ delegationHeader: {
4133
+ Authorization: string;
4134
+ };
4135
+ ownerAddress: string;
4136
+ chainId: number;
4137
+ host: string;
4138
+ resources: Array<{
4139
+ service: string;
4140
+ space: string;
4141
+ path: string;
4142
+ actions: string[];
4143
+ }>;
4144
+ disableSubDelegation: boolean;
4145
+ };
4146
+ source: {
4147
+ parentCid: string;
4148
+ spaceId: string;
4149
+ path: string;
4150
+ host: string;
4151
+ expiresAt: Date;
4152
+ };
4153
+ }
3824
4154
  /**
3825
4155
  * Configuration for SharingService.
3826
4156
  */
@@ -3867,6 +4197,8 @@ interface SharingServiceConfig {
3867
4197
  * Creates UCAN delegations directly without requiring server roundtrip.
3868
4198
  */
3869
4199
  createDelegationWasm?: (params: CreateDelegationWasmParams) => CreateDelegationWasmResult;
4200
+ /** Compute a CID for serialized delegation bytes. Required for share attenuation. */
4201
+ computeCid?: (data: Uint8Array, codec: bigint) => string;
3870
4202
  /**
3871
4203
  * Path prefix for KV operations.
3872
4204
  * When set, paths passed to generate() are prefixed with this value.
@@ -3928,6 +4260,12 @@ interface ISharingService {
3928
4260
  * creates a sub-delegation to the current session key.
3929
4261
  */
3930
4262
  receive(link: string, options?: ReceiveOptions): Promise<Result<ShareAccess, DelegationError>>;
4263
+ /**
4264
+ * Consume a sharing link locally and create an attenuated child delegation.
4265
+ * The raw link and embedded private JWK are never returned. The returned
4266
+ * child delegation is itself a sensitive bearer credential.
4267
+ */
4268
+ delegateReceivedShare(link: string, params: DelegateReceivedShareParams): Promise<Result<DelegatedShareAccess, DelegationError>>;
3931
4269
  /**
3932
4270
  * Encode sharing data into a link string.
3933
4271
  */
@@ -3986,6 +4324,7 @@ declare class SharingService implements ISharingService {
3986
4324
  private baseUrl;
3987
4325
  private createDelegationFn?;
3988
4326
  private createDelegationWasmFn?;
4327
+ private computeCidFn?;
3989
4328
  private pathPrefix;
3990
4329
  private sessionExpiry?;
3991
4330
  private onRootDelegationNeeded?;
@@ -4059,6 +4398,16 @@ declare class SharingService implements ISharingService {
4059
4398
  * 4. Return ShareAccess with pre-configured KV service
4060
4399
  */
4061
4400
  receive(link: string, options?: ReceiveOptions): Promise<Result<ShareAccess, DelegationError>>;
4401
+ /**
4402
+ * Create a constrained child delegation from a received sharing link.
4403
+ *
4404
+ * This is the safe handoff for a browser delegating shared input to an
4405
+ * agent or service: the bearer link is decoded and used only in this SDK
4406
+ * instance, while the recipient receives a child UCAN without the embedded
4407
+ * private key. The child UCAN is a sensitive bearer credential and must not
4408
+ * be logged or stored insecurely.
4409
+ */
4410
+ delegateReceivedShare(link: string, params: DelegateReceivedShareParams): Promise<Result<DelegatedShareAccess, DelegationError>>;
4062
4411
  /**
4063
4412
  * Encode sharing data into a link string.
4064
4413
  *
@@ -4662,6 +5011,7 @@ interface AccountServiceConfig {
4662
5011
  getPrimarySpaceId: () => string | undefined;
4663
5012
  getAccountSpaceId: () => string | undefined;
4664
5013
  getSpaces: () => ISpaceService;
5014
+ getDelegationManager?: () => Pick<DelegationManager, "query" | "revoke">;
4665
5015
  getAccountDb?: () => IDatabaseHandle | undefined;
4666
5016
  ensureAccountSpaceHosted?: () => Promise<void>;
4667
5017
  }
@@ -4683,8 +5033,9 @@ declare class AccountService {
4683
5033
  remove: (spaceId: string) => Promise<Result$1<void>>;
4684
5034
  };
4685
5035
  readonly delegations: {
5036
+ query: (options?: AccountDelegationQueryOptions) => Promise<Result$1<AccountDelegationPage>>;
4686
5037
  list: (options?: AccountDelegationListOptions) => Promise<Result$1<AccountDelegation[]>>;
4687
- revoke: (options: AccountDelegationRevokeOptions) => Promise<Result$1<void>>;
5038
+ revoke: (input: string | AccountDelegationRevokeOptions) => Promise<Result$1<DelegationRevocationReceipt | void>>;
4688
5039
  };
4689
5040
  readonly index: {
4690
5041
  ensure: () => Promise<Result$1<AccountIndexEnsureResult>>;
@@ -4748,6 +5099,8 @@ interface SpaceHostResult {
4748
5099
  activated?: string[];
4749
5100
  /** Space IDs that were skipped (e.g., space doesn't exist yet) */
4750
5101
  skipped?: string[];
5102
+ /** Raw node receipt CID. This identifies the commit event, not the delegation. */
5103
+ commitEventCid?: string;
4751
5104
  }
4752
5105
  /**
4753
5106
  * Fetch the peer ID from TinyCloud server for space hosting.
@@ -4947,4 +5300,4 @@ declare const EXPIRY: {
4947
5300
  declare const DEFAULT_SIGNED_READ_URL_EXPIRY_MS: number;
4948
5301
  type ExpiryTier = keyof typeof EXPIRY;
4949
5302
 
4950
- export { ACCOUNT_REGISTRY_PATH, ACCOUNT_REGISTRY_SPACE, type AbilitiesMap, type AccountApplication, type AccountApplicationListOptions, type AccountDelegation, type AccountDelegationListOptions, 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 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_KNOWLEDGE_ROOT, 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 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 PersistedTinyCloudSession, type PkhDidParts, ProtocolMismatchError, type ReceiveOptions, 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, 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, createOpenKeyCallbackSigningStrategy, 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, resolveManifestKnowledgeRoot, resolveTinyCloudHosts, resourceCapabilitiesToAbilitiesMap, resourceCapabilitiesToSpaceAbilitiesMap, signLocationRecord, submitHostDelegation, validateClientSession, validateLocationRecord, validateLocationRecordPayload, validateManifest, validatePersistedSessionData, verifyDidKeyEd25519Signature, verifyLocationRecord };
5303
+ export { ACCOUNT_REGISTRY_PATH, ACCOUNT_REGISTRY_SPACE, type AbilitiesMap, type AccountApplication, type AccountApplicationListOptions, type AccountDelegation, type AccountDelegationListOptions, type AccountDelegationPage, type AccountDelegationQueryOptions, type AccountDelegationRecord, type AccountDelegationResource, 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 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_KNOWLEDGE_ROOT, DEFAULT_MANIFEST_SPACE, DEFAULT_MANIFEST_VERSION, DEFAULT_SIGNED_READ_URL_EXPIRY_MS, DEFAULT_TINYCLOUD_FALLBACK_HOST, DEFAULT_TINYCLOUD_LOCATION_REGISTRY_URL, type DelegateReceivedShareParams, type DelegatedResource, type DelegatedShareAccess, 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 DelegationRevocationReceipt, type DelegationStatus, 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 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 PersistedTinyCloudSession, type PkhDidParts, ProtocolMismatchError, type ReceiveOptions, 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, 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, actionContains, activateSessionWithHost, addressStorageKey, applyPrefix, buildSpaceUri, canonicalLocationPayload, canonicalizeAddress, canonicalizeDid, canonicalizeDidUrl, canonicalizeNetworkId, checkNodeInfo, composeManifestRequest, createCapabilityKeyRegistry, createOpenKeyCallbackSigningStrategy, 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, resolveManifestKnowledgeRoot, resolveTinyCloudHosts, resourceCapabilitiesToAbilitiesMap, resourceCapabilitiesToSpaceAbilitiesMap, signLocationRecord, submitHostDelegation, validateClientSession, validateLocationRecord, validateLocationRecordPayload, validateManifest, validatePersistedSessionData, verifyDidKeyEd25519Signature, verifyLocationRecord };