hyperledger-fabric-sdk 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/lib/fabric/block_decoder.rb +299 -0
  3. data/lib/fabric/chaincode_response.rb +47 -0
  4. data/lib/fabric/channel.rb +55 -34
  5. data/lib/fabric/client.rb +107 -25
  6. data/lib/fabric/configuration.rb +12 -4
  7. data/lib/fabric/constants.rb +1 -1
  8. data/lib/fabric/crypto_suite.rb +145 -0
  9. data/lib/fabric/enumerator_queue.rb +26 -0
  10. data/lib/fabric/error.rb +52 -0
  11. data/lib/fabric/event_hub.rb +81 -0
  12. data/lib/fabric/helper.rb +31 -0
  13. data/lib/fabric/identity.rb +25 -19
  14. data/lib/fabric/logger.rb +37 -0
  15. data/lib/fabric/orderer.rb +18 -2
  16. data/lib/fabric/peer.rb +15 -36
  17. data/lib/fabric/proposal.rb +100 -0
  18. data/lib/{protos → fabric/protos}/common/collection_pb.rb +14 -14
  19. data/lib/{protos → fabric/protos}/common/common_pb.rb +37 -36
  20. data/lib/fabric/protos/common/configtx_pb.rb +71 -0
  21. data/lib/{protos → fabric/protos}/common/configuration_pb.rb +13 -13
  22. data/lib/{protos → fabric/protos}/common/ledger_pb.rb +2 -2
  23. data/lib/{protos → fabric/protos}/common/policies_pb.rb +19 -19
  24. data/lib/fabric/protos/discovery/protocol_pb.rb +120 -0
  25. data/lib/{protos → fabric/protos}/discovery/protocol_services_pb.rb +0 -1
  26. data/lib/fabric/protos/gossip/message_pb.rb +233 -0
  27. data/lib/{protos → fabric/protos}/gossip/message_services_pb.rb +0 -1
  28. data/lib/{protos → fabric/protos}/idemix/idemix_pb.rb +37 -37
  29. data/lib/{protos → fabric/protos}/ledger/queryresult/kv_query_result_pb.rb +5 -5
  30. data/lib/fabric/protos/ledger/rwset/kvrwset/kv_rwset_pb.rb +85 -0
  31. data/lib/fabric/protos/ledger/rwset/rwset_pb.rb +46 -0
  32. data/lib/{protos → fabric/protos}/msp/identities_pb.rb +4 -4
  33. data/lib/{protos → fabric/protos}/msp/msp_config_pb.rb +27 -27
  34. data/lib/{protos → fabric/protos}/msp/msp_principal_pb.rb +20 -20
  35. data/lib/fabric/protos/orderer/ab_pb.rb +52 -0
  36. data/lib/{protos → fabric/protos}/orderer/ab_services_pb.rb +0 -1
  37. data/lib/fabric/protos/orderer/cluster_pb.rb +31 -0
  38. data/lib/fabric/protos/orderer/cluster_services_pb.rb +31 -0
  39. data/lib/{protos → fabric/protos}/orderer/configuration_pb.rb +11 -10
  40. data/lib/fabric/protos/orderer/etcdraft/configuration_pb.rb +21 -0
  41. data/lib/{protos → fabric/protos}/orderer/kafka_pb.rb +16 -16
  42. data/lib/{protos → fabric/protos}/peer/admin_pb.rb +12 -12
  43. data/lib/{protos → fabric/protos}/peer/admin_services_pb.rb +0 -1
  44. data/lib/{protos → fabric/protos}/peer/chaincode_event_pb.rb +2 -2
  45. data/lib/fabric/protos/peer/chaincode_pb.rb +60 -0
  46. data/lib/fabric/protos/peer/chaincode_shim_pb.rb +129 -0
  47. data/lib/{protos → fabric/protos}/peer/chaincode_shim_services_pb.rb +0 -1
  48. data/lib/{protos → fabric/protos}/peer/configuration_pb.rb +10 -10
  49. data/lib/fabric/protos/peer/events_pb.rb +45 -0
  50. data/lib/fabric/protos/peer/events_services_pb.rb +34 -0
  51. data/lib/{protos → fabric/protos}/peer/peer_pb.rb +5 -5
  52. data/lib/{protos → fabric/protos}/peer/peer_services_pb.rb +0 -1
  53. data/lib/{protos → fabric/protos}/peer/proposal_pb.rb +13 -13
  54. data/lib/{protos → fabric/protos}/peer/proposal_response_pb.rb +11 -11
  55. data/lib/{protos → fabric/protos}/peer/query_pb.rb +10 -10
  56. data/lib/{protos → fabric/protos}/peer/resources_pb.rb +12 -12
  57. data/lib/{protos → fabric/protos}/peer/signed_cc_dep_spec_pb.rb +3 -3
  58. data/lib/{protos → fabric/protos}/peer/transaction_pb.rb +22 -18
  59. data/lib/fabric/protos/token/prover_pb.rb +66 -0
  60. data/lib/fabric/protos/token/prover_services_pb.rb +33 -0
  61. data/lib/fabric/protos/token/transaction_pb.rb +41 -0
  62. data/lib/{protos → fabric/protos}/transientstore/transientstore_pb.rb +4 -4
  63. data/lib/fabric/queue.rb +26 -0
  64. data/lib/fabric/transaction.rb +51 -0
  65. data/lib/fabric/transaction_info.rb +20 -0
  66. data/lib/fabric/version.rb +1 -1
  67. data/lib/fabric.rb +74 -0
  68. data/lib/fabric_ca/attribute.rb +7 -0
  69. data/lib/fabric_ca/client.rb +11 -19
  70. data/lib/fabric_ca/configuration.rb +4 -2
  71. data/lib/fabric_ca/connection.rb +22 -20
  72. data/lib/fabric_ca/error.rb +3 -2
  73. data/lib/fabric_ca/faraday_middleware/basic_auth.rb +3 -3
  74. data/lib/fabric_ca/faraday_middleware/raise_http_exception.rb +13 -13
  75. data/lib/fabric_ca/faraday_middleware/token_auth.rb +10 -12
  76. data/lib/fabric_ca/request.rb +13 -24
  77. data/lib/fabric_ca/version.rb +1 -1
  78. data/lib/fabric_ca.rb +16 -0
  79. data/lib/hyperledger-fabric-sdk.rb +2 -47
  80. metadata +161 -61
  81. data/lib/crypto_suite/ecdsa_aes.rb +0 -86
  82. data/lib/fabric/peer_endorser.rb +0 -85
  83. data/lib/fabric/transaction_id.rb +0 -11
  84. data/lib/fabric/user.rb +0 -24
  85. data/lib/fabric_ca/tools.rb +0 -35
  86. data/lib/protos/common/configtx_pb.rb +0 -71
  87. data/lib/protos/discovery/protocol_pb.rb +0 -119
  88. data/lib/protos/gossip/message_pb.rb +0 -233
  89. data/lib/protos/ledger/rwset/kvrwset/kv_rwset_pb.rb +0 -85
  90. data/lib/protos/ledger/rwset/rwset_pb.rb +0 -46
  91. data/lib/protos/orderer/ab_pb.rb +0 -52
  92. data/lib/protos/peer/chaincode_pb.rb +0 -60
  93. data/lib/protos/peer/chaincode_shim_pb.rb +0 -94
  94. data/lib/protos/peer/events_pb.rb +0 -98
  95. data/lib/protos/peer/events_services_pb.rb +0 -59
