rs-ucan icon indicating copy to clipboard operation
rs-ucan copied to clipboard

DidParser/BytesToKey API should enable use of other DID methods

Open chunningham opened this issue 2 years ago • 3 comments

Excellent crate! I understand the initial implementation approach of being bound to did:key, but the API of BytesToKey and DidParser::parse assumes/requires that:

  1. a public key will always be extractable from the DID string
  2. DIDs will always be generative/not need to be resolved

Which actually permanently rules out any non-did:key methods (did:pkh is generative but a pub key cannot be extracted from the DID, and most other DID methods are not generative/require resolution and so would need DidParser::parse and BytesToKey to be async). Is there interest in a PR to move to a more general API to support such methods?

chunningham avatar May 19 '22 11:05 chunningham