fabric-gateway 0.0.1 → 0.3.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 (50) hide show
  1. checksums.yaml +4 -4
  2. data/.editorconfig +3 -0
  3. data/.github/workflows/rspec.yml +37 -0
  4. data/.github/workflows/rubocop.yml +28 -0
  5. data/.gitignore +1 -0
  6. data/.rubocop.yml +23 -0
  7. data/.ruby-version +1 -0
  8. data/.vscode/settings.json +7 -0
  9. data/.yardopts +2 -0
  10. data/CODE_OF_CONDUCT.md +105 -46
  11. data/Gemfile +5 -3
  12. data/LICENSE.txt +1 -1
  13. data/README.md +105 -7
  14. data/Rakefile +7 -3
  15. data/bin/console +4 -3
  16. data/bin/regenerate +19 -0
  17. data/bin/release +5 -0
  18. data/fabric-gateway.gemspec +32 -17
  19. data/lib/common/common_pb.rb +113 -0
  20. data/lib/common/policies_pb.rb +61 -0
  21. data/lib/fabric/accessors/contract.rb +51 -0
  22. data/lib/fabric/accessors/gateway.rb +33 -0
  23. data/lib/fabric/accessors/network.rb +40 -0
  24. data/lib/fabric/client.rb +146 -0
  25. data/lib/fabric/constants.rb +8 -0
  26. data/lib/fabric/contract.rb +154 -0
  27. data/lib/fabric/ec_crypto_suite.rb +199 -0
  28. data/lib/fabric/entities/envelope.rb +153 -0
  29. data/lib/fabric/entities/identity.rb +87 -0
  30. data/lib/fabric/entities/proposal.rb +189 -0
  31. data/lib/fabric/entities/proposed_transaction.rb +163 -0
  32. data/lib/fabric/entities/status.rb +32 -0
  33. data/lib/fabric/entities/transaction.rb +247 -0
  34. data/lib/fabric/gateway.rb +31 -6
  35. data/lib/fabric/network.rb +56 -0
  36. data/lib/fabric/version.rb +5 -0
  37. data/lib/fabric.rb +57 -0
  38. data/lib/gossip/message_pb.rb +236 -0
  39. data/lib/gossip/message_services_pb.rb +31 -0
  40. data/lib/msp/identities_pb.rb +25 -0
  41. data/lib/msp/msp_principal_pb.rb +57 -0
  42. data/lib/orderer/ab_pb.rb +64 -0
  43. data/lib/orderer/ab_services_pb.rb +30 -0
  44. data/lib/peer/chaincode_event_pb.rb +19 -0
  45. data/lib/peer/chaincode_pb.rb +69 -0
  46. data/lib/peer/proposal_pb.rb +41 -0
  47. data/lib/peer/proposal_response_pb.rb +52 -0
  48. data/lib/peer/transaction_pb.rb +74 -0
  49. metadata +184 -10
  50. data/lib/fabric/gateway/version.rb +0 -5
