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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -3,8 +3,8 @@ import { InvokeFunction, InvokeAnyFunction, ParsedNetworkId, ServiceError, Resul
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
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.cjs';
5
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-Cy_81K45.cjs';
7
- export { a as JsonValue, j as jcsCanonicalize, n as normalizeJson, s as serializeJcsJson } from './capability-Dbx-xqUh.cjs';
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-CpXNKC4d.cjs';
7
+ export { b as JsonValue, j as jcsCanonicalize, n as normalizeJson, s as serializeJcsJson } from './capability-DpdAwc1W.cjs';
8
8
  export { SiweMessage } from 'siwe';
9
9
 
10
10
  /**
@@ -1502,6 +1502,227 @@ declare const DelegationStatusSchema: z.ZodEffects<z.ZodObject<{
1502
1502
  exists: boolean;
1503
1503
  }>;
1504
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>;
1505
1726
  /**
1506
1727
  * Entry in the capability registry mapping a capability to available keys.
1507
1728
  */
@@ -2162,23 +2383,23 @@ declare const DelegationFiltersSchema: z.ZodObject<{
2162
2383
  }, "strip", z.ZodTypeAny, {
2163
2384
  path?: string | undefined;
2164
2385
  actions?: string[] | undefined;
2386
+ direction?: "received" | "all" | "granted" | undefined;
2387
+ limit?: number | undefined;
2388
+ cursor?: string | undefined;
2165
2389
  delegator?: string | undefined;
2166
2390
  delegatee?: string | undefined;
2167
- direction?: "received" | "all" | "granted" | undefined;
2168
2391
  includeRevoked?: boolean | undefined;
2169
2392
  validAt?: Date | undefined;
2170
- limit?: number | undefined;
2171
- cursor?: string | undefined;
2172
2393
  }, {
2173
2394
  path?: string | undefined;
2174
2395
  actions?: string[] | undefined;
2396
+ direction?: "received" | "all" | "granted" | undefined;
2397
+ limit?: number | undefined;
2398
+ cursor?: string | undefined;
2175
2399
  delegator?: string | undefined;
2176
2400
  delegatee?: string | undefined;
2177
- direction?: "received" | "all" | "granted" | undefined;
2178
2401
  includeRevoked?: boolean | undefined;
2179
2402
  validAt?: Date | undefined;
2180
- limit?: number | undefined;
2181
- cursor?: string | undefined;
2182
2403
  }>;
2183
2404
  type DelegationFilters = z.infer<typeof DelegationFiltersSchema>;
2184
2405
  /**
@@ -2405,6 +2626,8 @@ type GenerateShareParams = z.infer<typeof GenerateShareParamsSchema>;
2405
2626
  declare const DelegationManagerConfigSchema: z.ZodObject<{
2406
2627
  /** TinyCloud host URLs */
2407
2628
  hosts: z.ZodArray<z.ZodString, "many">;
2629
+ /** Account space used by account-wide delegation history queries */
2630
+ accountSpaceId: z.ZodOptional<z.ZodString>;
2408
2631
  /** Active session for authentication */
2409
2632
  session: z.ZodEffects<z.ZodUnknown, ServiceSession, unknown>;
2410
2633
  /** Platform-specific invoke function */
@@ -2418,11 +2641,13 @@ declare const DelegationManagerConfigSchema: z.ZodObject<{
2418
2641
  hosts: string[];
2419
2642
  invoke: InvokeFunction;
2420
2643
  invokeAny?: InvokeAnyFunction | undefined;
2644
+ accountSpaceId?: string | undefined;
2421
2645
  fetch?: FetchFunction | undefined;
2422
2646
  }, {
2423
2647
  hosts: string[];
2424
2648
  invokeAny?: unknown;
2425
2649
  session?: unknown;
2650
+ accountSpaceId?: string | undefined;
2426
2651
  invoke?: unknown;
2427
2652
  fetch?: unknown;
2428
2653
  }>;
@@ -3679,6 +3904,7 @@ declare class DelegationManager {
3679
3904
  private invoke;
3680
3905
  private invokeAny?;
3681
3906
  private fetchFn;
3907
+ private accountSpaceId?;
3682
3908
  /**
3683
3909
  * Creates a new DelegationManager instance.
3684
3910
  *
@@ -3737,12 +3963,14 @@ declare class DelegationManager {
3737
3963
  * }
3738
3964
  * ```
3739
3965
  */
3740
- revoke(cid: string): Promise<Result<void>>;
3966
+ revoke(cid: string): Promise<Result<DelegationRevocationReceipt>>;
3741
3967
  /**
3742
3968
  * Reads the node-confirmed lifecycle state of one delegation without
3743
3969
  * exposing delegation metadata.
3744
3970
  */
3745
3971
  status(cid: string): Promise<Result<DelegationStatus>>;
3972
+ /** Query lifecycle-complete delegation history for the authenticated account. */
3973
+ query(options?: AccountDelegationQueryOptions): Promise<Result<AccountDelegationPage>>;
3746
3974
  /**
3747
3975
  * Lists all delegations for the current session's space.
3748
3976
  *
@@ -4783,6 +5011,7 @@ interface AccountServiceConfig {
4783
5011
  getPrimarySpaceId: () => string | undefined;
4784
5012
  getAccountSpaceId: () => string | undefined;
4785
5013
  getSpaces: () => ISpaceService;
5014
+ getDelegationManager?: () => Pick<DelegationManager, "query" | "revoke">;
4786
5015
  getAccountDb?: () => IDatabaseHandle | undefined;
4787
5016
  ensureAccountSpaceHosted?: () => Promise<void>;
4788
5017
  }
@@ -4804,8 +5033,9 @@ declare class AccountService {
4804
5033
  remove: (spaceId: string) => Promise<Result$1<void>>;
4805
5034
  };
4806
5035
  readonly delegations: {
5036
+ query: (options?: AccountDelegationQueryOptions) => Promise<Result$1<AccountDelegationPage>>;
4807
5037
  list: (options?: AccountDelegationListOptions) => Promise<Result$1<AccountDelegation[]>>;
4808
- revoke: (options: AccountDelegationRevokeOptions) => Promise<Result$1<void>>;
5038
+ revoke: (input: string | AccountDelegationRevokeOptions) => Promise<Result$1<DelegationRevocationReceipt | void>>;
4809
5039
  };
4810
5040
  readonly index: {
4811
5041
  ensure: () => Promise<Result$1<AccountIndexEnsureResult>>;
@@ -5070,4 +5300,4 @@ declare const EXPIRY: {
5070
5300
  declare const DEFAULT_SIGNED_READ_URL_EXPIRY_MS: number;
5071
5301
  type ExpiryTier = keyof typeof EXPIRY;
5072
5302
 
5073
- 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 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 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 };
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 };