 
 (defn encode
   "Encodes a multihash into a binary representation."
+  ^bytes
   [mhash]
   (let [length (:length mhash)
         encoded (byte-array (+ length 2))]


(defn base58
  "Encodes a multihash into a Base-58 string."
  [mhash]
  (when mhash
    (b58/encode (encode mhash))))


(defn hex
  "Encodes a multihash into a hexadecimal string."
  ^String
  [mhash]
  (when mhash
    (hex/encode (encode mhash))))
