dwyl / cid

❄️cid ("content id") is a human-friendly (readable/typeable) unique ID function built for distributed/decentralised systems.
GNU General Public License v2.0
33 stars 3 forks source link

Create base58 module (and remove dependency) #23

Closed SimonLab closed 5 years ago

SimonLab commented 5 years ago

At the moment we are using the following package https://github.com/nocursor/b58 to convert the cid to base58.

This package provide much more than we need and to avoid having another dependency we can add a simplified version of base58 to the cid project

ref: https://en.wikipedia.org/wiki/Base58

nelsonic commented 5 years ago

@SimonLab thanks for opening this issue. ✅ https://hex.pm/packages/b58 image

Let's fix this 404 with the following repo: https://github.com/dwyl/elixir-base58-encode

SimonLab commented 5 years ago

Just for info if people are looking for https://github.com/nocursor/b58 on hex, the name of the package is basefiftyheight: https://hex.pm/packages/basefiftyeight

nelsonic commented 5 years ago

@SimonLab I know ... the naming is a fail. ideally it should be base58encode https://hex.pm/packages/base58encode which describes exactly what the package does (or will do)

SimonLab commented 5 years ago

The package is now public at https://hex.pm/packages/b58 I'm going to add it to the dependency of CID and check that all our tests are still working

SimonLab commented 5 years ago

error when trying to run mix test (`mix deps.get was run before) image

SimonLab commented 5 years ago

The error is due to a mismatch in the base58encode package in the name, see https://github.com/dwyl/base58encode/issues/11

SimonLab commented 5 years ago

We are now using b58 elixir package in CID, see #30