Last active
November 13, 2018 14:12
-
-
Save moea/3e2e09194e174811bc06dfa4cc4ff970 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns stickler.core | |
| (:require [clojure.java.io :as io] | |
| [camel-snake-kebab.core :refer [->kebab-case]]) | |
| (:import [com.squareup.wire.schema Schema SchemaLoader ProtoType]) | |
| (:gen-class)) | |
| (def ^:dynamic package-renames {}) | |
| (def ^:dynamic ->field-name ->kebab-case) | |
| (def ^:dynamic ->type-name ->kebab-case) | |
| (def ^:private scalar-proto-type->key | |
| {ProtoType/BOOL :boolean | |
| ProtoType/BYTES :bytes | |
| ProtoType/DOUBLE :double | |
| ProtoType/FLOAT :float | |
| ProtoType/FIXED32 :fixed32 | |
| ProtoType/FIXED64 :fixed64 | |
| ProtoType/INT32 :int32 | |
| ProtoType/INT64 :int64 | |
| ProtoType/SFIXED32 :sfixed32 | |
| ProtoType/SFIXED64 :sfixed64 | |
| ProtoType/SINT32 :sint32 | |
| ProtoType/SINT64 :sint64 | |
| ProtoType/STRING :string | |
| ProtoType/UINT32 :uint32 | |
| ProtoType/UINT64 :uint64}) | |
| (defn- proto->package-name [proto] | |
| (or (.javaPackage proto) (.packageName proto))) | |
| (defn- type->simple-name [t] | |
| (-> t .type .simpleName)) | |
| (defn- proto+type->key [proto t] | |
| (let [package (proto->package-name proto)] | |
| (keyword package (->type-name (type->simple-name t))))) | |
| (defn- convert-field [proto f] | |
| (let [t (.type f) | |
| m (cond-> {:tag (.tag f) | |
| :name (->field-name (keyword (.name f)))} | |
| (.isDeprecated f) (assoc :depecated? true) | |
| (.isRepeated f) (assoc :repeated? true) | |
| (.isRedacted f) (assoc :redacted? true) | |
| (.isPacked f) (assoc :packed? true) | |
| (.isRequired f) (assoc :required? true) | |
| (.isOptional f) (assoc :optional? true) | |
| (.getDefault f) (assoc :default (.getDefault f)))] | |
| (cond | |
| (.isScalar t) (assoc m :scalar? true :type (scalar-proto-type->key t)) | |
| (.isMap t) (assoc m :map? true :type [(.keyType t) (.valueType t)]) | |
| :else (assoc m :type (proto+type->key proto f))))) | |
| (defn- convert-one-of [proto one-of] | |
| {(->field-name (keyword (.name one-of))) (mapv (partial convert-field proto) (.fields one-of))}) | |
| (defn- convert-fields [proto fields one-ofs] | |
| (let [fields (mapv (partial convert-field proto) fields) | |
| one-ofs (map (partial convert-one-of proto) one-ofs)] | |
| (cond-> {} | |
| (not-empty fields) (assoc :fields fields) | |
| (not-empty one-ofs) (assoc :one-ofs (apply merge one-ofs))))) | |
| (defn- convert-type [proto t-name t] | |
| (let [fields (convert-fields proto (.fields t) (.oneOfs t))] | |
| {t-name (assoc fields | |
| :package (proto->package-name proto) | |
| :name (type->simple-name t))})) | |
| (defn- convert-proto-file [f] | |
| (reduce | |
| (fn [acc t] | |
| (let [t-name (proto+type->key f t)] | |
| (into acc (convert-type f t-name t)))) | |
| {} | |
| (.types f))) | |
| (let [loader (doto (SchemaLoader.) | |
| (.addSource (io/file "/tmp/proto"))) | |
| schema (.load loader) | |
| maps (mapv convert-proto-file (.protoFiles schema))] | |
| (clojure.pprint/pprint (apply merge maps))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {:com.google.protobuf/method-descriptor-proto | |
| {:fields | |
| [{:tag 1, :name :name, :optional? true, :scalar? true, :type :string} | |
| {:tag 2, | |
| :name :input-type, | |
| :optional? true, | |
| :scalar? true, | |
| :type :string} | |
| {:tag 3, | |
| :name :output-type, | |
| :optional? true, | |
| :scalar? true, | |
| :type :string} | |
| {:tag 4, | |
| :name :options, | |
| :optional? true, | |
| :type :com.google.protobuf/method-options} | |
| {:tag 5, | |
| :name :client-streaming, | |
| :optional? true, | |
| :default "false", | |
| :scalar? true, | |
| :type :boolean} | |
| {:tag 6, | |
| :name :server-streaming, | |
| :optional? true, | |
| :default "false", | |
| :scalar? true, | |
| :type :boolean}], | |
| :package "com.google.protobuf", | |
| :name "MethodDescriptorProto"}, | |
| :com.google.protobuf/enum-value-descriptor-proto | |
| {:fields | |
| [{:tag 1, :name :name, :optional? true, :scalar? true, :type :string} | |
| {:tag 2, | |
| :name :number, | |
| :optional? true, | |
| :scalar? true, | |
| :type :int32} | |
| {:tag 3, | |
| :name :options, | |
| :optional? true, | |
| :type :com.google.protobuf/enum-value-options | |
| }], | |
| :package "com.google.protobuf", | |
| :name "EnumValueDescriptorProto"}, | |
| :com.google.protobuf/service-options | |
| {:fields | |
| [{:tag 33, | |
| :name :deprecated, | |
| :optional? true, | |
| :default "false", | |
| :scalar? true, | |
| :type :boolean} | |
| {:tag 999, | |
| :name :uninterpreted-option, | |
| :repeated? true, | |
| :type :com.google.protobuf/uninterpreted-option}], | |
| :package "com.google.protobuf", | |
| :name "ServiceOptions"}, | |
| :com.github.jtendermint.jabci.types/request-begin-block | |
| {:fields | |
| [{:tag 1, :name :hash, :scalar? true, :type :bytes} | |
| {:tag 2, | |
| :name :header, | |
| :type :com.github.jtendermint.jabci.types/header} | |
| {:tag 3, | |
| :name :last-commit-info, | |
| :type :com.github.jtendermint.jabci.types/last-commit-info} | |
| {:tag 4, | |
| :name :byzantine-validators, | |
| :repeated? true, | |
| :type :com.github.jtendermint.jabci.types/evidence}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "RequestBeginBlock"}, | |
| :com.github.jtendermint.jabci.types/response-flush | |
| {:package "com.github.jtendermin | |
| t.jabci.types", | |
| :name "ResponseFlush"}, | |
| :com.github.jtendermint.jabci.types/response-query | |
| {:fields | |
| [{:tag 1, :name :code, :scalar? true, :type :uint32} | |
| {:tag 3, :name :log, :scalar? true, :type :string} | |
| {:tag 4, :name :info, :scalar? true, :type :string} | |
| {:tag 5, :name :index, :scalar? true, :type :int64} | |
| {:tag 6, :name :key, :scalar? true, :type :bytes} | |
| {:tag 7, :name :value, :scalar? true, :type :bytes} | |
| {:tag 8, | |
| :name :proof, | |
| :type :com.github.jtendermint.jabci.types/proof} | |
| {:tag 9, :name :height, :scalar? true, :type :int64} | |
| {:tag 10, :name :codespace, :scalar? true, :type :string}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "ResponseQuery"}, | |
| :com.google.protobuf/method-options | |
| {:fields | |
| [{:tag 33, | |
| :name :deprecated, | |
| :optional? true, | |
| :default "false", | |
| :scalar? true, | |
| :type :boolean} | |
| {:tag 999, | |
| :name :uninterpreted-option, | |
| :repeated? true, | |
| :type :com.google.protobuf/uninterpreted-option}], | |
| :package "com.google.proto | |
| buf", | |
| :name "MethodOptions"}, | |
| :com.github.jtendermint.jabci.types/response-deliver-tx | |
| {:fields | |
| [{:tag 1, :name :code, :scalar? true, :type :uint32} | |
| {:tag 2, :name :data, :scalar? true, :type :bytes} | |
| {:tag 3, :name :log, :scalar? true, :type :string} | |
| {:tag 4, :name :info, :scalar? true, :type :string} | |
| {:tag 5, :name :gas-wanted, :scalar? true, :type :int64} | |
| {:tag 6, :name :gas-used, :scalar? true, :type :int64} | |
| {:tag 7, | |
| :name :tags, | |
| :repeated? true, | |
| :type :com.github.jtendermint.jabci.types/kv-pair} | |
| {:tag 8, :name :codespace, :scalar? true, :type :string}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "ResponseDeliverTx"}, | |
| :com.google.protobuf/file-options | |
| {:fields | |
| [{:tag 1, | |
| :name :java-package, | |
| :optional? true, | |
| :scalar? true, | |
| :type :string} | |
| {:tag 8, | |
| :name :java-outer-classname, | |
| :optional? true, | |
| :scalar? true, | |
| :type :string} | |
| {:tag 10, | |
| :name :java-multiple-files, | |
| :optional? true, | |
| :default "false", | |
| :scalar? | |
| true, | |
| :type :boolean} | |
| {:tag 20, | |
| :name :java-generate-equals-and-hash, | |
| :optional? true, | |
| :default "false", | |
| :scalar? true, | |
| :type :boolean} | |
| {:tag 27, | |
| :name :java-string-check-utf-8, | |
| :optional? true, | |
| :default "false", | |
| :scalar? true, | |
| :type :boolean} | |
| {:tag 9, | |
| :name :optimize-for, | |
| :optional? true, | |
| :default "SPEED", | |
| :type :com.google.protobuf/optimize-mode} | |
| {:tag 11, | |
| :name :go-package, | |
| :optional? true, | |
| :scalar? true, | |
| :type :string} | |
| {:tag 16, | |
| :name :cc-generic-services, | |
| :optional? true, | |
| :default "false", | |
| :scalar? true, | |
| :type :boolean} | |
| {:tag 17, | |
| :name :java-generic-services, | |
| :optional? true, | |
| :default "false", | |
| :scalar? true, | |
| :type :boolean} | |
| {:tag 18, | |
| :name :py-generic-services, | |
| :optional? true, | |
| :default "false", | |
| :scalar? true, | |
| :type :boolean} | |
| {:tag 23, | |
| :name :deprecated, | |
| :optional? true, | |
| :default "false", | |
| :scalar? true, | |
| :type :boolean} | |
| {:tag | |
| 31, | |
| :name :cc-enable-arenas, | |
| :optional? true, | |
| :default "false", | |
| :scalar? true, | |
| :type :boolean} | |
| {:tag 36, | |
| :name :objc-class-prefix, | |
| :optional? true, | |
| :scalar? true, | |
| :type :string} | |
| {:tag 37, | |
| :name :csharp-namespace, | |
| :optional? true, | |
| :scalar? true, | |
| :type :string} | |
| {:tag 999, | |
| :name :uninterpreted-option, | |
| :repeated? true, | |
| :type :com.google.protobuf/uninterpreted-option}], | |
| :package "com.google.protobuf", | |
| :name "FileOptions"}, | |
| :com.github.jtendermint.jabci.types/request-commit | |
| {:package "com.github.jtendermint.jabci.types", | |
| :name "RequestCommit"}, | |
| :com.github.jtendermint.jabci.types/pub-key | |
| {:fields | |
| [{:tag 1, :name :type, :scalar? true, :type :string} | |
| {:tag 2, :name :data, :scalar? true, :type :bytes}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "PubKey"}, | |
| :com.google.protobuf/file-descriptor-proto | |
| {:fields | |
| [{:tag 1, :name :name, :optional? true, :scalar? true, :type :string} | |
| {:tag 2, | |
| :name :package, | |
| :optional? | |
| true, | |
| :scalar? true, | |
| :type :string} | |
| {:tag 3, | |
| :name :dependency, | |
| :repeated? true, | |
| :scalar? true, | |
| :type :string} | |
| {:tag 10, | |
| :name :public-dependency, | |
| :repeated? true, | |
| :scalar? true, | |
| :type :int32} | |
| {:tag 11, | |
| :name :weak-dependency, | |
| :repeated? true, | |
| :scalar? true, | |
| :type :int32} | |
| {:tag 4, | |
| :name :message-type, | |
| :repeated? true, | |
| :type :com.google.protobuf/descriptor-proto} | |
| {:tag 5, | |
| :name :enum-type, | |
| :repeated? true, | |
| :type :com.google.protobuf/enum-descriptor-proto} | |
| {:tag 6, | |
| :name :service, | |
| :repeated? true, | |
| :type :com.google.protobuf/service-descriptor-proto} | |
| {:tag 7, | |
| :name :extension, | |
| :repeated? true, | |
| :type :com.google.protobuf/field-descriptor-proto} | |
| {:tag 8, | |
| :name :options, | |
| :optional? true, | |
| :type :com.google.protobuf/file-options} | |
| {:tag 9, | |
| :name :source-code-info, | |
| :optional? true, | |
| :type :com.google.protobuf/source-code-info} | |
| {:tag 12, | |
| :name :syntax, | |
| :optional? | |
| true, | |
| :scalar? true, | |
| :type :string}], | |
| :package "com.google.protobuf", | |
| :name "FileDescriptorProto"}, | |
| :com.github.jtendermint.jabci.types/response-exception | |
| {:fields [{:tag 1, :name :error, :scalar? true, :type :string}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "ResponseException"}, | |
| :com.github.jtendermint.jabci.types/request-query | |
| {:fields | |
| [{:tag 1, :name :data, :scalar? true, :type :bytes} | |
| {:tag 2, :name :path, :scalar? true, :type :string} | |
| {:tag 3, :name :height, :scalar? true, :type :int64} | |
| {:tag 4, :name :prove, :scalar? true, :type :boolean}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "RequestQuery"}, | |
| :com.github.jtendermint.jabci.types/version | |
| {:fields | |
| [{:tag 1, :name :block, :scalar? true, :type :uint64} | |
| {:tag 2, :name :app, :scalar? true, :type :uint64}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "Version"}, | |
| :com.google.protobuf/enum-descriptor-proto | |
| {:fields | |
| [{:tag 1, :name :name, :optional? true, :scalar? true, :type | |
| :string} | |
| {:tag 2, | |
| :name :value, | |
| :repeated? true, | |
| :type :com.google.protobuf/enum-value-descriptor-proto} | |
| {:tag 3, | |
| :name :options, | |
| :optional? true, | |
| :type :com.google.protobuf/enum-options}], | |
| :package "com.google.protobuf", | |
| :name "EnumDescriptorProto"}, | |
| :com.github.jtendermint.jabci.types/request-check-tx | |
| {:fields [{:tag 1, :name :tx, :scalar? true, :type :bytes}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "RequestCheckTx"}, | |
| :com.github.jtendermint.jabci.types/request-init-chain | |
| {:fields | |
| [{:tag 1, | |
| :name :time, | |
| :type :com.github.jtendermint.jabci.types/timestamp} | |
| {:tag 2, :name :chain-id, :scalar? true, :type :string} | |
| {:tag 3, | |
| :name :consensus-params, | |
| :type :com.github.jtendermint.jabci.types/consensus-params} | |
| {:tag 4, | |
| :name :validators, | |
| :repeated? true, | |
| :type :com.github.jtendermint.jabci.types/validator-update} | |
| {:tag 5, :name :app-state-bytes, :scalar? true, :type :bytes}], | |
| :package "com.github.jtendermint.jabci.t | |
| ypes", | |
| :name "RequestInitChain"}, | |
| :com.google.protobuf/enum-value-options | |
| {:fields | |
| [{:tag 1, | |
| :name :deprecated, | |
| :optional? true, | |
| :default "false", | |
| :scalar? true, | |
| :type :boolean} | |
| {:tag 999, | |
| :name :uninterpreted-option, | |
| :repeated? true, | |
| :type :com.google.protobuf/uninterpreted-option}], | |
| :package "com.google.protobuf", | |
| :name "EnumValueOptions"}, | |
| :com.github.jtendermint.jabci.types/response-info | |
| {:fields | |
| [{:tag 1, :name :data, :scalar? true, :type :string} | |
| {:tag 2, :name :version, :scalar? true, :type :string} | |
| {:tag 3, :name :app-version, :scalar? true, :type :uint64} | |
| {:tag 4, :name :last-block-height, :scalar? true, :type :int64} | |
| {:tag 5, :name :last-block-app-hash, :scalar? true, :type :bytes}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "ResponseInfo"}, | |
| :com.github.jtendermint.jabci.types/last-commit-info | |
| {:fields | |
| [{:tag 1, :name :round, :scalar? true, :type :int32} | |
| {:tag 2, | |
| :name :votes, | |
| :repeated? true, | |
| :type :com.github.jtendermint.jabci.types/vote-info | |
| }], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "LastCommitInfo"}, | |
| :com.github.jtendermint.jabci.types/evidence-params | |
| {:fields [{:tag 1, :name :max-age, :scalar? true, :type :int64}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "EvidenceParams"}, | |
| :com.google.protobuf/source-code-info | |
| {:fields | |
| [{:tag 1, | |
| :name :location, | |
| :repeated? true, | |
| :type :com.google.protobuf/location}], | |
| :package "com.google.protobuf", | |
| :name "SourceCodeInfo"}, | |
| :com.google.protobuf/file-descriptor-set | |
| {:fields | |
| [{:tag 1, | |
| :name :file, | |
| :repeated? true, | |
| :type :com.google.protobuf/file-descriptor-proto}], | |
| :package "com.google.protobuf", | |
| :name "FileDescriptorSet"}, | |
| :com.github.jtendermint.jabci.types/response | |
| {:one-ofs | |
| {:value | |
| [{:tag 1, | |
| :name :exception, | |
| :type :com.github.jtendermint.jabci.types/response-exception} | |
| {:tag 2, | |
| :name :echo, | |
| :type :com.github.jtendermint.jabci.types/response-echo} | |
| {:tag 3, | |
| :name :flush, | |
| :type :com.github.jtendermint.jabci.types/response-flush | |
| } | |
| {:tag 4, | |
| :name :info, | |
| :type :com.github.jtendermint.jabci.types/response-info} | |
| {:tag 5, | |
| :name :set-option, | |
| :type :com.github.jtendermint.jabci.types/response-set-option} | |
| {:tag 6, | |
| :name :init-chain, | |
| :type :com.github.jtendermint.jabci.types/response-init-chain} | |
| {:tag 7, | |
| :name :query, | |
| :type :com.github.jtendermint.jabci.types/response-query} | |
| {:tag 8, | |
| :name :begin-block, | |
| :type :com.github.jtendermint.jabci.types/response-begin-block} | |
| {:tag 9, | |
| :name :check-tx, | |
| :type :com.github.jtendermint.jabci.types/response-check-tx} | |
| {:tag 10, | |
| :name :deliver-tx, | |
| :type :com.github.jtendermint.jabci.types/response-deliver-tx} | |
| {:tag 11, | |
| :name :end-block, | |
| :type :com.github.jtendermint.jabci.types/response-end-block} | |
| {:tag 12, | |
| :name :commit, | |
| :type :com.github.jtendermint.jabci.types/response-commit}]}, | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "Response"}, | |
| :com.github.jtendermint.jabci.types/consensus-params | |
| {:fields | |
| [{:tag 1, | |
| :name :block-size, | |
| :type :com.github.jtendermint.jabci.types/block-size-params} | |
| {:tag 2, | |
| :name :evidence, | |
| :type :com.github.jtendermint.jabci.types/evidence-params} | |
| {:tag 3, | |
| :name :validator, | |
| :type :com.github.jtendermint.jabci.types/validator-params}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "ConsensusParams"}, | |
| :com.google.protobuf/oneof-descriptor-proto | |
| {:fields | |
| [{:tag 1, | |
| :name :name, | |
| :optional? true, | |
| :scalar? true, | |
| :type :string}], | |
| :package "com.google.protobuf", | |
| :name "OneofDescriptorProto"}, | |
| :com.google.protobuf/timestamp | |
| {:fields | |
| [{:tag 1, :name :seconds, :scalar? true, :type :int64} | |
| {:tag 2, :name :nanos, :scalar? true, :type :int32}], | |
| :package "com.google.protobuf", | |
| :name "Timestamp"}, | |
| :com.github.jtendermint.jabci.types/block-size-params | |
| {:fields | |
| [{:tag 1, :name :max-bytes, :scalar? true, :type :int64} | |
| {:tag 2, :name :max-gas, :scalar? true, :type :int64}], | |
| :package "com.github.jtendermin | |
| t.jabci.types", | |
| :name "BlockSizeParams"}, | |
| :com.google.protobuf/message-options | |
| {:fields | |
| [{:tag 1, | |
| :name :message-set-wire-format, | |
| :optional? true, | |
| :default "false", | |
| :scalar? true, | |
| :type :boolean} | |
| {:tag 2, | |
| :name :no-standard-descriptor-accessor, | |
| :optional? true, | |
| :default "false", | |
| :scalar? true, | |
| :type :boolean} | |
| {:tag 3, | |
| :name :deprecated, | |
| :optional? true, | |
| :default "false", | |
| :scalar? true, | |
| :type :boolean} | |
| {:tag 7, | |
| :name :map-entry, | |
| :optional? true, | |
| :scalar? true, | |
| :type :boolean} | |
| {:tag 999, | |
| :name :uninterpreted-option, | |
| :repeated? true, | |
| :type :com.google.protobuf/uninterpreted-option}], | |
| :package "com.google.protobuf", | |
| :name "MessageOptions"}, | |
| :com.github.jtendermint.jabci.types/request | |
| {:one-ofs | |
| {:value | |
| [{:tag 2, | |
| :name :echo, | |
| :type :com.github.jtendermint.jabci.types/request-echo} | |
| {:tag 3, | |
| :name :flush, | |
| :type :com.github.jtendermint.jabci.types/request-flush} | |
| {:tag 4, | |
| :name :info, | |
| :type :com.github.jtendermint.jabci.types/request-info} | |
| {:tag 5, | |
| :name :set-option, | |
| :type :com.github.jtendermint.jabci.types/request-set-option} | |
| {:tag 6, | |
| :name :init-chain, | |
| :type :com.github.jtendermint.jabci.types/request-init-chain} | |
| {:tag 7, | |
| :name :query, | |
| :type :com.github.jtendermint.jabci.types/request-query} | |
| {:tag 8, | |
| :name :begin-block, | |
| :type :com.github.jtendermint.jabci.types/request-begin-block} | |
| {:tag 9, | |
| :name :check-tx, | |
| :type :com.github.jtendermint.jabci.types/request-check-tx} | |
| {:tag 19, | |
| :name :deliver-tx, | |
| :type :com.github.jtendermint.jabci.types/request-deliver-tx} | |
| {:tag 11, | |
| :name :end-block, | |
| :type :com.github.jtendermint.jabci.types/request-end-block} | |
| {:tag 12, | |
| :name :commit, | |
| :type :com.github.jtendermint.jabci.types/request-commit}]}, | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "Request"}, | |
| :com.github.jtendermint.jabci.types/validator-params | |
| {:fields | |
| [{:tag 1, | |
| :name :pub-key-types, | |
| :repeated? true, | |
| :scalar? true, | |
| :type :string}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "ValidatorParams"}, | |
| :com.google.protobuf/enum-options | |
| {:fields | |
| [{:tag 2, | |
| :name :allow-alias, | |
| :optional? true, | |
| :scalar? true, | |
| :type :boolean} | |
| {:tag 3, | |
| :name :deprecated, | |
| :optional? true, | |
| :default "false", | |
| :scalar? true, | |
| :type :boolean} | |
| {:tag 999, | |
| :name :uninterpreted-option, | |
| :repeated? true, | |
| :type :com.google.protobuf/uninterpreted-option}], | |
| :package "com.google.protobuf", | |
| :name "EnumOptions"}, | |
| :com.github.jtendermint.jabci.types/validator | |
| {:fields | |
| [{:tag 1, :name :address, :scalar? true, :type :bytes} | |
| {:tag 3, :name :power, :scalar? true, :type :int64}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "Validator"}, | |
| :com.github.jtendermint.jabci.types/response-end-block | |
| {:fields | |
| [{:tag 1, | |
| :name :validator-updates, | |
| :repeated? true, | |
| :type :com.github.jtendermint.jabci.types/validator-update | |
| } | |
| {:tag 2, | |
| :name :consensus-param-updates, | |
| :type :com.github.jtendermint.jabci.types/consensus-params} | |
| {:tag 3, | |
| :name :tags, | |
| :repeated? true, | |
| :type :com.github.jtendermint.jabci.types/kv-pair}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "ResponseEndBlock"}, | |
| :com.github.jtendermint.jabci.types/response-echo | |
| {:fields [{:tag 1, :name :message, :scalar? true, :type :string}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "ResponseEcho"}, | |
| :com.github.jtendermint.jabci.types/part-set-header | |
| {:fields | |
| [{:tag 1, :name :total, :scalar? true, :type :int32} | |
| {:tag 2, :name :hash, :scalar? true, :type :bytes}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "PartSetHeader"}, | |
| :com.google.protobuf/field-options | |
| {:fields | |
| [{:tag 1, | |
| :name :ctype, | |
| :optional? true, | |
| :default "STRING", | |
| :type :com.google.protobuf/c-type} | |
| {:tag 2, | |
| :name :packed, | |
| :optional? true, | |
| :scalar? true, | |
| :type :boolean} | |
| {:tag 6, | |
| :name :jstype, | |
| :optional? true, | |
| :default "JS_NORMAL", | |
| :type :com.google.protobuf/js-type} | |
| {:tag 5, | |
| :name :lazy, | |
| :optional? true, | |
| :default "false", | |
| :scalar? true, | |
| :type :boolean} | |
| {:tag 3, | |
| :name :deprecated, | |
| :optional? true, | |
| :default "false", | |
| :scalar? true, | |
| :type :boolean} | |
| {:tag 10, | |
| :name :weak, | |
| :optional? true, | |
| :default "false", | |
| :scalar? true, | |
| :type :boolean} | |
| {:tag 999, | |
| :name :uninterpreted-option, | |
| :repeated? true, | |
| :type :com.google.protobuf/uninterpreted-option}], | |
| :package "com.google.protobuf", | |
| :name "FieldOptions"}, | |
| :com.github.jtendermint.jabci.types/validator-update | |
| {:fields | |
| [{:tag 1, | |
| :name :pub-key, | |
| :type :com.github.jtendermint.jabci.types/pub-key} | |
| {:tag 2, :name :power, :scalar? true, :type :int64}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "ValidatorUpdate"}, | |
| :com.github.jtendermint.jabci.types/request-echo | |
| {:fields [{:tag 1, :name :message, :scalar? true, :type :string}], | |
| :package "com. | |
| github.jtendermint.jabci.types", | |
| :name "RequestEcho"}, | |
| :com.github.jtendermint.jabci.types/proof-op | |
| {:fields | |
| [{:tag 1, :name :type, :scalar? true, :type :string} | |
| {:tag 2, :name :key, :scalar? true, :type :bytes} | |
| {:tag 3, :name :data, :scalar? true, :type :bytes}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "ProofOp"}, | |
| :com.google.protobuf/uninterpreted-option | |
| {:fields | |
| [{:tag 2, | |
| :name :name, | |
| :repeated? true, | |
| :type :com.google.protobuf/name-part} | |
| {:tag 3, | |
| :name :identifier-value, | |
| :optional? true, | |
| :scalar? true, | |
| :type :string} | |
| {:tag 4, | |
| :name :positive-int-value, | |
| :optional? true, | |
| :scalar? true, | |
| :type :uint64} | |
| {:tag 5, | |
| :name :negative-int-value, | |
| :optional? true, | |
| :scalar? true, | |
| :type :int64} | |
| {:tag 6, | |
| :name :double-value, | |
| :optional? true, | |
| :scalar? true, | |
| :type :double} | |
| {:tag 7, | |
| :name :string-value, | |
| :optional? true, | |
| :scalar? true, | |
| :type :bytes} | |
| {:tag 8, | |
| :name :aggregate-value, | |
| :optional? true, | |
| :scalar? true, | |
| :type :string}], | |
| :package "com.google.protobuf", | |
| :name "UninterpretedOption"}, | |
| :com.github.jtendermint.jabci.types/evidence | |
| {:fields | |
| [{:tag 1, :name :type, :scalar? true, :type :string} | |
| {:tag 2, | |
| :name :validator, | |
| :type :com.github.jtendermint.jabci.types/validator} | |
| {:tag 3, :name :height, :scalar? true, :type :int64} | |
| {:tag 4, | |
| :name :time, | |
| :type :com.github.jtendermint.jabci.types/timestamp} | |
| {:tag 5, :name :total-voting-power, :scalar? true, :type :int64}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "Evidence"}, | |
| :com.github.jtendermint.jabci.types/request-deliver-tx | |
| {:fields [{:tag 1, :name :tx, :scalar? true, :type :bytes}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "RequestDeliverTx"}, | |
| :com.github.jtendermint.jabci.types/request-flush | |
| {:package "com.github.jtendermint.jabci.types", :name "RequestFlush"}, | |
| :com.github.jtendermint.jabci.types/response-set-option | |
| {:fields | |
| [{:tag 1, :name :code, :scalar? | |
| true, :type :uint32} | |
| {:tag 3, :name :log, :scalar? true, :type :string} | |
| {:tag 4, :name :info, :scalar? true, :type :string}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "ResponseSetOption"}, | |
| :com.github.jtendermint.jabci.types/request-set-option | |
| {:fields | |
| [{:tag 1, :name :key, :scalar? true, :type :string} | |
| {:tag 2, :name :value, :scalar? true, :type :string}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "RequestSetOption"}, | |
| :com.github.jtendermint.jabci.types/ki-64-pair | |
| {:fields | |
| [{:tag 1, :name :key, :scalar? true, :type :bytes} | |
| {:tag 2, :name :value, :scalar? true, :type :int64}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "KI64Pair"}, | |
| :com.github.jtendermint.jabci.types/kv-pair | |
| {:fields | |
| [{:tag 1, :name :key, :scalar? true, :type :bytes} | |
| {:tag 2, :name :value, :scalar? true, :type :bytes}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "KVPair"}, | |
| :com.github.jtendermint.jabci.types/response-commit | |
| {:fields [{:tag 2, :name :data, | |
| :scalar? true, :type :bytes}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "ResponseCommit"}, | |
| :com.github.jtendermint.jabci.types/proof | |
| {:fields | |
| [{:tag 1, | |
| :name :ops, | |
| :repeated? true, | |
| :type :com.github.jtendermint.jabci.types/proof-op}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "Proof"}, | |
| :com.github.jtendermint.jabci.types/request-end-block | |
| {:fields [{:tag 1, :name :height, :scalar? true, :type :int64}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "RequestEndBlock"}, | |
| :com.google.protobuf/field-descriptor-proto | |
| {:fields | |
| [{:tag 1, :name :name, :optional? true, :scalar? true, :type :string} | |
| {:tag 3, | |
| :name :number, | |
| :optional? true, | |
| :scalar? true, | |
| :type :int32} | |
| {:tag 4, | |
| :name :label, | |
| :optional? true, | |
| :type :com.google.protobuf/label} | |
| {:tag 5, | |
| :name :type, | |
| :optional? true, | |
| :type :com.google.protobuf/type} | |
| {:tag 6, | |
| :name :type-name, | |
| :optional? true, | |
| :scalar? true, | |
| :type :string} | |
| {:tag | |
| 2, | |
| :name :extendee, | |
| :optional? true, | |
| :scalar? true, | |
| :type :string} | |
| {:tag 7, | |
| :name :default-value, | |
| :optional? true, | |
| :scalar? true, | |
| :type :string} | |
| {:tag 9, | |
| :name :oneof-index, | |
| :optional? true, | |
| :scalar? true, | |
| :type :int32} | |
| {:tag 8, | |
| :name :options, | |
| :optional? true, | |
| :type :com.google.protobuf/field-options}], | |
| :package "com.google.protobuf", | |
| :name "FieldDescriptorProto"}, | |
| :com.github.jtendermint.jabci.types/response-init-chain | |
| {:fields | |
| [{:tag 1, | |
| :name :consensus-params, | |
| :type :com.github.jtendermint.jabci.types/consensus-params} | |
| {:tag 2, | |
| :name :validators, | |
| :repeated? true, | |
| :type :com.github.jtendermint.jabci.types/validator-update}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "ResponseInitChain"}, | |
| :com.github.jtendermint.jabci.types/response-check-tx | |
| {:fields | |
| [{:tag 1, :name :code, :scalar? true, :type :uint32} | |
| {:tag 2, :name :data, :scalar? true, :type :bytes} | |
| {:tag 3, :name :log, :scalar? true | |
| , :type :string} | |
| {:tag 4, :name :info, :scalar? true, :type :string} | |
| {:tag 5, :name :gas-wanted, :scalar? true, :type :int64} | |
| {:tag 6, :name :gas-used, :scalar? true, :type :int64} | |
| {:tag 7, | |
| :name :tags, | |
| :repeated? true, | |
| :type :com.github.jtendermint.jabci.types/kv-pair} | |
| {:tag 8, :name :codespace, :scalar? true, :type :string}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "ResponseCheckTx"}, | |
| :com.google.protobuf/descriptor-proto | |
| {:fields | |
| [{:tag 1, :name :name, :optional? true, :scalar? true, :type :string} | |
| {:tag 2, | |
| :name :field, | |
| :repeated? true, | |
| :type :com.google.protobuf/field-descriptor-proto} | |
| {:tag 6, | |
| :name :extension, | |
| :repeated? true, | |
| :type :com.google.protobuf/field-descriptor-proto} | |
| {:tag 3, | |
| :name :nested-type, | |
| :repeated? true, | |
| :type :com.google.protobuf/descriptor-proto} | |
| {:tag 4, | |
| :name :enum-type, | |
| :repeated? true, | |
| :type :com.google.protobuf/enum-descriptor-proto} | |
| {:tag 5, | |
| :name :extension-range | |
| , | |
| :repeated? true, | |
| :type :com.google.protobuf/extension-range} | |
| {:tag 8, | |
| :name :oneof-decl, | |
| :repeated? true, | |
| :type :com.google.protobuf/oneof-descriptor-proto} | |
| {:tag 7, | |
| :name :options, | |
| :optional? true, | |
| :type :com.google.protobuf/message-options} | |
| {:tag 9, | |
| :name :reserved-range, | |
| :repeated? true, | |
| :type :com.google.protobuf/reserved-range} | |
| {:tag 10, | |
| :name :reserved-name, | |
| :repeated? true, | |
| :scalar? true, | |
| :type :string}], | |
| :package "com.google.protobuf", | |
| :name "DescriptorProto"}, | |
| :com.github.jtendermint.jabci.types/response-begin-block | |
| {:fields | |
| [{:tag 1, | |
| :name :tags, | |
| :repeated? true, | |
| :type :com.github.jtendermint.jabci.types/kv-pair}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "ResponseBeginBlock"}, | |
| :com.github.jtendermint.jabci.types/block-id | |
| {:fields | |
| [{:tag 1, :name :hash, :scalar? true, :type :bytes} | |
| {:tag 2, | |
| :name :parts-header, | |
| :type :com.github.jtendermint.jabci.types/part-set-header}], | |
| :package | |
| "com.github.jtendermint.jabci.types", | |
| :name "BlockID"}, | |
| :com.github.jtendermint.jabci.types/header | |
| {:fields | |
| [{:tag 1, | |
| :name :version, | |
| :type :com.github.jtendermint.jabci.types/version} | |
| {:tag 2, :name :chain-id, :scalar? true, :type :string} | |
| {:tag 3, :name :height, :scalar? true, :type :int64} | |
| {:tag 4, | |
| :name :time, | |
| :type :com.github.jtendermint.jabci.types/timestamp} | |
| {:tag 5, :name :num-txs, :scalar? true, :type :int64} | |
| {:tag 6, :name :total-txs, :scalar? true, :type :int64} | |
| {:tag 7, | |
| :name :last-block-id, | |
| :type :com.github.jtendermint.jabci.types/block-id} | |
| {:tag 8, :name :last-commit-hash, :scalar? true, :type :bytes} | |
| {:tag 9, :name :data-hash, :scalar? true, :type :bytes} | |
| {:tag 10, :name :validators-hash, :scalar? true, :type :bytes} | |
| {:tag 11, :name :next-validators-hash, :scalar? true, :type :bytes} | |
| {:tag 12, :name :consensus-hash, :scalar? true, :type :bytes} | |
| {:tag 13, :name :app-hash, :scalar? true, :type :bytes} | |
| {:tag 14, :name :last-results-hash | |
| , :scalar? true, :type :bytes} | |
| {:tag 15, :name :evidence-hash, :scalar? true, :type :bytes} | |
| {:tag 16, :name :proposer-address, :scalar? true, :type :bytes}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "Header"}, | |
| :com.github.jtendermint.jabci.types/vote-info | |
| {:fields | |
| [{:tag 1, | |
| :name :validator, | |
| :type :com.github.jtendermint.jabci.types/validator} | |
| {:tag 2, :name :signed-last-block, :scalar? true, :type :boolean}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "VoteInfo"}, | |
| :com.google.protobuf/service-descriptor-proto | |
| {:fields | |
| [{:tag 1, :name :name, :optional? true, :scalar? true, :type :string} | |
| {:tag 2, | |
| :name :method, | |
| :repeated? true, | |
| :type :com.google.protobuf/method-descriptor-proto} | |
| {:tag 3, | |
| :name :options, | |
| :optional? true, | |
| :type :com.google.protobuf/service-options}], | |
| :package "com.google.protobuf", | |
| :name "ServiceDescriptorProto"}, | |
| :com.github.jtendermint.jabci.types/request-info | |
| {:fields | |
| [{:tag 1, :name :version, :scalar? | |
| true, :type :string} | |
| {:tag 2, :name :block-version, :scalar? true, :type :uint64} | |
| {:tag 3, :name :p-2p-version, :scalar? true, :type :uint64}], | |
| :package "com.github.jtendermint.jabci.types", | |
| :name "RequestInfo"}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment