hyperledger-fabric-sdk 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. checksums.yaml +7 -0
  2. data/lib/crypto_suite/ecdsa_aes.rb +86 -0
  3. data/lib/fabric/channel.rb +54 -0
  4. data/lib/fabric/client.rb +45 -0
  5. data/lib/fabric/configuration.rb +25 -0
  6. data/lib/fabric/constants.rb +18 -0
  7. data/lib/fabric/identity.rb +36 -0
  8. data/lib/fabric/orderer.rb +19 -0
  9. data/lib/fabric/peer.rb +58 -0
  10. data/lib/fabric/peer_endorser.rb +85 -0
  11. data/lib/fabric/transaction_id.rb +11 -0
  12. data/lib/fabric/user.rb +24 -0
  13. data/lib/fabric/version.rb +3 -0
  14. data/lib/fabric_ca/client.rb +51 -0
  15. data/lib/fabric_ca/configuration.rb +25 -0
  16. data/lib/fabric_ca/connection.rb +32 -0
  17. data/lib/fabric_ca/error.rb +11 -0
  18. data/lib/fabric_ca/faraday_middleware/basic_auth.rb +33 -0
  19. data/lib/fabric_ca/faraday_middleware/raise_http_exception.rb +47 -0
  20. data/lib/fabric_ca/faraday_middleware/token_auth.rb +38 -0
  21. data/lib/fabric_ca/request.rb +50 -0
  22. data/lib/fabric_ca/response.rb +10 -0
  23. data/lib/fabric_ca/tools.rb +35 -0
  24. data/lib/fabric_ca/version.rb +3 -0
  25. data/lib/hyperledger-fabric-sdk.rb +47 -0
  26. data/lib/protos/common/collection_pb.rb +42 -0
  27. data/lib/protos/common/common_pb.rb +106 -0
  28. data/lib/protos/common/configtx_pb.rb +71 -0
  29. data/lib/protos/common/configuration_pb.rb +33 -0
  30. data/lib/protos/common/ledger_pb.rb +16 -0
  31. data/lib/protos/common/policies_pb.rb +52 -0
  32. data/lib/protos/discovery/protocol_pb.rb +119 -0
  33. data/lib/protos/discovery/protocol_services_pb.rb +30 -0
  34. data/lib/protos/gossip/message_pb.rb +233 -0
  35. data/lib/protos/gossip/message_services_pb.rb +31 -0
  36. data/lib/protos/idemix/idemix_pb.rb +93 -0
  37. data/lib/protos/ledger/queryresult/kv_query_result_pb.rb +24 -0
  38. data/lib/protos/ledger/rwset/kvrwset/kv_rwset_pb.rb +85 -0
  39. data/lib/protos/ledger/rwset/rwset_pb.rb +46 -0
  40. data/lib/protos/msp/identities_pb.rb +23 -0
  41. data/lib/protos/msp/msp_config_pb.rb +72 -0
  42. data/lib/protos/msp/msp_principal_pb.rb +54 -0
  43. data/lib/protos/orderer/ab_pb.rb +52 -0
  44. data/lib/protos/orderer/ab_services_pb.rb +41 -0
  45. data/lib/protos/orderer/configuration_pb.rb +32 -0
  46. data/lib/protos/orderer/kafka_pb.rb +45 -0
  47. data/lib/protos/peer/admin_pb.rb +41 -0
  48. data/lib/protos/peer/admin_services_pb.rb +33 -0
  49. data/lib/protos/peer/chaincode_event_pb.rb +17 -0
  50. data/lib/protos/peer/chaincode_pb.rb +60 -0
  51. data/lib/protos/peer/chaincode_shim_pb.rb +94 -0
  52. data/lib/protos/peer/chaincode_shim_services_pb.rb +30 -0
  53. data/lib/protos/peer/configuration_pb.rb +27 -0
  54. data/lib/protos/peer/events_pb.rb +98 -0
  55. data/lib/protos/peer/events_services_pb.rb +59 -0
  56. data/lib/protos/peer/peer_pb.rb +21 -0
  57. data/lib/protos/peer/peer_services_pb.rb +37 -0
  58. data/lib/protos/peer/proposal_pb.rb +40 -0
  59. data/lib/protos/peer/proposal_response_pb.rb +35 -0
  60. data/lib/protos/peer/query_pb.rb +32 -0
  61. data/lib/protos/peer/resources_pb.rb +34 -0
  62. data/lib/protos/peer/signed_cc_dep_spec_pb.rb +17 -0
  63. data/lib/protos/peer/transaction_pb.rb +72 -0
  64. data/lib/protos/transientstore/transientstore_pb.rb +18 -0
  65. metadata +123 -0