@@ -0,0 +1,233 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: gossip/message.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'common/collection_pb'
7
+ Google::Protobuf::DescriptorPool.generated_pool.build do
8
+ add_message 'gossip.Envelope' do
9
+ optional :payload, :bytes, 1
10
+ optional :signature, :bytes, 2
11
+ optional :secret_envelope, :message, 3, 'gossip.SecretEnvelope'
12
+ end
13
+ add_message 'gossip.SecretEnvelope' do
14
+ optional :payload, :bytes, 1
15
+ optional :signature, :bytes, 2
16
+ end
17
+ add_message 'gossip.Secret' do
18
+ oneof :content do
19
+ optional :internalEndpoint, :string, 1
20
+ end
21
+ end
22
+ add_message 'gossip.GossipMessage' do
23
+ optional :nonce, :uint64, 1
24
+ optional :channel, :bytes, 2
25
+ optional :tag, :enum, 3, 'gossip.GossipMessage.Tag'
26
+ oneof :content do
27
+ optional :alive_msg, :message, 5, 'gossip.AliveMessage'
28
+ optional :mem_req, :message, 6, 'gossip.MembershipRequest'
29
+ optional :mem_res, :message, 7, 'gossip.MembershipResponse'
30
+ optional :data_msg, :message, 8, 'gossip.DataMessage'
31
+ optional :hello, :message, 9, 'gossip.GossipHello'
32
+ optional :data_dig, :message, 10, 'gossip.DataDigest'
33
+ optional :data_req, :message, 11, 'gossip.DataRequest'
34
+ optional :data_update, :message, 12, 'gossip.DataUpdate'
35
+ optional :empty, :message, 13, 'gossip.Empty'
36
+ optional :conn, :message, 14, 'gossip.ConnEstablish'
37
+ optional :state_info, :message, 15, 'gossip.StateInfo'
38
+ optional :state_snapshot, :message, 16, 'gossip.StateInfoSnapshot'
39
+ optional :state_info_pull_req, :message, 17, 'gossip.StateInfoPullRequest'
40
+ optional :state_request, :message, 18, 'gossip.RemoteStateRequest'
41
+ optional :state_response, :message, 19, 'gossip.RemoteStateResponse'
42
+ optional :leadership_msg, :message, 20, 'gossip.LeadershipMessage'
43
+ optional :peer_identity, :message, 21, 'gossip.PeerIdentity'
44
+ optional :ack, :message, 22, 'gossip.Acknowledgement'
45
+ optional :privateReq, :message, 23, 'gossip.RemotePvtDataRequest'
46
+ optional :privateRes, :message, 24, 'gossip.RemotePvtDataResponse'
47
+ optional :private_data, :message, 25, 'gossip.PrivateDataMessage'
48
+ end
49
+ end
50
+ add_enum 'gossip.GossipMessage.Tag' do
51
+ value :UNDEFINED, 0
52
+ value :EMPTY, 1
53
+ value :ORG_ONLY, 2
54
+ value :CHAN_ONLY, 3
55
+ value :CHAN_AND_ORG, 4
56
+ value :CHAN_OR_ORG, 5
57
+ end
58
+ add_message 'gossip.StateInfo' do
59
+ optional :timestamp, :message, 2, 'gossip.PeerTime'
60
+ optional :pki_id, :bytes, 3
61
+ optional :channel_MAC, :bytes, 4
62
+ optional :properties, :message, 5, 'gossip.Properties'
63
+ end
64
+ add_message 'gossip.Properties' do
65
+ optional :ledger_height, :uint64, 1
66
+ optional :left_channel, :bool, 2
67
+ repeated :chaincodes, :message, 3, 'gossip.Chaincode'
68
+ end
69
+ add_message 'gossip.StateInfoSnapshot' do
70
+ repeated :elements, :message, 1, 'gossip.Envelope'
71
+ end
72
+ add_message 'gossip.StateInfoPullRequest' do
73
+ optional :channel_MAC, :bytes, 1
74
+ end
75
+ add_message 'gossip.ConnEstablish' do
76
+ optional :pki_id, :bytes, 1
77
+ optional :identity, :bytes, 2
78
+ optional :tls_cert_hash, :bytes, 3
79
+ end
80
+ add_message 'gossip.PeerIdentity' do
81
+ optional :pki_id, :bytes, 1
82
+ optional :cert, :bytes, 2
83
+ optional :metadata, :bytes, 3
84
+ end
85
+ add_message 'gossip.DataRequest' do
86
+ optional :nonce, :uint64, 1
87
+ repeated :digests, :bytes, 2
88
+ optional :msg_type, :enum, 3, 'gossip.PullMsgType'
89
+ end
90
+ add_message 'gossip.GossipHello' do
91
+ optional :nonce, :uint64, 1
92
+ optional :metadata, :bytes, 2
93
+ optional :msg_type, :enum, 3, 'gossip.PullMsgType'
94
+ end
95
+ add_message 'gossip.DataUpdate' do
96
+ optional :nonce, :uint64, 1
97
+ repeated :data, :message, 2, 'gossip.Envelope'
98
+ optional :msg_type, :enum, 3, 'gossip.PullMsgType'
99
+ end
100
+ add_message 'gossip.DataDigest' do
101
+ optional :nonce, :uint64, 1
102
+ repeated :digests, :bytes, 2
103
+ optional :msg_type, :enum, 3, 'gossip.PullMsgType'
104
+ end
105
+ add_message 'gossip.DataMessage' do
106
+ optional :payload, :message, 1, 'gossip.Payload'
107
+ end
108
+ add_message 'gossip.PrivateDataMessage' do
109
+ optional :payload, :message, 1, 'gossip.PrivatePayload'
110
+ end
111
+ add_message 'gossip.Payload' do
112
+ optional :seq_num, :uint64, 1
113
+ optional :data, :bytes, 2
114
+ repeated :private_data, :bytes, 3
115
+ end
116
+ add_message 'gossip.PrivatePayload' do
117
+ optional :collection_name, :string, 1
118
+ optional :namespace, :string, 2
119
+ optional :tx_id, :string, 3
120
+ optional :private_rwset, :bytes, 4
121
+ optional :private_sim_height, :uint64, 5
122
+ optional :collection_configs, :message, 6, 'common.CollectionConfigPackage'
123
+ end
124
+ add_message 'gossip.AliveMessage' do
125
+ optional :membership, :message, 1, 'gossip.Member'
126
+ optional :timestamp, :message, 2, 'gossip.PeerTime'
127
+ optional :identity, :bytes, 4
128
+ end
129
+ add_message 'gossip.LeadershipMessage' do
130
+ optional :pki_id, :bytes, 1
131
+ optional :timestamp, :message, 2, 'gossip.PeerTime'
132
+ optional :is_declaration, :bool, 3
133
+ end
134
+ add_message 'gossip.PeerTime' do
135
+ optional :inc_num, :uint64, 1
136
+ optional :seq_num, :uint64, 2
137
+ end
138
+ add_message 'gossip.MembershipRequest' do
139
+ optional :self_information, :message, 1, 'gossip.Envelope'
140
+ repeated :known, :bytes, 2
141
+ end
142
+ add_message 'gossip.MembershipResponse' do
143
+ repeated :alive, :message, 1, 'gossip.Envelope'
144
+ repeated :dead, :message, 2, 'gossip.Envelope'
145
+ end
146
+ add_message 'gossip.Member' do
147
+ optional :endpoint, :string, 1
148
+ optional :metadata, :bytes, 2
149
+ optional :pki_id, :bytes, 3
150
+ end
151
+ add_message 'gossip.Empty' do
152
+ end
153
+ add_message 'gossip.RemoteStateRequest' do
154
+ optional :start_seq_num, :uint64, 1
155
+ optional :end_seq_num, :uint64, 2
156
+ end
157
+ add_message 'gossip.RemoteStateResponse' do
158
+ repeated :payloads, :message, 1, 'gossip.Payload'
159
+ end
160
+ add_message 'gossip.RemotePvtDataRequest' do
161
+ repeated :digests, :message, 1, 'gossip.PvtDataDigest'
162
+ end
163
+ add_message 'gossip.PvtDataDigest' do
164
+ optional :tx_id, :string, 1
165
+ optional :namespace, :string, 2
166
+ optional :collection, :string, 3
167
+ optional :block_seq, :uint64, 4
168
+ optional :seq_in_block, :uint64, 5
169
+ end
170
+ add_message 'gossip.RemotePvtDataResponse' do
171
+ repeated :elements, :message, 1, 'gossip.PvtDataElement'
172
+ end
173
+ add_message 'gossip.PvtDataElement' do
174
+ optional :digest, :message, 1, 'gossip.PvtDataDigest'
175
+ repeated :payload, :bytes, 2
176
+ end
177
+ add_message 'gossip.PvtDataPayload' do
178
+ optional :tx_seq_in_block, :uint64, 1
179
+ optional :payload, :bytes, 2
180
+ end
181
+ add_message 'gossip.Acknowledgement' do
182
+ optional :error, :string, 1
183
+ end
184
+ add_message 'gossip.Chaincode' do
185
+ optional :name, :string, 1
186
+ optional :version, :string, 2
187
+ optional :metadata, :bytes, 3
188
+ end
189
+ add_enum 'gossip.PullMsgType' do
190
+ value :UNDEFINED, 0
191
+ value :BLOCK_MSG, 1
192
+ value :IDENTITY_MSG, 2
193
+ end
194
+ end
195
+
196
+ module Gossip
197
+ Envelope = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.Envelope').msgclass
198
+ SecretEnvelope = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.SecretEnvelope').msgclass
199
+ Secret = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.Secret').msgclass
200
+ GossipMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.GossipMessage').msgclass
201
+ GossipMessage::Tag = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.GossipMessage.Tag').enummodule
202
+ StateInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.StateInfo').msgclass
203
+ Properties = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.Properties').msgclass
204
+ StateInfoSnapshot = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.StateInfoSnapshot').msgclass
205
+ StateInfoPullRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.StateInfoPullRequest').msgclass
206
+ ConnEstablish = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.ConnEstablish').msgclass
207
+ PeerIdentity = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.PeerIdentity').msgclass
208
+ DataRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.DataRequest').msgclass
209
+ GossipHello = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.GossipHello').msgclass
210
+ DataUpdate = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.DataUpdate').msgclass
211
+ DataDigest = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.DataDigest').msgclass
212
+ DataMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.DataMessage').msgclass
213
+ PrivateDataMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.PrivateDataMessage').msgclass
214
+ Payload = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.Payload').msgclass
215
+ PrivatePayload = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.PrivatePayload').msgclass
216
+ AliveMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.AliveMessage').msgclass
217
+ LeadershipMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.LeadershipMessage').msgclass
218
+ PeerTime = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.PeerTime').msgclass
219
+ MembershipRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.MembershipRequest').msgclass
220
+ MembershipResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.MembershipResponse').msgclass
221
+ Member = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.Member').msgclass
222
+ Empty = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.Empty').msgclass
223
+ RemoteStateRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.RemoteStateRequest').msgclass
224
+ RemoteStateResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.RemoteStateResponse').msgclass
225
+ RemotePvtDataRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.RemotePvtDataRequest').msgclass
226
+ PvtDataDigest = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.PvtDataDigest').msgclass
227
+ RemotePvtDataResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.RemotePvtDataResponse').msgclass
228
+ PvtDataElement = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.PvtDataElement').msgclass
229
+ PvtDataPayload = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.PvtDataPayload').msgclass
230
+ Acknowledgement = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.Acknowledgement').msgclass
231
+ Chaincode = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.Chaincode').msgclass
232
+ PullMsgType = Google::Protobuf::DescriptorPool.generated_pool.lookup('gossip.PullMsgType').enummodule
233
+ end
@@ -13,7 +13,6 @@ module Gossip
13
13
  module Gossip
