HackMD
  • Beta
    Beta  Get a sneak peek of HackMD’s new design
    Turn on the feature preview and give us feedback.
    Go → Got it
      • Create new note
      • Create a note from template
    • Beta  Get a sneak peek of HackMD’s new design
      Beta  Get a sneak peek of HackMD’s new design
      Turn on the feature preview and give us feedback.
      Go → Got it
      • Sharing Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • More (Comment, Invitee)
      • Publishing
        Please check the box to agree to the Community Guidelines.
        Everyone on the web can find and read all notes of this public team.
        After the note is published, everyone on the web can find and read this note.
        See all published notes on profile page.
      • Commenting Enable
        Disabled Forbidden Owners Signed-in users Everyone
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
        • Everyone
      • Invitee
      • No invitee
      • Options
      • Versions and GitHub Sync
      • Transfer ownership
      • Delete this note
      • Template
      • Save as template
      • Insert from template
      • Export
      • Dropbox
      • Google Drive Export to Google Drive
      • Gist
      • Import
      • Dropbox
      • Google Drive Import from Google Drive
      • Gist
      • Clipboard
      • Download
      • Markdown
      • HTML
      • Raw HTML
    Menu Sharing Create Help
    Create Create new note Create a note from template
    Menu
    Options
    Versions and GitHub Sync Transfer ownership Delete this note
    Export
    Dropbox Google Drive Export to Google Drive Gist
    Import
    Dropbox Google Drive Import from Google Drive Gist Clipboard
    Download
    Markdown HTML Raw HTML
    Back
    Sharing
    Sharing Link copied
    /edit
    View mode
    • Edit mode
    • View mode
    • Book mode
    • Slide mode
    Edit mode View mode Book mode Slide mode
    Note Permission
    Read
    Only me
    • Only me
    • Signed-in users
    • Everyone
    Only me Signed-in users Everyone
    Write
    Only me
    • Only me
    • Signed-in users
    • Everyone
    Only me Signed-in users Everyone
    More (Comment, Invitee)
    Publishing
    Please check the box to agree to the Community Guidelines.
    Everyone on the web can find and read all notes of this public team.
    After the note is published, everyone on the web can find and read this note.
    See all published notes on profile page.
    More (Comment, Invitee)
    Commenting Enable
    Disabled Forbidden Owners Signed-in users Everyone
    Permission
    Owners
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Invitee
    No invitee
       owned this note    owned this note      
    Published Linked with GitHub
    Like BookmarkBookmarked
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Decentralized Web Node Companion Guide (DWN) The companion guide is intended to be a supportive guide to the core [spec guide](https://identity.foundation/decentralized-web-node/spec/). It is intended to make DWN's more accessible for the general audience. * 3 efforts need to happen: * Improving the specifications on DWNs * Providing better tools for adoption both code and documentation * Better understanding of how the larger ecosystem interacts with DWNs. ## Overview - Describe the intent of DWNs - Implicit: Why are other methods not sufficient. - Why it's valuable and who benefits from DWNs. - Overview of DWNs. - What they do - How they work - Basic architecture - Design principles of DWNs - What's the Lift? ## Target audience of this document - Proposal: Developers implementing DWNs, Architects, and Solution providers trying to understand the value proposition of DWNs. ## Terminology This is explaining terminology on a funcational level, not a specification level. - **IPFS** :: A protocol, hypermedia and file sharing peer-to-peer network for storing and sharing data in a distributed file system. - **DWN** :: A data storage and message relay mechanism entities can use to locate public or private permissioned data related to a given Decentralized Identifier (DID). - **DID** :: Decentralized identifiers (DIDs) are a type of globally unique identifier that enables an entity to be identified in a manner that is verifiable, persistent (as long as the DID controller desires), and does not require the use of a centralized registry. - **[DAG CBOR](https://github.com/ipld/specs/blob/master/block-layer/codecs/dag-cbor.md)** :: DAG-CBOR is a codec that implements the IPLD Data Model as a subset of CBOR, plus some additional constraints for hash consistent representations. - **Requests Objects** :: Request Objects are JSON object envelopes used to pass messages to Decentralized Web Nodes. - **Collection** :: An interface of Decentralized Web Nodes provides a mechanism to store data relative to shared schemas. - **Protocol** :: Protocols introduces a mechanism for declaratively encoding an app or service’s underlying protocol rules, including segmentation of records, relationships between records, data-level requirements, and constraints on how participants interact with a protocol - **Hook** :: Web Hooks are one-way pushes of data to subscribed entities. - **[IANA Media Type](https://www.iana.org/assignments/media-types/media-types.xhtml)** :: A two-part identifier for file formats and format contents transmitted on the Internet aka MIME type. - **JSON Web Signature ( JWS )** :: Content secured with digital signatures or Message Authentication Codes (MACs) using JSON-based data structures - **Content Identifier (CID)** :: A label used to point to material in IPFS - **Message** :: All Decentralized Web Node messaging is transacted via Messages JSON objects. These objects contain message execution parameters, authorization material, authorization signatures, and signing/encryption information ## Technology Comparison Note from @andorsk : I had a conversation with Simon about this, and @simon will be adding his comparisions to this. TODO: what technology should beon t ### DWN vs DIDComm vs. KERI Note from @andorsk. This is really early. I need to go through this more carefully tbh, and there are details I need to review. | Capability | DWN | KERI | DIDComm | | --- |------------| -------- | -------- | | Web Hooks | Yes | No | No | | Permissions | Yes | ? | ? | | Standard Storage Layer | Yes | ? | ? | | JSON Schema Based | Yes. | ? | ? | | Custom Protocols | Yes | No | Yes | | Multi-Node Sync | Yes. | ? | ? | | DID Based | Yes. |. | Yes | | Out of Band Support | No |Yes| Yes | | Multiple CryptoSuites | No | | Yes | | Off Ledger | No. | Yes | Yes | | 3+ Node Interactions | Yes. | ? | ? | | Distributed sync | ? ( Future? ) | ? | ? | | Completely Anonymous Transactions | | | | | p2p ( no intermediary ) trasactions | No. | Yes | Yes | ## Using a DWN ### Architecture TODO: Commentary on architecture <img src="https://i.imgur.com/9qzOMP5.png" width=200px> ### Data Flow TODO: Commentary on data flow ![Topology](https://identity.foundation/decentralized-web-node/spec/images/topology.svg) ### Building your own applications ## Examples In this section, focus will be to show how this would work, and elaborate on the advantages a DWN based solution would have over a DIDComm based solution. #### Chat App #### Todo App #### Buying a Plane Ticket #### Coordinating Travel Plans #### Applying for a job #### Multi-exchange example #### Hook example #### Share music playlist #### Medical Health Record: Query attributes of the data ## DWNS at Scale ## Reference Implementations - [TBD's JS SDK](https://github.com/TBD54566975/dwn-sdk-js) : Javascript sdk - [TBD's Web 5 Implementation](https://github.com/TBD54566975/incubating-web5-labs) ## Use Cases ## Limitations - Out of band - Possible: Not addressed yet but on roadmap - ## Other Considerations - Working with Non-DWN based wallets ## Action Item: - [ ] Figure out where this document goes. # DWN Companion Guide ## Use Cases **Status** IN PROGRESS Example Use case table | Use Case | Reference | | -------- | -------- | | Exchange credentials | [link](#exchange-credentials) | Share Music Playlist | [link](#music-playlist) | Apply for a job | [link](#apply-for-job) | Rent a car | [link](#rent-a-car) | Chat Service | [link](#chat-service) | Buy a plane ticket | [link](#plane-ticket) | Buy a concert ticket | [link](#concert-ticket) | Payroll analysis | [link](#payroll) ### Actors * Bob: typically the issuer * Alice: typically the holder * Oscar: typically the role of the adversary * Carol: typically the service provider * Ted: typically the middle man ### Exchange Credentials **Description:** **Stakeholders:** **How it works:** **Advantages of using DWNs:** ### Share Music Playlist **Description:** **Stakeholders:** **How it works:** **Advantages of using DWNs:** ### Apply for a Job **Description:** **Stakeholders:** **How it works:** **Advantages of using DWNs:** ### Rent a car **Description:** **Stakeholders:** **How it works:** **Advantages of using DWNs:** ### Chat Service **Description**: Alice wishes to chat with a friend Bob **Precondition:** Both Alice and her friend Bob have chat client apps. Alice and Bob are also able to communicate out of band. Out of band Bob shares via a QR code with Alice the DID of his DWN. **Stakeholders**: n/a **How it works**: Alice opens her chat client app and scans the DID Bob shared ith her and adds Bob as a new contact in the chat app. Alice types "Hi Bob" into the chat client. This message data is stored in Alice's DWN as well as transmitted to Bob's DWN. This message appears in Bob's client and is stored in Bob's DWN. **Advantages:** This respects Alice's and Bob's privacy by eliminating the need for them to trust a service, app or site provided by an intermediary entity. The message content is end-to-end encrypted and never stored by an intermediary (e.g. a social networking site like Twitter, Facebook, etc.) and although it may pass through relay servers, it does so only transiently. ### Buy a plane ticket **Description:** **Stake Holders:** **How it works:** **Advantages of using DWNs:** ### Buy a concert ticket **Description:** **Stake Holders:** **How it works:** **Advantages of using DWNs:** ### Manage Payroll **Description:** **Stake Holders:** **How it works:** **Advantages of using DWNs:** ## Protocol Interplay : DWN and DIDComm **Status**: IN PROGRESS ### Problem Statement Given a finite set of $\{n_{DWN}, n_{DIDCOMM}\} \in N$ nodes, with a distributed traction, what are the communication models that power a web of trust. #### Assumptions **Not a winner takes all system**: Given a finite number of actors using decentralized identity solutions, a vector $W$ represents the distribution of protcols in the SSI ecosystem. $\{{w_{DIDComm}, w_{DWN}, w_{\lambda}} \in W\}$ and $\sum{W} = 1$. - $w_{DIDComm} * n_{DID}$ represents the # of DIDComm users. - $w_{DWN} * n_{DID}$ represents the # of DWN users - $n_{DID}$ represents the total # of users using DID protocols. - $n_{DID} / N$ represents the current traction with DID Communication protocols as a whole, versus the entire market possibility. #### Modeling the Interplay Given ${n_0, n_1, n_n} \in n_{DID}$, ### Actors * Bob: DWN User * Alice: DWN User * Oscar: Aries Agent User * Carol: Aries Agent User * Ted: KERI User 5P2: 20 permutations 5P3: 60 permutations ( not quite right ) 5P4: 120 permutations ### Use Cases * Use Case #1: Credential Exchange * P2P * DWN -> DWN: Bob wants to exchange a credential with Alice * DWN -> DIDComm: Bob wants to exchange a credential with Oscar * DIDComm --> DWN Oscar wants to exchange a credential with Carol * DIDComm --> DIDComm: Carol wants to exchange a credential with Bob * DIDComm --> KERI Carol wants to exchange a credential with Ted * KERI --> DIDComm Ted wants to exchange a credential with Carol * KERI --> DWN Ted wants to exchange a credential with Bob * DWN --> KERI Bob wants to exchange a credential with Ted * Multi-exchange * DWN --> ( DWN, DIDComm ) Bob wants to exchange a credential with Alice and Oscar. * DIDComm --> (DWN, DIDComm) Oscar wants to exchange a credential with Alice and Carol * DWN --> ( DWN, DIDComm, KERI ) Bob wants to exchange a credential with Alice and Oscar, and Ted. * DIDComm --> (DWN, DIDComm, KERI) : Oscar wants to exchange a message with Bob, Carol, and Ted * Use Case #2: Chat * How do chat services interact with Agents. * Use Case #3: Sharing a music playlist ![](https://i.imgur.com/ScnKx3M.png) * Use Case #4: Job Application * Bob wants to apply for a job. The application communicates over DIDComm. * Alice wants to apply for a job. Alice has a Agent, the company a DWN. * Use Case #5: Sharing data * Bob wants to share to personal data to Alice. * Use Case #6: Hotel Travel Plans * ![](https://i.imgur.com/VBuUSW3.png) * If Hotel doesn't have DWN? * If Airline doesn't have DWN? * If Car Rental Doesn't have DWN? * Use Case #7: Out of Band Communication * https://didcomm.org/out-of-band/2.0/ * If Bob wants to share data to Carol out of band? * Use Case #8: Trust Ping * https://didcomm.org/trust-ping/2.0/ * Can Carol ping Bob's DWN and get a trust ping back? What about reverse?

    Import from clipboard

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lost their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template is not available.


    Upgrade

    All
    • All
    • Team
    No template found.

    Create custom template


    Upgrade

    Delete template

    Do you really want to delete this template?

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Tutorials

    Book Mode Tutorial

    Slide Mode Tutorial

    YAML Metadata

    Contacts

    Facebook

    Twitter

    Feedback

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions

    Versions and GitHub Sync

    Sign in to link this note to GitHub Learn more
    This note is not linked with GitHub Learn more
     
    Add badge Pull Push GitHub Link Settings
    Upgrade now

    Version named by    

    More Less
    • Edit
    • Delete

    Note content is identical to the latest version.
    Compare with
      Choose a version
      No search result
      Version not found

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub

        Please sign in to GitHub and install the HackMD app on your GitHub repo. Learn more

         Sign in to GitHub

        HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Available push count

        Upgrade

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Upgrade

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully