 (defn- url [{:keys [host port]}]
   (str "http://" host ":" port "/chaincode"))
 
+;;--------------------------------------------------------------------------------------
+;; post - performs a synchronous http/jsonrpc to the server, evaluating to the response
+;;--------------------------------------------------------------------------------------
 (defn- post [{:keys [method name func args] :as options}]
   (let [body {:jsonrpc "2.0"
               :method method

                :accept :json
                :form-params body})))

(defn- query [args]
  (let [{:keys [body]} (post (assoc args :method "query"))
        response (-> body (json/parse-string true) (select-keys [:result :error]))]

             (do
               (println "\t-" name)
               (when-let [path (:interfaces options)]
                 (let [is (->> data .newInput (codecs/decompressor "gzip"))
                       file (io/file path (str name ".cci"))]

                   (io/make-parents file)