@@ -0,0 +1,74 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: peer/transaction.proto
3
+
4
+ require 'peer/proposal_response_pb'
5
+ require 'common/common_pb'
6
+ require 'google/protobuf'
7
+
8
+ Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_file("peer/transaction.proto", :syntax => :proto3) do
10
+ add_message "protos.ProcessedTransaction" do
11
+ optional :transactionEnvelope, :message, 1, "common.Envelope"
12
+ optional :validationCode, :int32, 2
13
+ end
14
+ add_message "protos.Transaction" do
15
+ repeated :actions, :message, 1, "protos.TransactionAction"
16
+ end
17
+ add_message "protos.TransactionAction" do
18
+ optional :header, :bytes, 1
19
+ optional :payload, :bytes, 2
20
+ end
21
+ add_message "protos.ChaincodeActionPayload" do
22
+ optional :chaincode_proposal_payload, :bytes, 1
23
+ optional :action, :message, 2, "protos.ChaincodeEndorsedAction"
24
+ end
25
+ add_message "protos.ChaincodeEndorsedAction" do
26
+ optional :proposal_response_payload, :bytes, 1
27
+ repeated :endorsements, :message, 2, "protos.Endorsement"
28
+ end
29
+ add_enum "protos.TxValidationCode" do
30
+ value :VALID, 0
31
+ value :NIL_ENVELOPE, 1
32
+ value :BAD_PAYLOAD, 2
33
+ value :BAD_COMMON_HEADER, 3
34
+ value :BAD_CREATOR_SIGNATURE, 4
35
+ value :INVALID_ENDORSER_TRANSACTION, 5
36
+ value :INVALID_CONFIG_TRANSACTION, 6
37
+ value :UNSUPPORTED_TX_PAYLOAD, 7
38
+ value :BAD_PROPOSAL_TXID, 8
39
+ value :DUPLICATE_TXID, 9
40
+ value :ENDORSEMENT_POLICY_FAILURE, 10
41
+ value :MVCC_READ_CONFLICT, 11
42
+ value :PHANTOM_READ_CONFLICT, 12
43
+ value :UNKNOWN_TX_TYPE, 13
44
+ value :TARGET_CHAIN_NOT_FOUND, 14
45
+ value :MARSHAL_TX_ERROR, 15
46
+ value :NIL_TXACTION, 16
47
+ value :EXPIRED_CHAINCODE, 17
48
+ value :CHAINCODE_VERSION_CONFLICT, 18
49
+ value :BAD_HEADER_EXTENSION, 19
50
+ value :BAD_CHANNEL_HEADER, 20
51
+ value :BAD_RESPONSE_PAYLOAD, 21
52
+ value :BAD_RWSET, 22
53
+ value :ILLEGAL_WRITESET, 23
54
+ value :INVALID_WRITESET, 24
55
+ value :INVALID_CHAINCODE, 25
56
+ value :NOT_VALIDATED, 254
57
+ value :INVALID_OTHER_REASON, 255
58
+ end
59
+ add_enum "protos.MetaDataKeys" do
60
+ value :VALIDATION_PARAMETER, 0
61
+ value :VALIDATION_PARAMETER_V2, 1
62
+ end
63
+ end
64
+ end
65
+
66
+ module Protos
67
+ ProcessedTransaction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ProcessedTransaction").msgclass
68
+ Transaction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.Transaction").msgclass
69
+ TransactionAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.TransactionAction").msgclass
70
+ ChaincodeActionPayload = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeActionPayload").msgclass
71
+ ChaincodeEndorsedAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.ChaincodeEndorsedAction").msgclass
72
+ TxValidationCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.TxValidationCode").enummodule
73
+ MetaDataKeys = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protos.MetaDataKeys").enummodule
74
+ end
metadata CHANGED
@@ -1,15 +1,155 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fabric-gateway
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Chan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-08 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2022-01-04 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: google-protobuf
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 3.19.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 3.19.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: grpc
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.42'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.42'
41
+ - !ruby/object:Gem::Dependency
42
+ name: codecov
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 0.6.0
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 0.6.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: factory_bot
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 6.2.0
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 6.2.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: grpc-tools
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '1.42'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '1.42'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rake-notes
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 0.2.0
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 0.2.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: rubocop
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 1.23.0
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 1.23.0
111
+ - !ruby/object:Gem::Dependency
112
+ name: rubocop-rspec
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 2.6.0
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 2.6.0
125
+ - !ruby/object:Gem::Dependency
126
+ name: simplecov
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: 0.21.2
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: 0.21.2
139
+ - !ruby/object:Gem::Dependency
140
+ name: timecop
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: 0.9.4
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: 0.9.4
13
153
  description: 'Hyperledger Fabric Gateway gRPC SDK generated directly from protos found
14
154
  at: https://github.com/hyperledger/fabric-protos.'
15
155
  email:
@@ -18,10 +158,17 @@ executables: []
18
158
  extensions: []
19
159
  extra_rdoc_files: []
20
160
  files:
161
+ - ".editorconfig"
162
+ - ".github/workflows/rspec.yml"
163
+ - ".github/workflows/rubocop.yml"
21
164
  - ".gitignore"