14
14
  # Gossip
15
15
  class Service
16
-
17
16
  include GRPC::GenericService
18
17
 
19
18
  self.marshal_class_method = :encode
@@ -4,49 +4,49 @@
4
4
  require 'google/protobuf'
5
5
 
6
6
  Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_message "ECP" do
7
+ add_message 'ECP' do
8
8
  optional :x, :bytes, 1
9
9
  optional :y, :bytes, 2
10
10
  end
11
- add_message "ECP2" do
11
+ add_message 'ECP2' do
12
12
  optional :xa, :bytes, 1
13
13
  optional :xb, :bytes, 2
14
14
  optional :ya, :bytes, 3
15
15
  optional :yb, :bytes, 4
16
16
  end
17
- add_message "IssuerPublicKey" do
17
+ add_message 'IssuerPublicKey' do
18
18
  repeated :attribute_names, :string, 1
19
- optional :h_sk, :message, 2, "ECP"
20
- optional :h_rand, :message, 3, "ECP"
21
- repeated :h_attrs, :message, 4, "ECP"
22
- optional :w, :message, 5, "ECP2"
23
- optional :bar_g1, :message, 6, "ECP"
24
- optional :bar_g2, :message, 7, "ECP"
19
+ optional :h_sk, :message, 2, 'ECP'
20
+ optional :h_rand, :message, 3, 'ECP'
21
+ repeated :h_attrs, :message, 4, 'ECP'
22
+ optional :w, :message, 5, 'ECP2'
23
+ optional :bar_g1, :message, 6, 'ECP'
24
+ optional :bar_g2, :message, 7, 'ECP'
25
25
  optional :proof_c, :bytes, 8
26
26
  optional :proof_s, :bytes, 9
27
27
  optional :hash, :bytes, 10
28
28
  end
29
- add_message "IssuerKey" do
29
+ add_message 'IssuerKey' do
30
30
  optional :isk, :bytes, 1
31
- optional :ipk, :message, 2, "IssuerPublicKey"
31
+ optional :ipk, :message, 2, 'IssuerPublicKey'
32
32
  end
33
- add_message "Credential" do
34
- optional :a, :message, 1, "ECP"
35
- optional :b, :message, 2, "ECP"
33
+ add_message 'Credential' do
34
+ optional :a, :message, 1, 'ECP'
35
+ optional :b, :message, 2, 'ECP'
36
36
  optional :e, :bytes, 3
37
37
  optional :s, :bytes, 4
38
38
  repeated :attrs, :bytes, 5
39
39
  end
40
- add_message "CredRequest" do
41
- optional :nym, :message, 1, "ECP"
40
+ add_message 'CredRequest' do
41
+ optional :nym, :message, 1, 'ECP'
42
42
  optional :issuer_nonce, :bytes, 2
43
43
  optional :proof_c, :bytes, 3
44
44
  optional :proof_s, :bytes, 4
45
45
  end
46
- add_message "Signature" do
47
- optional :a_prime, :message, 1, "ECP"
48
- optional :a_bar, :message, 2, "ECP"
49
- optional :b_prime, :message, 3, "ECP"
46
+ add_message 'Signature' do
47
+ optional :a_prime, :message, 1, 'ECP'
48
+ optional :a_bar, :message, 2, 'ECP'
49
+ optional :b_prime, :message, 3, 'ECP'
50
50
  optional :proof_c, :bytes, 4
