Skip to content

exportToDidDocument

exportToDidDocument(did, mimeType): ConformingDidDocument

Export a [[DidDocument]] to a W3C-spec conforming DID Document in the format provided.

Parameters

did: DidDocument

The [[DidDocument]].

mimeType: "application/json" | "application/ld+json"

The format for the output DID Document. Accepted values are application/json and application/ld+json.

Returns

ConformingDidDocument

The DID Document formatted according to the mime type provided, or an error if the format specified is not supported.

Source

did/src/DidDocumentExporter/DidDocumentExporter.ts:96