@storacha/clawracha 0.1.21 → 0.1.23
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/plugin.d.ts.map +1 -1
- package/dist/plugin.js +4 -6
- package/package.json +1 -1
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,KAAK,EACV,iBAAiB,EAIlB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,KAAK,EACV,iBAAiB,EAIlB,MAAM,qBAAqB,CAAC;AAmJ7B,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,GAAG,EAAE,iBAAiB,QAqmBpD"}
|
package/dist/plugin.js
CHANGED
|
@@ -17,6 +17,7 @@ import { resolveAgentWorkspace, getAgentIds } from "./utils/workspace.js";
|
|
|
17
17
|
import { Agent, Name } from "@storacha/ucn/pail";
|
|
18
18
|
import { extract } from "@storacha/client/delegation";
|
|
19
19
|
import * as z from "zod";
|
|
20
|
+
import { spaceAccess } from "@storacha/client/capability/access";
|
|
20
21
|
const activeSyncers = new Map();
|
|
21
22
|
// --- Config helpers ---
|
|
22
23
|
const UpdateParams = z.object({
|
|
@@ -446,12 +447,9 @@ export default function plugin(api) {
|
|
|
446
447
|
const audience = {
|
|
447
448
|
did: () => targetDID,
|
|
448
449
|
};
|
|
449
|
-
const uploadDel = await storachaClient.createDelegation(audience,
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
"upload/add",
|
|
453
|
-
"filecoin/offer",
|
|
454
|
-
]);
|
|
450
|
+
const uploadDel = await storachaClient.createDelegation(audience,
|
|
451
|
+
// @ts-expect-error createDelegation should validate abilities
|
|
452
|
+
Object.keys(spaceAccess), { expiration: Infinity });
|
|
455
453
|
const { ok: archiveBytes } = await uploadDel.archive();
|
|
456
454
|
if (archiveBytes) {
|
|
457
455
|
results.push(`Upload delegation:\n${encodeDelegation(archiveBytes)}`);
|