hyperledger-fabric-sdk 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. checksums.yaml +7 -0
  2. data/lib/crypto_suite/ecdsa_aes.rb +86 -0
  3. data/lib/fabric/channel.rb +54 -0
  4. data/lib/fabric/client.rb +45 -0
  5. data/lib/fabric/configuration.rb +25 -0
  6. data/lib/fabric/constants.rb +18 -0
  7. data/lib/fabric/identity.rb +36 -0
  8. data/lib/fabric/orderer.rb +19 -0
  9. data/lib/fabric/peer.rb +58 -0
  10. data/lib/fabric/peer_endorser.rb +85 -0
  11. data/lib/fabric/transaction_id.rb +11 -0
  12. data/lib/fabric/user.rb +24 -0
  13. data/lib/fabric/version.rb +3 -0
  14. data/lib/fabric_ca/client.rb +51 -0
  15. data/lib/fabric_ca/configuration.rb +25 -0
  16. data/lib/fabric_ca/connection.rb +32 -0
  17. data/lib/fabric_ca/error.rb +11 -0
  18. data/lib/fabric_ca/faraday_middleware/basic_auth.rb +33 -0
  19. data/lib/fabric_ca/faraday_middleware/raise_http_exception.rb +47 -0
  20. data/lib/fabric_ca/faraday_middleware/token_auth.rb +38 -0
  21. data/lib/fabric_ca/request.rb +50 -0
  22. data/lib/fabric_ca/response.rb +10 -0
  23. data/lib/fabric_ca/tools.rb +35 -0
  24. data/lib/fabric_ca/version.rb +3 -0
  25. data/lib/hyperledger-fabric-sdk.rb +47 -0
  26. data/lib/protos/common/collection_pb.rb +42 -0
  27. data/lib/protos/common/common_pb.rb +106 -0
  28. data/lib/protos/common/configtx_pb.rb +71 -0
  29. data/lib/protos/common/configuration_pb.rb +33 -0
  30. data/lib/protos/common/ledger_pb.rb +16 -0
  31. data/lib/protos/common/policies_pb.rb +52 -0
  32. data/lib/protos/discovery/protocol_pb.rb +119 -0
  33. data/lib/protos/discovery/protocol_services_pb.rb +30 -0
  34. data/lib/protos/gossip/message_pb.rb +233 -0
  35. data/lib/protos/gossip/message_services_pb.rb +31 -0
  36. data/lib/protos/idemix/idemix_pb.rb +93 -0
  37. data/lib/protos/ledger/queryresult/kv_query_result_pb.rb +24 -0
  38. data/lib/protos/ledger/rwset/kvrwset/kv_rwset_pb.rb +85 -0
  39. data/lib/protos/ledger/rwset/rwset_pb.rb +46 -0
  40. data/lib/protos/msp/identities_pb.rb +23 -0
  41. data/lib/protos/msp/msp_config_pb.rb +72 -0
  42. data/lib/protos/msp/msp_principal_pb.rb +54 -0
  43. data/lib/protos/orderer/ab_pb.rb +52 -0
  44. data/lib/protos/orderer/ab_services_pb.rb +41 -0
  45. data/lib/protos/orderer/configuration_pb.rb +32 -0
  46. data/lib/protos/orderer/kafka_pb.rb +45 -0
  47. data/lib/protos/peer/admin_pb.rb +41 -0
  48. data/lib/protos/peer/admin_services_pb.rb +33 -0
  49. data/lib/protos/peer/chaincode_event_pb.rb +17 -0
  50. data/lib/protos/peer/chaincode_pb.rb +60 -0
  51. data/lib/protos/peer/chaincode_shim_pb.rb +94 -0
  52. data/lib/protos/peer/chaincode_shim_services_pb.rb +30 -0
  53. data/lib/protos/peer/configuration_pb.rb +27 -0
  54. data/lib/protos/peer/events_pb.rb +98 -0
  55. data/lib/protos/peer/events_services_pb.rb +59 -0
  56. data/lib/protos/peer/peer_pb.rb +21 -0
  57. data/lib/protos/peer/peer_services_pb.rb +37 -0
  58. data/lib/protos/peer/proposal_pb.rb +40 -0
  59. data/lib/protos/peer/proposal_response_pb.rb +35 -0
  60. data/lib/protos/peer/query_pb.rb +32 -0
  61. data/lib/protos/peer/resources_pb.rb +34 -0
  62. data/lib/protos/peer/signed_cc_dep_spec_pb.rb +17 -0
  63. data/lib/protos/peer/transaction_pb.rb +72 -0
  64. data/lib/protos/transientstore/transientstore_pb.rb +18 -0
  65. metadata +123 -0
