flow-ruby 0.2.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.
@@ -0,0 +1,22 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: flow/entities/block_header.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/protobuf/timestamp_pb'
7
+ Google::Protobuf::DescriptorPool.generated_pool.build do
8
+ add_file("flow/entities/block_header.proto", :syntax => :proto3) do
9
+ add_message "flow.entities.BlockHeader" do
10
+ optional :id, :bytes, 1
11
+ optional :parent_id, :bytes, 2
12
+ optional :height, :uint64, 3
13
+ optional :timestamp, :message, 4, "google.protobuf.Timestamp"
14
+ end
15
+ end
16
+ end
17
+
18
+ module Flow
19
+ module Entities
20
+ BlockHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.entities.BlockHeader").msgclass
21
+ end
22
+ end
@@ -0,0 +1,27 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: flow/entities/block.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/protobuf/timestamp_pb'
7
+ require 'flow/entities/collection_pb'
8
+ require 'flow/entities/block_seal_pb'
9
+ Google::Protobuf::DescriptorPool.generated_pool.build do
10
+ add_file("flow/entities/block.proto", :syntax => :proto3) do
11
+ add_message "flow.entities.Block" do
12
+ optional :id, :bytes, 1
13
+ optional :parent_id, :bytes, 2
14
+ optional :height, :uint64, 3
15
+ optional :timestamp, :message, 4, "google.protobuf.Timestamp"
16
+ repeated :collection_guarantees, :message, 5, "flow.entities.CollectionGuarantee"
17
+ repeated :block_seals, :message, 6, "flow.entities.BlockSeal"
18
+ repeated :signatures, :bytes, 7
19
+ end
20
+ end
21
+ end
22
+
23
+ module Flow
24
+ module Entities
25
+ Block = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.entities.Block").msgclass
26
+ end
27
+ end
@@ -0,0 +1,21 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: flow/entities/block_seal.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("flow/entities/block_seal.proto", :syntax => :proto3) do
8
+ add_message "flow.entities.BlockSeal" do
9
+ optional :block_id, :bytes, 1
10
+ optional :execution_receipt_id, :bytes, 2
11
+ repeated :execution_receipt_signatures, :bytes, 3
12
+ repeated :result_approval_signatures, :bytes, 4
13
+ end
14
+ end
15
+ end
16
+
17
+ module Flow
18
+ module Entities
19
+ BlockSeal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.entities.BlockSeal").msgclass
20
+ end
21
+ end
@@ -0,0 +1,24 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: flow/entities/collection.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("flow/entities/collection.proto", :syntax => :proto3) do
8
+ add_message "flow.entities.Collection" do
9
+ optional :id, :bytes, 1
10
+ repeated :transaction_ids, :bytes, 2
11
+ end
12
+ add_message "flow.entities.CollectionGuarantee" do
13
+ optional :collection_id, :bytes, 1
14
+ repeated :signatures, :bytes, 2
15
+ end
16
+ end
17
+ end
18
+
19
+ module Flow
20
+ module Entities
21
+ Collection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.entities.Collection").msgclass
22
+ CollectionGuarantee = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.entities.CollectionGuarantee").msgclass
23
+ end
24
+ end
@@ -0,0 +1,22 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: flow/entities/event.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("flow/entities/event.proto", :syntax => :proto3) do
8
+ add_message "flow.entities.Event" do
9
+ optional :type, :string, 1
10
+ optional :transaction_id, :bytes, 2
11
+ optional :transaction_index, :uint32, 3
12
+ optional :event_index, :uint32, 4
13
+ optional :payload, :bytes, 5
14
+ end
15
+ end
16
+ end
17
+
18
+ module Flow
19
+ module Entities
20
+ Event = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.entities.Event").msgclass
21
+ end
22
+ end
@@ -0,0 +1,47 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: flow/entities/transaction.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("flow/entities/transaction.proto", :syntax => :proto3) do
8
+ add_message "flow.entities.Transaction" do
9
+ optional :script, :bytes, 1
10
+ repeated :arguments, :bytes, 2
11
+ optional :reference_block_id, :bytes, 3
12
+ optional :gas_limit, :uint64, 4
13
+ optional :proposal_key, :message, 5, "flow.entities.Transaction.ProposalKey"
14
+ optional :payer, :bytes, 6
15
+ repeated :authorizers, :bytes, 7
16
+ repeated :payload_signatures, :message, 8, "flow.entities.Transaction.Signature"
17
+ repeated :envelope_signatures, :message, 9, "flow.entities.Transaction.Signature"
18
+ end
19
+ add_message "flow.entities.Transaction.ProposalKey" do
20
+ optional :address, :bytes, 1
21
+ optional :key_id, :uint32, 2
22
+ optional :sequence_number, :uint64, 3
23
+ end
24
+ add_message "flow.entities.Transaction.Signature" do
25
+ optional :address, :bytes, 1
26
+ optional :key_id, :uint32, 2
27
+ optional :signature, :bytes, 3
28
+ end
29
+ add_enum "flow.entities.TransactionStatus" do
30
+ value :UNKNOWN, 0
31
+ value :PENDING, 1
32
+ value :FINALIZED, 2
33
+ value :EXECUTED, 3
34
+ value :SEALED, 4
35
+ value :EXPIRED, 5
36
+ end
37
+ end
38
+ end
39
+
40
+ module Flow
41
+ module Entities
42
+ Transaction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.entities.Transaction").msgclass
43
+ Transaction::ProposalKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.entities.Transaction.ProposalKey").msgclass
44
+ Transaction::Signature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.entities.Transaction.Signature").msgclass
45
+ TransactionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.entities.TransactionStatus").enummodule
46
+ end
47
+ end
@@ -0,0 +1,67 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: flow/execution/execution.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'flow/entities/account_pb'
7
+ require 'flow/entities/event_pb'
8
+ Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_file("flow/execution/execution.proto", :syntax => :proto3) do
10
+ add_message "flow.execution.PingRequest" do
11
+ end
12
+ add_message "flow.execution.PingResponse" do
13
+ end
14
+ add_message "flow.execution.GetAccountAtBlockIDRequest" do
15
+ optional :block_id, :bytes, 1
16
+ optional :address, :bytes, 2
17
+ end
18
+ add_message "flow.execution.GetAccountAtBlockIDResponse" do
19
+ optional :account, :message, 1, "flow.entities.Account"
20
+ end
21
+ add_message "flow.execution.ExecuteScriptAtBlockIDRequest" do
22
+ optional :block_id, :bytes, 1
23
+ optional :script, :bytes, 2
24
+ repeated :arguments, :bytes, 3
25
+ end
26
+ add_message "flow.execution.ExecuteScriptAtBlockIDResponse" do
27
+ optional :value, :bytes, 1
28
+ end
29
+ add_message "flow.execution.GetEventsForBlockIDsResponse" do
30
+ repeated :results, :message, 1, "flow.execution.GetEventsForBlockIDsResponse.Result"
31
+ end
32
+ add_message "flow.execution.GetEventsForBlockIDsResponse.Result" do
33
+ optional :block_id, :bytes, 1
34
+ optional :block_height, :uint64, 2
35
+ repeated :events, :message, 3, "flow.entities.Event"
36
+ end
37
+ add_message "flow.execution.GetEventsForBlockIDsRequest" do
38
+ optional :type, :string, 1
39
+ repeated :block_ids, :bytes, 2
40
+ end
41
+ add_message "flow.execution.GetTransactionResultRequest" do
42
+ optional :block_id, :bytes, 1
43
+ optional :transaction_id, :bytes, 2
44
+ end
45
+ add_message "flow.execution.GetTransactionResultResponse" do
46
+ optional :status_code, :uint32, 1
47
+ optional :error_message, :string, 2
48
+ repeated :events, :message, 3, "flow.entities.Event"
49
+ end
50
+ end
51
+ end
52
+
53
+ module Flow
54
+ module Execution
55
+ PingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.execution.PingRequest").msgclass
56
+ PingResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.execution.PingResponse").msgclass
57
+ GetAccountAtBlockIDRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.execution.GetAccountAtBlockIDRequest").msgclass
58
+ GetAccountAtBlockIDResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.execution.GetAccountAtBlockIDResponse").msgclass
59
+ ExecuteScriptAtBlockIDRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.execution.ExecuteScriptAtBlockIDRequest").msgclass
60
+ ExecuteScriptAtBlockIDResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.execution.ExecuteScriptAtBlockIDResponse").msgclass
61
+ GetEventsForBlockIDsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.execution.GetEventsForBlockIDsResponse").msgclass
62
+ GetEventsForBlockIDsResponse::Result = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.execution.GetEventsForBlockIDsResponse.Result").msgclass
63
+ GetEventsForBlockIDsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.execution.GetEventsForBlockIDsRequest").msgclass
64
+ GetTransactionResultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.execution.GetTransactionResultRequest").msgclass
65
+ GetTransactionResultResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.execution.GetTransactionResultResponse").msgclass
66
+ end
67
+ end
@@ -0,0 +1,42 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: flow/execution/execution.proto for package 'flow.execution'
3
+
4
+ require 'grpc'
5
+ require 'flow/execution/execution_pb'
6
+
7
+ module Flow
8
+ module Execution
9
+ module ExecutionAPI
10
+ # ExecutionAPI is the API provided by the execution nodes.
11
+ class Service
12
+
13
+ include GRPC::GenericService
14
+
15
+ self.marshal_class_method = :encode
16
+ self.unmarshal_class_method = :decode
17
+ self.service_name = 'flow.execution.ExecutionAPI'
18
+
19
+ # Ping is used to check if the access node is alive and healthy.
20
+ rpc :Ping, ::Flow::Execution::PingRequest, ::Flow::Execution::PingResponse
21
+ # Accounts
22
+ #
23
+ # GetAccountAtBlockID gets an account by address at the given block ID
24
+ rpc :GetAccountAtBlockID, ::Flow::Execution::GetAccountAtBlockIDRequest, ::Flow::Execution::GetAccountAtBlockIDResponse
25
+ # Scripts
26
+ #
27
+ # ExecuteScriptAtBlockID executes a ready-only Cadence script against the execution state at the block with the given ID.
28
+ rpc :ExecuteScriptAtBlockID, ::Flow::Execution::ExecuteScriptAtBlockIDRequest, ::Flow::Execution::ExecuteScriptAtBlockIDResponse
29
+ # Events
30
+ #
31
+ # GetEventsForBlockIDs retrieves events for all the specified block IDs that have the given type
32
+ rpc :GetEventsForBlockIDs, ::Flow::Execution::GetEventsForBlockIDsRequest, ::Flow::Execution::GetEventsForBlockIDsResponse
33
+ # Transaction
34
+ #
35
+ # GetTransactionResult gets the result of a transaction.
36
+ rpc :GetTransactionResult, ::Flow::Execution::GetTransactionResultRequest, ::Flow::Execution::GetTransactionResultResponse
37
+ end
38
+
39
+ Stub = Service.rpc_stub_class
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Flow
4
+ VERSION = "0.2.1"
5
+ end
metadata ADDED
@@ -0,0 +1,180 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: flow-ruby
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.1
5
+ platform: ruby
6
+ authors:
7
+ - david metta
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-03-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: grpc
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.36'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.36'
27
+ - !ruby/object:Gem::Dependency
28
+ name: json
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '2.5'
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: 2.5.1
37
+ type: :runtime
38
+ prerelease: false
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - "~>"
42
+ - !ruby/object:Gem::Version
43
+ version: '2.5'
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 2.5.1
47
+ - !ruby/object:Gem::Dependency
48
+ name: grpc-tools
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '1.36'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '1.36'
61
+ - !ruby/object:Gem::Dependency
62
+ name: minitest
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '5.0'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '5.0'
75
+ - !ruby/object:Gem::Dependency
76
+ name: pry
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: 0.13.1
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: 0.13.1
89
+ - !ruby/object:Gem::Dependency
90
+ name: rake
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '13.0'
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: '13.0'
103
+ - !ruby/object:Gem::Dependency
104
+ name: rubocop
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - "~>"
108
+ - !ruby/object:Gem::Version
109
+ version: '1.7'
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - "~>"
115
+ - !ruby/object:Gem::Version
116
+ version: '1.7'
117
+ description: This gem is Ruby client for the Flow API.
118
+ email:
119
+ - davideliemetta@gmail.com
120
+ executables:
121
+ - console
122
+ - setup
123
+ extensions: []
124
+ extra_rdoc_files: []
125
+ files:
126
+ - ".github/workflows/test.yml"
127
+ - ".gitignore"
128
+ - ".rubocop.yml"
129
+ - CHANGELOG.md
130
+ - CODE_OF_CONDUCT.md
131
+ - Gemfile
132
+ - Gemfile.lock
133
+ - LICENSE.txt
134
+ - README.md
135
+ - Rakefile
136
+ - bin/console
137
+ - bin/setup
138
+ - flow-ruby.gemspec
139
+ - lib/flow.rb
140
+ - lib/flow/access/access_pb.rb
141
+ - lib/flow/access/access_services_pb.rb
142
+ - lib/flow/client.rb
143
+ - lib/flow/entities/account_pb.rb
144
+ - lib/flow/entities/block_header_pb.rb
145
+ - lib/flow/entities/block_pb.rb
146
+ - lib/flow/entities/block_seal_pb.rb
147
+ - lib/flow/entities/collection_pb.rb
148
+ - lib/flow/entities/event_pb.rb
149
+ - lib/flow/entities/transaction_pb.rb
150
+ - lib/flow/execution/execution_pb.rb
151
+ - lib/flow/execution/execution_services_pb.rb
152
+ - lib/flow/version.rb
153
+ homepage: https://github.com/davidmetta/flow-ruby
154
+ licenses:
155
+ - MIT
156
+ metadata:
157
+ allowed_push_host: https://rubygems.org
158
+ homepage_uri: https://github.com/davidmetta/flow-ruby
159
+ source_code_uri: https://github.com/davidmetta/flow-ruby.git
160
+ changelog_uri: https://github.com/davidmetta/flow-ruby/blob/master/CHANGELOG.md
161
+ post_install_message:
162
+ rdoc_options: []
163
+ require_paths:
164
+ - lib
165
+ required_ruby_version: !ruby/object:Gem::Requirement
166
+ requirements:
167
+ - - ">="
168
+ - !ruby/object:Gem::Version
169
+ version: 2.4.0
170
+ required_rubygems_version: !ruby/object:Gem::Requirement
171
+ requirements:
172
+ - - ">="
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
175
+ requirements: []
176
+ rubygems_version: 3.0.3
177
+ signing_key:
178
+ specification_version: 4
179
+ summary: Ruby client for the Flow API.
180
+ test_files: []