@tinycloud/sdk-core 2.2.0-beta.6 → 2.2.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { InvokeFunction, InvokeAnyFunction, ServiceError, Result as Result$1, ServiceSession, FetchFunction, ServiceConstructor, RetryPolicy, IServiceContext, IService, IKVService, ISQLService, IDuckDbService, IHooksService, IDataVaultService } from '@tinycloud/sdk-services';
3
- export { BatchOptions, BatchResponse, ColumnInfo, DataVaultConfig, DataVaultService, DatabaseHandle, DuckDbAction, DuckDbActionType, DuckDbBatchOptions, DuckDbBatchResponse, DuckDbDatabaseHandle, DuckDbExecuteOptions, DuckDbExecuteResponse, DuckDbOptions, DuckDbQueryOptions, DuckDbQueryResponse, DuckDbService, DuckDbServiceConfig, DuckDbStatement, DuckDbValue, ErrorCode, ErrorCodes, ExecuteOptions, ExecuteResponse, FetchFunction, HookEvent, HookServiceName, HookStreamEvent, HookSubscription, HookWebhookListOptions, HookWebhookRecord, HookWebhookRegistration, HookWebhookScope, HookWebhookUnregisterOptions, HooksService, HooksServiceConfig, IDataVaultService, IDatabaseHandle, IDuckDbDatabaseHandle, IDuckDbService, IHooksService, IKVService, IPrefixedKVService, ISQLService, IService, IServiceContext, InvokeAnyEntry, InvokeAnyFunction, InvokeFunction, KVDeleteOptions, KVGetOptions, KVHeadOptions, KVListOptions, KVListResponse, KVPutOptions, KVResponse, KVResponseHeaders, KVService, KVServiceConfig, PrefixedKVService, QueryOptions, QueryResponse, Result, RetryPolicy, SQLAction, SQLActionType, SQLService, SQLServiceConfig, SchemaInfo, ServiceContext, ServiceContextConfig, ServiceError, ServiceSession, SqlStatement, SqlValue, SubscribeOptions, TableInfo, VaultCrypto, VaultEntry, VaultError, VaultGetOptions, VaultGrantOptions, VaultHeaders, VaultListOptions, VaultPublicSpaceKVActions, VaultPutOptions, ViewInfo, WasmVaultFunctions, createVaultCrypto, defaultRetryPolicy, err, ok, serviceError } from '@tinycloud/sdk-services';
3
+ export { BatchOptions, BatchResponse, ColumnInfo, DataVaultConfig, DataVaultService, DatabaseHandle, DuckDbAction, DuckDbActionType, DuckDbBatchOptions, DuckDbBatchResponse, DuckDbDatabaseHandle, DuckDbExecuteOptions, DuckDbExecuteResponse, DuckDbOptions, DuckDbQueryOptions, DuckDbQueryResponse, DuckDbService, DuckDbServiceConfig, DuckDbStatement, DuckDbValue, ErrorCode, ErrorCodes, ExecuteOptions, ExecuteResponse, FetchFunction, HookEvent, HookServiceName, HookStreamEvent, HookSubscription, HookWebhookListOptions, HookWebhookRecord, HookWebhookRegistration, HookWebhookScope, HookWebhookUnregisterOptions, HooksService, HooksServiceConfig, IDataVaultService, IDatabaseHandle, IDuckDbDatabaseHandle, IDuckDbService, IHooksService, IKVService, IPrefixedKVService, ISQLService, ISecretsService, IService, IServiceContext, InvokeAnyEntry, InvokeAnyFunction, InvokeFunction, KVDeleteOptions, KVGetOptions, KVHeadOptions, KVListOptions, KVListResponse, KVPutOptions, KVResponse, KVResponseHeaders, KVService, KVServiceConfig, PrefixedKVService, QueryOptions, QueryResponse, Result, RetryPolicy, SQLAction, SQLActionType, SQLService, SQLServiceConfig, SchemaInfo, SecretPayload, SecretsError, SecretsService, ServiceContext, ServiceContextConfig, ServiceError, ServiceSession, SqlStatement, SqlValue, SubscribeOptions, TableInfo, VaultCrypto, VaultEntry, VaultError, VaultGetOptions, VaultGrantOptions, VaultHeaders, VaultListOptions, VaultPublicSpaceKVActions, VaultPutOptions, ViewInfo, WasmVaultFunctions, createVaultCrypto, defaultRetryPolicy, err, ok, serviceError } from '@tinycloud/sdk-services';
4
4
  export { SiweMessage } from 'siwe';
5
5
 
6
6
  /**
@@ -229,6 +229,11 @@ interface PermissionEntry {
229
229
  /** User/agent-facing context for why this permission is requested. */
230
230
  description?: string;
231
231
  }
232
+ type ManifestSecretActions = true | string | string[] | {
233
+ actions?: string | string[];
234
+ expiry?: string;
235
+ description?: string;
236
+ };
232
237
  /**
233
238
  * The valid values for `Manifest.defaults`.
234
239
  *
@@ -281,6 +286,11 @@ interface Manifest {
281
286
  * DuckDB (opt-in), or `skipPrefix: true` entries.
282
287
  */
283
288
  permissions?: PermissionEntry[];
289
+ /**
290
+ * Secret name shorthand. Entries resolve to encrypted vault KV resources in
291
+ * the `secrets` space.
292
+ */
293
+ secrets?: Record<string, ManifestSecretActions>;
284
294
  }
285
295
  /**
286
296
  * A resolved permission entry with fully-expanded paths and action URNs.
@@ -1303,11 +1313,11 @@ declare const DelegationSchema: z.ZodObject<{
1303
1313
  authHeader: z.ZodOptional<z.ZodString>;
1304
1314
  }, "strip", z.ZodTypeAny, {
1305
1315
  path: string;
1316
+ actions: string[];
1306
1317
  expiry: Date;
1307
1318
  spaceId: string;
1308
1319
  cid: string;
1309
1320
  delegateDID: string;
1310
- actions: string[];
1311
1321
  isRevoked: boolean;
1312
1322
  createdAt?: Date | undefined;
1313
1323
  delegatorDID?: string | undefined;
@@ -1316,11 +1326,11 @@ declare const DelegationSchema: z.ZodObject<{
1316
1326
  authHeader?: string | undefined;
1317
1327
  }, {
1318
1328
  path: string;
1329
+ actions: string[];
1319
1330
  expiry: Date;
1320
1331
  spaceId: string;
1321
1332
  cid: string;
1322
1333
  delegateDID: string;
1323
- actions: string[];
1324
1334
  isRevoked: boolean;
1325
1335
  createdAt?: Date | undefined;
1326
1336
  delegatorDID?: string | undefined;
@@ -1461,11 +1471,11 @@ declare const CapabilityEntrySchema: z.ZodObject<{
1461
1471
  authHeader: z.ZodOptional<z.ZodString>;
1462
1472
  }, "strip", z.ZodTypeAny, {
1463
1473
  path: string;
1474
+ actions: string[];
1464
1475
  expiry: Date;
1465
1476
  spaceId: string;
1466
1477
  cid: string;
1467
1478
  delegateDID: string;
1468
- actions: string[];
1469
1479
  isRevoked: boolean;
1470
1480
  createdAt?: Date | undefined;
1471
1481
  delegatorDID?: string | undefined;
@@ -1474,11 +1484,11 @@ declare const CapabilityEntrySchema: z.ZodObject<{
1474
1484
  authHeader?: string | undefined;
1475
1485
  }, {
1476
1486
  path: string;
1487
+ actions: string[];
1477
1488
  expiry: Date;
1478
1489
  spaceId: string;
1479
1490
  cid: string;
1480
1491
  delegateDID: string;
1481
- actions: string[];
1482
1492
  isRevoked: boolean;
1483
1493
  createdAt?: Date | undefined;
1484
1494
  delegatorDID?: string | undefined;
@@ -1510,11 +1520,11 @@ declare const CapabilityEntrySchema: z.ZodObject<{
1510
1520
  }[];
1511
1521
  delegation: {
1512
1522
  path: string;
1523
+ actions: string[];
1513
1524
  expiry: Date;
1514
1525
  spaceId: string;
1515
1526
  cid: string;
1516
1527
  delegateDID: string;
1517
- actions: string[];
1518
1528
  isRevoked: boolean;
1519
1529
  createdAt?: Date | undefined;
1520
1530
  delegatorDID?: string | undefined;
@@ -1547,11 +1557,11 @@ declare const CapabilityEntrySchema: z.ZodObject<{
1547
1557
  }[];
1548
1558
  delegation: {
1549
1559
  path: string;
1560
+ actions: string[];
1550
1561
  expiry: Date;
1551
1562
  spaceId: string;
1552
1563
  cid: string;
1553
1564
  delegateDID: string;
1554
- actions: string[];
1555
1565
  isRevoked: boolean;
1556
1566
  createdAt?: Date | undefined;
1557
1567
  delegatorDID?: string | undefined;
@@ -1594,10 +1604,10 @@ declare const DelegationRecordSchema: z.ZodObject<{
1594
1604
  parentCid: z.ZodOptional<z.ZodString>;
1595
1605
  }, "strip", z.ZodTypeAny, {
1596
1606
  path: string;
1607
+ actions: string[];
1597
1608
  spaceId: string;
1598
1609
  createdAt: Date;
1599
1610
  cid: string;
1600
- actions: string[];
1601
1611
  isRevoked: boolean;
1602
1612
  delegator: string;
1603
1613
  delegatee: string;
@@ -1607,10 +1617,10 @@ declare const DelegationRecordSchema: z.ZodObject<{
1607
1617
  keyId?: string | undefined;
1608
1618
  }, {
1609
1619
  path: string;
1620
+ actions: string[];
1610
1621
  spaceId: string;
1611
1622
  createdAt: Date;
1612
1623
  cid: string;
1613
- actions: string[];
1614
1624
  isRevoked: boolean;
1615
1625
  delegator: string;
1616
1626
  delegatee: string;
@@ -1638,15 +1648,15 @@ declare const CreateDelegationParamsSchema: z.ZodObject<{
1638
1648
  statement: z.ZodOptional<z.ZodString>;
1639
1649
  }, "strip", z.ZodTypeAny, {
1640
1650
  path: string;
1641
- delegateDID: string;
1642
1651
  actions: string[];
1652
+ delegateDID: string;
1643
1653
  statement?: string | undefined;
1644
1654
  expiry?: Date | undefined;
1645
1655
  disableSubDelegation?: boolean | undefined;
1646
1656
  }, {
1647
1657
  path: string;
1648
- delegateDID: string;
1649
1658
  actions: string[];
1659
+ delegateDID: string;
1650
1660
  statement?: string | undefined;
1651
1661
  expiry?: Date | undefined;
1652
1662
  disableSubDelegation?: boolean | undefined;
@@ -1682,11 +1692,11 @@ declare const DelegationChainSchema: z.ZodArray<z.ZodObject<{
1682
1692
  authHeader: z.ZodOptional<z.ZodString>;
1683
1693
  }, "strip", z.ZodTypeAny, {
1684
1694
  path: string;
1695
+ actions: string[];
1685
1696
  expiry: Date;
1686
1697
  spaceId: string;
1687
1698
  cid: string;
1688
1699
  delegateDID: string;
1689
- actions: string[];
1690
1700
  isRevoked: boolean;
1691
1701
  createdAt?: Date | undefined;
1692
1702
  delegatorDID?: string | undefined;
@@ -1695,11 +1705,11 @@ declare const DelegationChainSchema: z.ZodArray<z.ZodObject<{
1695
1705
  authHeader?: string | undefined;
1696
1706
  }, {
1697
1707
  path: string;
1708
+ actions: string[];
1698
1709
  expiry: Date;
1699
1710
  spaceId: string;
1700
1711
  cid: string;
1701
1712
  delegateDID: string;
1702
- actions: string[];
1703
1713
  isRevoked: boolean;
1704
1714
  createdAt?: Date | undefined;
1705
1715
  delegatorDID?: string | undefined;
@@ -1740,11 +1750,11 @@ declare const DelegationChainV2Schema: z.ZodObject<{
1740
1750
  authHeader: z.ZodOptional<z.ZodString>;
1741
1751
  }, "strip", z.ZodTypeAny, {
1742
1752
  path: string;
1753
+ actions: string[];
1743
1754
  expiry: Date;
1744
1755
  spaceId: string;
1745
1756
  cid: string;
1746
1757
  delegateDID: string;
1747
- actions: string[];
1748
1758
  isRevoked: boolean;
1749
1759
  createdAt?: Date | undefined;
1750
1760
  delegatorDID?: string | undefined;
@@ -1753,11 +1763,11 @@ declare const DelegationChainV2Schema: z.ZodObject<{
1753
1763
  authHeader?: string | undefined;
1754
1764
  }, {
1755
1765
  path: string;
1766
+ actions: string[];
1756
1767
  expiry: Date;
1757
1768
  spaceId: string;
1758
1769
  cid: string;
1759
1770
  delegateDID: string;
1760
- actions: string[];
1761
1771
  isRevoked: boolean;
1762
1772
  createdAt?: Date | undefined;
1763
1773
  delegatorDID?: string | undefined;
@@ -1793,11 +1803,11 @@ declare const DelegationChainV2Schema: z.ZodObject<{
1793
1803
  authHeader: z.ZodOptional<z.ZodString>;
1794
1804
  }, "strip", z.ZodTypeAny, {
1795
1805
  path: string;
1806
+ actions: string[];
1796
1807
  expiry: Date;
1797
1808
  spaceId: string;
1798
1809
  cid: string;
1799
1810
  delegateDID: string;
1800
- actions: string[];
1801
1811
  isRevoked: boolean;
1802
1812
  createdAt?: Date | undefined;
1803
1813
  delegatorDID?: string | undefined;
@@ -1806,11 +1816,11 @@ declare const DelegationChainV2Schema: z.ZodObject<{
1806
1816
  authHeader?: string | undefined;
1807
1817
  }, {
1808
1818
  path: string;
1819
+ actions: string[];
1809
1820
  expiry: Date;
1810
1821
  spaceId: string;
1811
1822
  cid: string;
1812
1823
  delegateDID: string;
1813
- actions: string[];
1814
1824
  isRevoked: boolean;
1815
1825
  createdAt?: Date | undefined;
1816
1826
  delegatorDID?: string | undefined;
@@ -1846,11 +1856,11 @@ declare const DelegationChainV2Schema: z.ZodObject<{
1846
1856
  authHeader: z.ZodOptional<z.ZodString>;
1847
1857
  }, "strip", z.ZodTypeAny, {
1848
1858
  path: string;
1859
+ actions: string[];
1849
1860
  expiry: Date;
1850
1861
  spaceId: string;
1851
1862
  cid: string;
1852
1863
  delegateDID: string;
1853
- actions: string[];
1854
1864
  isRevoked: boolean;
1855
1865
  createdAt?: Date | undefined;
1856
1866
  delegatorDID?: string | undefined;
@@ -1859,11 +1869,11 @@ declare const DelegationChainV2Schema: z.ZodObject<{
1859
1869
  authHeader?: string | undefined;
1860
1870
  }, {
1861
1871
  path: string;
1872
+ actions: string[];
1862
1873
  expiry: Date;
1863
1874
  spaceId: string;
1864
1875
  cid: string;
1865
1876
  delegateDID: string;
1866
- actions: string[];
1867
1877
  isRevoked: boolean;
1868
1878
  createdAt?: Date | undefined;
1869
1879
  delegatorDID?: string | undefined;
@@ -1874,11 +1884,11 @@ declare const DelegationChainV2Schema: z.ZodObject<{
1874
1884
  }, "strip", z.ZodTypeAny, {
1875
1885
  root: {
1876
1886
  path: string;
1887
+ actions: string[];
1877
1888
  expiry: Date;
1878
1889
  spaceId: string;
1879
1890
  cid: string;
1880
1891
  delegateDID: string;
1881
- actions: string[];
1882
1892
  isRevoked: boolean;
1883
1893
  createdAt?: Date | undefined;
1884
1894
  delegatorDID?: string | undefined;
@@ -1888,11 +1898,11 @@ declare const DelegationChainV2Schema: z.ZodObject<{
1888
1898
  };
1889
1899
  chain: {
1890
1900
  path: string;
1901
+ actions: string[];
1891
1902
  expiry: Date;
1892
1903
  spaceId: string;
1893
1904
  cid: string;
1894
1905
  delegateDID: string;
1895
- actions: string[];
1896
1906
  isRevoked: boolean;
1897
1907
  createdAt?: Date | undefined;
1898
1908
  delegatorDID?: string | undefined;
@@ -1902,11 +1912,11 @@ declare const DelegationChainV2Schema: z.ZodObject<{
1902
1912
  }[];
1903
1913
  leaf: {
1904
1914
  path: string;
1915
+ actions: string[];
1905
1916
  expiry: Date;
1906
1917
  spaceId: string;
1907
1918
  cid: string;
1908
1919
  delegateDID: string;
1909
- actions: string[];
1910
1920
  isRevoked: boolean;
1911
1921
  createdAt?: Date | undefined;
1912
1922
  delegatorDID?: string | undefined;
@@ -1917,11 +1927,11 @@ declare const DelegationChainV2Schema: z.ZodObject<{
1917
1927
  }, {
1918
1928
  root: {
1919
1929
  path: string;
1930
+ actions: string[];
1920
1931
  expiry: Date;
1921
1932
  spaceId: string;
1922
1933
  cid: string;
1923
1934
  delegateDID: string;
1924
- actions: string[];
1925
1935
  isRevoked: boolean;
1926
1936
  createdAt?: Date | undefined;
1927
1937
  delegatorDID?: string | undefined;
@@ -1931,11 +1941,11 @@ declare const DelegationChainV2Schema: z.ZodObject<{
1931
1941
  };
1932
1942
  chain: {
1933
1943
  path: string;
1944
+ actions: string[];
1934
1945
  expiry: Date;
1935
1946
  spaceId: string;
1936
1947
  cid: string;
1937
1948
  delegateDID: string;
1938
- actions: string[];
1939
1949
  isRevoked: boolean;
1940
1950
  createdAt?: Date | undefined;
1941
1951
  delegatorDID?: string | undefined;
@@ -1945,11 +1955,11 @@ declare const DelegationChainV2Schema: z.ZodObject<{
1945
1955
  }[];
1946
1956
  leaf: {
1947
1957
  path: string;
1958
+ actions: string[];
1948
1959
  expiry: Date;
1949
1960
  spaceId: string;
1950
1961
  cid: string;
1951
1962
  delegateDID: string;
1952
- actions: string[];
1953
1963
  isRevoked: boolean;
1954
1964
  createdAt?: Date | undefined;
1955
1965
  delegatorDID?: string | undefined;
@@ -2033,15 +2043,15 @@ declare const SpaceInfoSchema: z.ZodObject<{
2033
2043
  type: "owned" | "delegated";
2034
2044
  id: string;
2035
2045
  owner: string;
2036
- expiresAt?: Date | undefined;
2037
2046
  name?: string | undefined;
2047
+ expiresAt?: Date | undefined;
2038
2048
  permissions?: string[] | undefined;
2039
2049
  }, {
2040
2050
  type: "owned" | "delegated";
2041
2051
  id: string;
2042
2052
  owner: string;
2043
- expiresAt?: Date | undefined;
2044
2053
  name?: string | undefined;
2054
+ expiresAt?: Date | undefined;
2045
2055
  permissions?: string[] | undefined;
2046
2056
  }>;
2047
2057
  type SpaceInfo = z.infer<typeof SpaceInfoSchema>;
@@ -2086,11 +2096,11 @@ declare const ShareLinkSchema: z.ZodObject<{
2086
2096
  authHeader: z.ZodOptional<z.ZodString>;
2087
2097
  }, "strip", z.ZodTypeAny, {
2088
2098
  path: string;
2099
+ actions: string[];
2089
2100
  expiry: Date;
2090
2101
  spaceId: string;
2091
2102
  cid: string;
2092
2103
  delegateDID: string;
2093
- actions: string[];
2094
2104
  isRevoked: boolean;
2095
2105
  createdAt?: Date | undefined;
2096
2106
  delegatorDID?: string | undefined;
@@ -2099,11 +2109,11 @@ declare const ShareLinkSchema: z.ZodObject<{
2099
2109
  authHeader?: string | undefined;
2100
2110
  }, {
2101
2111
  path: string;
2112
+ actions: string[];
2102
2113
  expiry: Date;
2103
2114
  spaceId: string;
2104
2115
  cid: string;
2105
2116
  delegateDID: string;
2106
- actions: string[];
2107
2117
  isRevoked: boolean;
2108
2118
  createdAt?: Date | undefined;
2109
2119
  delegatorDID?: string | undefined;
@@ -2121,11 +2131,11 @@ declare const ShareLinkSchema: z.ZodObject<{
2121
2131
  url: string;
2122
2132
  delegation: {
2123
2133
  path: string;
2134
+ actions: string[];
2124
2135
  expiry: Date;
2125
2136
  spaceId: string;
2126
2137
  cid: string;
2127
2138
  delegateDID: string;
2128
- actions: string[];
2129
2139
  isRevoked: boolean;
2130
2140
  createdAt?: Date | undefined;
2131
2141
  delegatorDID?: string | undefined;
@@ -2141,11 +2151,11 @@ declare const ShareLinkSchema: z.ZodObject<{
2141
2151
  url: string;
2142
2152
  delegation: {
2143
2153
  path: string;
2154
+ actions: string[];
2144
2155
  expiry: Date;
2145
2156
  spaceId: string;
2146
2157
  cid: string;
2147
2158
  delegateDID: string;
2148
- actions: string[];
2149
2159
  isRevoked: boolean;
2150
2160
  createdAt?: Date | undefined;
2151
2161
  delegatorDID?: string | undefined;
@@ -2211,16 +2221,16 @@ declare const GenerateShareParamsSchema: z.ZodObject<{
2211
2221
  baseUrl: z.ZodOptional<z.ZodString>;
2212
2222
  }, "strip", z.ZodTypeAny, {
2213
2223
  path: string;
2214
- description?: string | undefined;
2215
- expiry?: Date | undefined;
2216
2224
  actions?: string[] | undefined;
2225
+ expiry?: Date | undefined;
2226
+ description?: string | undefined;
2217
2227
  schema?: "base64" | "compact" | "ipfs" | undefined;
2218
2228
  baseUrl?: string | undefined;
2219
2229
  }, {
2220
2230
  path: string;
2221
- description?: string | undefined;
2222
- expiry?: Date | undefined;
2223
2231
  actions?: string[] | undefined;
2232
+ expiry?: Date | undefined;
2233
+ description?: string | undefined;
2224
2234
  schema?: "base64" | "compact" | "ipfs" | undefined;
2225
2235
  baseUrl?: string | undefined;
2226
2236
  }>;
@@ -2318,14 +2328,14 @@ declare const DelegatedResourceSchema: z.ZodObject<{
2318
2328
  actions: z.ZodArray<z.ZodString, "many">;
2319
2329
  }, "strip", z.ZodTypeAny, {
2320
2330
  path: string;
2331
+ actions: string[];
2321
2332
  space: string;
2322
2333
  service: string;
2323
- actions: string[];
2324
2334
  }, {
2325
2335
  path: string;
2336
+ actions: string[];
2326
2337
  space: string;
2327
2338
  service: string;
2328
- actions: string[];
2329
2339
  }>;
2330
2340
  type DelegatedResource = z.infer<typeof DelegatedResourceSchema>;
2331
2341
  /**
@@ -2416,21 +2426,21 @@ declare const CreateDelegationWasmResultSchema: z.ZodObject<{
2416
2426
  actions: z.ZodArray<z.ZodString, "many">;
2417
2427
  }, "strip", z.ZodTypeAny, {
2418
2428
  path: string;
2429
+ actions: string[];
2419
2430
  space: string;
2420
2431
  service: string;
2421
- actions: string[];
2422
2432
  }, {
2423
2433
  path: string;
2434
+ actions: string[];
2424
2435
  space: string;
2425
2436
  service: string;
2426
- actions: string[];
2427
2437
  }>, "many">;
2428
2438
  }, "strip", z.ZodTypeAny, {
2429
2439
  resources: {
2430
2440
  path: string;
2441
+ actions: string[];
2431
2442
  space: string;
2432
2443
  service: string;
2433
- actions: string[];
2434
2444
  }[];
2435
2445
  expiry: Date;
2436
2446
  delegation: string;
@@ -2439,9 +2449,9 @@ declare const CreateDelegationWasmResultSchema: z.ZodObject<{
2439
2449
  }, {
2440
2450
  resources: {
2441
2451
  path: string;
2452
+ actions: string[];
2442
2453
  space: string;
2443
2454
  service: string;
2444
- actions: string[];
2445
2455
  }[];
2446
2456
  expiry: Date;
2447
2457
  delegation: string;
@@ -4013,6 +4023,10 @@ interface ISpace {
4013
4023
  * KV operations scoped to this space.
4014
4024
  */
