@tinycloud/sdk-core 3.2.6-beta.2 → 3.3.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/delegations/index.cjs +32 -18
- package/dist/delegations/index.cjs.map +1 -1
- package/dist/delegations/index.d.cts +2 -2
- package/dist/delegations/index.d.ts +2 -2
- package/dist/delegations/index.js +32 -18
- package/dist/delegations/index.js.map +1 -1
- package/dist/index.cjs +78 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +55 -4
- package/dist/index.d.ts +55 -4
- package/dist/index.js +78 -22
- package/dist/index.js.map +1 -1
- package/dist/{recipient-types.schema-BKrmP8hJ.d.cts → recipient-types.schema-CPDoAVh4.d.cts} +8 -0
- package/dist/{recipient-types.schema-BKrmP8hJ.d.ts → recipient-types.schema-CPDoAVh4.d.ts} +8 -0
- package/package.json +3 -3
package/dist/{recipient-types.schema-BKrmP8hJ.d.cts → recipient-types.schema-CPDoAVh4.d.cts}
RENAMED
|
@@ -1492,6 +1492,8 @@ declare const DelegationManagerConfigSchema: z.ZodObject<{
|
|
|
1492
1492
|
invoke: z.ZodEffects<z.ZodUnknown, InvokeFunction, unknown>;
|
|
1493
1493
|
/** Platform-specific invoke function for raw resource URIs */
|
|
1494
1494
|
invokeAny: z.ZodOptional<z.ZodEffects<z.ZodUnknown, InvokeAnyFunction, unknown>>;
|
|
1495
|
+
/** Optional owner-signed authorization for direct CID revocation */
|
|
1496
|
+
signOwnerRevocation: z.ZodOptional<z.ZodType<(cid: string) => Promise<string>, z.ZodTypeDef, (cid: string) => Promise<string>>>;
|
|
1495
1497
|
/** Optional custom fetch implementation */
|
|
1496
1498
|
fetch: z.ZodOptional<z.ZodEffects<z.ZodUnknown, FetchFunction, unknown>>;
|
|
1497
1499
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1500,6 +1502,7 @@ declare const DelegationManagerConfigSchema: z.ZodObject<{
|
|
|
1500
1502
|
invoke: InvokeFunction;
|
|
1501
1503
|
invokeAny?: InvokeAnyFunction | undefined;
|
|
1502
1504
|
accountSpaceId?: string | undefined;
|
|
1505
|
+
signOwnerRevocation?: ((cid: string) => Promise<string>) | undefined;
|
|
1503
1506
|
fetch?: FetchFunction | undefined;
|
|
1504
1507
|
}, {
|
|
1505
1508
|
hosts: string[];
|
|
@@ -1507,6 +1510,7 @@ declare const DelegationManagerConfigSchema: z.ZodObject<{
|
|
|
1507
1510
|
invokeAny?: unknown;
|
|
1508
1511
|
accountSpaceId?: string | undefined;
|
|
1509
1512
|
invoke?: unknown;
|
|
1513
|
+
signOwnerRevocation?: ((cid: string) => Promise<string>) | undefined;
|
|
1510
1514
|
fetch?: unknown;
|
|
1511
1515
|
}>;
|
|
1512
1516
|
type DelegationManagerConfig = z.infer<typeof DelegationManagerConfigSchema>;
|
|
@@ -1761,6 +1765,7 @@ declare class DelegationManager {
|
|
|
1761
1765
|
private session;
|
|
1762
1766
|
private invoke;
|
|
1763
1767
|
private invokeAny?;
|
|
1768
|
+
private signOwnerRevocation?;
|
|
1764
1769
|
private fetchFn;
|
|
1765
1770
|
private accountSpaceId?;
|
|
1766
1771
|
/**
|
|
@@ -1810,6 +1815,9 @@ declare class DelegationManager {
|
|
|
1810
1815
|
* Once revoked, the delegation can no longer be used to access resources.
|
|
1811
1816
|
* This also invalidates any sub-delegations derived from this delegation.
|
|
1812
1817
|
*
|
|
1818
|
+
* Explicit target-space or authority options keep the delegated session
|
|
1819
|
+
* signing path even when an owner signer is available.
|
|
1820
|
+
*
|
|
1813
1821
|
* @param cid - The CID of the delegation to revoke
|
|
1814
1822
|
* @returns Result indicating success or an error
|
|
1815
1823
|
*
|
|
@@ -1492,6 +1492,8 @@ declare const DelegationManagerConfigSchema: z.ZodObject<{
|
|
|
1492
1492
|
invoke: z.ZodEffects<z.ZodUnknown, InvokeFunction, unknown>;
|
|
1493
1493
|
/** Platform-specific invoke function for raw resource URIs */
|
|
1494
1494
|
invokeAny: z.ZodOptional<z.ZodEffects<z.ZodUnknown, InvokeAnyFunction, unknown>>;
|
|
1495
|
+
/** Optional owner-signed authorization for direct CID revocation */
|
|
1496
|
+
signOwnerRevocation: z.ZodOptional<z.ZodType<(cid: string) => Promise<string>, z.ZodTypeDef, (cid: string) => Promise<string>>>;
|
|
1495
1497
|
/** Optional custom fetch implementation */
|
|
1496
1498
|
fetch: z.ZodOptional<z.ZodEffects<z.ZodUnknown, FetchFunction, unknown>>;
|
|
1497
1499
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1500,6 +1502,7 @@ declare const DelegationManagerConfigSchema: z.ZodObject<{
|
|
|
1500
1502
|
invoke: InvokeFunction;
|
|
1501
1503
|
invokeAny?: InvokeAnyFunction | undefined;
|
|
1502
1504
|
accountSpaceId?: string | undefined;
|
|
1505
|
+
signOwnerRevocation?: ((cid: string) => Promise<string>) | undefined;
|
|
1503
1506
|
fetch?: FetchFunction | undefined;
|
|
1504
1507
|
}, {
|
|
1505
1508
|
hosts: string[];
|
|
@@ -1507,6 +1510,7 @@ declare const DelegationManagerConfigSchema: z.ZodObject<{
|
|
|
1507
1510
|
invokeAny?: unknown;
|
|
1508
1511
|
accountSpaceId?: string | undefined;
|
|
1509
1512
|
invoke?: unknown;
|
|
1513
|
+
signOwnerRevocation?: ((cid: string) => Promise<string>) | undefined;
|
|
1510
1514
|
fetch?: unknown;
|
|
1511
1515
|
}>;
|
|
1512
1516
|
type DelegationManagerConfig = z.infer<typeof DelegationManagerConfigSchema>;
|
|
@@ -1761,6 +1765,7 @@ declare class DelegationManager {
|
|
|
1761
1765
|
private session;
|
|
1762
1766
|
private invoke;
|
|
1763
1767
|
private invokeAny?;
|
|
1768
|
+
private signOwnerRevocation?;
|
|
1764
1769
|
private fetchFn;
|
|
1765
1770
|
private accountSpaceId?;
|
|
1766
1771
|
/**
|
|
@@ -1810,6 +1815,9 @@ declare class DelegationManager {
|
|
|
1810
1815
|
* Once revoked, the delegation can no longer be used to access resources.
|
|
1811
1816
|
* This also invalidates any sub-delegations derived from this delegation.
|
|
1812
1817
|
*
|
|
1818
|
+
* Explicit target-space or authority options keep the delegated session
|
|
1819
|
+
* signing path even when an owner signer is available.
|
|
1820
|
+
*
|
|
1813
1821
|
* @param cid - The CID of the delegation to revoke
|
|
1814
1822
|
* @returns Result indicating success or an error
|
|
1815
1823
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinycloud/sdk-core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0-beta.10",
|
|
4
4
|
"description": "Core TinyCloud SDK - shared interfaces and TinyCloud class",
|
|
5
5
|
"author": "TinyCloud, Inc.",
|
|
6
6
|
"license": "EGPL",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"@multiformats/uri-to-multiaddr": "^10.0.0",
|
|
55
55
|
"@noble/curves": "^1.9.7",
|
|
56
56
|
"@tinycloud/share-envelope": "1.1.0",
|
|
57
|
-
"@tinycloud/share-sdk": "1.
|
|
57
|
+
"@tinycloud/share-sdk": "1.2.0-beta.0",
|
|
58
58
|
"@tinycloud/bootstrap": "2.8.0",
|
|
59
|
-
"@tinycloud/sdk-services": "3.
|
|
59
|
+
"@tinycloud/sdk-services": "3.3.0-beta.7",
|
|
60
60
|
"multiformats": "^13.4.1",
|
|
61
61
|
"ms": "^2.1.3",
|
|
62
62
|
"siwe": "^3.0.0",
|