rs-ucan
rs-ucan copied to clipboard
DidParser/BytesToKey API should enable use of other DID methods
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:
- a public key will always be extractable from the DID string
- 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?