fabric-gateway 0.0.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.editorconfig +3 -0
- data/.github/workflows/rspec.yml +37 -0
- data/.github/workflows/rubocop.yml +28 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +23 -0
- data/.ruby-version +1 -0
- data/.vscode/settings.json +7 -0
- data/.yardopts +2 -0
- data/CODE_OF_CONDUCT.md +105 -46
- data/Gemfile +5 -3
- data/LICENSE.txt +1 -1
- data/README.md +105 -7
- data/Rakefile +7 -3
- data/bin/console +4 -3
- data/bin/regenerate +19 -0
- data/bin/release +5 -0
- data/fabric-gateway.gemspec +32 -17
- data/lib/common/common_pb.rb +113 -0
- data/lib/common/policies_pb.rb +61 -0
- data/lib/fabric/accessors/contract.rb +51 -0
- data/lib/fabric/accessors/gateway.rb +33 -0
- data/lib/fabric/accessors/network.rb +40 -0
- data/lib/fabric/client.rb +146 -0
- data/lib/fabric/constants.rb +8 -0
- data/lib/fabric/contract.rb +154 -0
- data/lib/fabric/ec_crypto_suite.rb +199 -0
- data/lib/fabric/entities/envelope.rb +153 -0
- data/lib/fabric/entities/identity.rb +87 -0
- data/lib/fabric/entities/proposal.rb +189 -0
- data/lib/fabric/entities/proposed_transaction.rb +163 -0
- data/lib/fabric/entities/status.rb +32 -0
- data/lib/fabric/entities/transaction.rb +247 -0
- data/lib/fabric/gateway.rb +31 -6
- data/lib/fabric/network.rb +56 -0
- data/lib/fabric/version.rb +5 -0
- data/lib/fabric.rb +57 -0
- data/lib/gossip/message_pb.rb +236 -0
- data/lib/gossip/message_services_pb.rb +31 -0
- data/lib/msp/identities_pb.rb +25 -0
- data/lib/msp/msp_principal_pb.rb +57 -0
- data/lib/orderer/ab_pb.rb +64 -0
- data/lib/orderer/ab_services_pb.rb +30 -0
- data/lib/peer/chaincode_event_pb.rb +19 -0
- data/lib/peer/chaincode_pb.rb +69 -0
- data/lib/peer/proposal_pb.rb +41 -0
- data/lib/peer/proposal_response_pb.rb +52 -0
- data/lib/peer/transaction_pb.rb +74 -0
- metadata +184 -10
- data/lib/fabric/gateway/version.rb +0 -5
@@ -0,0 +1,236 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: gossip/message.proto
|
3
|
+
|
4
|
+
require 'peer/collection_pb'
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
+
add_file("gossip/message.proto", :syntax => :proto3) do
|
9
|
+
add_message "gossip.Envelope" do
|
10
|
+
optional :payload, :bytes, 1
|
11
|
+
optional :signature, :bytes, 2
|
12
|
+
optional :secret_envelope, :message, 3, "gossip.SecretEnvelope"
|
13
|
+
end
|
14
|
+
add_message "gossip.SecretEnvelope" do
|
15
|
+
optional :payload, :bytes, 1
|
16
|
+
optional :signature, :bytes, 2
|
17
|
+
end
|
18
|
+
add_message "gossip.Secret" do
|
19
|
+
oneof :content do
|
20
|
+
optional :internalEndpoint, :string, 1
|
21
|
+
end
|
22
|
+
end
|
23
|
+
add_message "gossip.GossipMessage" do
|
24
|
+
optional :nonce, :uint64, 1
|
25
|
+
optional :channel, :bytes, 2
|
26
|
+
optional :tag, :enum, 3, "gossip.GossipMessage.Tag"
|
27
|
+
oneof :content do
|
28
|
+
optional :alive_msg, :message, 5, "gossip.AliveMessage"
|
29
|
+
optional :mem_req, :message, 6, "gossip.MembershipRequest"
|
30
|
+
optional :mem_res, :message, 7, "gossip.MembershipResponse"
|
31
|
+
optional :data_msg, :message, 8, "gossip.DataMessage"
|
32
|
+
optional :hello, :message, 9, "gossip.GossipHello"
|
33
|
+
optional :data_dig, :message, 10, "gossip.DataDigest"
|
34
|
+
optional :data_req, :message, 11, "gossip.DataRequest"
|
35
|
+
optional :data_update, :message, 12, "gossip.DataUpdate"
|
36
|
+
optional :empty, :message, 13, "gossip.Empty"
|
37
|
+
optional :conn, :message, 14, "gossip.ConnEstablish"
|
38
|
+
optional :state_info, :message, 15, "gossip.StateInfo"
|
39
|
+
optional :state_snapshot, :message, 16, "gossip.StateInfoSnapshot"
|
40
|
+
optional :state_info_pull_req, :message, 17, "gossip.StateInfoPullRequest"
|
41
|
+
optional :state_request, :message, 18, "gossip.RemoteStateRequest"
|
42
|
+
optional :state_response, :message, 19, "gossip.RemoteStateResponse"
|
43
|
+
optional :leadership_msg, :message, 20, "gossip.LeadershipMessage"
|
44
|
+
optional :peer_identity, :message, 21, "gossip.PeerIdentity"
|
45
|
+
optional :ack, :message, 22, "gossip.Acknowledgement"
|
46
|
+
optional :privateReq, :message, 23, "gossip.RemotePvtDataRequest"
|
47
|
+
optional :privateRes, :message, 24, "gossip.RemotePvtDataResponse"
|
48
|
+
optional :private_data, :message, 25, "gossip.PrivateDataMessage"
|
49
|
+
end
|
50
|
+
end
|
51
|
+
add_enum "gossip.GossipMessage.Tag" do
|
52
|
+
value :UNDEFINED, 0
|
53
|
+
value :EMPTY, 1
|
54
|
+
value :ORG_ONLY, 2
|
55
|
+
value :CHAN_ONLY, 3
|
56
|
+
value :CHAN_AND_ORG, 4
|
57
|
+
value :CHAN_OR_ORG, 5
|
58
|
+
end
|
59
|
+
add_message "gossip.StateInfo" do
|
60
|
+
optional :timestamp, :message, 2, "gossip.PeerTime"
|
61
|
+
optional :pki_id, :bytes, 3
|
62
|
+
optional :channel_MAC, :bytes, 4
|
63
|
+
optional :properties, :message, 5, "gossip.Properties"
|
64
|
+
end
|
65
|
+
add_message "gossip.Properties" do
|
66
|
+
optional :ledger_height, :uint64, 1
|
67
|
+
optional :left_channel, :bool, 2
|
68
|
+
repeated :chaincodes, :message, 3, "gossip.Chaincode"
|
69
|
+
end
|
70
|
+
add_message "gossip.StateInfoSnapshot" do
|
71
|
+
repeated :elements, :message, 1, "gossip.Envelope"
|
72
|
+
end
|
73
|
+
add_message "gossip.StateInfoPullRequest" do
|
74
|
+
optional :channel_MAC, :bytes, 1
|
75
|
+
end
|
76
|
+
add_message "gossip.ConnEstablish" do
|
77
|
+
optional :pki_id, :bytes, 1
|
78
|
+
optional :identity, :bytes, 2
|
79
|
+
optional :tls_cert_hash, :bytes, 3
|
80
|
+
optional :probe, :bool, 4
|
81
|
+
end
|
82
|
+
add_message "gossip.PeerIdentity" do
|
83
|
+
optional :pki_id, :bytes, 1
|
84
|
+
optional :cert, :bytes, 2
|
85
|
+
optional :metadata, :bytes, 3
|
86
|
+
end
|
87
|
+
add_message "gossip.DataRequest" do
|
88
|
+
optional :nonce, :uint64, 1
|
89
|
+
repeated :digests, :bytes, 2
|
90
|
+
optional :msg_type, :enum, 3, "gossip.PullMsgType"
|
91
|
+
end
|
92
|
+
add_message "gossip.GossipHello" do
|
93
|
+
optional :nonce, :uint64, 1
|
94
|
+
optional :metadata, :bytes, 2
|
95
|
+
optional :msg_type, :enum, 3, "gossip.PullMsgType"
|
96
|
+
end
|
97
|
+
add_message "gossip.DataUpdate" do
|
98
|
+
optional :nonce, :uint64, 1
|
99
|
+
repeated :data, :message, 2, "gossip.Envelope"
|
100
|
+
optional :msg_type, :enum, 3, "gossip.PullMsgType"
|
101
|
+
end
|
102
|
+
add_message "gossip.DataDigest" do
|
103
|
+
optional :nonce, :uint64, 1
|
104
|
+
repeated :digests, :bytes, 2
|
105
|
+
optional :msg_type, :enum, 3, "gossip.PullMsgType"
|
106
|
+
end
|
107
|
+
add_message "gossip.DataMessage" do
|
108
|
+
optional :payload, :message, 1, "gossip.Payload"
|
109
|
+
end
|
110
|
+
add_message "gossip.PrivateDataMessage" do
|
111
|
+
optional :payload, :message, 1, "gossip.PrivatePayload"
|
112
|
+
end
|
113
|
+
add_message "gossip.Payload" do
|
114
|
+
optional :seq_num, :uint64, 1
|
115
|
+
optional :data, :bytes, 2
|
116
|
+
repeated :private_data, :bytes, 3
|
117
|
+
end
|
118
|
+
add_message "gossip.PrivatePayload" do
|
119
|
+
optional :collection_name, :string, 1
|
120
|
+
optional :namespace, :string, 2
|
121
|
+
optional :tx_id, :string, 3
|
122
|
+
optional :private_rwset, :bytes, 4
|
123
|
+
optional :private_sim_height, :uint64, 5
|
124
|
+
optional :collection_configs, :message, 6, "protos.CollectionConfigPackage"
|
125
|
+
end
|
126
|
+
add_message "gossip.AliveMessage" do
|
127
|
+
optional :membership, :message, 1, "gossip.Member"
|
128
|
+
optional :timestamp, :message, 2, "gossip.PeerTime"
|
129
|
+
optional :identity, :bytes, 4
|
130
|
+
end
|
131
|
+
add_message "gossip.LeadershipMessage" do
|
132
|
+
optional :pki_id, :bytes, 1
|
133
|
+
optional :timestamp, :message, 2, "gossip.PeerTime"
|
134
|
+
optional :is_declaration, :bool, 3
|
135
|
+
end
|
136
|
+
add_message "gossip.PeerTime" do
|
137
|
+
optional :inc_num, :uint64, 1
|
138
|
+
optional :seq_num, :uint64, 2
|
139
|
+
end
|
140
|
+
add_message "gossip.MembershipRequest" do
|
141
|
+
optional :self_information, :message, 1, "gossip.Envelope"
|
142
|
+
repeated :known, :bytes, 2
|
143
|
+
end
|
144
|
+
add_message "gossip.MembershipResponse" do
|
145
|
+
repeated :alive, :message, 1, "gossip.Envelope"
|
146
|
+
repeated :dead, :message, 2, "gossip.Envelope"
|
147
|
+
end
|
148
|
+
add_message "gossip.Member" do
|
149
|
+
optional :endpoint, :string, 1
|
150
|
+
optional :metadata, :bytes, 2
|
151
|
+
optional :pki_id, :bytes, 3
|
152
|
+
end
|
153
|
+
add_message "gossip.Empty" do
|
154
|
+
end
|
155
|
+
add_message "gossip.RemoteStateRequest" do
|
156
|
+
optional :start_seq_num, :uint64, 1
|
157
|
+
optional :end_seq_num, :uint64, 2
|
158
|
+
end
|
159
|
+
add_message "gossip.RemoteStateResponse" do
|
160
|
+
repeated :payloads, :message, 1, "gossip.Payload"
|
161
|
+
end
|
162
|
+
add_message "gossip.RemotePvtDataRequest" do
|
163
|
+
repeated :digests, :message, 1, "gossip.PvtDataDigest"
|
164
|
+
end
|
165
|
+
add_message "gossip.PvtDataDigest" do
|
166
|
+
optional :tx_id, :string, 1
|
167
|
+
optional :namespace, :string, 2
|
168
|
+
optional :collection, :string, 3
|
169
|
+
optional :block_seq, :uint64, 4
|
170
|
+
optional :seq_in_block, :uint64, 5
|
171
|
+
end
|
172
|
+
add_message "gossip.RemotePvtDataResponse" do
|
173
|
+
repeated :elements, :message, 1, "gossip.PvtDataElement"
|
174
|
+
end
|
175
|
+
add_message "gossip.PvtDataElement" do
|
176
|
+
optional :digest, :message, 1, "gossip.PvtDataDigest"
|
177
|
+
repeated :payload, :bytes, 2
|
178
|
+
end
|
179
|
+
add_message "gossip.PvtDataPayload" do
|
180
|
+
optional :tx_seq_in_block, :uint64, 1
|
181
|
+
optional :payload, :bytes, 2
|
182
|
+
end
|
183
|
+
add_message "gossip.Acknowledgement" do
|
184
|
+
optional :error, :string, 1
|
185
|
+
end
|
186
|
+
add_message "gossip.Chaincode" do
|
187
|
+
optional :name, :string, 1
|
188
|
+
optional :version, :string, 2
|
189
|
+
optional :metadata, :bytes, 3
|
190
|
+
end
|
191
|
+
add_enum "gossip.PullMsgType" do
|
192
|
+
value :UNDEFINED, 0
|
193
|
+
value :BLOCK_MSG, 1
|
194
|
+
value :IDENTITY_MSG, 2
|
195
|
+
end
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
module Gossip
|
200
|
+
Envelope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.Envelope").msgclass
|
201
|
+
SecretEnvelope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.SecretEnvelope").msgclass
|
202
|
+
Secret = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.Secret").msgclass
|
203
|
+
GossipMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.GossipMessage").msgclass
|
204
|
+
GossipMessage::Tag = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.GossipMessage.Tag").enummodule
|
205
|
+
StateInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.StateInfo").msgclass
|
206
|
+
Properties = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.Properties").msgclass
|
207
|
+
StateInfoSnapshot = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.StateInfoSnapshot").msgclass
|
208
|
+
StateInfoPullRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.StateInfoPullRequest").msgclass
|
209
|
+
ConnEstablish = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.ConnEstablish").msgclass
|
210
|
+
PeerIdentity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.PeerIdentity").msgclass
|
211
|
+
DataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.DataRequest").msgclass
|
212
|
+
GossipHello = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.GossipHello").msgclass
|
213
|
+
DataUpdate = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.DataUpdate").msgclass
|
214
|
+
DataDigest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.DataDigest").msgclass
|
215
|
+
DataMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.DataMessage").msgclass
|
216
|
+
PrivateDataMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.PrivateDataMessage").msgclass
|
217
|
+
Payload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.Payload").msgclass
|
218
|
+
PrivatePayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.PrivatePayload").msgclass
|
219
|
+
AliveMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.AliveMessage").msgclass
|
220
|
+
LeadershipMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.LeadershipMessage").msgclass
|
221
|
+
PeerTime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.PeerTime").msgclass
|
222
|
+
MembershipRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.MembershipRequest").msgclass
|
223
|
+
MembershipResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.MembershipResponse").msgclass
|
224
|
+
Member = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.Member").msgclass
|
225
|
+
Empty = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.Empty").msgclass
|
226
|
+
RemoteStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.RemoteStateRequest").msgclass
|
227
|
+
RemoteStateResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.RemoteStateResponse").msgclass
|
228
|
+
RemotePvtDataRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.RemotePvtDataRequest").msgclass
|
229
|
+
PvtDataDigest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.PvtDataDigest").msgclass
|
230
|
+
RemotePvtDataResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.RemotePvtDataResponse").msgclass
|
231
|
+
PvtDataElement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.PvtDataElement").msgclass
|
232
|
+
PvtDataPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.PvtDataPayload").msgclass
|
233
|
+
Acknowledgement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.Acknowledgement").msgclass
|
234
|
+
Chaincode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.Chaincode").msgclass
|
235
|
+
PullMsgType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gossip.PullMsgType").enummodule
|
236
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: gossip/message.proto for package 'gossip'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright the Hyperledger Fabric contributors. All rights reserved.
|
5
|
+
#
|
6
|
+
# SPDX-License-Identifier: Apache-2.0
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'grpc'
|
10
|
+
require 'gossip/message_pb'
|
11
|
+
|
12
|
+
module Gossip
|
13
|
+
module Gossip
|
14
|
+
# Gossip
|
15
|
+
class Service
|
16
|
+
|
17
|
+
include ::GRPC::GenericService
|
18
|
+
|
19
|
+
self.marshal_class_method = :encode
|
20
|
+
self.unmarshal_class_method = :decode
|
21
|
+
self.service_name = 'gossip.Gossip'
|
22
|
+
|
23
|
+
# GossipStream is the gRPC stream used for sending and receiving messages
|
24
|
+
rpc :GossipStream, stream(::Gossip::Envelope), stream(::Gossip::Envelope)
|
25
|
+
# Ping is used to probe a remote peer's aliveness
|
26
|
+
rpc :Ping, ::Gossip::Empty, ::Gossip::Empty
|
27
|
+
end
|
28
|
+
|
29
|
+
Stub = Service.rpc_stub_class
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: msp/identities.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_file("msp/identities.proto", :syntax => :proto3) do
|
8
|
+
add_message "msp.SerializedIdentity" do
|
9
|
+
optional :mspid, :string, 1
|
10
|
+
optional :id_bytes, :bytes, 2
|
11
|
+
end
|
12
|
+
add_message "msp.SerializedIdemixIdentity" do
|
13
|
+
optional :nym_x, :bytes, 1
|
14
|
+
optional :nym_y, :bytes, 2
|
15
|
+
optional :ou, :bytes, 3
|
16
|
+
optional :role, :bytes, 4
|
17
|
+
optional :proof, :bytes, 5
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
module Msp
|
23
|
+
SerializedIdentity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("msp.SerializedIdentity").msgclass
|
24
|
+
SerializedIdemixIdentity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("msp.SerializedIdemixIdentity").msgclass
|
25
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: msp/msp_principal.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_file("msp/msp_principal.proto", :syntax => :proto3) do
|
8
|
+
add_message "common.MSPPrincipal" do
|
9
|
+
optional :principal_classification, :enum, 1, "common.MSPPrincipal.Classification"
|
10
|
+
optional :principal, :bytes, 2
|
11
|
+
end
|
12
|
+
add_enum "common.MSPPrincipal.Classification" do
|
13
|
+
value :ROLE, 0
|
14
|
+
value :ORGANIZATION_UNIT, 1
|
15
|
+
value :IDENTITY, 2
|
16
|
+
value :ANONYMITY, 3
|
17
|
+
value :COMBINED, 4
|
18
|
+
end
|
19
|
+
add_message "common.OrganizationUnit" do
|
20
|
+
optional :msp_identifier, :string, 1
|
21
|
+
optional :organizational_unit_identifier, :string, 2
|
22
|
+
optional :certifiers_identifier, :bytes, 3
|
23
|
+
end
|
24
|
+
add_message "common.MSPRole" do
|
25
|
+
optional :msp_identifier, :string, 1
|
26
|
+
optional :role, :enum, 2, "common.MSPRole.MSPRoleType"
|
27
|
+
end
|
28
|
+
add_enum "common.MSPRole.MSPRoleType" do
|
29
|
+
value :MEMBER, 0
|
30
|
+
value :ADMIN, 1
|
31
|
+
value :CLIENT, 2
|
32
|
+
value :PEER, 3
|
33
|
+
value :ORDERER, 4
|
34
|
+
end
|
35
|
+
add_message "common.MSPIdentityAnonymity" do
|
36
|
+
optional :anonymity_type, :enum, 1, "common.MSPIdentityAnonymity.MSPIdentityAnonymityType"
|
37
|
+
end
|
38
|
+
add_enum "common.MSPIdentityAnonymity.MSPIdentityAnonymityType" do
|
39
|
+
value :NOMINAL, 0
|
40
|
+
value :ANONYMOUS, 1
|
41
|
+
end
|
42
|
+
add_message "common.CombinedPrincipal" do
|
43
|
+
repeated :principals, :message, 1, "common.MSPPrincipal"
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
module Common
|
49
|
+
MSPPrincipal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("common.MSPPrincipal").msgclass
|
50
|
+
MSPPrincipal::Classification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("common.MSPPrincipal.Classification").enummodule
|
51
|
+
OrganizationUnit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("common.OrganizationUnit").msgclass
|
52
|
+
MSPRole = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("common.MSPRole").msgclass
|
53
|
+
MSPRole::MSPRoleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("common.MSPRole.MSPRoleType").enummodule
|
54
|
+
MSPIdentityAnonymity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("common.MSPIdentityAnonymity").msgclass
|
55
|
+
MSPIdentityAnonymity::MSPIdentityAnonymityType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("common.MSPIdentityAnonymity.MSPIdentityAnonymityType").enummodule
|
56
|
+
CombinedPrincipal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("common.CombinedPrincipal").msgclass
|
57
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: orderer/ab.proto
|
3
|
+
|
4
|
+
require 'common/common_pb'
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
+
add_file("orderer/ab.proto", :syntax => :proto3) do
|
9
|
+
add_message "orderer.BroadcastResponse" do
|
10
|
+
optional :status, :enum, 1, "common.Status"
|
11
|
+
optional :info, :string, 2
|
12
|
+
end
|
13
|
+
add_message "orderer.SeekNewest" do
|
14
|
+
end
|
15
|
+
add_message "orderer.SeekOldest" do
|
16
|
+
end
|
17
|
+
add_message "orderer.SeekSpecified" do
|
18
|
+
optional :number, :uint64, 1
|
19
|
+
end
|
20
|
+
add_message "orderer.SeekNextCommit" do
|
21
|
+
end
|
22
|
+
add_message "orderer.SeekPosition" do
|
23
|
+
oneof :Type do
|
24
|
+
optional :newest, :message, 1, "orderer.SeekNewest"
|
25
|
+
optional :oldest, :message, 2, "orderer.SeekOldest"
|
26
|
+
optional :specified, :message, 3, "orderer.SeekSpecified"
|
27
|
+
optional :next_commit, :message, 4, "orderer.SeekNextCommit"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
add_message "orderer.SeekInfo" do
|
31
|
+
optional :start, :message, 1, "orderer.SeekPosition"
|
32
|
+
optional :stop, :message, 2, "orderer.SeekPosition"
|
33
|
+
optional :behavior, :enum, 3, "orderer.SeekInfo.SeekBehavior"
|
34
|
+
optional :error_response, :enum, 4, "orderer.SeekInfo.SeekErrorResponse"
|
35
|
+
end
|
36
|
+
add_enum "orderer.SeekInfo.SeekBehavior" do
|
37
|
+
value :BLOCK_UNTIL_READY, 0
|
38
|
+
value :FAIL_IF_NOT_READY, 1
|
39
|
+
end
|
40
|
+
add_enum "orderer.SeekInfo.SeekErrorResponse" do
|
41
|
+
value :STRICT, 0
|
42
|
+
value :BEST_EFFORT, 1
|
43
|
+
end
|
44
|
+
add_message "orderer.DeliverResponse" do
|
45
|
+
oneof :Type do
|
46
|
+
optional :status, :enum, 1, "common.Status"
|
47
|
+
optional :block, :message, 2, "common.Block"
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
module Orderer
|
54
|
+
BroadcastResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.BroadcastResponse").msgclass
|
55
|
+
SeekNewest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.SeekNewest").msgclass
|
56
|
+
SeekOldest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.SeekOldest").msgclass
|
57
|
+
SeekSpecified = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.SeekSpecified").msgclass
|
58
|
+
SeekNextCommit = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.SeekNextCommit").msgclass
|
59
|
+
SeekPosition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.SeekPosition").msgclass
|
60
|
+
SeekInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.SeekInfo").msgclass
|
61
|
+
SeekInfo::SeekBehavior = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.SeekInfo.SeekBehavior").enummodule
|
62
|
+
SeekInfo::SeekErrorResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.SeekInfo.SeekErrorResponse").enummodule
|
63
|
+
DeliverResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("orderer.DeliverResponse").msgclass
|
64
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: orderer/ab.proto for package 'orderer'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright the Hyperledger Fabric contributors. All rights reserved.
|
5
|
+
#
|
6
|
+
# SPDX-License-Identifier: Apache-2.0
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'grpc'
|
10
|
+
require 'orderer/ab_pb'
|
11
|
+
|
12
|
+
module Orderer
|
13
|
+
module AtomicBroadcast
|
14
|
+
class Service
|
15
|
+
|
16
|
+
include ::GRPC::GenericService
|
17
|
+
|
18
|
+
self.marshal_class_method = :encode
|
19
|
+
self.unmarshal_class_method = :decode
|
20
|
+
self.service_name = 'orderer.AtomicBroadcast'
|
21
|
+
|
22
|
+
# broadcast receives a reply of Acknowledgement for each common.Envelope in order, indicating success or type of failure
|
23
|
+
rpc :Broadcast, stream(::Common::Envelope), stream(::Orderer::BroadcastResponse)
|
24
|
+
# deliver first requires an Envelope of type DELIVER_SEEK_INFO with Payload data as a mashaled SeekInfo message, then a stream of block replies is received.
|
25
|
+
rpc :Deliver, stream(::Common::Envelope), stream(::Orderer::DeliverResponse)
|
26
|
+
end
|
27
|
+
|
28
|
+
Stub = Service.rpc_stub_class
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,19 @@
|
|
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_file("peer/chaincode_event.proto", :syntax => :proto3) do
|
8
|
+
add_message "protos.ChaincodeEvent" do
|
9
|
+
optional :chaincode_id, :string, 1
|
10
|
+
optional :tx_id, :string, 2
|
11
|
+
optional :event_name, :string, 3
|
12
|
+
optional :payload, :bytes, 4
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
module Protos
|
18
|
+
ChaincodeEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeEvent").msgclass
|
19
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: peer/chaincode.proto
|
3
|
+
|
4
|
+
require 'common/policies_pb'
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
+
add_file("peer/chaincode.proto", :syntax => :proto3) do
|
9
|
+
add_message "protos.ChaincodeID" do
|
10
|
+
optional :path, :string, 1
|
11
|
+
optional :name, :string, 2
|
12
|
+
optional :version, :string, 3
|
13
|
+
end
|
14
|
+
add_message "protos.ChaincodeInput" do
|
15
|
+
repeated :args, :bytes, 1
|
16
|
+
map :decorations, :string, :bytes, 2
|
17
|
+
optional :is_init, :bool, 3
|
18
|
+
end
|
19
|
+
add_message "protos.ChaincodeSpec" do
|
20
|
+
optional :type, :enum, 1, "protos.ChaincodeSpec.Type"
|
21
|
+
optional :chaincode_id, :message, 2, "protos.ChaincodeID"
|
22
|
+
optional :input, :message, 3, "protos.ChaincodeInput"
|
23
|
+
optional :timeout, :int32, 4
|
24
|
+
end
|
25
|
+
add_enum "protos.ChaincodeSpec.Type" do
|
26
|
+
value :UNDEFINED, 0
|
27
|
+
value :GOLANG, 1
|
28
|
+
value :NODE, 2
|
29
|
+
value :CAR, 3
|
30
|
+
value :JAVA, 4
|
31
|
+
end
|
32
|
+
add_message "protos.ChaincodeDeploymentSpec" do
|
33
|
+
optional :chaincode_spec, :message, 1, "protos.ChaincodeSpec"
|
34
|
+
optional :code_package, :bytes, 3
|
35
|
+
end
|
36
|
+
add_message "protos.ChaincodeInvocationSpec" do
|
37
|
+
optional :chaincode_spec, :message, 1, "protos.ChaincodeSpec"
|
38
|
+
end
|
39
|
+
add_message "protos.LifecycleEvent" do
|
40
|
+
optional :chaincode_name, :string, 1
|
41
|
+
end
|
42
|
+
add_message "protos.CDSData" do
|
43
|
+
optional :hash, :bytes, 1
|
44
|
+
optional :metadatahash, :bytes, 2
|
45
|
+
end
|
46
|
+
add_message "protos.ChaincodeData" do
|
47
|
+
optional :name, :string, 1
|
48
|
+
optional :version, :string, 2
|
49
|
+
optional :escc, :string, 3
|
50
|
+
optional :vscc, :string, 4
|
51
|
+
optional :policy, :message, 5, "common.SignaturePolicyEnvelope"
|
52
|
+
optional :data, :bytes, 6
|
53
|
+
optional :id, :bytes, 7
|
54
|
+
optional :instantiation_policy, :message, 8, "common.SignaturePolicyEnvelope"
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
module Protos
|
60
|
+
ChaincodeID = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeID").msgclass
|
61
|
+
ChaincodeInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeInput").msgclass
|
62
|
+
ChaincodeSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeSpec").msgclass
|
63
|
+
ChaincodeSpec::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeSpec.Type").enummodule
|
64
|
+
ChaincodeDeploymentSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeDeploymentSpec").msgclass
|
65
|
+
ChaincodeInvocationSpec = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeInvocationSpec").msgclass
|
66
|
+
LifecycleEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.LifecycleEvent").msgclass
|
67
|
+
CDSData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.CDSData").msgclass
|
68
|
+
ChaincodeData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeData").msgclass
|
69
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: peer/proposal.proto
|
3
|
+
|
4
|
+
require 'peer/chaincode_pb'
|
5
|
+
require 'peer/proposal_response_pb'
|
6
|
+
require 'google/protobuf'
|
7
|
+
|
8
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
+
add_file("peer/proposal.proto", :syntax => :proto3) do
|
10
|
+
add_message "protos.SignedProposal" do
|
11
|
+
optional :proposal_bytes, :bytes, 1
|
12
|
+
optional :signature, :bytes, 2
|
13
|
+
end
|
14
|
+
add_message "protos.Proposal" do
|
15
|
+
optional :header, :bytes, 1
|
16
|
+
optional :payload, :bytes, 2
|
17
|
+
optional :extension, :bytes, 3
|
18
|
+
end
|
19
|
+
add_message "protos.ChaincodeHeaderExtension" do
|
20
|
+
optional :chaincode_id, :message, 2, "protos.ChaincodeID"
|
21
|
+
end
|
22
|
+
add_message "protos.ChaincodeProposalPayload" do
|
23
|
+
optional :input, :bytes, 1
|
24
|
+
map :TransientMap, :string, :bytes, 2
|
25
|
+
end
|
26
|
+
add_message "protos.ChaincodeAction" do
|
27
|
+
optional :results, :bytes, 1
|
28
|
+
optional :events, :bytes, 2
|
29
|
+
optional :response, :message, 3, "protos.Response"
|
30
|
+
optional :chaincode_id, :message, 4, "protos.ChaincodeID"
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
module Protos
|
36
|
+
SignedProposal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.SignedProposal").msgclass
|
37
|
+
Proposal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.Proposal").msgclass
|
38
|
+
ChaincodeHeaderExtension = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeHeaderExtension").msgclass
|
39
|
+
ChaincodeProposalPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeProposalPayload").msgclass
|
40
|
+
ChaincodeAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeAction").msgclass
|
41
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: peer/proposal_response.proto
|
3
|
+
|
4
|
+
require 'google/protobuf/timestamp_pb'
|
5
|
+
require 'common/policies_pb'
|
6
|
+
require 'google/protobuf'
|
7
|
+
|
8
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
+
add_file("peer/proposal_response.proto", :syntax => :proto3) do
|
10
|
+
add_message "protos.ProposalResponse" do
|
11
|
+
optional :version, :int32, 1
|
12
|
+
optional :timestamp, :message, 2, "google.protobuf.Timestamp"
|
13
|
+
optional :response, :message, 4, "protos.Response"
|
14
|
+
optional :payload, :bytes, 5
|
15
|
+
optional :endorsement, :message, 6, "protos.Endorsement"
|
16
|
+
optional :interest, :message, 7, "protos.ChaincodeInterest"
|
17
|
+
end
|
18
|
+
add_message "protos.Response" do
|
19
|
+
optional :status, :int32, 1
|
20
|
+
optional :message, :string, 2
|
21
|
+
optional :payload, :bytes, 3
|
22
|
+
end
|
23
|
+
add_message "protos.ProposalResponsePayload" do
|
24
|
+
optional :proposal_hash, :bytes, 1
|
25
|
+
optional :extension, :bytes, 2
|
26
|
+
end
|
27
|
+
add_message "protos.Endorsement" do
|
28
|
+
optional :endorser, :bytes, 1
|
29
|
+
optional :signature, :bytes, 2
|
30
|
+
end
|
31
|
+
add_message "protos.ChaincodeInterest" do
|
32
|
+
repeated :chaincodes, :message, 1, "protos.ChaincodeCall"
|
33
|
+
end
|
34
|
+
add_message "protos.ChaincodeCall" do
|
35
|
+
optional :name, :string, 1
|
36
|
+
repeated :collection_names, :string, 2
|
37
|
+
optional :no_private_reads, :bool, 3
|
38
|
+
optional :no_public_writes, :bool, 4
|
39
|
+
repeated :key_policies, :message, 5, "common.SignaturePolicyEnvelope"
|
40
|
+
optional :disregard_namespace_policy, :bool, 6
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
module Protos
|
46
|
+
ProposalResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ProposalResponse").msgclass
|
47
|
+
Response = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.Response").msgclass
|
48
|
+
ProposalResponsePayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ProposalResponsePayload").msgclass
|
49
|
+
Endorsement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.Endorsement").msgclass
|
50
|
+
ChaincodeInterest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeInterest").msgclass
|
51
|
+
ChaincodeCall = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeCall").msgclass
|
52
|
+
end
|