pub fn cert_to_did_document(
cert: &Certificate,
x25519_key: Option<&[u8]>,
) -> DidDocumentExpand description
Convert an NDN certificate to a W3C DidDocument.
The certificate’s name is expected to be a KEY name like
/com/acme/alice/KEY/v=123/self. The identity DID is derived from
the prefix before /KEY/.
§Key agreement key
Pass x25519_key to include a keyAgreement entry. This is an X25519
public key separate from the Ed25519 signing key — critical for NDA’s
encrypted content tier. The X25519 key is typically derived from the
Ed25519 seed (e.g., via RFC 7748 conversion) or generated independently.