51
51
  optional :proof_s_sk, :bytes, 5
52
52
  optional :proof_s_e, :bytes, 6
@@ -55,39 +55,39 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
55
55
  optional :proof_s_s_prime, :bytes, 9
56
56
  repeated :proof_s_attrs, :bytes, 10
57
57
  optional :nonce, :bytes, 11
58
- optional :nym, :message, 12, "ECP"
58
+ optional :nym, :message, 12, 'ECP'
59
59
  optional :proof_s_r_nym, :bytes, 13
60
- optional :revocation_epoch_pk, :message, 14, "ECP2"
60
+ optional :revocation_epoch_pk, :message, 14, 'ECP2'
61
61
  optional :revocation_pk_sig, :bytes, 15
62
62
  optional :epoch, :int64, 16
63
- optional :non_revocation_proof, :message, 17, "NonRevocationProof"
63
+ optional :non_revocation_proof, :message, 17, 'NonRevocationProof'
64
64
  end
65
- add_message "NonRevocationProof" do
65
+ add_message 'NonRevocationProof' do
66
66
  optional :revocation_alg, :int32, 1
67
67
  optional :non_revocation_proof, :bytes, 2
68
68
  end
69
- add_message "NymSignature" do
69
+ add_message 'NymSignature' do
70
70
  optional :proof_c, :bytes, 1
71
71
  optional :proof_s_sk, :bytes, 2
72
72
  optional :proof_s_r_nym, :bytes, 3
73
73
  optional :nonce, :bytes, 4
74
74
  end
75
- add_message "CredentialRevocationInformation" do
75
+ add_message 'CredentialRevocationInformation' do
76
76
  optional :epoch, :int64, 1
77
- optional :epoch_pk, :message, 2, "ECP2"
77
+ optional :epoch_pk, :message, 2, 'ECP2'
78
78
  optional :epoch_pk_sig, :bytes, 3
79
79
  optional :revocation_alg, :int32, 4
80
80
  optional :revocation_data, :bytes, 5
81
81
  end
82
82
  end
83
83
 
84
- ECP = Google::Protobuf::DescriptorPool.generated_pool.lookup("ECP").msgclass
85
- ECP2 = Google::Protobuf::DescriptorPool.generated_pool.lookup("ECP2").msgclass
86
- IssuerPublicKey = Google::Protobuf::DescriptorPool.generated_pool.lookup("IssuerPublicKey").msgclass
87
- IssuerKey = Google::Protobuf::DescriptorPool.generated_pool.lookup("IssuerKey").msgclass
88
- Credential = Google::Protobuf::DescriptorPool.generated_pool.lookup("Credential").msgclass
89
- CredRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("CredRequest").msgclass
90
- Signature = Google::Protobuf::DescriptorPool.generated_pool.lookup("Signature").msgclass
91
- NonRevocationProof = Google::Protobuf::DescriptorPool.generated_pool.lookup("NonRevocationProof").msgclass
92
- NymSignature = Google::Protobuf::DescriptorPool.generated_pool.lookup("NymSignature").msgclass
93
- CredentialRevocationInformation = Google::Protobuf::DescriptorPool.generated_pool.lookup("CredentialRevocationInformation").msgclass
84
+ ECP = Google::Protobuf::DescriptorPool.generated_pool.lookup('ECP').msgclass
85
+ ECP2 = Google::Protobuf::DescriptorPool.generated_pool.lookup('ECP2').msgclass
86
+ IssuerPublicKey = Google::Protobuf::DescriptorPool.generated_pool.lookup('IssuerPublicKey').msgclass
87
+ IssuerKey = Google::Protobuf::DescriptorPool.generated_pool.lookup('IssuerKey').msgclass
88
+ Credential = Google::Protobuf::DescriptorPool.generated_pool.lookup('Credential').msgclass
89
+ CredRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup('CredRequest').msgclass
90
+ Signature = Google::Protobuf::DescriptorPool.generated_pool.lookup('Signature').msgclass
91
+ NonRevocationProof = Google::Protobuf::DescriptorPool.generated_pool.lookup('NonRevocationProof').msgclass
92
+ NymSignature = Google::Protobuf::DescriptorPool.generated_pool.lookup('NymSignature').msgclass
93
+ CredentialRevocationInformation = Google::Protobuf::DescriptorPool.generated_pool.lookup('CredentialRevocationInformation').msgclass
@@ -5,20 +5,20 @@ require 'google/protobuf'
5
5
 
6
6
  require 'google/protobuf/timestamp_pb'
7
7
  Google::Protobuf::DescriptorPool.generated_pool.build do
8
- add_message "queryresult.KV" do
8
+ add_message 'queryresult.KV' do
9
9
  optional :namespace, :string, 1
10
10
  optional :key, :string, 2
