This library provide encoding and decoding function for the Base 58 encoding.
opam install base58
OCamldoc generated doc can be found here.
let () =
let alphabet = B58.make_alphabet "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" in
let data = Bytes.of_string "Hello World" in
let b58 = B58.encode alphabet data in
print_endline @@ Bytes.to_string b58
Then to compile:
ocamlbuild -use-ocamlfind -pkgs base58 example01.native