@@ -0,0 +1,17 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: peer/chaincode_event.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_message "protos.ChaincodeEvent" do
8
+ optional :chaincode_id, :string, 1
9
+ optional :tx_id, :string, 2
10
+ optional :event_name, :string, 3
11
+ optional :payload, :bytes, 4
12
+ end
13
+ end
14
+
15
+ module Protos
16
+ ChaincodeEvent = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeEvent").msgclass
17
+ end
@@ -0,0 +1,60 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: peer/chaincode.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_message "protos.ChaincodeID" do
8
+ optional :path, :string, 1
9
+ optional :name, :string, 2
10
+ optional :version, :string, 3
11
+ end
12
+ add_message "protos.ChaincodeInput" do
13
+ repeated :args, :bytes, 1
14
+ map :decorations, :string, :bytes, 2
15
+ end
16
+ add_message "protos.ChaincodeSpec" do
17
+ optional :type, :enum, 1, "protos.ChaincodeSpec.Type"
18
+ optional :chaincode_id, :message, 2, "protos.ChaincodeID"
19
+ optional :input, :message, 3, "protos.ChaincodeInput"
20
+ optional :timeout, :int32, 4
21
+ end
22
+ add_enum "protos.ChaincodeSpec.Type" do
23
+ value :UNDEFINED, 0
24
+ value :GOLANG, 1
25
+ value :NODE, 2
26
+ value :CAR, 3
27
+ value :JAVA, 4
28
+ end
29
+ add_message "protos.ChaincodeDeploymentSpec" do
30
+ optional :chaincode_spec, :message, 1, "protos.ChaincodeSpec"
31
+ optional :code_package, :bytes, 3
32
+ optional :exec_env, :enum, 4, "protos.ChaincodeDeploymentSpec.ExecutionEnvironment"
33
+ end
34
+ add_enum "protos.ChaincodeDeploymentSpec.ExecutionEnvironment" do
35
+ value :DOCKER, 0
36
+ value :SYSTEM, 1
37
+ end
38
+ add_message "protos.ChaincodeInvocationSpec" do
39
+ optional :chaincode_spec, :message, 1, "protos.ChaincodeSpec"
40
+ end
41
+ add_message "protos.LifecycleEvent" do
42
+ optional :chaincode_name, :string, 1
43
+ end
44
+ add_enum "protos.ConfidentialityLevel" do
45
+ value :PUBLIC, 0
46
+ value :CONFIDENTIAL, 1
47
+ end
48
+ end
49
+
50
+ module Protos
51
+ ChaincodeID = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeID").msgclass
52
+ ChaincodeInput = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeInput").msgclass
53
+ ChaincodeSpec = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeSpec").msgclass
54
+ ChaincodeSpec::Type = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeSpec.Type").enummodule
55
+ ChaincodeDeploymentSpec = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeDeploymentSpec").msgclass
56
+ ChaincodeDeploymentSpec::ExecutionEnvironment = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeDeploymentSpec.ExecutionEnvironment").enummodule
57
+ ChaincodeInvocationSpec = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeInvocationSpec").msgclass
58
+ LifecycleEvent = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.LifecycleEvent").msgclass
59
+ ConfidentialityLevel = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ConfidentialityLevel").enummodule
60
+ end
@@ -0,0 +1,94 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: peer/chaincode_shim.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'peer/chaincode_event_pb'
7
+ require 'peer/proposal_pb'
8
+ require 'google/protobuf/timestamp_pb'
9
+ Google::Protobuf::DescriptorPool.generated_pool.build do
10
+ add_message "protos.ChaincodeMessage" do
11
+ optional :type, :enum, 1, "protos.ChaincodeMessage.Type"
12
+ optional :timestamp, :message, 2, "google.protobuf.Timestamp"
13
+ optional :payload, :bytes, 3
14
+ optional :txid, :string, 4
15
+ optional :proposal, :message, 5, "protos.SignedProposal"
16
+ optional :chaincode_event, :message, 6, "protos.ChaincodeEvent"
17
+ optional :channel_id, :string, 7
18
+ end
19
+ add_enum "protos.ChaincodeMessage.Type" do
20
+ value :UNDEFINED, 0
21
+ value :REGISTER, 1
22
+ value :REGISTERED, 2
23
+ value :INIT, 3
24
+ value :READY, 4
25
+ value :TRANSACTION, 5
26
+ value :COMPLETED, 6
27
+ value :ERROR, 7
28
+ value :GET_STATE, 8
29
+ value :PUT_STATE, 9
30
+ value :DEL_STATE, 10
31
+ value :INVOKE_CHAINCODE, 11
32
+ value :RESPONSE, 13
33
+ value :GET_STATE_BY_RANGE, 14
34
+ value :GET_QUERY_RESULT, 15
35
+ value :QUERY_STATE_NEXT, 16
36
+ value :QUERY_STATE_CLOSE, 17
37
+ value :KEEPALIVE, 18
38
+ value :GET_HISTORY_FOR_KEY, 19
39
+ end
40
+ add_message "protos.GetState" do
41
+ optional :key, :string, 1
42
+ optional :collection, :string, 2
43
+ end
44
+ add_message "protos.PutState" do
45
+ optional :key, :string, 1
46
+ optional :value, :bytes, 2
47
+ optional :collection, :string, 3
48
+ end
49
+ add_message "protos.DelState" do
50
+ optional :key, :string, 1
51
+ optional :collection, :string, 2
52
+ end
53
+ add_message "protos.GetStateByRange" do
54
+ optional :startKey, :string, 1
55
+ optional :endKey, :string, 2
56
+ optional :collection, :string, 3
57
+ end
58
+ add_message "protos.GetQueryResult" do
59
+ optional :query, :string, 1
60
+ optional :collection, :string, 2
61
+ end
62
+ add_message "protos.GetHistoryForKey" do
63
+ optional :key, :string, 1
64
+ end
65
+ add_message "protos.QueryStateNext" do
66
+ optional :id, :string, 1
67
+ end
68
+ add_message "protos.QueryStateClose" do
69
+ optional :id, :string, 1
70
+ end
71
+ add_message "protos.QueryResultBytes" do
72
+ optional :resultBytes, :bytes, 1
73
+ end
74
+ add_message "protos.QueryResponse" do
75
+ repeated :results, :message, 1, "protos.QueryResultBytes"
76
+ optional :has_more, :bool, 2
77
+ optional :id, :string, 3
78
+ end
79
+ end
80
+
81
+ module Protos
82
+ ChaincodeMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeMessage").msgclass
83
+ ChaincodeMessage::Type = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeMessage.Type").enummodule
84
+ GetState = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.GetState").msgclass
85
+ PutState = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.PutState").msgclass
86
+ DelState = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.DelState").msgclass
87
+ GetStateByRange = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.GetStateByRange").msgclass
88
+ GetQueryResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.GetQueryResult").msgclass
89
+ GetHistoryForKey = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.GetHistoryForKey").msgclass
90
+ QueryStateNext = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.QueryStateNext").msgclass
91
+ QueryStateClose = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.QueryStateClose").msgclass
92
+ QueryResultBytes = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.QueryResultBytes").msgclass
93
+ QueryResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.QueryResponse").msgclass
94
+ end
@@ -0,0 +1,30 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: peer/chaincode_shim.proto for package 'protos'
3
+ # Original file comments:
4
+ #
5
+ # Copyright IBM Corp. All Rights Reserved.
6
+ #
7
+ # SPDX-License-Identifier: Apache-2.0
8
+ #
9
+
10
+ require 'grpc'
11
+ require 'peer/chaincode_shim_pb'
12
+
13
+ module Protos
14
+ module ChaincodeSupport
15
+ # Interface that provides support to chaincode execution. ChaincodeContext
16
+ # provides the context necessary for the server to respond appropriately.
17
+ class Service
18
+
19
+ include GRPC::GenericService
20
+
21
+ self.marshal_class_method = :encode
22
+ self.unmarshal_class_method = :decode
23
+ self.service_name = 'protos.ChaincodeSupport'
24
+
25
+ rpc :Register, stream(ChaincodeMessage), stream(ChaincodeMessage)
26
+ end
27
+
28
+ Stub = Service.rpc_stub_class
29
+ end
30
+ end
@@ -0,0 +1,27 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: peer/configuration.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_message "protos.AnchorPeers" do
8
+ repeated :anchor_peers, :message, 1, "protos.AnchorPeer"
9
+ end
10
+ add_message "protos.AnchorPeer" do
11
+ optional :host, :string, 1
12
+ optional :port, :int32, 2
13
+ end
14
+ add_message "protos.APIResource" do
15
+ optional :policy_ref, :string, 1
16
+ end
17
+ add_message "protos.ACLs" do
18
+ map :acls, :string, :message, 1, "protos.APIResource"
19
+ end
20
+ end
21
+
22
+ module Protos
23
+ AnchorPeers = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.AnchorPeers").msgclass
24
+ AnchorPeer = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.AnchorPeer").msgclass
25
+ APIResource = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.APIResource").msgclass
26
+ ACLs = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ACLs").msgclass
27
+ end
@@ -0,0 +1,98 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: peer/events.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'common/common_pb'
7
+ require 'google/protobuf/timestamp_pb'
8
+ require 'peer/chaincode_event_pb'
9
+ require 'peer/transaction_pb'
10
+ Google::Protobuf::DescriptorPool.generated_pool.build do
11
+ add_message "protos.ChaincodeReg" do
12
+ optional :chaincode_id, :string, 1
13
+ optional :event_name, :string, 2
14
+ end
15
+ add_message "protos.Interest" do
16
+ optional :event_type, :enum, 1, "protos.EventType"
17
+ optional :chainID, :string, 3
18
+ oneof :RegInfo do
19
+ optional :chaincode_reg_info, :message, 2, "protos.ChaincodeReg"
20
+ end
21
+ end
22
+ add_message "protos.Register" do
23
+ repeated :events, :message, 1, "protos.Interest"
24
+ end
25
+ add_message "protos.Rejection" do
26
+ optional :tx, :message, 1, "protos.Transaction"
27
+ optional :error_msg, :string, 2
28
+ end
29
+ add_message "protos.Unregister" do
30
+ repeated :events, :message, 1, "protos.Interest"
31
+ end
32
+ add_message "protos.FilteredBlock" do
33
+ optional :channel_id, :string, 1
34
+ optional :number, :uint64, 2
35
+ repeated :filtered_transactions, :message, 4, "protos.FilteredTransaction"
36
+ end
37
+ add_message "protos.FilteredTransaction" do
38
+ optional :txid, :string, 1
39
+ optional :type, :enum, 2, "common.HeaderType"
40
+ optional :tx_validation_code, :enum, 3, "protos.TxValidationCode"
41
+ oneof :Data do
42
+ optional :transaction_actions, :message, 4, "protos.FilteredTransactionActions"
43
+ end
44
+ end
45
+ add_message "protos.FilteredTransactionActions" do
46
+ repeated :chaincode_actions, :message, 1, "protos.FilteredChaincodeAction"
47
+ end
48
+ add_message "protos.FilteredChaincodeAction" do
49
+ optional :chaincode_event, :message, 1, "protos.ChaincodeEvent"
50
+ end
51
+ add_message "protos.SignedEvent" do
52
+ optional :signature, :bytes, 1
53
+ optional :eventBytes, :bytes, 2
54
+ end
55
+ add_message "protos.Event" do
56
+ optional :creator, :bytes, 6
57
+ optional :timestamp, :message, 8, "google.protobuf.Timestamp"
58
+ optional :tls_cert_hash, :bytes, 9
59
+ oneof :Event do
60
+ optional :register, :message, 1, "protos.Register"
61
+ optional :block, :message, 2, "common.Block"
62
+ optional :chaincode_event, :message, 3, "protos.ChaincodeEvent"
63
+ optional :rejection, :message, 4, "protos.Rejection"
64
+ optional :unregister, :message, 5, "protos.Unregister"
65
+ optional :filtered_block, :message, 7, "protos.FilteredBlock"
66
+ end
67
+ end
68
+ add_message "protos.DeliverResponse" do
69
+ oneof :Type do
70
+ optional :status, :enum, 1, "common.Status"
71
+ optional :block, :message, 2, "common.Block"
72
+ optional :filtered_block, :message, 3, "protos.FilteredBlock"
73
+ end
74
+ end
75
+ add_enum "protos.EventType" do
76
+ value :REGISTER, 0
77
+ value :BLOCK, 1
78
+ value :CHAINCODE, 2
79
+ value :REJECTION, 3
80
+ value :FILTEREDBLOCK, 4
81
+ end
82
+ end
83
+
84
+ module Protos
85
+ ChaincodeReg = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeReg").msgclass
86
+ Interest = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.Interest").msgclass
87
+ Register = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.Register").msgclass
88
+ Rejection = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.Rejection").msgclass
89
+ Unregister = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.Unregister").msgclass
90
+ FilteredBlock = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.FilteredBlock").msgclass
91
+ FilteredTransaction = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.FilteredTransaction").msgclass
92
+ FilteredTransactionActions = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.FilteredTransactionActions").msgclass
93
+ FilteredChaincodeAction = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.FilteredChaincodeAction").msgclass
94
+ SignedEvent = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.SignedEvent").msgclass
95
+ Event = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.Event").msgclass
96
+ DeliverResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.DeliverResponse").msgclass
97
+ EventType = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.EventType").enummodule
98
+ end
@@ -0,0 +1,59 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: peer/events.proto for package 'protos'
3
+ # Original file comments:
4
+ #
5
+ # Copyright IBM Corp. 2016 All Rights Reserved.
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+ #
19
+
20
+ require 'grpc'
21
+ require 'peer/events_pb'
22
+
23
+ module Protos
24
+ module Events
25
+ # Interface exported by the events server
26
+ class Service
27
+
28
+ include GRPC::GenericService
29
+
30
+ self.marshal_class_method = :encode
31
+ self.unmarshal_class_method = :decode
32
+ self.service_name = 'protos.Events'
33
+
34
+ # event chatting using Event
35
+ rpc :Chat, stream(SignedEvent), stream(Event)
36
+ end
37
+
38
+ Stub = Service.rpc_stub_class
39
+ end
40
+ module Deliver
41
+ class Service
42
+
43
+ include GRPC::GenericService
44
+
45
+ self.marshal_class_method = :encode
46
+ self.unmarshal_class_method = :decode
47
+ self.service_name = 'protos.Deliver'
48
+
49
+ # deliver first requires an Envelope of type ab.DELIVER_SEEK_INFO with Payload data as a marshaled orderer.SeekInfo message,
50
+ # then a stream of block replies is received.
51
+ rpc :Deliver, stream(Common::Envelope), stream(DeliverResponse)
52
+ # deliver first requires an Envelope of type ab.DELIVER_SEEK_INFO with Payload data as a marshaled orderer.SeekInfo message,
53
+ # then a stream of **filtered** block replies is received.
54
+ rpc :DeliverFiltered, stream(Common::Envelope), stream(DeliverResponse)
55
+ end
56
+
57
+ Stub = Service.rpc_stub_class
58
+ end
59
+ end
@@ -0,0 +1,21 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: peer/peer.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'peer/proposal_pb'
7
+ require 'peer/proposal_response_pb'
8
+ Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_message "protos.PeerID" do
10
+ optional :name, :string, 1
11
+ end
12
+ add_message "protos.PeerEndpoint" do
13
+ optional :id, :message, 1, "protos.PeerID"
14
+ optional :address, :string, 2
15
+ end
16
+ end
17
+
18
+ module Protos
19
+ PeerID = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.PeerID").msgclass
20
+ PeerEndpoint = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.PeerEndpoint").msgclass
21
+ end
@@ -0,0 +1,37 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: peer/peer.proto for package 'protos'
3
+ # Original file comments:
4
+ #
5
+ # Copyright IBM Corp. 2016 All Rights Reserved.
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+
19
+ require 'grpc'
20
+ require 'peer/peer_pb'
21
+
22
+ module Protos
23
+ module Endorser
24
+ class Service
25
+
26
+ include GRPC::GenericService
27
+
28
+ self.marshal_class_method = :encode
29
+ self.unmarshal_class_method = :decode
30
+ self.service_name = 'protos.Endorser'
31
+
32
+ rpc :ProcessProposal, SignedProposal, ProposalResponse
33
+ end
34
+
35
+ Stub = Service.rpc_stub_class
36
+ end
37
+ end