22
165
  - ".gitmodules"
23
166
  - ".rspec"
167
+ - ".rubocop.yml"
168
+ - ".ruby-version"
24
169
  - ".travis.yml"
170
+ - ".vscode/settings.json"
171
+ - ".yardopts"
25
172
  - CHANGELOG.md
26
173
  - CODE_OF_CONDUCT.md
27
174
  - Gemfile
@@ -30,22 +177,49 @@ files:
30
177
  - Rakefile
31
178
  - TAGS
32
179
  - bin/console
180
+ - bin/regenerate
181
+ - bin/release
33
182
  - bin/setup
34
183
  - fabric-gateway.gemspec
35
184
  - lib/.DS_Store
185
+ - lib/common/common_pb.rb
186
+ - lib/common/policies_pb.rb
187
+ - lib/fabric.rb
36
188
  - lib/fabric/.DS_Store
189
+ - lib/fabric/accessors/contract.rb
190
+ - lib/fabric/accessors/gateway.rb
191
+ - lib/fabric/accessors/network.rb
192
+ - lib/fabric/client.rb
193
+ - lib/fabric/constants.rb
194
+ - lib/fabric/contract.rb
195
+ - lib/fabric/ec_crypto_suite.rb
196
+ - lib/fabric/entities/envelope.rb
197
+ - lib/fabric/entities/identity.rb
198
+ - lib/fabric/entities/proposal.rb
199
+ - lib/fabric/entities/proposed_transaction.rb
200
+ - lib/fabric/entities/status.rb
201
+ - lib/fabric/entities/transaction.rb
37
202
  - lib/fabric/gateway.rb
38
- - lib/fabric/gateway/version.rb
203
+ - lib/fabric/network.rb
204
+ - lib/fabric/version.rb
39
205
  - lib/gateway/gateway_pb.rb
40
206
  - lib/gateway/gateway_services_pb.rb
207
+ - lib/gossip/message_pb.rb
208
+ - lib/gossip/message_services_pb.rb
209
+ - lib/msp/identities_pb.rb
210
+ - lib/msp/msp_principal_pb.rb
211
+ - lib/orderer/ab_pb.rb
212
+ - lib/orderer/ab_services_pb.rb
213
+ - lib/peer/chaincode_event_pb.rb
214
+ - lib/peer/chaincode_pb.rb
215
+ - lib/peer/proposal_pb.rb
216
+ - lib/peer/proposal_response_pb.rb
217
+ - lib/peer/transaction_pb.rb
41
218
  homepage: https://github.com/ethicalidentity/fabric-gateway-ruby
42
219
  licenses:
43
220
  - MIT
44
221
  metadata:
45
- allowed_push_host: https://rubygems.org
46
- homepage_uri: https://github.com/ethicalidentity/fabric-gateway-ruby
47
- source_code_uri: https://github.com/ethicalidentity/fabric-gateway-ruby
48
- changelog_uri: https://github.com/EthicalIdentity/fabric-gateway-ruby/blob/master/CHANGELOG.md
222
+ rubygems_mfa_required: 'true'
49
223
  post_install_message:
50
224
  rdoc_options: []
51
225
  require_paths:
@@ -54,14 +228,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
54
228
  requirements:
55
229
  - - ">="
56
230
  - !ruby/object:Gem::Version
57
- version: 2.3.0
231
+ version: 2.6.0
58
232
  required_rubygems_version: !ruby/object:Gem::Requirement
59
233
  requirements:
60
234
  - - ">="
61
235
  - !ruby/object:Gem::Version
62
236
  version: '0'
63
237
  requirements: []
64
- rubygems_version: 3.0.3
238
+ rubygems_version: 3.1.6
65
239
  signing_key:
66
240
  specification_version: 4
67
241
  summary: Hyperledger Fabric Gateway gRPC SDK
@@ -1,5 +0,0 @@
1
- module Fabric
2
- module Gateway
3
- VERSION = "0.0.1"
4
- end
5
- end