Changelog
All notable changes to this project will be documented in this page.
This page collects any major change to Grove API and library. While we will try to keep breaking changes to a minimum, we may need to introduce them as we iterate on the implementations.
3 March 2025
New Edge Infrastructure
Changed
Mandatory ACL
Whenever you use the @lens-chain/storage-client to upload files/folder, you MUST specify an ACL even for the immutable resources.
JSON Upload
-const response = await storageClient.uploadAsJson(data);+const acl = immutable(37111);+const response = await storageClient.uploadAsJson(data, { acl });
File Upload
-const response = await storageClient.uploadFile(file);+const acl = immutable(37111);+const response = await storageClient.uploadFile(file, { acl });
Folder Upload
-const response = await storageClient.uploadFolder(input.files);+const acl = immutable(37111);+const response = await storageClient.uploadFolder(input.files, { acl });
Generic ACL Syntax
Generic ACL now requires a chain_id to be specified and it follows a builder pattern.
import { RECOVERED_ADDRESS_PARAM_MARKER } from "@lens-chain/storage-client";
// …
-const acl = genericAcl(- "0x1234…",- "someFunction(address user) returns (bool)",- ["<recovered_address>"],-);+const acl = genericAcl("0x1234…")+ .withFunction("someFunction(address user) returns (bool)")+ .withChainId(1)+ .withParams([RECOVERED_ADDRESS_PARAM_MARKER])+ .build();
File Upload Response
Edit a file now returns a FileUploadResponse like the uploadFile method.
-const success = await storageClient.editFile("lens://af5225b…", updated, signer, { acl });--if (success) {- console.log("File edited successfully");-} else {- console.log("Failed to edit file");-}+try {+ const response = await storageClient.editFile("lens://af5225b…", updated, signer, { acl });+ console.log("File edited successfully", response);+} catch (error) {+ console.error("Failed to edit file", error);+}
26 February 2025
New Package Home
Install the new package @lens-chain/storage-client to interact with Grove.
Instantiate the client with the following code:
-import { StorageClient, testnet } from "@lens-protocol/storage-node-client";+import { StorageClient } from "@lens-chain/storage-client";-const storageClient = StorageClient.create(testnet);+const storageClient = StorageClient.create();
No other changes are required to use the new package.