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.
- checksums.yaml +4 -4
- data/lib/fabric/block_decoder.rb +299 -0
- data/lib/fabric/chaincode_response.rb +47 -0
- data/lib/fabric/channel.rb +55 -34
- data/lib/fabric/client.rb +107 -25
- data/lib/fabric/configuration.rb +12 -4
- data/lib/fabric/constants.rb +1 -1
- data/lib/fabric/crypto_suite.rb +145 -0
- data/lib/fabric/enumerator_queue.rb +26 -0
- data/lib/fabric/error.rb +52 -0
- data/lib/fabric/event_hub.rb +81 -0
- data/lib/fabric/helper.rb +31 -0
- data/lib/fabric/identity.rb +25 -19
- data/lib/fabric/logger.rb +37 -0
- data/lib/fabric/orderer.rb +18 -2
- data/lib/fabric/peer.rb +15 -36
- data/lib/fabric/proposal.rb +100 -0
- data/lib/{protos → fabric/protos}/common/collection_pb.rb +14 -14
- data/lib/{protos → fabric/protos}/common/common_pb.rb +37 -36
- data/lib/fabric/protos/common/configtx_pb.rb +71 -0
- data/lib/{protos → fabric/protos}/common/configuration_pb.rb +13 -13
- data/lib/{protos → fabric/protos}/common/ledger_pb.rb +2 -2
- data/lib/{protos → fabric/protos}/common/policies_pb.rb +19 -19
- data/lib/fabric/protos/discovery/protocol_pb.rb +120 -0
- data/lib/{protos → fabric/protos}/discovery/protocol_services_pb.rb +0 -1
- data/lib/fabric/protos/gossip/message_pb.rb +233 -0
- data/lib/{protos → fabric/protos}/gossip/message_services_pb.rb +0 -1
- data/lib/{protos → fabric/protos}/idemix/idemix_pb.rb +37 -37
- data/lib/{protos → fabric/protos}/ledger/queryresult/kv_query_result_pb.rb +5 -5
- data/lib/fabric/protos/ledger/rwset/kvrwset/kv_rwset_pb.rb +85 -0
- data/lib/fabric/protos/ledger/rwset/rwset_pb.rb +46 -0
- data/lib/{protos → fabric/protos}/msp/identities_pb.rb +4 -4
- data/lib/{protos → fabric/protos}/msp/msp_config_pb.rb +27 -27
- data/lib/{protos → fabric/protos}/msp/msp_principal_pb.rb +20 -20
- data/lib/fabric/protos/orderer/ab_pb.rb +52 -0
- data/lib/{protos → fabric/protos}/orderer/ab_services_pb.rb +0 -1
- data/lib/fabric/protos/orderer/cluster_pb.rb +31 -0
- data/lib/fabric/protos/orderer/cluster_services_pb.rb +31 -0
- data/lib/{protos → fabric/protos}/orderer/configuration_pb.rb +11 -10
- data/lib/fabric/protos/orderer/etcdraft/configuration_pb.rb +21 -0
- data/lib/{protos → fabric/protos}/orderer/kafka_pb.rb +16 -16
- data/lib/{protos → fabric/protos}/peer/admin_pb.rb +12 -12
- data/lib/{protos → fabric/protos}/peer/admin_services_pb.rb +0 -1
- data/lib/{protos → fabric/protos}/peer/chaincode_event_pb.rb +2 -2
- data/lib/fabric/protos/peer/chaincode_pb.rb +60 -0
- data/lib/fabric/protos/peer/chaincode_shim_pb.rb +129 -0
- data/lib/{protos → fabric/protos}/peer/chaincode_shim_services_pb.rb +0 -1
- data/lib/{protos → fabric/protos}/peer/configuration_pb.rb +10 -10
- data/lib/fabric/protos/peer/events_pb.rb +45 -0
- data/lib/fabric/protos/peer/events_services_pb.rb +34 -0
- data/lib/{protos → fabric/protos}/peer/peer_pb.rb +5 -5
- data/lib/{protos → fabric/protos}/peer/peer_services_pb.rb +0 -1
- data/lib/{protos → fabric/protos}/peer/proposal_pb.rb +13 -13
- data/lib/{protos → fabric/protos}/peer/proposal_response_pb.rb +11 -11
- data/lib/{protos → fabric/protos}/peer/query_pb.rb +10 -10
- data/lib/{protos → fabric/protos}/peer/resources_pb.rb +12 -12
- data/lib/{protos → fabric/protos}/peer/signed_cc_dep_spec_pb.rb +3 -3
- data/lib/{protos → fabric/protos}/peer/transaction_pb.rb +22 -18
- data/lib/fabric/protos/token/prover_pb.rb +66 -0
- data/lib/fabric/protos/token/prover_services_pb.rb +33 -0
- data/lib/fabric/protos/token/transaction_pb.rb +41 -0
- data/lib/{protos → fabric/protos}/transientstore/transientstore_pb.rb +4 -4
- data/lib/fabric/queue.rb +26 -0
- data/lib/fabric/transaction.rb +51 -0
- data/lib/fabric/transaction_info.rb +20 -0
- data/lib/fabric/version.rb +1 -1
- data/lib/fabric.rb +74 -0
- data/lib/fabric_ca/attribute.rb +7 -0
- data/lib/fabric_ca/client.rb +11 -19
- data/lib/fabric_ca/configuration.rb +4 -2
- data/lib/fabric_ca/connection.rb +22 -20
- data/lib/fabric_ca/error.rb +3 -2
- data/lib/fabric_ca/faraday_middleware/basic_auth.rb +3 -3
- data/lib/fabric_ca/faraday_middleware/raise_http_exception.rb +13 -13
- data/lib/fabric_ca/faraday_middleware/token_auth.rb +10 -12
- data/lib/fabric_ca/request.rb +13 -24
- data/lib/fabric_ca/version.rb +1 -1
- data/lib/fabric_ca.rb +16 -0
- data/lib/hyperledger-fabric-sdk.rb +2 -47
- metadata +161 -61
- data/lib/crypto_suite/ecdsa_aes.rb +0 -86
- data/lib/fabric/peer_endorser.rb +0 -85
- data/lib/fabric/transaction_id.rb +0 -11
- data/lib/fabric/user.rb +0 -24
- data/lib/fabric_ca/tools.rb +0 -35
- data/lib/protos/common/configtx_pb.rb +0 -71
- data/lib/protos/discovery/protocol_pb.rb +0 -119
- data/lib/protos/gossip/message_pb.rb +0 -233
- data/lib/protos/ledger/rwset/kvrwset/kv_rwset_pb.rb +0 -85
- data/lib/protos/ledger/rwset/rwset_pb.rb +0 -46
- data/lib/protos/orderer/ab_pb.rb +0 -52
- data/lib/protos/peer/chaincode_pb.rb +0 -60
- data/lib/protos/peer/chaincode_shim_pb.rb +0 -94
- data/lib/protos/peer/events_pb.rb +0 -98
- data/lib/protos/peer/events_services_pb.rb +0 -59
@@ -4,51 +4,51 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
-
add_message
|
8
|
-
optional :principal_classification, :enum, 1,
|
7
|
+
add_message 'common.MSPPrincipal' do
|
8
|
+
optional :principal_classification, :enum, 1, 'common.MSPPrincipal.Classification'
|
9
9
|
optional :principal, :bytes, 2
|
10
10
|
end
|
11
|
-
add_enum
|
11
|
+
add_enum 'common.MSPPrincipal.Classification' do
|
12
12
|
value :ROLE, 0
|
13
13
|
value :ORGANIZATION_UNIT, 1
|
14
14
|
value :IDENTITY, 2
|
15
15
|
value :ANONYMITY, 3
|
16
16
|
value :COMBINED, 4
|
17
17
|
end
|
18
|
-
add_message
|
18
|
+
add_message 'common.OrganizationUnit' do
|
19
19
|
optional :msp_identifier, :string, 1
|
20
20
|
optional :organizational_unit_identifier, :string, 2
|
21
21
|
optional :certifiers_identifier, :bytes, 3
|
22
22
|
end
|
23
|
-
add_message
|
23
|
+
add_message 'common.MSPRole' do
|
24
24
|
optional :msp_identifier, :string, 1
|
25
|
-
optional :role, :enum, 2,
|
25
|
+
optional :role, :enum, 2, 'common.MSPRole.MSPRoleType'
|
26
26
|
end
|
27
|
-
add_enum
|
27
|
+
add_enum 'common.MSPRole.MSPRoleType' do
|
28
28
|
value :MEMBER, 0
|
29
29
|
value :ADMIN, 1
|
30
30
|
value :CLIENT, 2
|
31
31
|
value :PEER, 3
|
32
32
|
end
|
33
|
-
add_message
|
34
|
-
optional :anonymity_type, :enum, 1,
|
33
|
+
add_message 'common.MSPIdentityAnonymity' do
|
34
|
+
optional :anonymity_type, :enum, 1, 'common.MSPIdentityAnonymity.MSPIdentityAnonymityType'
|
35
35
|
end
|
36
|
-
add_enum
|
36
|
+
add_enum 'common.MSPIdentityAnonymity.MSPIdentityAnonymityType' do
|
37
37
|
value :NOMINAL, 0
|
38
38
|
value :ANONYMOUS, 1
|
39
39
|
end
|
40
|
-
add_message
|
41
|
-
repeated :principals, :message, 1,
|
40
|
+
add_message 'common.CombinedPrincipal' do
|
41
|
+
repeated :principals, :message, 1, 'common.MSPPrincipal'
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
45
|
module Common
|
46
|
-
MSPPrincipal = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
47
|
-
MSPPrincipal::Classification = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
48
|
-
OrganizationUnit = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
49
|
-
MSPRole = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
50
|
-
MSPRole::MSPRoleType = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
51
|
-
MSPIdentityAnonymity = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
52
|
-
MSPIdentityAnonymity::MSPIdentityAnonymityType = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
53
|
-
CombinedPrincipal = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
46
|
+
MSPPrincipal = Google::Protobuf::DescriptorPool.generated_pool.lookup('common.MSPPrincipal').msgclass
|
47
|
+
MSPPrincipal::Classification = Google::Protobuf::DescriptorPool.generated_pool.lookup('common.MSPPrincipal.Classification').enummodule
|
48
|
+
OrganizationUnit = Google::Protobuf::DescriptorPool.generated_pool.lookup('common.OrganizationUnit').msgclass
|
49
|
+
MSPRole = Google::Protobuf::DescriptorPool.generated_pool.lookup('common.MSPRole').msgclass
|
50
|
+
MSPRole::MSPRoleType = Google::Protobuf::DescriptorPool.generated_pool.lookup('common.MSPRole.MSPRoleType').enummodule
|
51
|
+
MSPIdentityAnonymity = Google::Protobuf::DescriptorPool.generated_pool.lookup('common.MSPIdentityAnonymity').msgclass
|
52
|
+
MSPIdentityAnonymity::MSPIdentityAnonymityType = Google::Protobuf::DescriptorPool.generated_pool.lookup('common.MSPIdentityAnonymity.MSPIdentityAnonymityType').enummodule
|
53
|
+
CombinedPrincipal = Google::Protobuf::DescriptorPool.generated_pool.lookup('common.CombinedPrincipal').msgclass
|
54
54
|
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: orderer/ab.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'common/common_pb'
|
7
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
+
add_message 'orderer.BroadcastResponse' do
|
9
|
+
optional :status, :enum, 1, 'common.Status'
|
10
|
+
optional :info, :string, 2
|
11
|
+
end
|
12
|
+
add_message 'orderer.SeekNewest' do
|
13
|
+
end
|
14
|
+
add_message 'orderer.SeekOldest' do
|
15
|
+
end
|
16
|
+
add_message 'orderer.SeekSpecified' do
|
17
|
+
optional :number, :uint64, 1
|
18
|
+
end
|
19
|
+
add_message 'orderer.SeekPosition' do
|
20
|
+
oneof :Type do
|
21
|
+
optional :newest, :message, 1, 'orderer.SeekNewest'
|
22
|
+
optional :oldest, :message, 2, 'orderer.SeekOldest'
|
23
|
+
optional :specified, :message, 3, 'orderer.SeekSpecified'
|
24
|
+
end
|
25
|
+
end
|
26
|
+
add_message 'orderer.SeekInfo' do
|
27
|
+
optional :start, :message, 1, 'orderer.SeekPosition'
|
28
|
+
optional :stop, :message, 2, 'orderer.SeekPosition'
|
29
|
+
optional :behavior, :enum, 3, 'orderer.SeekInfo.SeekBehavior'
|
30
|
+
end
|
31
|
+
add_enum 'orderer.SeekInfo.SeekBehavior' do
|
32
|
+
value :BLOCK_UNTIL_READY, 0
|
33
|
+
value :FAIL_IF_NOT_READY, 1
|
34
|
+
end
|
35
|
+
add_message 'orderer.DeliverResponse' do
|
36
|
+
oneof :Type do
|
37
|
+
optional :status, :enum, 1, 'common.Status'
|
38
|
+
optional :block, :message, 2, 'common.Block'
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
module Orderer
|
44
|
+
BroadcastResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup('orderer.BroadcastResponse').msgclass
|
45
|
+
SeekNewest = Google::Protobuf::DescriptorPool.generated_pool.lookup('orderer.SeekNewest').msgclass
|
46
|
+
SeekOldest = Google::Protobuf::DescriptorPool.generated_pool.lookup('orderer.SeekOldest').msgclass
|
47
|
+
SeekSpecified = Google::Protobuf::DescriptorPool.generated_pool.lookup('orderer.SeekSpecified').msgclass
|
48
|
+
SeekPosition = Google::Protobuf::DescriptorPool.generated_pool.lookup('orderer.SeekPosition').msgclass
|
49
|
+
SeekInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup('orderer.SeekInfo').msgclass
|
50
|
+
SeekInfo::SeekBehavior = Google::Protobuf::DescriptorPool.generated_pool.lookup('orderer.SeekInfo.SeekBehavior').enummodule
|
51
|
+
DeliverResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup('orderer.DeliverResponse').msgclass
|
52
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: orderer/cluster.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'common/common_pb'
|
7
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
+
add_message 'orderer.StepRequest' do
|
9
|
+
optional :channel, :string, 1
|
10
|
+
optional :payload, :bytes, 2
|
11
|
+
end
|
12
|
+
add_message 'orderer.StepResponse' do
|
13
|
+
optional :payload, :bytes, 1
|
14
|
+
end
|
15
|
+
add_message 'orderer.SubmitRequest' do
|
16
|
+
optional :channel, :string, 1
|
17
|
+
optional :last_validation_seq, :uint64, 2
|
18
|
+
optional :content, :message, 3, 'common.Envelope'
|
19
|
+
end
|
20
|
+
add_message 'orderer.SubmitResponse' do
|
21
|
+
optional :status, :enum, 1, 'common.Status'
|
22
|
+
optional :info, :string, 2
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
module Orderer
|
27
|
+
StepRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup('orderer.StepRequest').msgclass
|
28
|
+
StepResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup('orderer.StepResponse').msgclass
|
29
|
+
SubmitRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup('orderer.SubmitRequest').msgclass
|
30
|
+
SubmitResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup('orderer.SubmitResponse').msgclass
|
31
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: orderer/cluster.proto for package 'orderer'
|
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 'orderer/cluster_pb'
|
12
|
+
|
13
|
+
module Orderer
|
14
|
+
module Cluster
|
15
|
+
# Cluster defines communication between cluster members.
|
16
|
+
class Service
|
17
|
+
include GRPC::GenericService
|
18
|
+
|
19
|
+
self.marshal_class_method = :encode
|
20
|
+
self.unmarshal_class_method = :decode
|
21
|
+
self.service_name = 'orderer.Cluster'
|
22
|
+
|
23
|
+
# Submit submits transactions to a cluster member
|
24
|
+
rpc :Submit, stream(SubmitRequest), stream(SubmitResponse)
|
25
|
+
# Step passes an implementation-specific message to another cluster member.
|
26
|
+
rpc :Step, StepRequest, StepResponse
|
27
|
+
end
|
28
|
+
|
29
|
+
Stub = Service.rpc_stub_class
|
30
|
+
end
|
31
|
+
end
|
@@ -4,29 +4,30 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
-
add_message
|
7
|
+
add_message 'orderer.ConsensusType' do
|
8
8
|
optional :type, :string, 1
|
9
|
+
optional :metadata, :bytes, 2
|
9
10
|
end
|
10
|
-
add_message
|
11
|
+
add_message 'orderer.BatchSize' do
|
11
12
|
optional :max_message_count, :uint32, 1
|
12
13
|
optional :absolute_max_bytes, :uint32, 2
|
13
14
|
optional :preferred_max_bytes, :uint32, 3
|
14
15
|
end
|
15
|
-
add_message
|
16
|
+
add_message 'orderer.BatchTimeout' do
|
16
17
|
optional :timeout, :string, 1
|
17
18
|
end
|
18
|
-
add_message
|
19
|
+
add_message 'orderer.KafkaBrokers' do
|
19
20
|
repeated :brokers, :string, 1
|
20
21
|
end
|
21
|
-
add_message
|
22
|
+
add_message 'orderer.ChannelRestrictions' do
|
22
23
|
optional :max_count, :uint64, 1
|
23
24
|
end
|
24
25
|
end
|
25
26
|
|
26
27
|
module Orderer
|
27
|
-
ConsensusType = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
28
|
-
BatchSize = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
29
|
-
BatchTimeout = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
30
|
-
KafkaBrokers = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
31
|
-
ChannelRestrictions = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
28
|
+
ConsensusType = Google::Protobuf::DescriptorPool.generated_pool.lookup('orderer.ConsensusType').msgclass
|
29
|
+
BatchSize = Google::Protobuf::DescriptorPool.generated_pool.lookup('orderer.BatchSize').msgclass
|
30
|
+
BatchTimeout = Google::Protobuf::DescriptorPool.generated_pool.lookup('orderer.BatchTimeout').msgclass
|
31
|
+
KafkaBrokers = Google::Protobuf::DescriptorPool.generated_pool.lookup('orderer.KafkaBrokers').msgclass
|
32
|
+
ChannelRestrictions = Google::Protobuf::DescriptorPool.generated_pool.lookup('orderer.ChannelRestrictions').msgclass
|
32
33
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: orderer/etcdraft/configuration.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_message 'etcdraft.Metadata' do
|
8
|
+
repeated :consenters, :message, 1, 'etcdraft.Consenter'
|
9
|
+
end
|
10
|
+
add_message 'etcdraft.Consenter' do
|
11
|
+
optional :host, :string, 1
|
12
|
+
optional :port, :uint32, 2
|
13
|
+
optional :client_tls_cert, :bytes, 3
|
14
|
+
optional :server_tls_cert, :bytes, 4
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
module Etcdraft
|
19
|
+
Metadata = Google::Protobuf::DescriptorPool.generated_pool.lookup('etcdraft.Metadata').msgclass
|
20
|
+
Consenter = Google::Protobuf::DescriptorPool.generated_pool.lookup('etcdraft.Consenter').msgclass
|
21
|
+
end
|
@@ -4,31 +4,31 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
-
add_message
|
7
|
+
add_message 'orderer.KafkaMessage' do
|
8
8
|
oneof :Type do
|
9
|
-
optional :regular, :message, 1,
|
10
|
-
optional :time_to_cut, :message, 2,
|
11
|
-
optional :connect, :message, 3,
|
9
|
+
optional :regular, :message, 1, 'orderer.KafkaMessageRegular'
|
10
|
+
optional :time_to_cut, :message, 2, 'orderer.KafkaMessageTimeToCut'
|
11
|
+
optional :connect, :message, 3, 'orderer.KafkaMessageConnect'
|
12
12
|
end
|
13
13
|
end
|
14
|
-
add_message
|
14
|
+
add_message 'orderer.KafkaMessageRegular' do
|
15
15
|
optional :payload, :bytes, 1
|
16
16
|
optional :config_seq, :uint64, 2
|
17
|
-
optional :class, :enum, 3,
|
17
|
+
optional :class, :enum, 3, 'orderer.KafkaMessageRegular.Class'
|
18
18
|
optional :original_offset, :int64, 4
|
19
19
|
end
|
20
|
-
add_enum
|
20
|
+
add_enum 'orderer.KafkaMessageRegular.Class' do
|
21
21
|
value :UNKNOWN, 0
|
22
22
|
value :NORMAL, 1
|
23
23
|
value :CONFIG, 2
|
24
24
|
end
|
25
|
-
add_message
|
25
|
+
add_message 'orderer.KafkaMessageTimeToCut' do
|
26
26
|
optional :block_number, :uint64, 1
|
27
27
|
end
|
28
|
-
add_message
|
28
|
+
add_message 'orderer.KafkaMessageConnect' do
|
29
29
|
optional :payload, :bytes, 1
|
30
30
|
end
|
31
|
-
add_message
|
31
|
+
add_message 'orderer.KafkaMetadata' do
|
32
32
|
optional :last_offset_persisted, :int64, 1
|
33
33
|
optional :last_original_offset_processed, :int64, 2
|
34
34
|
optional :last_resubmitted_config_offset, :int64, 3
|
@@ -36,10 +36,10 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
36
36
|
end
|
37
37
|
|
38
38
|
module Orderer
|
39
|
-
KafkaMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
40
|
-
KafkaMessageRegular = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
41
|
-
KafkaMessageRegular::Class = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
42
|
-
KafkaMessageTimeToCut = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
43
|
-
KafkaMessageConnect = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
44
|
-
KafkaMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
39
|
+
KafkaMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup('orderer.KafkaMessage').msgclass
|
40
|
+
KafkaMessageRegular = Google::Protobuf::DescriptorPool.generated_pool.lookup('orderer.KafkaMessageRegular').msgclass
|
41
|
+
KafkaMessageRegular::Class = Google::Protobuf::DescriptorPool.generated_pool.lookup('orderer.KafkaMessageRegular.Class').enummodule
|
42
|
+
KafkaMessageTimeToCut = Google::Protobuf::DescriptorPool.generated_pool.lookup('orderer.KafkaMessageTimeToCut').msgclass
|
43
|
+
KafkaMessageConnect = Google::Protobuf::DescriptorPool.generated_pool.lookup('orderer.KafkaMessageConnect').msgclass
|
44
|
+
KafkaMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup('orderer.KafkaMetadata').msgclass
|
45
45
|
end
|
@@ -6,10 +6,10 @@ require 'google/protobuf'
|
|
6
6
|
require 'google/protobuf/empty_pb'
|
7
7
|
require 'common/common_pb'
|
8
8
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
-
add_message
|
10
|
-
optional :status, :enum, 1,
|
9
|
+
add_message 'protos.ServerStatus' do
|
10
|
+
optional :status, :enum, 1, 'protos.ServerStatus.StatusCode'
|
11
11
|
end
|
12
|
-
add_enum
|
12
|
+
add_enum 'protos.ServerStatus.StatusCode' do
|
13
13
|
value :UNDEFINED, 0
|
14
14
|
value :STARTED, 1
|
15
15
|
value :STOPPED, 2
|
@@ -17,25 +17,25 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
17
17
|
value :ERROR, 4
|
18
18
|
value :UNKNOWN, 5
|
19
19
|
end
|
20
|
-
add_message
|
20
|
+
add_message 'protos.LogLevelRequest' do
|
21
21
|
optional :log_module, :string, 1
|
22
22
|
optional :log_level, :string, 2
|
23
23
|
end
|
24
|
-
add_message
|
24
|
+
add_message 'protos.LogLevelResponse' do
|
25
25
|
optional :log_module, :string, 1
|
26
26
|
optional :log_level, :string, 2
|
27
27
|
end
|
28
|
-
add_message
|
28
|
+
add_message 'protos.AdminOperation' do
|
29
29
|
oneof :content do
|
30
|
-
optional :logReq, :message, 1,
|
30
|
+
optional :logReq, :message, 1, 'protos.LogLevelRequest'
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
35
|
module Protos
|
36
|
-
ServerStatus = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
37
|
-
ServerStatus::StatusCode = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
38
|
-
LogLevelRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
39
|
-
LogLevelResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
40
|
-
AdminOperation = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
36
|
+
ServerStatus = Google::Protobuf::DescriptorPool.generated_pool.lookup('protos.ServerStatus').msgclass
|
37
|
+
ServerStatus::StatusCode = Google::Protobuf::DescriptorPool.generated_pool.lookup('protos.ServerStatus.StatusCode').enummodule
|
38
|
+
LogLevelRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup('protos.LogLevelRequest').msgclass
|
39
|
+
LogLevelResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup('protos.LogLevelResponse').msgclass
|
40
|
+
AdminOperation = Google::Protobuf::DescriptorPool.generated_pool.lookup('protos.AdminOperation').msgclass
|
41
41
|
end
|
@@ -4,7 +4,7 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
-
add_message
|
7
|
+
add_message 'protos.ChaincodeEvent' do
|
8
8
|
optional :chaincode_id, :string, 1
|
9
9
|
optional :tx_id, :string, 2
|
10
10
|
optional :event_name, :string, 3
|
@@ -13,5 +13,5 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
13
13
|
end
|
14
14
|
|
15
15
|
module Protos
|
16
|
-
ChaincodeEvent = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
16
|
+
ChaincodeEvent = Google::Protobuf::DescriptorPool.generated_pool.lookup('protos.ChaincodeEvent').msgclass
|
17
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,129 @@
|
|
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
|
+
value :GET_STATE_METADATA, 20
|
40
|
+
value :PUT_STATE_METADATA, 21
|
41
|
+
end
|
42
|
+
add_message 'protos.GetState' do
|
43
|
+
optional :key, :string, 1
|
44
|
+
optional :collection, :string, 2
|
45
|
+
end
|
46
|
+
add_message 'protos.GetStateMetadata' do
|
47
|
+
optional :key, :string, 1
|
48
|
+
optional :collection, :string, 2
|
49
|
+
end
|
50
|
+
add_message 'protos.PutState' do
|
51
|
+
optional :key, :string, 1
|
52
|
+
optional :value, :bytes, 2
|
53
|
+
optional :collection, :string, 3
|
54
|
+
end
|
55
|
+
add_message 'protos.PutStateMetadata' do
|
56
|
+
optional :key, :string, 1
|
57
|
+
optional :collection, :string, 3
|
58
|
+
optional :metadata, :message, 4, 'protos.StateMetadata'
|
59
|
+
end
|
60
|
+
add_message 'protos.DelState' do
|
61
|
+
optional :key, :string, 1
|
62
|
+
optional :collection, :string, 2
|
63
|
+
end
|
64
|
+
add_message 'protos.GetStateByRange' do
|
65
|
+
optional :startKey, :string, 1
|
66
|
+
optional :endKey, :string, 2
|
67
|
+
optional :collection, :string, 3
|
68
|
+
optional :metadata, :bytes, 4
|
69
|
+
end
|
70
|
+
add_message 'protos.GetQueryResult' do
|
71
|
+
optional :query, :string, 1
|
72
|
+
optional :collection, :string, 2
|
73
|
+
optional :metadata, :bytes, 3
|
74
|
+
end
|
75
|
+
add_message 'protos.QueryMetadata' do
|
76
|
+
optional :pageSize, :int32, 1
|
77
|
+
optional :bookmark, :string, 2
|
78
|
+
end
|
79
|
+
add_message 'protos.GetHistoryForKey' do
|
80
|
+
optional :key, :string, 1
|
81
|
+
end
|
82
|
+
add_message 'protos.QueryStateNext' do
|
83
|
+
optional :id, :string, 1
|
84
|
+
end
|
85
|
+
add_message 'protos.QueryStateClose' do
|
86
|
+
optional :id, :string, 1
|
87
|
+
end
|
88
|
+
add_message 'protos.QueryResultBytes' do
|
89
|
+
optional :resultBytes, :bytes, 1
|
90
|
+
end
|
91
|
+
add_message 'protos.QueryResponse' do
|
92
|
+
repeated :results, :message, 1, 'protos.QueryResultBytes'
|
93
|
+
optional :has_more, :bool, 2
|
94
|
+
optional :id, :string, 3
|
95
|
+
optional :metadata, :bytes, 4
|
96
|
+
end
|
97
|
+
add_message 'protos.QueryResponseMetadata' do
|
98
|
+
optional :fetched_records_count, :int32, 1
|
99
|
+
optional :bookmark, :string, 2
|
100
|
+
end
|
101
|
+
add_message 'protos.StateMetadata' do
|
102
|
+
optional :metakey, :string, 1
|
103
|
+
optional :value, :bytes, 2
|
104
|
+
end
|
105
|
+
add_message 'protos.StateMetadataResult' do
|
106
|
+
repeated :entries, :message, 1, 'protos.StateMetadata'
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
module Protos
|
111
|
+
ChaincodeMessage = Google::Protobuf::DescriptorPool.generated_pool.lookup('protos.ChaincodeMessage').msgclass
|
112
|
+
ChaincodeMessage::Type = Google::Protobuf::DescriptorPool.generated_pool.lookup('protos.ChaincodeMessage.Type').enummodule
|
113
|
+
GetState = Google::Protobuf::DescriptorPool.generated_pool.lookup('protos.GetState').msgclass
|
114
|
+
GetStateMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup('protos.GetStateMetadata').msgclass
|
115
|
+
PutState = Google::Protobuf::DescriptorPool.generated_pool.lookup('protos.PutState').msgclass
|
116
|
+
PutStateMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup('protos.PutStateMetadata').msgclass
|
117
|
+
DelState = Google::Protobuf::DescriptorPool.generated_pool.lookup('protos.DelState').msgclass
|
118
|
+
GetStateByRange = Google::Protobuf::DescriptorPool.generated_pool.lookup('protos.GetStateByRange').msgclass
|
119
|
+
GetQueryResult = Google::Protobuf::DescriptorPool.generated_pool.lookup('protos.GetQueryResult').msgclass
|
120
|
+
QueryMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup('protos.QueryMetadata').msgclass
|
121
|
+
GetHistoryForKey = Google::Protobuf::DescriptorPool.generated_pool.lookup('protos.GetHistoryForKey').msgclass
|
122
|
+
QueryStateNext = Google::Protobuf::DescriptorPool.generated_pool.lookup('protos.QueryStateNext').msgclass
|
123
|
+
QueryStateClose = Google::Protobuf::DescriptorPool.generated_pool.lookup('protos.QueryStateClose').msgclass
|
124
|
+
QueryResultBytes = Google::Protobuf::DescriptorPool.generated_pool.lookup('protos.QueryResultBytes').msgclass
|
125
|
+
QueryResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup('protos.QueryResponse').msgclass
|
126
|
+
QueryResponseMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup('protos.QueryResponseMetadata').msgclass
|
127
|
+
StateMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup('protos.StateMetadata').msgclass
|
128
|
+
StateMetadataResult = Google::Protobuf::DescriptorPool.generated_pool.lookup('protos.StateMetadataResult').msgclass
|
129
|
+
end
|
@@ -15,7 +15,6 @@ module Protos
|
|
15
15
|
# Interface that provides support to chaincode execution. ChaincodeContext
|
16
16
|
# provides the context necessary for the server to respond appropriately.
|
17
17
|
class Service
|
18
|
-
|
19
18
|
include GRPC::GenericService
|
20
19
|
|
21
20
|
self.marshal_class_method = :encode
|
@@ -4,24 +4,24 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
-
add_message
|
8
|
-
repeated :anchor_peers, :message, 1,
|
7
|
+
add_message 'protos.AnchorPeers' do
|
8
|
+
repeated :anchor_peers, :message, 1, 'protos.AnchorPeer'
|
9
9
|
end
|
10
|
-
add_message
|
10
|
+
add_message 'protos.AnchorPeer' do
|
11
11
|
optional :host, :string, 1
|
12
12
|
optional :port, :int32, 2
|
13
13
|
end
|
14
|
-
add_message
|
14
|
+
add_message 'protos.APIResource' do
|
15
15
|
optional :policy_ref, :string, 1
|
16
16
|
end
|
17
|
-
add_message
|
18
|
-
map :acls, :string, :message, 1,
|
17
|
+
add_message 'protos.ACLs' do
|
18
|
+
map :acls, :string, :message, 1, 'protos.APIResource'
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
22
|
module Protos
|
23
|
-
AnchorPeers = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
24
|
-
AnchorPeer = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
25
|
-
APIResource = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
26
|
-
ACLs = Google::Protobuf::DescriptorPool.generated_pool.lookup(
|
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
27
|
end
|