Socket
Book a DemoInstallSign in
Socket

@cere-ddc-sdk/ddc

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cere-ddc-sdk/ddc

DDC nodes API

latest
Source
npmnpm
Version
2.16.0
Version published
Maintainers
1
Created
Source

@cere-ddc-sdk/ddc

The package provides API for interacting with DDC Storage nodes.

Installation

Using NPM:

npm install @cere-ddc-sdk/ddc --save

Using yarn:

yarn add @cere-ddc-sdk/ddc

Usage

The package provides various low-level APIs to work with DDC. Here is a simple example of how to upload a small piece of data using the StorageNode API.

import { StorageNode, StorageNodeMode, UriSigner, Piece } from '@cere-ddc-sdk/ddc';

const signer = new UriSigner('hybrid label reunion only dawn maze asset draft cousin height flock nation');
const storageNode = new StorageNode(signer, {
  mode: StorageNodeMode.Storage,
  logLevel: 'debug',
  grpcUrl: 'grpc://localhost:9091',
  httpUrl: 'http://localhost:8091',
});

const bucketId = 1n;
const content = new TextEncoder().encode('Hello DDC');
const piece = new Piece(content);

const cid = await storageNode.storePiece(bucketId, piece);

console.log('Stored piece CID', cid);

Documentation

For more information about what this package provides, see API reference

License

Licensed under the Apache License

FAQs

Package last updated on 14 Aug 2025

Did you know?

Socket

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.

Install

Related posts