What is a DID?
A DID is a URI that resolves to a DID Document — a JSON-LD document that contains public keys, authentication methods, and service endpoints. The W3C DID Core specification defines the structure; individual DID methods define how a particular DID is created, resolved, updated, and deactivated. A DID looks like:DID Document and cryptographic keys
A DID Document binds the DID to one or more cryptographic key pairs. When an issuer signs a credential or a verifier checks a proof, they resolve the issuer’s DID to retrieve the public key and verify the signature. CREDEBL stores each organization’s DIDs in theorg_dids table. An organization can hold multiple DIDs, one of which is designated as the primary DID used for issuance and verification by default.
Only the key types the agent supports can be used when creating a DID. CREDEBL supports
ed25519, bls12381g1g2, bls12381g1, bls12381g2, x25519, p256, p384, p521, and k256.Supported DID methods
CREDEBL supports the following DID methods, as defined in theDidMethod enum:
| Method | Value | Description |
|---|---|---|
indy | indy | Anchored on a Hyperledger Indy ledger. Requires a ledger write transaction and an endorser for permissioned networks. |
key | key | Ledger-less. The DID is derived directly from the public key. Suitable for ephemeral or testing use cases. |
web | web | Ledger-less. The DID Document is hosted at a well-known URL on a domain you control. |
polygon | polygon | Anchored on the Polygon blockchain. Used with W3C JSON-LD credentials. |
did:indy DIDs require an active agent and ledger registration. did:key and did:web DIDs are ledger-less and can be created without a network transaction.Ledger support
Fordid:indy, CREDEBL supports the following Hyperledger Indy networks:
| Network | Purpose |
|---|---|
| Bcovrin Testnet | Public test ledger for development and demos |
| Indicio Testnet | Indicio-hosted test network |
| Indicio Demonet | Indicio-hosted demonstration network |
| Indicio Mainnet | Indicio production network |
Ledgers enum in the platform defines these network names. When a DID is not anchored to any ledger (e.g., did:key or did:web), the network value is NA (Not Applicable).
For Polygon-based did:polygon DIDs, the platform uses the polygon:testnet namespace.
How DIDs are created in CREDEBL
DIDs are created during agent provisioning — the process of spinning up a DWN agent for an organization. TheAgentSpinupDto accepts the DID creation parameters alongside wallet configuration.
The agent spin-up status tracks three states:
| State | Value | Meaning |
|---|---|---|
PENDING | 0 | Agent provisioning has started |
WALLET_CREATED | 1 | The agent wallet has been initialized |
DID_CREATED | 2 | A DID has been created and registered |
The
seed field must be exactly 32 characters if provided. Spaces are not allowed.Organizations and their DIDs
Each organization in CREDEBL can have multiple DIDs registered under different methods or networks. The organization’s DID list is accessible to members with theowner, admin, issuer, or member role via GET /orgs/:orgId/dids.
Primary DID
The primary DID is the DID an organization uses by default for issuing credentials and responding to proof requests. It can be set or changed withPUT /orgs/:orgId/primary-did.
Setting isPrimaryDid: true during DID creation automatically designates that DID as the primary one. Only one DID can be primary at a time.
What is the difference between did:key and did:indy?
What is the difference between did:key and did:indy?
did:key is derived entirely from a public key and requires no ledger. It is portable and self-contained, but it cannot be updated or revoked. did:indy is anchored on a Hyperledger Indy ledger, which means it can be resolved by any participant on that network and supports credential definition publication and revocation.Do I need an endorser to create a did:indy DID?
Do I need an endorser to create a did:indy DID?
On permissioned Indy networks (such as Indicio Mainnet), writing a DID to the ledger requires a transaction signed by an endorser — a trusted party with write access. On open test networks like Bcovrin Testnet, you may be able to self-endorse. The
endorserDid field in the DID creation DTO is used to specify the endorser.Can an organization have multiple DIDs?
Can an organization have multiple DIDs?
Yes. An organization can create DIDs on multiple ledgers and using multiple methods. Only one DID is designated as the primary DID at any time. The others remain available and can be used for specific purposes or promoted to primary as needed.
What key types are supported?
What key types are supported?
CREDEBL supports
ed25519, bls12381g1g2, bls12381g1, bls12381g2, x25519, p256, p384, p521, and k256. The most commonly used key type for Indy-based DIDs is ed25519.What is a DID Document?
What is a DID Document?
A DID Document is a JSON-LD object that the DID resolves to. It contains the DID subject, verification methods (public keys), authentication references, and optionally service endpoints. CREDEBL’s agents use the DID Document to locate the public key needed to verify signatures on credentials and proofs.