NexusSocial / nexus-vr

Monorepo for most code
Apache License 2.0
19 stars 6 forks source link

did-simple: implement varint decode and keytype detect #95

Closed TheButlah closed 4 months ago

TheButlah commented 4 months ago

Previously in #94 I implemented the multibase decode of the url. This PR adds the ability to read that decoded byte slice and parse out the keytype from it.

This required implementing the varint encoding scheme described in the multicodec spec.

MalekiRe commented 4 months ago

Rename key_algo file to key_algorithms there's no need to keep it short when it's a module name, and fully descriptive module names are better.

MalekiRe commented 4 months ago

LGTM otherwise

TheButlah commented 4 months ago

key_algos is already unambiguous, it doesn't need to be fully written out. This is not java, longer with more words does not mean better, keeping function names and types short should be desired, as long as it is unambiguous.