According to did-core a resolver function should have the following abstract form:
resolve(did, resolutionOptions) →
« didResolutionMetadata, didDocument, didDocumentMetadata »
Currently the function signature for this library looks like this:
resolve(did: string): Promise<DIDDocument>
We should introduce a breaking change that adds support for returning didResolutionMetadata and didDocumentMetadata.
It should be possible to implement this in a way in which all resolvers won't break with the new version of this package, but won't provide additional metadata until they implement the new interface.
The new function signature would look something like this:
interface ResolutionResult {
didDocument: DIDDocument
didResolutionMetadata: DIDResolutionMetadata
didDocumentMetadata: DIDDocumentMetadata
}
resolve(did: string, resolutionOptions: ResolutionOptions): Promise<ResolutionResult>
According to did-core a resolver function should have the following abstract form:
Currently the function signature for this library looks like this:
We should introduce a breaking change that adds support for returning didResolutionMetadata and didDocumentMetadata.
It should be possible to implement this in a way in which all resolvers won't break with the new version of this package, but won't provide additional metadata until they implement the new interface.
The new function signature would look something like this: