 ;
 ; TODO: currently fails pretty silently if passed root=nil.
 (defn verification-path
-  ([root path-to-leaf] (verification-path root path-to-leaf ()))
+  ([root path-or-uid]
+    (if (string? path-or-uid)
+        (verification-path root (path-to-uid path-or-uid root) ())
+        (verification-path root path-or-uid ())))
   ([node path-to-leaf vpath]
     (if (leaf? node)
         (cons (:nonce (node-data node)) vpath)

                              :right (nth n 2 nil)}))
        n)) ; Acting like 'identity' on non-maps allows use with postwalk.


(defn- sha256-hex [s]
    (let [d (java.security.MessageDigest/getInstance "SHA-256")]

    (:require [clojure.math.numeric-tower :as math])
    (:require [uk.me.iwilcox.poltree.util :as util]))

(declare node-data left-child right-child leaf?
         sha256-hex hcombine ncombine add-leaf-hash
         prep-account pp-accounts->tree
         combiner-reducer path-to-uid)

;;;;;;;;;;;;;;;;;;;;;;;;
; Coinholder interface
