fabric-gateway 0.0.1
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.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.gitmodules +3 -0
- data/.rspec +3 -0
- data/.travis.yml +6 -0
- data/CHANGELOG.md +1 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +59 -0
- data/Rakefile +6 -0
- data/TAGS +59 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/fabric-gateway.gemspec +29 -0
- data/lib/.DS_Store +0 -0
- data/lib/fabric/.DS_Store +0 -0
- data/lib/fabric/gateway/version.rb +5 -0
- data/lib/fabric/gateway.rb +10 -0
- data/lib/gateway/gateway_pb.rb +99 -0
- data/lib/gateway/gateway_services_pb.rb +58 -0
- metadata +68 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: '0682847b6d6baf8c6c7e42969ea1df4ea1270a71c08ff738e7d50e437dc21f03'
|
4
|
+
data.tar.gz: 2d810690b719fe2d821c52994f98ee075ca1d2d64f33cfd3ddfc92ca9b3d285c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9af5b6d596e8044386b6cfd02de491c7ef40c16870ea2e70ea93e80402e06df6af87373b14c416644a19e08452509b2251d885da6fa2c35c5ab2c2332d49b900
|
7
|
+
data.tar.gz: ba1cec9dc77522e98bb55bc44eabe9b17bea003abe79f13d2d9b189a572d9bd5b8e09f9459cbac933eedcd864672c99b83bf3011d9bf70887c60df6b50a0771d
|
data/.gitignore
ADDED
data/.gitmodules
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CHANGELOG.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
# TODO
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at jonathan.chan@ethicalidentity.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [https://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: https://contributor-covenant.org
|
74
|
+
[version]: https://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2021 TODO: Write your name
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
# Fabric::Gateway
|
2
|
+
|
3
|
+
Hyperledger Fabric Gateway gRPC SDK generated directly from protos found at: https://github.com/hyperledger/fabric-protos.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'fabric-gateway'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle install
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install fabric-gateway
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
This is a pre-alpha library. None of the code has been tested or confirmed working yet.
|
24
|
+
|
25
|
+
## Development
|
26
|
+
|
27
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
28
|
+
|
29
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
30
|
+
|
31
|
+
To rebuild the proto code:
|
32
|
+
|
33
|
+
```
|
34
|
+
$ git submodule update --init --recursive
|
35
|
+
$ grpc_tools_ruby_protoc -I ./fabric-protos --ruby_out=./lib --grpc_out=./lib ./fabric-protos/gateway/gateway.proto
|
36
|
+
```
|
37
|
+
|
38
|
+
## Contributing
|
39
|
+
|
40
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/ethicalidentity/fabric-gateway. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/ethicalidentity/fabric-gateway/blob/master/CODE_OF_CONDUCT.md).
|
41
|
+
|
42
|
+
## TODO
|
43
|
+
|
44
|
+
~~everything~~
|
45
|
+
|
46
|
+
- [x] Add license
|
47
|
+
- [x] Add ChangeLog
|
48
|
+
- [ ] Create Gem
|
49
|
+
- [ ] Add usage instructions
|
50
|
+
- [ ] Add testing?
|
51
|
+
|
52
|
+
|
53
|
+
## License
|
54
|
+
|
55
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
56
|
+
|
57
|
+
## Code of Conduct
|
58
|
+
|
59
|
+
Everyone interacting in the Fabric::Gateway project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/ethicalidentity/fabric-gateway/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/TAGS
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
|
2
|
+
lib/fabric/gateway.rb,202
|
3
|
+
module FabricFabric5,0
|
4
|
+
module GatewayGateway6,0
|
5
|
+
module GatewayFabric::Gateway6,0
|
6
|
+
class Error < StandardError; endError7,0
|
7
|
+
class Error < StandardError; endFabric::Gateway::Error7,0
|
8
|
+
|
9
|
+
lib/fabric/gateway/version.rb,176
|
10
|
+
module FabricFabric1,0
|
11
|
+
module GatewayGateway2,0
|
12
|
+
module GatewayFabric::Gateway2,0
|
13
|
+
VERSION = "0.0.1"VERSION3,0
|
14
|
+
VERSION = "0.0.1"Fabric::Gateway::VERSION3,0
|
15
|
+
|
16
|
+
lib/gateway/gateway_services_pb.rb,283
|
17
|
+
module GatewayGateway12,0
|
18
|
+
module GatewayGateway13,0
|
19
|
+
module GatewayGateway::Gateway13,0
|
20
|
+
class ServiceService20,0
|
21
|
+
class ServiceGateway::Gateway::Service20,0
|
22
|
+
Stub = Service.rpc_stub_classStub56,0
|
23
|
+
Stub = Service.rpc_stub_classGateway::Gateway::Stub56,0
|
24
|
+
|
25
|
+
lib/gateway/gateway_pb.rb,4471
|
26
|
+
module GatewayGateway83,0
|
27
|
+
EndorseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.EndorseRequest").msgclassEndorseRequest84,0
|
28
|
+
EndorseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.EndorseRequest").msgclassGateway::EndorseRequest84,0
|
29
|
+
EndorseResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.EndorseResponse").msgclassEndorseResponse85,0
|
30
|
+
EndorseResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.EndorseResponse").msgclassGateway::EndorseResponse85,0
|
31
|
+
SubmitRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.SubmitRequest").msgclassSubmitRequest86,0
|
32
|
+
SubmitRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.SubmitRequest").msgclassGateway::SubmitRequest86,0
|
33
|
+
SubmitResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.SubmitResponse").msgclassSubmitResponse87,0
|
34
|
+
SubmitResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.SubmitResponse").msgclassGateway::SubmitResponse87,0
|
35
|
+
SignedCommitStatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.SignedCommitStatusRequest").msgclassSignedCommitStatusRequest88,0
|
36
|
+
SignedCommitStatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.SignedCommitStatusRequest").msgclassGateway::SignedCommitStatusRequest88,0
|
37
|
+
CommitStatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.CommitStatusRequest").msgclassCommitStatusRequest89,0
|
38
|
+
CommitStatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.CommitStatusRequest").msgclassGateway::CommitStatusRequest89,0
|
39
|
+
CommitStatusResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.CommitStatusResponse").msgclassCommitStatusResponse90,0
|
40
|
+
CommitStatusResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.CommitStatusResponse").msgclassGateway::CommitStatusResponse90,0
|
41
|
+
EvaluateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.EvaluateRequest").msgclassEvaluateRequest91,0
|
42
|
+
EvaluateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.EvaluateRequest").msgclassGateway::EvaluateRequest91,0
|
43
|
+
EvaluateResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.EvaluateResponse").msgclassEvaluateResponse92,0
|
44
|
+
EvaluateResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.EvaluateResponse").msgclassGateway::EvaluateResponse92,0
|
45
|
+
SignedChaincodeEventsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.SignedChaincodeEventsRequest").msgclassSignedChaincodeEventsRequest93,0
|
46
|
+
SignedChaincodeEventsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.SignedChaincodeEventsRequest").msgclassGateway::SignedChaincodeEventsRequest93,0
|
47
|
+
ChaincodeEventsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.ChaincodeEventsRequest").msgclassChaincodeEventsRequest94,0
|
48
|
+
ChaincodeEventsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.ChaincodeEventsRequest").msgclassGateway::ChaincodeEventsRequest94,0
|
49
|
+
ChaincodeEventsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.ChaincodeEventsResponse").msgclassChaincodeEventsResponse95,0
|
50
|
+
ChaincodeEventsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.ChaincodeEventsResponse").msgclassGateway::ChaincodeEventsResponse95,0
|
51
|
+
ErrorDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.ErrorDetail").msgclassErrorDetail96,0
|
52
|
+
ErrorDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.ErrorDetail").msgclassGateway::ErrorDetail96,0
|
53
|
+
ProposedTransaction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.ProposedTransaction").msgclassProposedTransaction97,0
|
54
|
+
ProposedTransaction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.ProposedTransaction").msgclassGateway::ProposedTransaction97,0
|
55
|
+
PreparedTransaction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.PreparedTransaction").msgclassPreparedTransaction98,0
|
56
|
+
PreparedTransaction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.PreparedTransaction").msgclassGateway::PreparedTransaction98,0
|
57
|
+
|
58
|
+
greeter_client.rb,19
|
59
|
+
def mainmain28,0
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "fabric/gateway"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
require_relative 'lib/fabric/gateway/version'
|
2
|
+
|
3
|
+
Gem::Specification.new do |spec|
|
4
|
+
spec.name = "fabric-gateway"
|
5
|
+
spec.version = Fabric::Gateway::VERSION
|
6
|
+
spec.authors = ["Jonathan Chan"]
|
7
|
+
spec.email = ["jonathan.chan@ethicalidentity.com"]
|
8
|
+
|
9
|
+
spec.summary = %q{Hyperledger Fabric Gateway gRPC SDK}
|
10
|
+
spec.description = %q{Hyperledger Fabric Gateway gRPC SDK generated directly from protos found at: https://github.com/hyperledger/fabric-protos.}
|
11
|
+
spec.homepage = "https://github.com/ethicalidentity/fabric-gateway-ruby"
|
12
|
+
spec.license = "MIT"
|
13
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
14
|
+
|
15
|
+
spec.metadata["allowed_push_host"] = 'https://rubygems.org'
|
16
|
+
|
17
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
18
|
+
spec.metadata["source_code_uri"] = "https://github.com/ethicalidentity/fabric-gateway-ruby"
|
19
|
+
spec.metadata["changelog_uri"] = "https://github.com/EthicalIdentity/fabric-gateway-ruby/blob/master/CHANGELOG.md"
|
20
|
+
|
21
|
+
# Specify which files should be added to the gem when it is released.
|
22
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
23
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
24
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
25
|
+
end
|
26
|
+
spec.bindir = "exe"
|
27
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
|
+
spec.require_paths = ["lib"]
|
29
|
+
end
|
data/lib/.DS_Store
ADDED
Binary file
|
Binary file
|
@@ -0,0 +1,99 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: gateway/gateway.proto
|
3
|
+
|
4
|
+
require 'peer/chaincode_event_pb'
|
5
|
+
require 'peer/proposal_pb'
|
6
|
+
require 'peer/proposal_response_pb'
|
7
|
+
require 'peer/transaction_pb'
|
8
|
+
require 'common/common_pb'
|
9
|
+
require 'orderer/ab_pb'
|
10
|
+
require 'google/protobuf'
|
11
|
+
|
12
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
13
|
+
add_file("gateway/gateway.proto", :syntax => :proto3) do
|
14
|
+
add_message "gateway.EndorseRequest" do
|
15
|
+
optional :transaction_id, :string, 1
|
16
|
+
optional :channel_id, :string, 2
|
17
|
+
optional :proposed_transaction, :message, 3, "protos.SignedProposal"
|
18
|
+
repeated :endorsing_organizations, :string, 4
|
19
|
+
end
|
20
|
+
add_message "gateway.EndorseResponse" do
|
21
|
+
optional :prepared_transaction, :message, 1, "common.Envelope"
|
22
|
+
end
|
23
|
+
add_message "gateway.SubmitRequest" do
|
24
|
+
optional :transaction_id, :string, 1
|
25
|
+
optional :channel_id, :string, 2
|
26
|
+
optional :prepared_transaction, :message, 3, "common.Envelope"
|
27
|
+
end
|
28
|
+
add_message "gateway.SubmitResponse" do
|
29
|
+
end
|
30
|
+
add_message "gateway.SignedCommitStatusRequest" do
|
31
|
+
optional :request, :bytes, 1
|
32
|
+
optional :signature, :bytes, 2
|
33
|
+
end
|
34
|
+
add_message "gateway.CommitStatusRequest" do
|
35
|
+
optional :transaction_id, :string, 1
|
36
|
+
optional :channel_id, :string, 2
|
37
|
+
optional :identity, :bytes, 3
|
38
|
+
end
|
39
|
+
add_message "gateway.CommitStatusResponse" do
|
40
|
+
optional :result, :enum, 1, "protos.TxValidationCode"
|
41
|
+
optional :block_number, :uint64, 2
|
42
|
+
end
|
43
|
+
add_message "gateway.EvaluateRequest" do
|
44
|
+
optional :transaction_id, :string, 1
|
45
|
+
optional :channel_id, :string, 2
|
46
|
+
optional :proposed_transaction, :message, 3, "protos.SignedProposal"
|
47
|
+
repeated :target_organizations, :string, 4
|
48
|
+
end
|
49
|
+
add_message "gateway.EvaluateResponse" do
|
50
|
+
optional :result, :message, 1, "protos.Response"
|
51
|
+
end
|
52
|
+
add_message "gateway.SignedChaincodeEventsRequest" do
|
53
|
+
optional :request, :bytes, 1
|
54
|
+
optional :signature, :bytes, 2
|
55
|
+
end
|
56
|
+
add_message "gateway.ChaincodeEventsRequest" do
|
57
|
+
optional :channel_id, :string, 1
|
58
|
+
optional :chaincode_id, :string, 2
|
59
|
+
optional :identity, :bytes, 3
|
60
|
+
optional :start_position, :message, 4, "orderer.SeekPosition"
|
61
|
+
end
|
62
|
+
add_message "gateway.ChaincodeEventsResponse" do
|
63
|
+
repeated :events, :message, 1, "protos.ChaincodeEvent"
|
64
|
+
optional :block_number, :uint64, 2
|
65
|
+
end
|
66
|
+
add_message "gateway.ErrorDetail" do
|
67
|
+
optional :address, :string, 1
|
68
|
+
optional :msp_id, :string, 2
|
69
|
+
optional :message, :string, 3
|
70
|
+
end
|
71
|
+
add_message "gateway.ProposedTransaction" do
|
72
|
+
optional :transaction_id, :string, 1
|
73
|
+
optional :proposal, :message, 2, "protos.SignedProposal"
|
74
|
+
repeated :endorsing_organizations, :string, 3
|
75
|
+
end
|
76
|
+
add_message "gateway.PreparedTransaction" do
|
77
|
+
optional :transaction_id, :string, 1
|
78
|
+
optional :envelope, :message, 2, "common.Envelope"
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
module Gateway
|
84
|
+
EndorseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.EndorseRequest").msgclass
|
85
|
+
EndorseResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.EndorseResponse").msgclass
|
86
|
+
SubmitRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.SubmitRequest").msgclass
|
87
|
+
SubmitResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.SubmitResponse").msgclass
|
88
|
+
SignedCommitStatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.SignedCommitStatusRequest").msgclass
|
89
|
+
CommitStatusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.CommitStatusRequest").msgclass
|
90
|
+
CommitStatusResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.CommitStatusResponse").msgclass
|
91
|
+
EvaluateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.EvaluateRequest").msgclass
|
92
|
+
EvaluateResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.EvaluateResponse").msgclass
|
93
|
+
SignedChaincodeEventsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.SignedChaincodeEventsRequest").msgclass
|
94
|
+
ChaincodeEventsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.ChaincodeEventsRequest").msgclass
|
95
|
+
ChaincodeEventsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.ChaincodeEventsResponse").msgclass
|
96
|
+
ErrorDetail = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.ErrorDetail").msgclass
|
97
|
+
ProposedTransaction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.ProposedTransaction").msgclass
|
98
|
+
PreparedTransaction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gateway.PreparedTransaction").msgclass
|
99
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: gateway/gateway.proto for package 'gateway'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright the Hyperledger Fabric contributors. All rights reserved.
|
5
|
+
#
|
6
|
+
# SPDX-License-Identifier: Apache-2.0
|
7
|
+
#
|
8
|
+
|
9
|
+
require 'grpc'
|
10
|
+
require 'gateway/gateway_pb'
|
11
|
+
|
12
|
+
module Gateway
|
13
|
+
module Gateway
|
14
|
+
# The Gateway API for evaluating and submitting transactions via the gateway.
|
15
|
+
# Transaction evaluation (query) requires the invocation of the Evaluate service
|
16
|
+
# Transaction submission (ledger updates) is a two step process invoking Endorse
|
17
|
+
# followed by Submit. A third step, invoking CommitStatus, is required if the
|
18
|
+
# clients wish to wait for a Transaction to be committed.
|
19
|
+
# The proposal and transaction must be signed by the client before each step.
|
20
|
+
class Service
|
21
|
+
|
22
|
+
include ::GRPC::GenericService
|
23
|
+
|
24
|
+
self.marshal_class_method = :encode
|
25
|
+
self.unmarshal_class_method = :decode
|
26
|
+
self.service_name = 'gateway.Gateway'
|
27
|
+
|
28
|
+
# The Endorse service passes a proposed transaction to the gateway in order to
|
29
|
+
# obtain sufficient endorsement.
|
30
|
+
# The gateway will determine the endorsement plan for the requested chaincode and
|
31
|
+
# forward to the appropriate peers for endorsement. It will return to the client a
|
32
|
+
# prepared transaction in the form of an Envelope message as defined
|
33
|
+
# in common/common.proto. The client must sign the contents of this envelope
|
34
|
+
# before invoking the Submit service.
|
35
|
+
rpc :Endorse, ::Gateway::EndorseRequest, ::Gateway::EndorseResponse
|
36
|
+
# The Submit service will process the prepared transaction returned from Endorse service
|
37
|
+
# once it has been signed by the client. It will wait for the transaction to be submitted to the
|
38
|
+
# ordering service but the client must invoke the CommitStatus service to wait for the transaction
|
39
|
+
# to be committed.
|
40
|
+
rpc :Submit, ::Gateway::SubmitRequest, ::Gateway::SubmitResponse
|
41
|
+
# The CommitStatus service will indicate whether a prepared transaction previously submitted to
|
42
|
+
# the Submit sevice has been committed. It will wait for the commit to occur if it hasn’t already
|
43
|
+
# committed.
|
44
|
+
rpc :CommitStatus, ::Gateway::SignedCommitStatusRequest, ::Gateway::CommitStatusResponse
|
45
|
+
# The Evaluate service passes a proposed transaction to the gateway in order to invoke the
|
46
|
+
# transaction function and return the result to the client. No ledger updates are made.
|
47
|
+
# The gateway will select an appropriate peer to query based on block height and load.
|
48
|
+
rpc :Evaluate, ::Gateway::EvaluateRequest, ::Gateway::EvaluateResponse
|
49
|
+
# The ChaincodeEvents service supplies a stream of responses, each containing all the events emitted by the
|
50
|
+
# requested chaincode for a specific block. The streamed responses are ordered by ascending block number. Responses
|
51
|
+
# are only returned for blocks that contain the requested events, while blocks not containing any of the requested
|
52
|
+
# events are skipped.
|
53
|
+
rpc :ChaincodeEvents, ::Gateway::SignedChaincodeEventsRequest, stream(::Gateway::ChaincodeEventsResponse)
|
54
|
+
end
|
55
|
+
|
56
|
+
Stub = Service.rpc_stub_class
|
57
|
+
end
|
58
|
+
end
|
metadata
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fabric-gateway
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jonathan Chan
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-12-08 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: 'Hyperledger Fabric Gateway gRPC SDK generated directly from protos found
|
14
|
+
at: https://github.com/hyperledger/fabric-protos.'
|
15
|
+
email:
|
16
|
+
- jonathan.chan@ethicalidentity.com
|
17
|
+
executables: []
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- ".gitignore"
|
22
|
+
- ".gitmodules"
|
23
|
+
- ".rspec"
|
24
|
+
- ".travis.yml"
|
25
|
+
- CHANGELOG.md
|
26
|
+
- CODE_OF_CONDUCT.md
|
27
|
+
- Gemfile
|
28
|
+
- LICENSE.txt
|
29
|
+
- README.md
|
30
|
+
- Rakefile
|
31
|
+
- TAGS
|
32
|
+
- bin/console
|
33
|
+
- bin/setup
|
34
|
+
- fabric-gateway.gemspec
|
35
|
+
- lib/.DS_Store
|
36
|
+
- lib/fabric/.DS_Store
|
37
|
+
- lib/fabric/gateway.rb
|
38
|
+
- lib/fabric/gateway/version.rb
|
39
|
+
- lib/gateway/gateway_pb.rb
|
40
|
+
- lib/gateway/gateway_services_pb.rb
|
41
|
+
homepage: https://github.com/ethicalidentity/fabric-gateway-ruby
|
42
|
+
licenses:
|
43
|
+
- MIT
|
44
|
+
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
|
49
|
+
post_install_message:
|
50
|
+
rdoc_options: []
|
51
|
+
require_paths:
|
52
|
+
- lib
|
53
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
54
|
+
requirements:
|
55
|
+
- - ">="
|
56
|
+
- !ruby/object:Gem::Version
|
57
|
+
version: 2.3.0
|
58
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
requirements: []
|
64
|
+
rubygems_version: 3.0.3
|
65
|
+
signing_key:
|
66
|
+
specification_version: 4
|
67
|
+
summary: Hyperledger Fabric Gateway gRPC SDK
|
68
|
+
test_files: []
|