PageSourceSearch

https://elastos-docs.onrender.com/assets/js/7ba16a52.72f629f4.js

js elastos-docs.onrender.com collected 2026-10-03 11:40:12 UTC 9,048 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkelastos_docs=globalThis.webpackChunkelastos_docs||[]).push([[84],{12963(e,n,i){i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>d,default:()=>h,frontMatter:()=>o,metadata:()=>t,toc:()=>a});const t=JSON.parse('{"id":"blockchain/concepts/did-method","title":"DID Method","description":"The Elastos DID Method specification: how DIDs are created, resolved, and managed.","source":"@site/docs/blockchain/concepts/did-method.md","sourceDirName":"blockchain/concepts","slug":"/blockchain/concepts/did-method","permalink":"/blockchain/concepts/did-method","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"type":"concept","title":"DID Method","description":"The Elastos DID Method specification: how DIDs are created, resolved, and managed.","keywords":["Elastos","World Computer","Blockchain","DID method","did:elastos","W3C","identifier"],"image":"/img/og-blockchain.jpg"},"sidebar":"blockchainSidebar","previous":{"title":"Verifiable Credentials","permalink":"/blockchain/concepts/did-credentials"},"next":{"title":"Hive Storage","permalink":"/blockchain/concepts/hive-storage"}}');var s=i(74848),r=i(28453);const o={type:"concept",title:"DID Method",description:"The Elastos DID Method specification: how DIDs are created, resolved, and managed.",keywords:["Elastos","World Computer","Blockchain","DID method","did:elastos","W3C","identifier"],image:"/img/og-blockchain.jpg"},d="The Elastos DID Method",c={},a=[{value:"DID Format",id:"did-format",level:2},{value:"DID Document",id:"did-document",level:2},{value:"CRUD Operations",id:"crud-operations",level:2},{value:"DID Registry",id:"did-registry",level:2},{value:"W3C Compliance",id:"w3c-compliance",level:2},{value:"Resources",id:"resources",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"the-elastos-did-method",children:"The Elastos DID Method"})}),"\n",(0,s.jsxs)(n.p,{children:["Every decentralized identifier needs a ",(0,s.jsx)(n.strong,{children:"method"})," \u2014 a set of rules that says how to create it, where to look it up, and how to update or retire it. The Elastos DID method (",(0,s.jsx)(n.code,{children:"did:elastos"}),") anchors identities on the ",(0,s.jsx)(n.strong,{children:"Elastos Identity Chain (EID)"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"did-format",children:"DID Format"}),"\n",(0,s.jsx)(n.p,{children:"An Elastos DID follows the W3C pattern and looks like this:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"did:elastos:icJ4z2DULrHEzYSvjKNJpKyhqFDxvYV7pN\n"})}),"\n",(0,s.jsxs)(n.p,{children:["The method-specific ID is derived from the user's ",(0,s.jsx)(n.strong,{children:"public key"})," using SHA-256, RIPEMD-160, and ",(0,s.jsx)(n.strong,{children:"Base58"}
1)," encoding. Because it comes straight from cryptographic material, no registration authority is involved \u2014 generate a key pair and you have a DID."]}),"\n",(0,s.jsx)(n.h2,{id:"did-document",children:"DID Document"}),"\n",(0,s.jsxs)(n.p,{children:["When you publish a DID to the EID chain, a ",(0,s.jsx)(n.strong,{children:"DID Document"})," describes how to interact with that identity. Here is a simplified example:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\n  "@context": "https://www.w3.org/ns/did/v1",\n  "id": "did:elastos:icJ4z2DULrHEzYSvjKNJpKyhqFDxvYV7pN",\n  "publicKey": [\n    {\n      "id": "#primary",\n      "type": "ECDSAsecp256r1",\n      "controller": "did:elastos:icJ4z2DULrHEzYSvjKNJpKyhqFDxvYV7pN",\n      "publicKeyBase58": "27bqfhMew6SjEv2\u2026"\n    }\n  ],\n  "authentication": ["#primary"],\n  "service": [\n    {\n      "id": "#hive-vault",\n      "type": "HiveVault",\n      "serviceEndpoint": "https://hive1.example.com"\n    }\n  ]\n}\n'})}),"\n",(0,s.jsx)(n.p,{children:"Key fields:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"id"})})," \u2014 the DID itself."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"publicKey"})}
1)," \u2014 one or more keys verifiers use to check signatures."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"authentication"})})," \u2014 which keys can prove control of this DID."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"service"})})," \u2014 optional endpoints (Hive vault, messaging, etc.)."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"crud-operations",children:"CRUD Operations"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Operation"}),(0,s.jsx)(n.th,{children:"What happens"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"Create"})}),(0,s.jsx)(n.td,{children:"Generate a key pair locally, derive the DID from the public key, then publish the DID Document as a transaction on EID."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"Read / Resolve"})}),(0,s.jsx)(n.td,{children:"Query the EID chain by DID to retrieve the current DID Document. Any resolver can do this \u2014 no special permissions needed."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"Update"})}),(0,s.jsx)(n.td,{children:"Publish a new version of the DID Document in a signed transaction. The chain keeps a full history of changes."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:"Deactivate"})}),(0,s.jsx)(n.td,{children:"Publish a deactivation transaction. The DID remains on-chain for auditability but is no longer considered valid."})]})]})]}),"\n",(0,s.jsx)(n.admonition,{title:'No "delete"',type:"info",children:(0,s.jsx)(n.p,{children:"DIDs are never truly deleted from the chain \u2014 deactivation marks them inactive while preserving the historical record."})}),"\n",(0,s.jsx)(n.h2,{id:"did-registry",children:"DID Registry"}),"\n",(0,s.jsxs)(n.p,{children:["All Elastos DIDs live on the ",(0,s.jsx)(n.strong,{children:"Elastos Identity Chain (EID)"}),", an EVM-compatible sidechain dedicated to identity. A ",(0,s.jsx)(n.strong,{children:"DID smart contract"})," on EID maintains the registry, storing documents and processing create/update/deactivate transactions."]}),"\n",(0,s.jsxs)(n.p,{children:["Because EID is a public chain, anyone can resolve any DID without permission. You only need a private key to ",(0,s.jsx)(n.strong,{children:"write"})," (create, update, or deactivate your own DID)."]}),"\n",(0,s.jsx)(n.h2,{id:"w3c-compliance",children:"W3C Compliance"}),"\n",(0,s.jsxs)(n.p,{children:["Elastos DIDs conform to the ",(0,s.jsx)(n.a,{href:"https://www.w3.org/TR/did-core/",children:"W3C DID Core specification"}),". This means:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"DID Documents use standard JSON-LD contexts."}),"\n",(0,s.jsx)(n.li,{children:"Key types, authentication, and service entries follow W3C-defined structures."}),"\n",(0,s.jsx)(n.li,{children:"Any W3C-compatible resolver or verifier can work with Elastos DIDs."}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{title:"Interoperability",type:"tip",children:(0,s.jsxs)(n.p,{children:["Because the method follows W3C standards, Elastos DIDs can participate in cross-ecosystem verification workflows \u2014 a verifier does not need to know Elastos internals, just how to resolve ",(0,s.jsx)(n.code,{children:"did:elastos:"})," identifiers."]})}),"\n",(0,s.jsx)(n.h2,{id:"resources",children:"Resources"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/blockchain/developers/did-integration",children:"DID Integration Guide"})," \u2014 create and manage DIDs from JavaScript/TypeScript"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://eid.elastos.io/",children:"EID Explorer"})," \u2014 browse identity transactions on the EID chain"]}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://www.w3.org/TR/did-core/",children:"W3C DID Core Specification"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/blockchain/developers/did-integration",children:"DID Integration Guide"})}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},28453(e,n,i){i.d(n,{R:()=>o,x:()=>d});var t=i(96540);const s={},r=t.createContext(s);function o(e){const n=t.useContext(r);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.