   default-epoch)
 
 (defn make-chaincode-header
-  [^Chaincode$ChaincodeID chaincode-id channel-id tx-id epoch]
-  (make-channel-header Common$HeaderType/ENDORSER_TRANSACTION ; type
+  [chaincode-id channel-id tx-id epoch]
+  (make-channel-header (proto/get-number Common$HeaderType/ENDORSER_TRANSACTION) ; type
                        1                ; version
                        channel-id
                        tx-id

       (.build))))

(defn make-chaincode-invocation-spec
  ([^Chaincode$ChaincodeSpec chaincode-spec]
   (-> (Chaincode$ChaincodeInvocationSpec/newBuilder)
       (.setChaincodeSpec chaincode-spec)
       (.build)))
  ;; FIXME: setIdGenerationAlg
  #_
  ([^Chaincode$ChaincodeSpec chaincode-spec id-generation-alg]

(ns clojure-fabric.grpc-core
  (:require [clojure-fabric.crypto-suite :as crypto-suite]
            [clojure-fabric.utils :as utils]
            [clojure-fabric.proto :as proto]
            [clojure.core.async :as async])
  (:import [com.google.protobuf ByteString Timestamp]
           io.grpc.ManagedChannel
