Used to check for browser translation.
用于检测浏览器翻译。
ブラウザの翻訳を検出する

Overview

Reference

The DID Spaces SDK for JavaScript (@blocklet/did-space-js) provides a comprehensive set of tools for developers to interact with DID Spaces. This SDK simplifies operations related to decentralized object storage, data backup, and advanced features, enabling you to build powerful decentralized applications on ArcBlock's DID infrastructure. It is available on npm.

Key Features#

  • Object Management: Programmatically upload, retrieve, list, and delete files and directories.
  • Folder Synchronization: Efficiently sync local folders with a DID Space using push, pull, and incremental sync commands.
  • Backup and Restore: Securely back up and restore Blocklet data.
  • NFT Management: Handle NFT-related objects, such as display assets.
  • Rich Previews: Create and manage preview metadata for your objects.
  • Audit Logging: Access and manage activity logs for various operations within your space.

Core Concepts#

To use the SDK effectively, you should understand its foundational components:

  • Client: The SpaceClient is the main entry point for all operations. See the Client section for more details.
  • Commands: All actions are encapsulated in command objects that inherit from a common BaseCommand. Learn more in the Base Command section.
  • Security: Interactions are secured through request signing and delegation. Details are available in the Security section.

Architecture#

The DID Spaces SDK is designed with a modular and extensible architecture to separate concerns and simplify development.

Utility Modules

Security Modules

Command Modules

SDK Core

Application Layer

Sends

Executes

Inherit from

Use

Use

Uses

Your Application

SpaceClient

Commands

Base Command

Security

Utilities

Object

Sync

Backup & Restore

NFT

Preview

Audit Log

Space

Request Signing

Delegation

DID Document

DID Helpers

HTTP Clients

Error Handling

File System

Hashing

Endpoint Mgmt


Utilities#

The SDK includes a collection of helper functions for common tasks like DID validation, HTTP requests, error handling, and hashing. These utilities support the core command functionality and are also available for use in your application. For a complete list, see the Utilities section.


Now that you have an overview of the DID Spaces SDK, you're ready to get started. Proceed to the Quick Start guide to begin integrating the SDK into your project.