You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently you have to use the getKeyDidMappingByVerificationMethod method to get access to the getKeyFromVerificationMethod method for a specific key type.
However this is a bit verbose and doesn't work nicely for the api.
E.g currently we have to write this:
constdidsApi=agentContext.dependencyManager.resolve(DidsApi)constdidResult=awaitdidsApi.resolve(`did:sov:${issuerId}`)if(!didResult.didDocument)thrownewAriesFrameworkError('Unable to resolve did')constverificationMethod=didResult.didDocument.dereferenceKey('did:sov:${issuerId}#key-1')const{ getKeyFromVerificationMethod }=getKeyDidMappingByVerificationMethod(verificationMethod)constkey=getKeyFromVerificationMethod(verificationMethod)
it would be nice if we can just do this:
constdidsApi=agentContext.dependencyManager.resolve(DidsApi)constdidResult=awaitdidsApi.resolve(`did:sov:${issuerId}`)if(!didResult.didDocument)thrownewAriesFrameworkError('Unable to resolve did')constverificationMethod=didResult.didDocument.dereferenceKey('did:sov:${issuerId}#key-1')constkey=getKeyFromVerificationMethod(verificationMethod)
So the getKeyFromVerificationMethod just calls getKeyDidMappingByVerificationMethod internally.
The text was updated successfully, but these errors were encountered:
auer-martin
added a commit
to auer-martin/aries-framework-javascript
that referenced
this issue
Feb 27, 2023
Currently you have to use the
getKeyDidMappingByVerificationMethod
method to get access to thegetKeyFromVerificationMethod
method for a specific key type.However this is a bit verbose and doesn't work nicely for the api.
E.g currently we have to write this:
it would be nice if we can just do this:
So the
getKeyFromVerificationMethod
just callsgetKeyDidMappingByVerificationMethod
internally.The text was updated successfully, but these errors were encountered: