Core concepts

Decentralized Web Nodes (DWNs)

A Decentralized Web Node (DWN) is a data storage and message relay mechanism that entities can use to locate public or private, permissioned data related to a given Decentralized Identifier (DID). Serving as a critical component in the decentralized identity infrastructure, DWNs are a mesh-like datastore construction.

Entities can operate multiple DWNs, all of which sync to the same state, providing the owner with the ability to secure, manage, and transact their data with others. This synchronization occurs without reliance on location or provider-specific infrastructure, interfaces, or routing mechanisms. Thus, DWNs empower the owner with greater control and flexibility.

As a personal data store, a DWN allows you to:

Own your data: You decide where to host your node and control who has access. Back up your data: Host multiple nodes in different places, keeping them all synced. If one goes down, you have a backup. When it comes back up, the sync is effortless.

Send and receive data: Entities like Alice and Bob control their respective DWNs using their DIDs. Alice can send data to Bob just by resolving his DID. Authorization DWNs have two mechanisms to allow others access to read, write, or delete data on your node:

Permissions: Allow someone access to read, write, or delete specific data records on your node. Protocols: Install a protocol that lets you define data types and authorization for a decentralized web app. Data Model Data types are bound to known schemas, allowing applications to agree on data models, thereby opening the door to applications working together in ways that have been much more challenging in traditional development platforms.

Messaging

All communication is done through simple JSON objects called messages. A message can install protocols, grant permissions, and read, write, query, or delete a record.

For example, a message writing a record to a DWN may look like the following:

json Copy code { "recordId": "b65b7r8n7bewv5w6eb7r8n7t78yj7hbevsv567n8r77bv65b7e6vwvd67b6", "descriptor": { "parentId": "CID(PREVIOUS_DESCRIPTOR)", "dataCid": "CID(data)", "dateCreated": 123456789, "published": true, "encryption": "jwe", "interface": "Records", "method": "Write", "schema": "https://schema.org/SocialMediaPosting", "commitStrategy": "json-merge", "dataFormat": "DATA_FORMAT" } } Refer to the DWN spec for a detailed explanation of each field.