11
11
  optional :value, :bytes, 3
12
12
  end
13
- add_message "queryresult.KeyModification" do
13
+ add_message 'queryresult.KeyModification' do
14
14
  optional :tx_id, :string, 1
15
15
  optional :value, :bytes, 2
16
- optional :timestamp, :message, 3, "google.protobuf.Timestamp"
16
+ optional :timestamp, :message, 3, 'google.protobuf.Timestamp'
17
17
  optional :is_delete, :bool, 4
18
18
  end
19
19
  end
20
20
 
21
21
  module Queryresult
22
- KV = Google::Protobuf::DescriptorPool.generated_pool.lookup("queryresult.KV").msgclass
23
- KeyModification = Google::Protobuf::DescriptorPool.generated_pool.lookup("queryresult.KeyModification").msgclass
22
+ KV = Google::Protobuf::DescriptorPool.generated_pool.lookup('queryresult.KV').msgclass
23
+ KeyModification = Google::Protobuf::DescriptorPool.generated_pool.lookup('queryresult.KeyModification').msgclass
24
24
  end
@@ -0,0 +1,85 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: ledger/rwset/kvrwset/kv_rwset.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_message 'kvrwset.KVRWSet' do
8
+ repeated :reads, :message, 1, 'kvrwset.KVRead'
9
+ repeated :range_queries_info, :message, 2, 'kvrwset.RangeQueryInfo'
10
+ repeated :writes, :message, 3, 'kvrwset.KVWrite'
11
+ repeated :metadata_writes, :message, 4, 'kvrwset.KVMetadataWrite'
12
+ end
13
+ add_message 'kvrwset.HashedRWSet' do
14
+ repeated :hashed_reads, :message, 1, 'kvrwset.KVReadHash'
15
+ repeated :hashed_writes, :message, 2, 'kvrwset.KVWriteHash'
16
+ repeated :metadata_writes, :message, 3, 'kvrwset.KVMetadataWriteHash'
17
+ end
18
+ add_message 'kvrwset.KVRead' do
19
+ optional :key, :string, 1
20
+ optional :version, :message, 2, 'kvrwset.Version'
21
+ end
22
+ add_message 'kvrwset.KVWrite' do
23
+ optional :key, :string, 1
24
+ optional :is_delete, :bool, 2
25
+ optional :value, :bytes, 3
26
+ end
27
+ add_message 'kvrwset.KVMetadataWrite' do
28
+ optional :key, :string, 1
29
+ repeated :entries, :message, 2, 'kvrwset.KVMetadataEntry'
30
+ end
31
+ add_message 'kvrwset.KVReadHash' do
32
+ optional :key_hash, :bytes, 1
33
+ optional :version, :message, 2, 'kvrwset.Version'
34
+ end
35
+ add_message 'kvrwset.KVWriteHash' do
36
+ optional :key_hash, :bytes, 1
37
+ optional :is_delete, :bool, 2
38
+ optional :value_hash, :bytes, 3
39
+ end
40
+ add_message 'kvrwset.KVMetadataWriteHash' do
41
+ optional :key_hash, :bytes, 1
42
+ repeated :entries, :message, 2, 'kvrwset.KVMetadataEntry'
43
+ end
44
+ add_message 'kvrwset.KVMetadataEntry' do
45
+ optional :name, :string, 1
46
+ optional :value, :bytes, 2
47
+ end
48
+ add_message 'kvrwset.Version' do
49
+ optional :block_num, :uint64, 1
50
+ optional :tx_num, :uint64, 2
51
+ end
52
+ add_message 'kvrwset.RangeQueryInfo' do
53
+ optional :start_key, :string, 1
54
+ optional :end_key, :string, 2
55
+ optional :itr_exhausted, :bool, 3
56
+ oneof :reads_info do
57
+ optional :raw_reads, :message, 4, 'kvrwset.QueryReads'
58
+ optional :reads_merkle_hashes, :message, 5, 'kvrwset.QueryReadsMerkleSummary'
59
+ end
60
+ end
61
+ add_message 'kvrwset.QueryReads' do
62
+ repeated :kv_reads, :message, 1, 'kvrwset.KVRead'
63
+ end
64
+ add_message 'kvrwset.QueryReadsMerkleSummary' do
65
+ optional :max_degree, :uint32, 1
66
+ optional :max_level, :uint32, 2
67
+ repeated :max_level_hashes, :bytes, 3
68
+ end
69
+ end
70
+
71
+ module Kvrwset
72
+ KVRWSet = Google::Protobuf::DescriptorPool.generated_pool.lookup('kvrwset.KVRWSet').msgclass
73
+ HashedRWSet = Google::Protobuf::DescriptorPool.generated_pool.lookup('kvrwset.HashedRWSet').msgclass
74
+ KVRead = Google::Protobuf::DescriptorPool.generated_pool.lookup('kvrwset.KVRead').msgclass
75
+ KVWrite = Google::Protobuf::DescriptorPool.generated_pool.lookup('kvrwset.KVWrite').msgclass
76
+ KVMetadataWrite = Google::Protobuf::DescriptorPool.generated_pool.lookup('kvrwset.KVMetadataWrite').msgclass
77
+ KVReadHash = Google::Protobuf::DescriptorPool.generated_pool.lookup('kvrwset.KVReadHash').msgclass
78
+ KVWriteHash = Google::Protobuf::DescriptorPool.generated_pool.lookup('kvrwset.KVWriteHash').msgclass
79
+ KVMetadataWriteHash = Google::Protobuf::DescriptorPool.generated_pool.lookup('kvrwset.KVMetadataWriteHash').msgclass
80
+ KVMetadataEntry = Google::Protobuf::DescriptorPool.generated_pool.lookup('kvrwset.KVMetadataEntry').msgclass
81
+ Version = Google::Protobuf::DescriptorPool.generated_pool.lookup('kvrwset.Version').msgclass
82
+ RangeQueryInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup('kvrwset.RangeQueryInfo').msgclass
83
+ QueryReads = Google::Protobuf::DescriptorPool.generated_pool.lookup('kvrwset.QueryReads').msgclass
84
+ QueryReadsMerkleSummary = Google::Protobuf::DescriptorPool.generated_pool.lookup('kvrwset.QueryReadsMerkleSummary').msgclass
85
+ end
@@ -0,0 +1,46 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: ledger/rwset/rwset.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_message 'rwset.TxReadWriteSet' do
8
+ optional :data_model, :enum, 1, 'rwset.TxReadWriteSet.DataModel'
9
+ repeated :ns_rwset, :message, 2, 'rwset.NsReadWriteSet'
10
+ end
11
+ add_enum 'rwset.TxReadWriteSet.DataModel' do
12
+ value :KV, 0
13
+ end
14
+ add_message 'rwset.NsReadWriteSet' do
15
+ optional :namespace, :string, 1
16
+ optional :rwset, :bytes, 2
17
+ repeated :collection_hashed_rwset, :message, 3, 'rwset.CollectionHashedReadWriteSet'
18
+ end
19
+ add_message 'rwset.CollectionHashedReadWriteSet' do
20
+ optional :collection_name, :string, 1
21
+ optional :hashed_rwset, :bytes, 2
22
+ optional :pvt_rwset_hash, :bytes, 3
23
+ end
24
+ add_message 'rwset.TxPvtReadWriteSet' do
25
+ optional :data_model, :enum, 1, 'rwset.TxReadWriteSet.DataModel'
26
+ repeated :ns_pvt_rwset, :message, 2, 'rwset.NsPvtReadWriteSet'
27
+ end
28
+ add_message 'rwset.NsPvtReadWriteSet' do
29
+ optional :namespace, :string, 1
30
+ repeated :collection_pvt_rwset, :message, 2, 'rwset.CollectionPvtReadWriteSet'
31
+ end
32
+ add_message 'rwset.CollectionPvtReadWriteSet' do
33
+ optional :collection_name, :string, 1
34
+ optional :rwset, :bytes, 2
35
+ end
36
+ end
37
+
38
+ module Rwset
39
+ TxReadWriteSet = Google::Protobuf::DescriptorPool.generated_pool.lookup('rwset.TxReadWriteSet').msgclass
40
+ TxReadWriteSet::DataModel = Google::Protobuf::DescriptorPool.generated_pool.lookup('rwset.TxReadWriteSet.DataModel').enummodule
41
+ NsReadWriteSet = Google::Protobuf::DescriptorPool.generated_pool.lookup('rwset.NsReadWriteSet').msgclass
42
+ CollectionHashedReadWriteSet = Google::Protobuf::DescriptorPool.generated_pool.lookup('rwset.CollectionHashedReadWriteSet').msgclass
43
+ TxPvtReadWriteSet = Google::Protobuf::DescriptorPool.generated_pool.lookup('rwset.TxPvtReadWriteSet').msgclass
44
+ NsPvtReadWriteSet = Google::Protobuf::DescriptorPool.generated_pool.lookup('rwset.NsPvtReadWriteSet').msgclass
45
+ CollectionPvtReadWriteSet = Google::Protobuf::DescriptorPool.generated_pool.lookup('rwset.CollectionPvtReadWriteSet').msgclass
46
+ end
@@ -4,11 +4,11 @@
4
4
  require 'google/protobuf'
5
5
 
6
6
  Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_message "msp.SerializedIdentity" do
7
+ add_message 'msp.SerializedIdentity' do
8
8
  optional :mspid, :string, 1
9
9
  optional :id_bytes, :bytes, 2
10
10
  end
11
- add_message "msp.SerializedIdemixIdentity" do
11
+ add_message 'msp.SerializedIdemixIdentity' do
12
12
  optional :nym_x, :bytes, 1
13
13
  optional :nym_y, :bytes, 2
14
14
  optional :ou, :bytes, 3
@@ -18,6 +18,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
18
18
  end
19
19
 
20
20
  module Msp
21
- SerializedIdentity = Google::Protobuf::DescriptorPool.generated_pool.lookup("msp.SerializedIdentity").msgclass
22
- SerializedIdemixIdentity = Google::Protobuf::DescriptorPool.generated_pool.lookup("msp.SerializedIdemixIdentity").msgclass
21
+ SerializedIdentity = Google::Protobuf::DescriptorPool.generated_pool.lookup('msp.SerializedIdentity').msgclass
22
+ SerializedIdemixIdentity = Google::Protobuf::DescriptorPool.generated_pool.lookup('msp.SerializedIdemixIdentity').msgclass
23
23
  end
@@ -4,69 +4,69 @@
4
4
  require 'google/protobuf'
5
5
 
6
6
  Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_message "msp.MSPConfig" do
7
+ add_message 'msp.MSPConfig' do
8
8
  optional :type, :int32, 1
9
9
  optional :config, :bytes, 2
10
10
  end
11
- add_message "msp.FabricMSPConfig" do
11
+ add_message 'msp.FabricMSPConfig' do
12
12
  optional :name, :string, 1
13
13
  repeated :root_certs, :bytes, 2
14
14
  repeated :intermediate_certs, :bytes, 3
15
15
  repeated :admins, :bytes, 4
16
16
  repeated :revocation_list, :bytes, 5
17
- optional :signing_identity, :message, 6, "msp.SigningIdentityInfo"
18
- repeated :organizational_unit_identifiers, :message, 7, "msp.FabricOUIdentifier"
19
- optional :crypto_config, :message, 8, "msp.FabricCryptoConfig"
17
+ optional :signing_identity, :message, 6, 'msp.SigningIdentityInfo'
18
+ repeated :organizational_unit_identifiers, :message, 7, 'msp.FabricOUIdentifier'
19
+ optional :crypto_config, :message, 8, 'msp.FabricCryptoConfig'
20
20
  repeated :tls_root_certs, :bytes, 9
21
21
  repeated :tls_intermediate_certs, :bytes, 10
22
- optional :fabric_node_ous, :message, 11, "msp.FabricNodeOUs"
22
+ optional :fabric_node_ous, :message, 11, 'msp.FabricNodeOUs'
23
23
  end
24
- add_message "msp.FabricCryptoConfig" do
24
+ add_message 'msp.FabricCryptoConfig' do
25
25
  optional :signature_hash_family, :string, 1
26
26
  optional :identity_identifier_hash_function, :string, 2
27
27
  end
28
- add_message "msp.IdemixMSPConfig" do
28
+ add_message 'msp.IdemixMSPConfig' do
29
29
  optional :name, :string, 1
30
30
  optional :ipk, :bytes, 2
31
- optional :signer, :message, 3, "msp.IdemixMSPSignerConfig"
31
+ optional :signer, :message, 3, 'msp.IdemixMSPSignerConfig'
32
32
  optional :revocation_pk, :bytes, 4
33
33
  optional :epoch, :int64, 5
34
34
  end
35
- add_message "msp.IdemixMSPSignerConfig" do
35
+ add_message 'msp.IdemixMSPSignerConfig' do
36
36
  optional :cred, :bytes, 1
37
37
  optional :sk, :bytes, 2
38
38
  optional :organizational_unit_identifier, :string, 3
39
- optional :is_admin, :bool, 4
39
+ optional :role, :int32, 4
40
40
  optional :enrollment_id, :string, 5
41
41
  optional :credential_revocation_information, :bytes, 6
42
42
  end
43
- add_message "msp.SigningIdentityInfo" do
43
+ add_message 'msp.SigningIdentityInfo' do
44
44
  optional :public_signer, :bytes, 1
45
- optional :private_signer, :message, 2, "msp.KeyInfo"
45
+ optional :private_signer, :message, 2, 'msp.KeyInfo'
46
46
  end
47
- add_message "msp.KeyInfo" do
47
+ add_message 'msp.KeyInfo' do
48
48
  optional :key_identifier, :string, 1
49
49
  optional :key_material, :bytes, 2
50
50
  end
51
- add_message "msp.FabricOUIdentifier" do
51
+ add_message 'msp.FabricOUIdentifier' do
52
52
  optional :certificate, :bytes, 1
53
53
  optional :organizational_unit_identifier, :string, 2
54
54
  end
55
- add_message "msp.FabricNodeOUs" do
55
+ add_message 'msp.FabricNodeOUs' do
56
56
  optional :enable, :bool, 1
57
- optional :client_ou_identifier, :message, 2, "msp.FabricOUIdentifier"
58
- optional :peer_ou_identifier, :message, 3, "msp.FabricOUIdentifier"
57
+ optional :client_ou_identifier, :message, 2, 'msp.FabricOUIdentifier'
58
+ optional :peer_ou_identifier, :message, 3, 'msp.FabricOUIdentifier'
59
59
  end
60
60
  end
61
61
 
62
62
  module Msp
63
- MSPConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("msp.MSPConfig").msgclass
64
- FabricMSPConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("msp.FabricMSPConfig").msgclass
65
- FabricCryptoConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("msp.FabricCryptoConfig").msgclass
66
- IdemixMSPConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("msp.IdemixMSPConfig").msgclass
67
- IdemixMSPSignerConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("msp.IdemixMSPSignerConfig").msgclass
68
- SigningIdentityInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("msp.SigningIdentityInfo").msgclass
69
- KeyInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("msp.KeyInfo").msgclass
70
- FabricOUIdentifier = Google::Protobuf::DescriptorPool.generated_pool.lookup("msp.FabricOUIdentifier").msgclass
71
- FabricNodeOUs = Google::Protobuf::DescriptorPool.generated_pool.lookup("msp.FabricNodeOUs").msgclass
63
+ MSPConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup('msp.MSPConfig').msgclass
64
+ FabricMSPConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup('msp.FabricMSPConfig').msgclass
65
+ FabricCryptoConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup('msp.FabricCryptoConfig').msgclass
66
+ IdemixMSPConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup('msp.IdemixMSPConfig').msgclass
67
+ IdemixMSPSignerConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup('msp.IdemixMSPSignerConfig').msgclass
68
+ SigningIdentityInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup('msp.SigningIdentityInfo').msgclass
69
+ KeyInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup('msp.KeyInfo').msgclass
70
+ FabricOUIdentifier = Google::Protobuf::DescriptorPool.generated_pool.lookup('msp.FabricOUIdentifier').msgclass
71
+ FabricNodeOUs = Google::Protobuf::DescriptorPool.generated_pool.lookup('msp.FabricNodeOUs').msgclass
72
72
  end