
Security News
Critical Security Vulnerability in React Server Components
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.
@cere-ddc-sdk/content-addressable-storage
Advanced tools
Basic package for working with data in DDC.
Support commands:
store - store data in DDCstoreEncrypted - store encrypted data in DDCread - download piece with data from DDCreadDecrypted - download and decrypt piece with data from DDCsearch - search pieces by tags and download from DDCInitialize client by cluster id and secret phrase.
import {ContentAddressableStorage} from '@cere-ddc-sdk/content-addressable-storage';
const signatureAlgorithm = 'ed25519';
const secretPhrase = '0x9gh7...';
const cdnClusterId = 2n;
const storage = await ContentAddressableStorage.build(
{
clusterAddress: cdnClusterId,
scheme: signatureAlgorithm,
},
secretPhrase,
);
Store piece with data in DDC.
import {Piece, PieceUri, Tag} from '@cere-ddc-sdk/content-addressable-storage';
const data = new Uint8Array([1, 2, 3, 4]); // data for storing
const bucketId = 1n;
const tags = [new Tag('key', 'test')]; // tag for search
const piece = new Piece(data, tags);
const pieceUri: PieceUri = await storage.store(bucketId, piece);
Store encrypted data in DDC.
import {Piece} from '@cere-ddc-sdk/content-addressable-storage';
const data = new Uint8Array([1, 2, 3, 4]); // data for storing
const bucketId = 1n;
const tags = [new Tag('key', 'test')]; // tag for search
const piece = new Piece(data, tags);
const encryptionOptions = {dekPath: '/data/secret', dek: dekBytes};
const pieceUri = await storage.storeEncrypted(bucketId, piece, encryptionOptions);
Download piece from DDC.
import {Piece} from '@cere-ddc-sdk/content-addressable-storage';
const bucketId = 1n;
const cid = 'b89mndf...'; // CID can get from pieceUri (pieceUri.cid)
const piece: Piece = await storage.read(bucketId, cid);
Read and decrypt piece from DDC.
import {Piece} from '@cere-ddc-sdk/content-addressable-storage';
const bucketId = 1n;
const cid = 'b89mndf...'; // CID can get from pieceUri (pieceUri.cid)
const piece: Piece = await storage.readDecrypted(bucketId, cid, dekBytes);
Search by tags pieces and download.
import {Piece, Query, SearchResult, Tag} from '@cere-ddc-sdk/content-addressable-storage';
const bucketId = 1n;
const tags = [new Tag('key', 'test')];
const skipData = false; // download pieces with data or metadata only
const query = new Query(bucketId, tags, skipData);
const searchResult: SearchResult = await storage.search(query);
const pieces: Array<Piece> = searchResult.pieces;
FAQs
Content-addressable storage client
The npm package @cere-ddc-sdk/content-addressable-storage receives a total of 87 weekly downloads. As such, @cere-ddc-sdk/content-addressable-storage popularity was classified as not popular.
We found that @cere-ddc-sdk/content-addressable-storage demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
React disclosed a CVSS 10.0 RCE in React Server Components and is advising users to upgrade affected packages and frameworks to patched versions now.

Research
/Security News
We spotted a wave of auto-generated “elf-*” npm packages published every two minutes from new accounts, with simple malware variants and early takedowns underway.

Research
/Security News
Malicious Rust crate evm-units disguised as an EVM version helper downloads and silently executes OS-specific payloads likely aimed at crypto theft.