4015
4025
  readonly kv: IKVService;
4026
+ /**
4027
+ * Data Vault operations scoped to this space.
4028
+ */
4029
+ readonly vault: IDataVaultService;
4016
4030
  /**
4017
4031
  * Delegation operations scoped to this space.
4018
4032
  */
@@ -4042,6 +4056,10 @@ interface SpaceConfig {
4042
4056
  * Factory function to create a space-scoped KV service.
4043
4057
  */
4044
4058
  createKV: (spaceId: string) => IKVService;
4059
+ /**
4060
+ * Factory function to create a space-scoped Data Vault service.
4061
+ */
4062
+ createVault: (spaceId: string) => IDataVaultService;
4045
4063
  /**
4046
4064
  * Factory function to create space-scoped delegations.
4047
4065
  */
@@ -4081,6 +4099,7 @@ declare class Space implements ISpace {
4081
4099
  private readonly _id;
4082
4100
  private readonly _name;
4083
4101
  private readonly _kv;
4102
+ private readonly _vault;
4084
4103
  private readonly _delegations;
4085
4104
  private readonly _sharing;
4086
4105
  private readonly _getInfo;
@@ -4102,6 +4121,10 @@ declare class Space implements ISpace {
4102
4121
  * KV operations scoped to this space.
4103
4122
  */
4104
4123
  get kv(): IKVService;
4124
+ /**
4125
+ * Data Vault operations scoped to this space.
4126
+ */
4127
+ get vault(): IDataVaultService;
4105
4128
  /**
4106
4129
  * Delegation operations scoped to this space.
4107
4130
  */
@@ -4177,6 +4200,8 @@ interface SpaceServiceConfig {
4177
4200
  capabilityRegistry?: ICapabilityKeyRegistry;
4178
4201
  /** Factory function to create a space-scoped KV service */
4179
4202
  createKVService?: (spaceId: string) => IKVService;
4203
+ /** Factory function to create a space-scoped Data Vault service */
4204
+ createVaultService?: (spaceId: string) => IDataVaultService;
4180
4205
  /** User's PKH DID (derived from address or provided explicitly) */
4181
4206
  userDid?: string;
4182
4207
  /** Optional SharingService for v2 sharing links (client-side) */
@@ -4303,6 +4328,7 @@ declare class SpaceService implements ISpaceService {
4303
4328
  private fetchFn;
4304
4329
  private capabilityRegistry?;
4305
4330
  private createKVServiceFn?;
4331
+ private createVaultServiceFn?;
4306
4332
  private _userDid?;
4307
4333
  private sharingService?;
4308
4334
  private createDelegationFn?;
@@ -4385,6 +4411,10 @@ declare class SpaceService implements ISpaceService {
4385
4411
  * Create a space-scoped KV service.
4386
4412
  */
4387
4413
  private createSpaceScopedKV;
4414
+ /**
4415
+ * Create a space-scoped Data Vault service.
4416
+ */
4417
+ private createSpaceScopedVault;
4388
4418
  /**
4389
4419
  * Create space-scoped delegation operations.
4390
4420
  */
@@ -4536,4 +4566,4 @@ declare function resolveTinyCloudHosts(subject: string, options?: ResolveTinyClo
4536
4566
  declare function multiaddrToHttpUrl(input: string): string;
4537
4567
  declare function httpUrlToMultiaddr(input: string): string;
4538
4568
 
4539
- export { ACCOUNT_REGISTRY_PATH, ACCOUNT_REGISTRY_SPACE, type AbilitiesMap, AutoApproveSpaceCreationHandler, type AutoRejectStrategy, type AutoSignStrategy, type Bytes, type CallbackStrategy, type CapabilityEntry, CapabilityKeyRegistry, type CapabilityKeyRegistryErrorCode, CapabilityKeyRegistryErrorCodes, type ClientSession, ClientSessionSchema, CloudLocationResolutionError, type ComposeManifestOptions, type ComposedManifestRequest, type CreateDelegationFunction, type CreateDelegationParams, type CreateDelegationWasmParams, type CreateDelegationWasmResult, DEFAULT_DEFAULTS, DEFAULT_EXPIRY, DEFAULT_MANIFEST_SPACE, DEFAULT_MANIFEST_VERSION, DEFAULT_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 EncodedShareData, type EnsData, EnsDataSchema, type EventEmitterStrategy, 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, type IngestOptions, type JWK, type KeyInfo, type KeyProvider, type KeyType, type LocationCandidate, type LocationCandidateInput, type LocationRecord, type LocationRecordPayload, type LocationRecordSigner, LocationRecordValidationError, type LocationResolutionAttempt, type LocationSource, type Manifest, type ManifestDefaults, type ManifestRegistryRecord, ManifestValidationError, type NodeInfo, type ParseRecapFromSiwe, type PartialSiweMessage, type PermissionEntry, PermissionNotInManifestError, type PersistedSessionData, type PersistedTinyCloudSession, ProtocolMismatchError, type ReceiveOptions, type ResolveCloudLocationOptions, type ResolveTinyCloudHostsOptions, type ResolvedCapabilities, type ResolvedCloudLocation, type ResolvedDelegate, type ResolvedTinyCloudHosts, type ResourceCapability, SERVICE_LONG_TO_SHORT, SERVICE_SHORT_TO_LONG, type ServerHost, SessionExpiredError, type ShareAccess, type ShareLink, type ShareLinkData, type ShareSchema, SharingService, type SharingServiceConfig, type SignCallback, type SignInOptions, type SignRequest, type SignResponse, type SignStrategy, SilentNotificationHandler, type SiweConfig, SiweConfigSchema, Space, type SpaceAbilitiesMap, type SpaceConfig, type SpaceCreationContext, type SpaceDelegationParams, type SpaceErrorCode, SpaceErrorCodes, type SpaceHostResult, type SpaceInfo, type SpaceOwnership, SpaceService, type SpaceServiceConfig, type StoredDelegationChain, type SubsetCheckResult, TinyCloud, type TinyCloudConfig, type TinyCloudSession, UnsupportedFeatureError, type UserAuthorizationConfig, type ValidationError, VersionCheckError, type WasmRecapEntry, activateSessionWithHost, applyPrefix, buildSpaceUri, canonicalLocationPayload, checkNodeInfo, composeManifestRequest, createCapabilityKeyRegistry, createSharingService, createSpaceService, defaultSignStrategy, defaultSpaceCreationHandler, expandActionShortNames, fetchLocationRecord, fetchPeerId, httpUrlToMultiaddr, isCapabilitySubset, loadManifest, locationPayloadForRecord, makePublicSpaceId, manifestAbilitiesUnion, multiaddrToHttpUrl, normalizeDefaults, parseExpiry, parseRecapCapabilities, parseSpaceUri, resolveCloudLocation, resolveManifest, resolveTinyCloudHosts, resourceCapabilitiesToAbilitiesMap, resourceCapabilitiesToSpaceAbilitiesMap, signLocationRecord, submitHostDelegation, validateClientSession, validateLocationRecord, validateLocationRecordPayload, validateManifest, validatePersistedSessionData, verifyLocationRecord };
4569
+ export { ACCOUNT_REGISTRY_PATH, ACCOUNT_REGISTRY_SPACE, type AbilitiesMap, AutoApproveSpaceCreationHandler, type AutoRejectStrategy, type AutoSignStrategy, type Bytes, type CallbackStrategy, type CapabilityEntry, CapabilityKeyRegistry, type CapabilityKeyRegistryErrorCode, CapabilityKeyRegistryErrorCodes, type ClientSession, ClientSessionSchema, CloudLocationResolutionError, type ComposeManifestOptions, type ComposedManifestRequest, type CreateDelegationFunction, type CreateDelegationParams, type CreateDelegationWasmParams, type CreateDelegationWasmResult, DEFAULT_DEFAULTS, DEFAULT_EXPIRY, DEFAULT_MANIFEST_SPACE, DEFAULT_MANIFEST_VERSION, DEFAULT_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 EncodedShareData, type EnsData, EnsDataSchema, type EventEmitterStrategy, 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, type IngestOptions, type JWK, type KeyInfo, type KeyProvider, type KeyType, type LocationCandidate, type LocationCandidateInput, type LocationRecord, type LocationRecordPayload, type LocationRecordSigner, LocationRecordValidationError, type LocationResolutionAttempt, type LocationSource, type Manifest, type ManifestDefaults, type ManifestRegistryRecord, type ManifestSecretActions, ManifestValidationError, type NodeInfo, type ParseRecapFromSiwe, type PartialSiweMessage, type PermissionEntry, PermissionNotInManifestError, type PersistedSessionData, type PersistedTinyCloudSession, ProtocolMismatchError, type ReceiveOptions, type ResolveCloudLocationOptions, type ResolveTinyCloudHostsOptions, type ResolvedCapabilities, type ResolvedCloudLocation, type ResolvedDelegate, type ResolvedTinyCloudHosts, type ResourceCapability, SERVICE_LONG_TO_SHORT, SERVICE_SHORT_TO_LONG, type ServerHost, SessionExpiredError, type ShareAccess, type ShareLink, type ShareLinkData, type ShareSchema, SharingService, type SharingServiceConfig, type SignCallback, type SignInOptions, type SignRequest, type SignResponse, type SignStrategy, SilentNotificationHandler, type SiweConfig, SiweConfigSchema, Space, type SpaceAbilitiesMap, type SpaceConfig, type SpaceCreationContext, type SpaceDelegationParams, type SpaceErrorCode, SpaceErrorCodes, type SpaceHostResult, type SpaceInfo, type SpaceOwnership, SpaceService, type SpaceServiceConfig, type StoredDelegationChain, type SubsetCheckResult, TinyCloud, type TinyCloudConfig, type TinyCloudSession, UnsupportedFeatureError, type UserAuthorizationConfig, type ValidationError, VersionCheckError, type WasmRecapEntry, activateSessionWithHost, applyPrefix, buildSpaceUri, canonicalLocationPayload, checkNodeInfo, composeManifestRequest, createCapabilityKeyRegistry, createSharingService, createSpaceService, defaultSignStrategy, defaultSpaceCreationHandler, expandActionShortNames, fetchLocationRecord, fetchPeerId, httpUrlToMultiaddr, isCapabilitySubset, loadManifest, locationPayloadForRecord, makePublicSpaceId, manifestAbilitiesUnion, multiaddrToHttpUrl, normalizeDefaults, parseExpiry, parseRecapCapabilities, parseSpaceUri, resolveCloudLocation, resolveManifest, resolveTinyCloudHosts, resourceCapabilitiesToAbilitiesMap, resourceCapabilitiesToSpaceAbilitiesMap, signLocationRecord, submitHostDelegation, validateClientSession, validateLocationRecord, validateLocationRecordPayload, validateManifest, validatePersistedSessionData, verifyLocationRecord };