Complete example
id, component IDs, controllers, and authorization references.
What each component does
The fragment names are component identifiers, not secret keys. You may use different fragments, but every reference must match the complete component ID exactly.
Key roles are not interchangeable
The Ed25519 and X25519 entries serve different purposes:- The Ed25519 private key signs registration, authorized Directory mutations, and Cache access proofs. Its public half appears in
verificationMethod. - The X25519 private key remains on the client and participates in message-key agreement. Its public half appears in
keyAgreement. authenticationand Cacheauthorizationreference the Ed25519 verification-method ID, not the X25519 key-agreement ID.- A sender uses the recipient’s X25519 public key for encryption. It does not use the Cache authorization key as the message-encryption key.
publicKeyMultibase values are public multibase strings. The leading z identifies Base58BTC encoding. Generate and store the corresponding private keys using a cryptographic library appropriate for each algorithm; never place either private key in the document.
During ownerless registration, root_pubkey identifies the public Ed25519 root key that validates the registration signature. In the example above, it is the same public key published by #keys-1.
Relay service behavior
The Relay service advertises a public base URL:TalariaRelayService endpoint and submits the encrypted DDN envelope to:
Cache service behavior
The Cache service advertises its public base URL and explicitly identifies the verification methods that may authorize retrieval:How clients use the document
For a typical outgoing message, a client:- Resolves the recipient DID.
- Rejects a deactivated identity.
- Selects a compatible entry from
keyAgreementand encrypts the DDN payload. - Selects a
TalariaRelayServiceendpoint. - Submits the encrypted envelope to the Relay API.
- Allows Relay delivery policy to use the recipient’s Cache service when immediate delivery is unavailable.
- Resolves its current DID document.
- Selects its
TalariaCacheServiceand complete service ID. - Selects an Ed25519 verification method listed in the service’s
authorizationarray. - Signs the Cache retrieval proof locally.
- Retrieves, persists, and acknowledges encrypted messages through the Cache API.
Publishing the document
You can include these service entries in thedid_document sent during initial registration. You can also add or update each service later through the proof-authorized DID document component endpoints.
After a mutation returns 202 Accepted, wait for chain confirmation and resolve the DID again before relying on the new endpoint.
Resolve the document
Read the current chain-backed DID record.
Add a service
Publish a Relay or Cache service with DID-key authorization.
Send through a Relay
Submit an encrypted DDN envelope to a resolved Relay endpoint.
Retrieve from a Cache
Build an authorized Cache retrieval flow.

