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

Decentralized Identifiers (DIDs)


Decentralized Identifiers (DIDs) are a cornerstone of the ArcBlock ecosystem, providing a universal and unique addressing system for virtually any entity on the blockchain. Unlike traditional systems where identifiers are limited to users, ArcBlock extends DIDs to represent accounts, tokens, NFTs, applications, and more. This approach creates a cohesive and interconnected digital environment.

These DIDs are designed to be compatible with the W3C DID Core specification, ensuring they are built on open standards. Understanding how DIDs are structured and generated is fundamental to interacting with other core concepts like Wallets and Accounts and Non-Fungible Tokens (NFTs).

DID Notation#

A typical DID on the ArcBlock platform follows a standardized format. Here is an example:

did:abt:z1muQ3xqHQK2uiACHyChikobsiY5kLqtShA

This string can be broken down into three parts:

Part

Example

Description

Scheme

did:

A standard prefix indicating that this is a DID.

Method

abt

Specifies the ArcBlock DID method.

Method-Specific ID

z1muQ3...

The unique identifier string, generated using a flexible set of cryptographic algorithms.

While other blockchains like Bitcoin and Ethereum use fixed hashing algorithms (e.g., secp256k1) to generate addresses, ArcBlock allows developers to choose the combination of algorithms for public key encryption, hashing, and encoding. This information is embedded directly into the DID itself.

DID Type#

The flexibility of ArcBlock DIDs is encoded within the "DID Type," a 2-byte (16-bit) segment at the beginning of the DID's binary representation. This type information specifies the exact combination of algorithms used to generate and secure the DID.

The 16 bits are allocated as follows:

DID Type (2 bytes / 16 bits)

Defines the entity's purpose

Defines the public key algorithm

Defines the hashing algorithm

RoleType (6 bits)

KeyType (5 bits)

HashType (5 bits)

e.g., Account, Token, NFT

e.g., ED25519, SECP256K1

e.g., SHA3, SHA2


For example, a DID type of 0x0C01 is interpreted as:

Binary

Hex

Value

Interpretation

000011

0x03

3

RoleType: ROLE_APPLICATION

00000

0x00

0

KeyType: ED25519

00001

0x01

1

HashType: SHA3

This embedded information makes each DID self-describing, allowing any system to understand how to interact with it without needing out-of-band configuration.

DID Generation Algorithm#

The process of creating a DID from a secret key involves a series of cryptographic steps. The following diagram illustrates the workflow:

Unsupported markdown: list
Unsupported markdown: list
Unsupported markdown: list
Unsupported markdown: list
Unsupported markdown: list
Unsupported markdown: list
Unsupported markdown: list
Unsupported markdown: list
Unsupported markdown: list
Unsupported markdown: list
Unsupported markdown: list
Unsupported markdown: list

Final DID String


This multi-step process, which includes a checksum, ensures that DIDs are not only unique but also verifiable and resistant to transcription errors.

Appendix: Type Definitions#

The following tables provide a comprehensive list of the available types that can be combined to create a DID. These are derived from the core protocol definitions.

RoleType#

RoleType defines the intended purpose of the DID.

Name

Value

Description

ROLE_ACCOUNT

0

Represents a user or entity account.

ROLE_NODE

1

Represents a node in the network.

ROLE_DEVICE

2

Represents a device.

ROLE_APPLICATION

3

Represents an application.

ROLE_SMART_CONTRACT

4

Represents a smart contract.

ROLE_BOT

5

Represents an automated agent or bot.

ROLE_ASSET

6

Represents a non-fungible asset (NFT).

ROLE_STAKE

7

Represents a stake transaction or state.

ROLE_VALIDATOR

8

Represents a validator node.

ROLE_GROUP

9

Represents a group of accounts.

ROLE_TX

10

Represents a transaction.

ROLE_TETHER

11

Represents a tethered resource.

ROLE_SWAP

12

Represents an atomic swap transaction.

ROLE_DELEGATION

13

Represents a delegation.

ROLE_VC

14

Represents a Verifiable Credential.

ROLE_BLOCKLET

15

Represents a Blocklet.

ROLE_STORE

16

Represents a store.

ROLE_TOKEN

17

Represents a fungible token.

ROLE_FACTORY

18

Represents a factory for creating assets or other entities.

ROLE_ROLLUP

19

Represents an ArcBridge (rollup) chain.

ROLE_STORAGE

20

Represents a storage service.

ROLE_ANY

63

Represents any role type.

KeyType#

KeyType specifies the cryptographic algorithm used for public/private key pairs.

Name

Value

Description

ED25519

0

Ed25519 signature algorithm.

SECP256K1

1

The algorithm used by Bitcoin and others.

ETHEREUM

2

An Ethereum-compatible key type.

HashType#

HashType defines the hashing function used in the generation process.

Name

Value

Description

KECCAK

0

Keccak hashing algorithm.

SHA3

1

SHA-3 (Secure Hash Algorithm 3).

SHA2

2

SHA-2 (Secure Hash Algorithm 2).

KECCAK_384

6

Keccak with a 384-bit output.

SHA3_384

7

SHA-3 with a 384-bit output.

KECCAK_512

13

Keccak with a 512-bit output.

SHA3_512

14

SHA-3 with a 512-bit output.


With a solid understanding of how DIDs function as the foundational identity layer, you are now ready to explore what these identities can create and own. To learn more, proceed to the next section on Non-Fungible Tokens (NFTs).