 ;; org.hyperledger.chaintool.meta interface
 ;;-----------------------------------------------------------------
 (defn- render-metadata [config ipath]
-  (let [facts (buildfacts config)
-        provides (buildccis ipath (intf/getprovides config))]
+  (let [facts (build-facts config)
+        provides (build-ccis ipath (intf/getprovides config))]
     (render-golang "metadata" [["facts" facts]
                                ["provides" provides]])))
 

;; emit-stub
;;-----------------------------------------------------------------
(defn- emit-stub [base name functions template srcdir filename]
  (let [[_ interface] (buildinterface base name functions)
        content (render-golang template [["base" base]["intf" interface]])
        output (io/file srcdir (package-path base name) filename)]

    (emit-golang output content)))

(defn- emit-server-stub [base name functions srcdir]
  (emit-stub base name functions "server" srcdir "server-stub.go"))


        ;; finally, construct a new CCI object
        (vector name (->CCI name data))))))

(defn- build-ccis [ipath interfaces]
  (into {} (map (fn [interface] (build-cci ipath interface)) interfaces)))

(defn- build-facts [config]
  (let [facts [["Application Name" (:Name config)]
               ["Application Version" (:Version config)]
               ["Platform" (str (-> config :Platform :Name) " version " (-> config :Platform :Version))]