@@ -0,0 +1,40 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: peer/proposal.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'peer/chaincode_pb'
7
+ require 'peer/proposal_response_pb'
8
+ Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_message "protos.SignedProposal" do
10
+ optional :proposal_bytes, :bytes, 1
11
+ optional :signature, :bytes, 2
12
+ end
13
+ add_message "protos.Proposal" do
14
+ optional :header, :bytes, 1
15
+ optional :payload, :bytes, 2
16
+ optional :extension, :bytes, 3
17
+ end
18
+ add_message "protos.ChaincodeHeaderExtension" do
19
+ optional :payload_visibility, :bytes, 1
20
+ optional :chaincode_id, :message, 2, "protos.ChaincodeID"
21
+ end
22
+ add_message "protos.ChaincodeProposalPayload" do
23
+ optional :input, :bytes, 1
24
+ map :TransientMap, :string, :bytes, 2
25
+ end
26
+ add_message "protos.ChaincodeAction" do
27
+ optional :results, :bytes, 1
28
+ optional :events, :bytes, 2
29
+ optional :response, :message, 3, "protos.Response"
30
+ optional :chaincode_id, :message, 4, "protos.ChaincodeID"
31
+ end
32
+ end
33
+
34
+ module Protos
35
+ SignedProposal = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.SignedProposal").msgclass
36
+ Proposal = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.Proposal").msgclass
37
+ ChaincodeHeaderExtension = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeHeaderExtension").msgclass
38
+ ChaincodeProposalPayload = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeProposalPayload").msgclass
39
+ ChaincodeAction = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeAction").msgclass
40
+ end
@@ -0,0 +1,35 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: peer/proposal_response.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/protobuf/timestamp_pb'
7
+ Google::Protobuf::DescriptorPool.generated_pool.build do
8
+ add_message "protos.ProposalResponse" do
9
+ optional :version, :int32, 1
10
+ optional :timestamp, :message, 2, "google.protobuf.Timestamp"
11
+ optional :response, :message, 4, "protos.Response"
12
+ optional :payload, :bytes, 5
13
+ optional :endorsement, :message, 6, "protos.Endorsement"
14
+ end
15
+ add_message "protos.Response" do
16
+ optional :status, :int32, 1
17
+ optional :message, :string, 2
18
+ optional :payload, :bytes, 3
19
+ end
20
+ add_message "protos.ProposalResponsePayload" do
21
+ optional :proposal_hash, :bytes, 1
22
+ optional :extension, :bytes, 2
23
+ end
24
+ add_message "protos.Endorsement" do
25
+ optional :endorser, :bytes, 1
26
+ optional :signature, :bytes, 2
27
+ end
28
+ end
29
+
30
+ module Protos
31
+ ProposalResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ProposalResponse").msgclass
32
+ Response = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.Response").msgclass
33
+ ProposalResponsePayload = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ProposalResponsePayload").msgclass
34
+ Endorsement = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.Endorsement").msgclass
35
+ end
@@ -0,0 +1,32 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: peer/query.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_message "protos.ChaincodeQueryResponse" do
8
+ repeated :chaincodes, :message, 1, "protos.ChaincodeInfo"
9
+ end
10
+ add_message "protos.ChaincodeInfo" do
11
+ optional :name, :string, 1
12
+ optional :version, :string, 2
13
+ optional :path, :string, 3
14
+ optional :input, :string, 4
15
+ optional :escc, :string, 5
16
+ optional :vscc, :string, 6
17
+ optional :id, :bytes, 7
18
+ end
19
+ add_message "protos.ChannelQueryResponse" do
20
+ repeated :channels, :message, 1, "protos.ChannelInfo"
21
+ end
22
+ add_message "protos.ChannelInfo" do
23
+ optional :channel_id, :string, 1
24
+ end
25
+ end
26
+
27
+ module Protos
28
+ ChaincodeQueryResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeQueryResponse").msgclass
29
+ ChaincodeInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeInfo").msgclass
30
+ ChannelQueryResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChannelQueryResponse").msgclass
31
+ ChannelInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChannelInfo").msgclass
32
+ end
@@ -0,0 +1,34 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: peer/resources.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'common/configtx_pb'
7
+ Google::Protobuf::DescriptorPool.generated_pool.build do
8
+ add_message "protos.ChaincodeIdentifier" do
9
+ optional :hash, :bytes, 1
10
+ optional :version, :string, 2
11
+ end
12
+ add_message "protos.ChaincodeValidation" do
13
+ optional :name, :string, 1
14
+ optional :argument, :bytes, 2
15
+ end
16
+ add_message "protos.VSCCArgs" do
17
+ optional :endorsement_policy_ref, :string, 1
18
+ end
19
+ add_message "protos.ChaincodeEndorsement" do
20
+ optional :name, :string, 1
21
+ end
22
+ add_message "protos.ConfigTree" do
23
+ optional :channel_config, :message, 1, "common.Config"
24
+ optional :resources_config, :message, 2, "common.Config"
25
+ end
26
+ end
27
+
28
+ module Protos
29
+ ChaincodeIdentifier = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeIdentifier").msgclass
30
+ ChaincodeValidation = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeValidation").msgclass
31
+ VSCCArgs = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.VSCCArgs").msgclass
32
+ ChaincodeEndorsement = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeEndorsement").msgclass
33
+ ConfigTree = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ConfigTree").msgclass
34
+ end
@@ -0,0 +1,17 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: peer/signed_cc_dep_spec.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'peer/proposal_response_pb'
7
+ Google::Protobuf::DescriptorPool.generated_pool.build do
8
+ add_message "protos.SignedChaincodeDeploymentSpec" do
9
+ optional :chaincode_deployment_spec, :bytes, 1
10
+ optional :instantiation_policy, :bytes, 2
11
+ repeated :owner_endorsements, :message, 3, "protos.Endorsement"
12
+ end
13
+ end
14
+
15
+ module Protos
16
+ SignedChaincodeDeploymentSpec = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.SignedChaincodeDeploymentSpec").msgclass
17
+ end
@@ -0,0 +1,72 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: peer/transaction.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/protobuf/timestamp_pb'
7
+ require 'peer/proposal_response_pb'
8
+ require 'common/common_pb'
9
+ Google::Protobuf::DescriptorPool.generated_pool.build do
10
+ add_message "protos.SignedTransaction" do
11
+ optional :transaction_bytes, :bytes, 1
12
+ optional :signature, :bytes, 2
13
+ end
14
+ add_message "protos.ProcessedTransaction" do
15
+ optional :transactionEnvelope, :message, 1, "common.Envelope"
16
+ optional :validationCode, :int32, 2
17
+ end
18
+ add_message "protos.Transaction" do
19
+ repeated :actions, :message, 1, "protos.TransactionAction"
20
+ end
21
+ add_message "protos.TransactionAction" do
22
+ optional :header, :bytes, 1
23
+ optional :payload, :bytes, 2
24
+ end
25
+ add_message "protos.ChaincodeActionPayload" do
26
+ optional :chaincode_proposal_payload, :bytes, 1
27
+ optional :action, :message, 2, "protos.ChaincodeEndorsedAction"
28
+ end
29
+ add_message "protos.ChaincodeEndorsedAction" do
30
+ optional :proposal_response_payload, :bytes, 1
31
+ repeated :endorsements, :message, 2, "protos.Endorsement"
32
+ end
33
+ add_enum "protos.TxValidationCode" do
34
+ value :VALID, 0
35
+ value :NIL_ENVELOPE, 1
36
+ value :BAD_PAYLOAD, 2
37
+ value :BAD_COMMON_HEADER, 3
38
+ value :BAD_CREATOR_SIGNATURE, 4
39
+ value :INVALID_ENDORSER_TRANSACTION, 5
40
+ value :INVALID_CONFIG_TRANSACTION, 6
41
+ value :UNSUPPORTED_TX_PAYLOAD, 7
42
+ value :BAD_PROPOSAL_TXID, 8
43
+ value :DUPLICATE_TXID, 9
44
+ value :ENDORSEMENT_POLICY_FAILURE, 10
45
+ value :MVCC_READ_CONFLICT, 11
46
+ value :PHANTOM_READ_CONFLICT, 12
47
+ value :UNKNOWN_TX_TYPE, 13
48
+ value :TARGET_CHAIN_NOT_FOUND, 14
49
+ value :MARSHAL_TX_ERROR, 15
50
+ value :NIL_TXACTION, 16
51
+ value :EXPIRED_CHAINCODE, 17
52
+ value :CHAINCODE_VERSION_CONFLICT, 18
53
+ value :BAD_HEADER_EXTENSION, 19
54
+ value :BAD_CHANNEL_HEADER, 20
55
+ value :BAD_RESPONSE_PAYLOAD, 21
56
+ value :BAD_RWSET, 22
57
+ value :ILLEGAL_WRITESET, 23
58
+ value :INVALID_WRITESET, 24
59
+ value :NOT_VALIDATED, 254
60
+ value :INVALID_OTHER_REASON, 255
61
+ end
62
+ end
63
+
64
+ module Protos
65
+ SignedTransaction = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.SignedTransaction").msgclass
66
+ ProcessedTransaction = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ProcessedTransaction").msgclass
67
+ Transaction = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.Transaction").msgclass
68
+ TransactionAction = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.TransactionAction").msgclass
69
+ ChaincodeActionPayload = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeActionPayload").msgclass
70
+ ChaincodeEndorsedAction = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeEndorsedAction").msgclass
71
+ TxValidationCode = Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.TxValidationCode").enummodule
72
+ end
@@ -0,0 +1,18 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: transientstore/transientstore.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'ledger/rwset/rwset_pb'
7
+ require 'common/collection_pb'
8
+ Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_message "transientstore.TxPvtReadWriteSetWithConfigInfo" do
10
+ optional :endorsed_at, :uint64, 1
11
+ optional :pvt_rwset, :message, 2, "rwset.TxPvtReadWriteSet"
12
+ map :collection_configs, :string, :message, 3, "common.CollectionConfigPackage"
13
+ end
14
+ end
15
+
16
+ module Transientstore
17
+ TxPvtReadWriteSetWithConfigInfo = Google::Protobuf::DescriptorPool.generated_pool.lookup("transientstore.TxPvtReadWriteSetWithConfigInfo").msgclass
18
+ end
metadata ADDED
@@ -0,0 +1,123 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hyperledger-fabric-sdk
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Alexandr Kirshin(kirshin)
8
+ - "(qiusugang)"
9
+ - Bryan Padron(djlazz3)
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2019-11-12 00:00:00.000000000 Z
14
+ dependencies: []
15
+ description: ''
16
+ email:
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - lib/crypto_suite/ecdsa_aes.rb
22
+ - lib/fabric/channel.rb
23
+ - lib/fabric/client.rb
24
+ - lib/fabric/configuration.rb
25
+ - lib/fabric/constants.rb
26
+ - lib/fabric/identity.rb
27
+ - lib/fabric/orderer.rb
28
+ - lib/fabric/peer.rb
29
+ - lib/fabric/peer_endorser.rb
30
+ - lib/fabric/transaction_id.rb
31
+ - lib/fabric/user.rb
32
+ - lib/fabric/version.rb
33
+ - lib/fabric_ca/client.rb
34
+ - lib/fabric_ca/configuration.rb
35
+ - lib/fabric_ca/connection.rb
36
+ - lib/fabric_ca/error.rb
37
+ - lib/fabric_ca/faraday_middleware/basic_auth.rb
38
+ - lib/fabric_ca/faraday_middleware/raise_http_exception.rb
39
+ - lib/fabric_ca/faraday_middleware/token_auth.rb
40
+ - lib/fabric_ca/request.rb
41
+ - lib/fabric_ca/response.rb
42
+ - lib/fabric_ca/tools.rb
43
+ - lib/fabric_ca/version.rb
44
+ - lib/hyperledger-fabric-sdk.rb
45
+ - lib/protos/common/collection_pb.rb
46
+ - lib/protos/common/common_pb.rb
47
+ - lib/protos/common/configtx_pb.rb
48
+ - lib/protos/common/configuration_pb.rb
49
+ - lib/protos/common/ledger_pb.rb
50
+ - lib/protos/common/policies_pb.rb
51
+ - lib/protos/discovery/protocol_pb.rb
52
+ - lib/protos/discovery/protocol_services_pb.rb
53
+ - lib/protos/gossip/message_pb.rb
54
+ - lib/protos/gossip/message_services_pb.rb
55
+ - lib/protos/idemix/idemix_pb.rb
56
+ - lib/protos/ledger/queryresult/kv_query_result_pb.rb
57
+ - lib/protos/ledger/rwset/kvrwset/kv_rwset_pb.rb
58
+ - lib/protos/ledger/rwset/rwset_pb.rb
59
+ - lib/protos/msp/identities_pb.rb
60
+ - lib/protos/msp/msp_config_pb.rb
61
+ - lib/protos/msp/msp_principal_pb.rb
62
+ - lib/protos/orderer/ab_pb.rb
63
+ - lib/protos/orderer/ab_services_pb.rb
64
+ - lib/protos/orderer/configuration_pb.rb
65
+ - lib/protos/orderer/kafka_pb.rb
66
+ - lib/protos/peer/admin_pb.rb
67
+ - lib/protos/peer/admin_services_pb.rb
68
+ - lib/protos/peer/chaincode_event_pb.rb
69
+ - lib/protos/peer/chaincode_pb.rb
70
+ - lib/protos/peer/chaincode_shim_pb.rb
71
+ - lib/protos/peer/chaincode_shim_services_pb.rb
72
+ - lib/protos/peer/configuration_pb.rb
73
+ - lib/protos/peer/events_pb.rb
74
+ - lib/protos/peer/events_services_pb.rb
75
+ - lib/protos/peer/peer_pb.rb
76
+ - lib/protos/peer/peer_services_pb.rb
77
+ - lib/protos/peer/proposal_pb.rb
78
+ - lib/protos/peer/proposal_response_pb.rb
79
+ - lib/protos/peer/query_pb.rb
80
+ - lib/protos/peer/resources_pb.rb
81
+ - lib/protos/peer/signed_cc_dep_spec_pb.rb
82
+ - lib/protos/peer/transaction_pb.rb
83
+ - lib/protos/transientstore/transientstore_pb.rb
84
+ homepage: https://github.com/kirshin/hyperledger-fabric-sdk
85
+ licenses: []
86
+ metadata: {}
87
+ post_install_message:
88
+ rdoc_options: []
89
+ require_paths:
90
+ - lib
91
+ - lib/crypto_suite
92
+ - lib/fabric
93
+ - lib/fabric_ca
94
+ - lib/fabric_ca/faraday_middleware
95
+ - lib/protos
96
+ - lib/protos/commmon
97
+ - lib/protos/discovery
98
+ - lib/protos/gossip
99
+ - lib/protos/idemix
100
+ - lib/protos/ledger
101
+ - lib/protos/ledger/queryresult
102
+ - lib/protos/ledger/rwset
103
+ - lib/protos/ledger/rwset/kvrwset
104
+ - lib/protos/msp
105
+ - lib/protos/orderer
106
+ - lib/protos/peer
107
+ - lib/protos/transientstore
108
+ required_ruby_version: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: '0'
113
+ required_rubygems_version: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ requirements: []
119
+ rubygems_version: 3.0.3
120
+ signing_key:
121
+ specification_version: 4
122
+ summary: This SDK enables Ruby developers to interact with hyperledger-fabric
123
+ test_files: []