1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
module List = Core.List
module String = Core.String

let show pub =
 List.reduce_exn pub ~f:Utils.concat_hashes

let load text =
  let list = String.split text ~on:'-' in
  Utils.validate_key list

let address pub =
  pub
  |> show
  |> Hash.digest
  |> Utils.to_hex