     ;; execute the protoc compiler to generate golang
     (protoc-cmd outputdir output)))
 
+;;-----------------------------------------------------------------
+;; compile-metadata
+;;-----------------------------------------------------------------
 (def metadata-name "org.hyperledger.chaintool.meta")
-(defn compile-metadata []
+(defn- compile-metadata []
   (let [data (->> (str "metadata/" metadata-name ".cci") io/resource slurp)]
     (intf/compileintf {:path metadata-name :data data})))
 
 ;;-----------------------------------------------------------------
 ;; compile interfaces
 ;;-----------------------------------------------------------------
-(defn compile-interfaces [ipath config]
+(defn- compile-interfaces [ipath config]
   (let [interfaces (intf/compile ipath config)
         metadata (compile-metadata)]
     (assoc interfaces metadata-name metadata)))

;; render stub output - compiles the interfaces into the primary
;; golang stub, suitable for writing to a file
;;-----------------------------------------------------------------
(defn render-primary-stub [base package config interfaces]
  (let [functions (algo/fmap intf/getallfunctions interfaces)
        provides (build base (select-keys functions (intf/getprovides config)))]


(defn pkg-to-relpath [path]
  (string/replace path #"^_/" ""))

(defn- package-name [name] (-> name (string/split #"\.") last))
(defn- package-camel [name] (-> name package-name string/capitalize))
(defn- package-path [base name] (str (pkg-to-relpath base) "/cci/" (string/replace name "." "/")))

;;------------------------------------------------------------------
;; return a string with composite GOPATH elements, separated by ":"
