The W3C did-core specification defines that the verification method used to assert the proof of a Verifiable Credential has to be associated with the assertionMethod property in the issuer's DID document (cf. 5.2.4.2 Assertion Method). But currently, the DIDDocument type of the did-resolver library does not allow a property assertionMethod. Instead, for this purpose the DIDDocument type currently only offers the property publicKey. The property publicKey is not defined in the W3C did-core specification (cf. 5.1.1 Core Properties of a DID Document). Thus, the DIDDocument type currently violates the W3C did-core specification.
Other libraries (such as vc-js and jsonld-signatures) expect the public key related to a Verifiable Credential signature in the assertionMethod property. Thus, it is currently not possible to use the DIDDocument type along with such libraries.
In did-resolver/resolver.ts:
The DIDDocument type should offer a property assertionMethod of type PublicKey[] to comply with the W3C did-core specification and to make it possible using this type along with other libraries.
Problem description
The W3C did-core specification defines that the verification method used to assert the proof of a Verifiable Credential has to be associated with the assertionMethod property in the issuer's DID document (cf. 5.2.4.2 Assertion Method). But currently, the DIDDocument type of the did-resolver library does not allow a property assertionMethod. Instead, for this purpose the DIDDocument type currently only offers the property publicKey. The property publicKey is not defined in the W3C did-core specification (cf. 5.1.1 Core Properties of a DID Document). Thus, the DIDDocument type currently violates the W3C did-core specification. Other libraries (such as vc-js and jsonld-signatures) expect the public key related to a Verifiable Credential signature in the assertionMethod property. Thus, it is currently not possible to use the DIDDocument type along with such libraries. In did-resolver/resolver.ts:
Suggested solution
The DIDDocument type should offer a property assertionMethod of type PublicKey[] to comply with the W3C did-core specification and to make it possible using this type along with other libraries.