hyperledger-fabric-sdk 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/crypto_suite/ecdsa_aes.rb +86 -0
- data/lib/fabric/channel.rb +54 -0
- data/lib/fabric/client.rb +45 -0
- data/lib/fabric/configuration.rb +25 -0
- data/lib/fabric/constants.rb +18 -0
- data/lib/fabric/identity.rb +36 -0
- data/lib/fabric/orderer.rb +19 -0
- data/lib/fabric/peer.rb +58 -0
- data/lib/fabric/peer_endorser.rb +85 -0
- data/lib/fabric/transaction_id.rb +11 -0
- data/lib/fabric/user.rb +24 -0
- data/lib/fabric/version.rb +3 -0
- data/lib/fabric_ca/client.rb +51 -0
- data/lib/fabric_ca/configuration.rb +25 -0
- data/lib/fabric_ca/connection.rb +32 -0
- data/lib/fabric_ca/error.rb +11 -0
- data/lib/fabric_ca/faraday_middleware/basic_auth.rb +33 -0
- data/lib/fabric_ca/faraday_middleware/raise_http_exception.rb +47 -0
- data/lib/fabric_ca/faraday_middleware/token_auth.rb +38 -0
- data/lib/fabric_ca/request.rb +50 -0
- data/lib/fabric_ca/response.rb +10 -0
- data/lib/fabric_ca/tools.rb +35 -0
- data/lib/fabric_ca/version.rb +3 -0
- data/lib/hyperledger-fabric-sdk.rb +47 -0
- data/lib/protos/common/collection_pb.rb +42 -0
- data/lib/protos/common/common_pb.rb +106 -0
- data/lib/protos/common/configtx_pb.rb +71 -0
- data/lib/protos/common/configuration_pb.rb +33 -0
- data/lib/protos/common/ledger_pb.rb +16 -0
- data/lib/protos/common/policies_pb.rb +52 -0
- data/lib/protos/discovery/protocol_pb.rb +119 -0
- data/lib/protos/discovery/protocol_services_pb.rb +30 -0
- data/lib/protos/gossip/message_pb.rb +233 -0
- data/lib/protos/gossip/message_services_pb.rb +31 -0
- data/lib/protos/idemix/idemix_pb.rb +93 -0
- data/lib/protos/ledger/queryresult/kv_query_result_pb.rb +24 -0
- data/lib/protos/ledger/rwset/kvrwset/kv_rwset_pb.rb +85 -0
- data/lib/protos/ledger/rwset/rwset_pb.rb +46 -0
- data/lib/protos/msp/identities_pb.rb +23 -0
- data/lib/protos/msp/msp_config_pb.rb +72 -0
- data/lib/protos/msp/msp_principal_pb.rb +54 -0
- data/lib/protos/orderer/ab_pb.rb +52 -0
- data/lib/protos/orderer/ab_services_pb.rb +41 -0
- data/lib/protos/orderer/configuration_pb.rb +32 -0
- data/lib/protos/orderer/kafka_pb.rb +45 -0
- data/lib/protos/peer/admin_pb.rb +41 -0
- data/lib/protos/peer/admin_services_pb.rb +33 -0
- data/lib/protos/peer/chaincode_event_pb.rb +17 -0
- data/lib/protos/peer/chaincode_pb.rb +60 -0
- data/lib/protos/peer/chaincode_shim_pb.rb +94 -0
- data/lib/protos/peer/chaincode_shim_services_pb.rb +30 -0
- data/lib/protos/peer/configuration_pb.rb +27 -0
- data/lib/protos/peer/events_pb.rb +98 -0
- data/lib/protos/peer/events_services_pb.rb +59 -0
- data/lib/protos/peer/peer_pb.rb +21 -0
- data/lib/protos/peer/peer_services_pb.rb +37 -0
- data/lib/protos/peer/proposal_pb.rb +40 -0
- data/lib/protos/peer/proposal_response_pb.rb +35 -0
- data/lib/protos/peer/query_pb.rb +32 -0
- data/lib/protos/peer/resources_pb.rb +34 -0
- data/lib/protos/peer/signed_cc_dep_spec_pb.rb +17 -0
- data/lib/protos/peer/transaction_pb.rb +72 -0
- data/lib/protos/transientstore/transientstore_pb.rb +18 -0
- metadata +123 -0
@@ -0,0 +1,42 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: common/collection.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'common/policies_pb'
|
7
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
+
add_message "common.CollectionConfigPackage" do
|
9
|
+
repeated :config, :message, 1, "common.CollectionConfig"
|
10
|
+
end
|
11
|
+
add_message "common.CollectionConfig" do
|
12
|
+
oneof :payload do
|
13
|
+
optional :static_collection_config, :message, 1, "common.StaticCollectionConfig"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
add_message "common.StaticCollectionConfig" do
|
17
|
+
optional :name, :string, 1
|
18
|
+
optional :member_orgs_policy, :message, 2, "common.CollectionPolicyConfig"
|
19
|
+
optional :required_peer_count, :int32, 3
|
20
|
+
optional :maximum_peer_count, :int32, 4
|
21
|
+
optional :block_to_live, :uint64, 5
|
22
|
+
end
|
23
|
+
add_message "common.CollectionPolicyConfig" do
|
24
|
+
oneof :payload do
|
25
|
+
optional :signature_policy, :message, 1, "common.SignaturePolicyEnvelope"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
add_message "common.CollectionCriteria" do
|
29
|
+
optional :channel, :string, 1
|
30
|
+
optional :tx_id, :string, 2
|
31
|
+
optional :collection, :string, 3
|
32
|
+
optional :namespace, :string, 4
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
module Common
|
37
|
+
CollectionConfigPackage = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.CollectionConfigPackage").msgclass
|
38
|
+
CollectionConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.CollectionConfig").msgclass
|
39
|
+
StaticCollectionConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.StaticCollectionConfig").msgclass
|
40
|
+
CollectionPolicyConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.CollectionPolicyConfig").msgclass
|
41
|
+
CollectionCriteria = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.CollectionCriteria").msgclass
|
42
|
+
end
|
@@ -0,0 +1,106 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: common/common.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/protobuf/timestamp_pb'
|
7
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
+
add_message "common.LastConfig" do
|
9
|
+
optional :index, :uint64, 1
|
10
|
+
end
|
11
|
+
add_message "common.Metadata" do
|
12
|
+
optional :value, :bytes, 1
|
13
|
+
repeated :signatures, :message, 2, "common.MetadataSignature"
|
14
|
+
end
|
15
|
+
add_message "common.MetadataSignature" do
|
16
|
+
optional :signature_header, :bytes, 1
|
17
|
+
optional :signature, :bytes, 2
|
18
|
+
end
|
19
|
+
add_message "common.Header" do
|
20
|
+
optional :channel_header, :bytes, 1
|
21
|
+
optional :signature_header, :bytes, 2
|
22
|
+
end
|
23
|
+
add_message "common.ChannelHeader" do
|
24
|
+
optional :type, :int32, 1
|
25
|
+
optional :version, :int32, 2
|
26
|
+
optional :timestamp, :message, 3, "google.protobuf.Timestamp"
|
27
|
+
optional :channel_id, :string, 4
|
28
|
+
optional :tx_id, :string, 5
|
29
|
+
optional :epoch, :uint64, 6
|
30
|
+
optional :extension, :bytes, 7
|
31
|
+
optional :tls_cert_hash, :bytes, 8
|
32
|
+
end
|
33
|
+
add_message "common.SignatureHeader" do
|
34
|
+
optional :creator, :bytes, 1
|
35
|
+
optional :nonce, :bytes, 2
|
36
|
+
end
|
37
|
+
add_message "common.Payload" do
|
38
|
+
optional :header, :message, 1, "common.Header"
|
39
|
+
optional :data, :bytes, 2
|
40
|
+
end
|
41
|
+
add_message "common.Envelope" do
|
42
|
+
optional :payload, :bytes, 1
|
43
|
+
optional :signature, :bytes, 2
|
44
|
+
end
|
45
|
+
add_message "common.Block" do
|
46
|
+
optional :header, :message, 1, "common.BlockHeader"
|
47
|
+
optional :data, :message, 2, "common.BlockData"
|
48
|
+
optional :metadata, :message, 3, "common.BlockMetadata"
|
49
|
+
end
|
50
|
+
add_message "common.BlockHeader" do
|
51
|
+
optional :number, :uint64, 1
|
52
|
+
optional :previous_hash, :bytes, 2
|
53
|
+
optional :data_hash, :bytes, 3
|
54
|
+
end
|
55
|
+
add_message "common.BlockData" do
|
56
|
+
repeated :data, :bytes, 1
|
57
|
+
end
|
58
|
+
add_message "common.BlockMetadata" do
|
59
|
+
repeated :metadata, :bytes, 1
|
60
|
+
end
|
61
|
+
add_enum "common.Status" do
|
62
|
+
value :UNKNOWN, 0
|
63
|
+
value :SUCCESS, 200
|
64
|
+
value :BAD_REQUEST, 400
|
65
|
+
value :FORBIDDEN, 403
|
66
|
+
value :NOT_FOUND, 404
|
67
|
+
value :REQUEST_ENTITY_TOO_LARGE, 413
|
68
|
+
value :INTERNAL_SERVER_ERROR, 500
|
69
|
+
value :NOT_IMPLEMENTED, 501
|
70
|
+
value :SERVICE_UNAVAILABLE, 503
|
71
|
+
end
|
72
|
+
add_enum "common.HeaderType" do
|
73
|
+
value :MESSAGE, 0
|
74
|
+
value :CONFIG, 1
|
75
|
+
value :CONFIG_UPDATE, 2
|
76
|
+
value :ENDORSER_TRANSACTION, 3
|
77
|
+
value :ORDERER_TRANSACTION, 4
|
78
|
+
value :DELIVER_SEEK_INFO, 5
|
79
|
+
value :CHAINCODE_PACKAGE, 6
|
80
|
+
value :PEER_ADMIN_OPERATION, 8
|
81
|
+
end
|
82
|
+
add_enum "common.BlockMetadataIndex" do
|
83
|
+
value :SIGNATURES, 0
|
84
|
+
value :LAST_CONFIG, 1
|
85
|
+
value :TRANSACTIONS_FILTER, 2
|
86
|
+
value :ORDERER, 3
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
module Common
|
91
|
+
LastConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.LastConfig").msgclass
|
92
|
+
Metadata = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.Metadata").msgclass
|
93
|
+
MetadataSignature = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.MetadataSignature").msgclass
|
94
|
+
Header = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.Header").msgclass
|
95
|
+
ChannelHeader = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.ChannelHeader").msgclass
|
96
|
+
SignatureHeader = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.SignatureHeader").msgclass
|
97
|
+
Payload = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.Payload").msgclass
|
98
|
+
Envelope = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.Envelope").msgclass
|
99
|
+
Block = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.Block").msgclass
|
100
|
+
BlockHeader = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.BlockHeader").msgclass
|
101
|
+
BlockData = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.BlockData").msgclass
|
102
|
+
BlockMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.BlockMetadata").msgclass
|
103
|
+
Status = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.Status").enummodule
|
104
|
+
HeaderType = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.HeaderType").enummodule
|
105
|
+
BlockMetadataIndex = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.BlockMetadataIndex").enummodule
|
106
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: common/configtx.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'common/common_pb'
|
7
|
+
require 'common/policies_pb'
|
8
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
+
add_message "common.ConfigEnvelope" do
|
10
|
+
optional :config, :message, 1, "common.Config"
|
11
|
+
optional :last_update, :message, 2, "common.Envelope"
|
12
|
+
end
|
13
|
+
add_message "common.ConfigGroupSchema" do
|
14
|
+
map :groups, :string, :message, 1, "common.ConfigGroupSchema"
|
15
|
+
map :values, :string, :message, 2, "common.ConfigValueSchema"
|
16
|
+
map :policies, :string, :message, 3, "common.ConfigPolicySchema"
|
17
|
+
end
|
18
|
+
add_message "common.ConfigValueSchema" do
|
19
|
+
end
|
20
|
+
add_message "common.ConfigPolicySchema" do
|
21
|
+
end
|
22
|
+
add_message "common.Config" do
|
23
|
+
optional :sequence, :uint64, 1
|
24
|
+
optional :channel_group, :message, 2, "common.ConfigGroup"
|
25
|
+
end
|
26
|
+
add_message "common.ConfigUpdateEnvelope" do
|
27
|
+
optional :config_update, :bytes, 1
|
28
|
+
repeated :signatures, :message, 2, "common.ConfigSignature"
|
29
|
+
end
|
30
|
+
add_message "common.ConfigUpdate" do
|
31
|
+
optional :channel_id, :string, 1
|
32
|
+
optional :read_set, :message, 2, "common.ConfigGroup"
|
33
|
+
optional :write_set, :message, 3, "common.ConfigGroup"
|
34
|
+
map :isolated_data, :string, :bytes, 5
|
35
|
+
end
|
36
|
+
add_message "common.ConfigGroup" do
|
37
|
+
optional :version, :uint64, 1
|
38
|
+
map :groups, :string, :message, 2, "common.ConfigGroup"
|
39
|
+
map :values, :string, :message, 3, "common.ConfigValue"
|
40
|
+
map :policies, :string, :message, 4, "common.ConfigPolicy"
|
41
|
+
optional :mod_policy, :string, 5
|
42
|
+
end
|
43
|
+
add_message "common.ConfigValue" do
|
44
|
+
optional :version, :uint64, 1
|
45
|
+
optional :value, :bytes, 2
|
46
|
+
optional :mod_policy, :string, 3
|
47
|
+
end
|
48
|
+
add_message "common.ConfigPolicy" do
|
49
|
+
optional :version, :uint64, 1
|
50
|
+
optional :policy, :message, 2, "common.Policy"
|
51
|
+
optional :mod_policy, :string, 3
|
52
|
+
end
|
53
|
+
add_message "common.ConfigSignature" do
|
54
|
+
optional :signature_header, :bytes, 1
|
55
|
+
optional :signature, :bytes, 2
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
module Common
|
60
|
+
ConfigEnvelope = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.ConfigEnvelope").msgclass
|
61
|
+
ConfigGroupSchema = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.ConfigGroupSchema").msgclass
|
62
|
+
ConfigValueSchema = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.ConfigValueSchema").msgclass
|
63
|
+
ConfigPolicySchema = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.ConfigPolicySchema").msgclass
|
64
|
+
Config = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.Config").msgclass
|
65
|
+
ConfigUpdateEnvelope = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.ConfigUpdateEnvelope").msgclass
|
66
|
+
ConfigUpdate = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.ConfigUpdate").msgclass
|
67
|
+
ConfigGroup = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.ConfigGroup").msgclass
|
68
|
+
ConfigValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.ConfigValue").msgclass
|
69
|
+
ConfigPolicy = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.ConfigPolicy").msgclass
|
70
|
+
ConfigSignature = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.ConfigSignature").msgclass
|
71
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: common/configuration.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_message "common.HashingAlgorithm" do
|
8
|
+
optional :name, :string, 1
|
9
|
+
end
|
10
|
+
add_message "common.BlockDataHashingStructure" do
|
11
|
+
optional :width, :uint32, 1
|
12
|
+
end
|
13
|
+
add_message "common.OrdererAddresses" do
|
14
|
+
repeated :addresses, :string, 1
|
15
|
+
end
|
16
|
+
add_message "common.Consortium" do
|
17
|
+
optional :name, :string, 1
|
18
|
+
end
|
19
|
+
add_message "common.Capabilities" do
|
20
|
+
map :capabilities, :string, :message, 1, "common.Capability"
|
21
|
+
end
|
22
|
+
add_message "common.Capability" do
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
module Common
|
27
|
+
HashingAlgorithm = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.HashingAlgorithm").msgclass
|
28
|
+
BlockDataHashingStructure = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.BlockDataHashingStructure").msgclass
|
29
|
+
OrdererAddresses = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.OrdererAddresses").msgclass
|
30
|
+
Consortium = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.Consortium").msgclass
|
31
|
+
Capabilities = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.Capabilities").msgclass
|
32
|
+
Capability = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.Capability").msgclass
|
33
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: common/ledger.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_message "common.BlockchainInfo" do
|
8
|
+
optional :height, :uint64, 1
|
9
|
+
optional :currentBlockHash, :bytes, 2
|
10
|
+
optional :previousBlockHash, :bytes, 3
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
module Common
|
15
|
+
BlockchainInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.BlockchainInfo").msgclass
|
16
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: common/policies.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'msp/msp_principal_pb'
|
7
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
+
add_message "common.Policy" do
|
9
|
+
optional :type, :int32, 1
|
10
|
+
optional :value, :bytes, 2
|
11
|
+
end
|
12
|
+
add_enum "common.Policy.PolicyType" do
|
13
|
+
value :UNKNOWN, 0
|
14
|
+
value :SIGNATURE, 1
|
15
|
+
value :MSP, 2
|
16
|
+
value :IMPLICIT_META, 3
|
17
|
+
end
|
18
|
+
add_message "common.SignaturePolicyEnvelope" do
|
19
|
+
optional :version, :int32, 1
|
20
|
+
optional :rule, :message, 2, "common.SignaturePolicy"
|
21
|
+
repeated :identities, :message, 3, "common.MSPPrincipal"
|
22
|
+
end
|
23
|
+
add_message "common.SignaturePolicy" do
|
24
|
+
oneof :Type do
|
25
|
+
optional :signed_by, :int32, 1
|
26
|
+
optional :n_out_of, :message, 2, "common.SignaturePolicy.NOutOf"
|
27
|
+
end
|
28
|
+
end
|
29
|
+
add_message "common.SignaturePolicy.NOutOf" do
|
30
|
+
optional :n, :int32, 1
|
31
|
+
repeated :rules, :message, 2, "common.SignaturePolicy"
|
32
|
+
end
|
33
|
+
add_message "common.ImplicitMetaPolicy" do
|
34
|
+
optional :sub_policy, :string, 1
|
35
|
+
optional :rule, :enum, 2, "common.ImplicitMetaPolicy.Rule"
|
36
|
+
end
|
37
|
+
add_enum "common.ImplicitMetaPolicy.Rule" do
|
38
|
+
value :ANY, 0
|
39
|
+
value :ALL, 1
|
40
|
+
value :MAJORITY, 2
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
module Common
|
45
|
+
Policy = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.Policy").msgclass
|
46
|
+
Policy::PolicyType = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.Policy.PolicyType").enummodule
|
47
|
+
SignaturePolicyEnvelope = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.SignaturePolicyEnvelope").msgclass
|
48
|
+
SignaturePolicy = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.SignaturePolicy").msgclass
|
49
|
+
SignaturePolicy::NOutOf = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.SignaturePolicy.NOutOf").msgclass
|
50
|
+
ImplicitMetaPolicy = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.ImplicitMetaPolicy").msgclass
|
51
|
+
ImplicitMetaPolicy::Rule = Google::Protobuf::DescriptorPool.generated_pool.lookup("common.ImplicitMetaPolicy.Rule").enummodule
|
52
|
+
end
|
@@ -0,0 +1,119 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: discovery/protocol.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'gossip/message_pb'
|
7
|
+
require 'msp/msp_config_pb'
|
8
|
+
require 'msp/identities_pb'
|
9
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
10
|
+
add_message "discovery.SignedRequest" do
|
11
|
+
optional :payload, :bytes, 1
|
12
|
+
optional :signature, :bytes, 2
|
13
|
+
end
|
14
|
+
add_message "discovery.Request" do
|
15
|
+
optional :authentication, :message, 1, "discovery.AuthInfo"
|
16
|
+
repeated :queries, :message, 2, "discovery.Query"
|
17
|
+
end
|
18
|
+
add_message "discovery.Response" do
|
19
|
+
repeated :results, :message, 1, "discovery.QueryResult"
|
20
|
+
end
|
21
|
+
add_message "discovery.AuthInfo" do
|
22
|
+
optional :client_identity, :bytes, 1
|
23
|
+
optional :client_tls_cert_hash, :bytes, 2
|
24
|
+
end
|
25
|
+
add_message "discovery.Query" do
|
26
|
+
optional :channel, :string, 1
|
27
|
+
oneof :query do
|
28
|
+
optional :config_query, :message, 2, "discovery.ConfigQuery"
|
29
|
+
optional :peer_query, :message, 3, "discovery.PeerMembershipQuery"
|
30
|
+
optional :cc_query, :message, 4, "discovery.ChaincodeQuery"
|
31
|
+
optional :local_peers, :message, 5, "discovery.LocalPeerQuery"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
add_message "discovery.QueryResult" do
|
35
|
+
oneof :result do
|
36
|
+
optional :error, :message, 1, "discovery.Error"
|
37
|
+
optional :config_result, :message, 2, "discovery.ConfigResult"
|
38
|
+
optional :cc_query_res, :message, 3, "discovery.ChaincodeQueryResult"
|
39
|
+
optional :members, :message, 4, "discovery.PeerMembershipResult"
|
40
|
+
end
|
41
|
+
end
|
42
|
+
add_message "discovery.ConfigQuery" do
|
43
|
+
end
|
44
|
+
add_message "discovery.ConfigResult" do
|
45
|
+
map :msps, :string, :message, 1, "msp.FabricMSPConfig"
|
46
|
+
map :orderers, :string, :message, 2, "discovery.Endpoints"
|
47
|
+
end
|
48
|
+
add_message "discovery.PeerMembershipQuery" do
|
49
|
+
end
|
50
|
+
add_message "discovery.PeerMembershipResult" do
|
51
|
+
map :peers_by_org, :string, :message, 1, "discovery.Peers"
|
52
|
+
end
|
53
|
+
add_message "discovery.ChaincodeQuery" do
|
54
|
+
repeated :interests, :message, 1, "discovery.ChaincodeInterest"
|
55
|
+
end
|
56
|
+
add_message "discovery.ChaincodeInterest" do
|
57
|
+
repeated :chaincodes, :message, 1, "discovery.ChaincodeCall"
|
58
|
+
end
|
59
|
+
add_message "discovery.ChaincodeCall" do
|
60
|
+
optional :name, :string, 1
|
61
|
+
repeated :collection_names, :string, 2
|
62
|
+
end
|
63
|
+
add_message "discovery.ChaincodeQueryResult" do
|
64
|
+
repeated :content, :message, 1, "discovery.EndorsementDescriptor"
|
65
|
+
end
|
66
|
+
add_message "discovery.LocalPeerQuery" do
|
67
|
+
end
|
68
|
+
add_message "discovery.EndorsementDescriptor" do
|
69
|
+
optional :chaincode, :string, 1
|
70
|
+
map :endorsers_by_groups, :string, :message, 2, "discovery.Peers"
|
71
|
+
repeated :layouts, :message, 3, "discovery.Layout"
|
72
|
+
end
|
73
|
+
add_message "discovery.Layout" do
|
74
|
+
map :quantities_by_group, :string, :uint32, 1
|
75
|
+
end
|
76
|
+
add_message "discovery.Peers" do
|
77
|
+
repeated :peers, :message, 1, "discovery.Peer"
|
78
|
+
end
|
79
|
+
add_message "discovery.Peer" do
|
80
|
+
optional :state_info, :message, 1, "gossip.Envelope"
|
81
|
+
optional :membership_info, :message, 2, "gossip.Envelope"
|
82
|
+
optional :identity, :bytes, 3
|
83
|
+
end
|
84
|
+
add_message "discovery.Error" do
|
85
|
+
optional :content, :string, 1
|
86
|
+
end
|
87
|
+
add_message "discovery.Endpoints" do
|
88
|
+
repeated :endpoint, :message, 1, "discovery.Endpoint"
|
89
|
+
end
|
90
|
+
add_message "discovery.Endpoint" do
|
91
|
+
optional :host, :string, 1
|
92
|
+
optional :port, :uint32, 2
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
module Discovery
|
97
|
+
SignedRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("discovery.SignedRequest").msgclass
|
98
|
+
Request = Google::Protobuf::DescriptorPool.generated_pool.lookup("discovery.Request").msgclass
|
99
|
+
Response = Google::Protobuf::DescriptorPool.generated_pool.lookup("discovery.Response").msgclass
|
100
|
+
AuthInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("discovery.AuthInfo").msgclass
|
101
|
+
Query = Google::Protobuf::DescriptorPool.generated_pool.lookup("discovery.Query").msgclass
|
102
|
+
QueryResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("discovery.QueryResult").msgclass
|
103
|
+
ConfigQuery = Google::Protobuf::DescriptorPool.generated_pool.lookup("discovery.ConfigQuery").msgclass
|
104
|
+
ConfigResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("discovery.ConfigResult").msgclass
|
105
|
+
PeerMembershipQuery = Google::Protobuf::DescriptorPool.generated_pool.lookup("discovery.PeerMembershipQuery").msgclass
|
106
|
+
PeerMembershipResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("discovery.PeerMembershipResult").msgclass
|
107
|
+
ChaincodeQuery = Google::Protobuf::DescriptorPool.generated_pool.lookup("discovery.ChaincodeQuery").msgclass
|
108
|
+
ChaincodeInterest = Google::Protobuf::DescriptorPool.generated_pool.lookup("discovery.ChaincodeInterest").msgclass
|
109
|
+
ChaincodeCall = Google::Protobuf::DescriptorPool.generated_pool.lookup("discovery.ChaincodeCall").msgclass
|
110
|
+
ChaincodeQueryResult = Google::Protobuf::DescriptorPool.generated_pool.lookup("discovery.ChaincodeQueryResult").msgclass
|
111
|
+
LocalPeerQuery = Google::Protobuf::DescriptorPool.generated_pool.lookup("discovery.LocalPeerQuery").msgclass
|
112
|
+
EndorsementDescriptor = Google::Protobuf::DescriptorPool.generated_pool.lookup("discovery.EndorsementDescriptor").msgclass
|
113
|
+
Layout = Google::Protobuf::DescriptorPool.generated_pool.lookup("discovery.Layout").msgclass
|
114
|
+
Peers = Google::Protobuf::DescriptorPool.generated_pool.lookup("discovery.Peers").msgclass
|
115
|
+
Peer = Google::Protobuf::DescriptorPool.generated_pool.lookup("discovery.Peer").msgclass
|
116
|
+
Error = Google::Protobuf::DescriptorPool.generated_pool.lookup("discovery.Error").msgclass
|
117
|
+
Endpoints = Google::Protobuf::DescriptorPool.generated_pool.lookup("discovery.Endpoints").msgclass
|
118
|
+
Endpoint = Google::Protobuf::DescriptorPool.generated_pool.lookup("discovery.Endpoint").msgclass
|
119
|
+
end
|