flow_client 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 (45) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/ruby.yml +35 -0
  3. data/.gitignore +12 -0
  4. data/.rspec +3 -0
  5. data/.rubocop.yml +20 -0
  6. data/CHANGELOG.md +5 -0
  7. data/CODE_OF_CONDUCT.md +84 -0
  8. data/Gemfile +14 -0
  9. data/Gemfile.lock +115 -0
  10. data/Guardfile +79 -0
  11. data/LICENSE.txt +21 -0
  12. data/README.md +93 -0
  13. data/Rakefile +12 -0
  14. data/bin/console +15 -0
  15. data/bin/setup +8 -0
  16. data/flow_client.gemspec +44 -0
  17. data/lib/flow/access/access_pb.rb +168 -0
  18. data/lib/flow/access/access_services_pb.rb +96 -0
  19. data/lib/flow/entities/account_pb.rb +30 -0
  20. data/lib/flow/entities/block_header_pb.rb +20 -0
  21. data/lib/flow/entities/block_pb.rb +25 -0
  22. data/lib/flow/entities/block_seal_pb.rb +19 -0
  23. data/lib/flow/entities/collection_pb.rb +23 -0
  24. data/lib/flow/entities/event_pb.rb +20 -0
  25. data/lib/flow/entities/transaction_pb.rb +47 -0
  26. data/lib/flow/execution/execution_pb.rb +65 -0
  27. data/lib/flow/execution/execution_services_pb.rb +43 -0
  28. data/lib/flow/legacy/access/access_pb.rb +157 -0
  29. data/lib/flow/legacy/access/access_services_pb.rb +89 -0
  30. data/lib/flow/legacy/entities/account_pb.rb +28 -0
  31. data/lib/flow/legacy/entities/block_header_pb.rb +20 -0
  32. data/lib/flow/legacy/entities/block_pb.rb +25 -0
  33. data/lib/flow/legacy/entities/block_seal_pb.rb +19 -0
  34. data/lib/flow/legacy/entities/collection_pb.rb +22 -0
  35. data/lib/flow/legacy/entities/event_pb.rb +20 -0
  36. data/lib/flow/legacy/entities/transaction_pb.rb +45 -0
  37. data/lib/flow/legacy/execution/execution_pb.rb +65 -0
  38. data/lib/flow/legacy/execution/execution_services_pb.rb +42 -0
  39. data/lib/flow_client.rb +14 -0
  40. data/lib/flow_client/client.rb +98 -0
  41. data/lib/flow_client/crypto.rb +33 -0
  42. data/lib/flow_client/transaction.rb +147 -0
  43. data/lib/flow_client/utils.rb +38 -0
  44. data/lib/flow_client/version.rb +5 -0
  45. metadata +201 -0
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "flow_client"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require "irb"
15
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,44 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/flow_client/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "flow_client"
7
+ spec.version = FlowClient::VERSION
8
+ spec.authors = ["Nico du Plessis"]
9
+ spec.email = ["nico@glucode.com"]
10
+
11
+ spec.summary = "A Ruby client for the Flow blockchain"
12
+ spec.description = "A Ruby client for the Flow blockchain"
13
+ spec.homepage = "https://github.com/glucode/flow_client"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = ">= 2.6.0"
16
+
17
+ # spec.metadata["allowed_push_host"] = "TODO: Set to 'https://mygemserver.com'"
18
+
19
+ spec.metadata["homepage_uri"] = spec.homepage
20
+ spec.metadata["source_code_uri"] = "https://github.com/glucode/flow_client"
21
+ spec.metadata["changelog_uri"] = "https://github.com/glucode/flow_client"
22
+
23
+ # Specify which files should be added to the gem when it is released.
24
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
26
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
27
+ end
28
+ spec.bindir = "exe"
29
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
30
+ spec.require_paths = ["lib"]
31
+
32
+ # Uncomment to register a new dependency of your gem
33
+ spec.add_dependency "digest-sha3"
34
+ spec.add_dependency "ecdsa"
35
+ spec.add_dependency "grpc"
36
+ spec.add_dependency "grpc-tools"
37
+ spec.add_dependency "json"
38
+ spec.add_dependency "openssl"
39
+ spec.add_dependency "rlp"
40
+ spec.add_dependency "rspec"
41
+
42
+ # For more information and examples about making a new gem, checkout our
43
+ # guide at: https://bundler.io/guides/creating_gem.html
44
+ end
@@ -0,0 +1,168 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: flow/access/access.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'flow/entities/account_pb'
7
+ require 'flow/entities/block_header_pb'
8
+ require 'flow/entities/block_pb'
9
+ require 'flow/entities/collection_pb'
10
+ require 'flow/entities/event_pb'
11
+ require 'flow/entities/transaction_pb'
12
+ require 'google/protobuf/timestamp_pb'
13
+ Google::Protobuf::DescriptorPool.generated_pool.build do
14
+ add_file("flow/access/access.proto", :syntax => :proto3) do
15
+ add_message "flow.access.PingRequest" do
16
+ end
17
+ add_message "flow.access.PingResponse" do
18
+ end
19
+ add_message "flow.access.GetLatestBlockHeaderRequest" do
20
+ optional :is_sealed, :bool, 1
21
+ end
22
+ add_message "flow.access.GetBlockHeaderByIDRequest" do
23
+ optional :id, :bytes, 1
24
+ end
25
+ add_message "flow.access.GetBlockHeaderByHeightRequest" do
26
+ optional :height, :uint64, 1
27
+ end
28
+ add_message "flow.access.BlockHeaderResponse" do
29
+ optional :block, :message, 1, "flow.entities.BlockHeader"
30
+ end
31
+ add_message "flow.access.GetLatestBlockRequest" do
32
+ optional :is_sealed, :bool, 1
33
+ end
34
+ add_message "flow.access.GetBlockByIDRequest" do
35
+ optional :id, :bytes, 1
36
+ end
37
+ add_message "flow.access.GetBlockByHeightRequest" do
38
+ optional :height, :uint64, 1
39
+ end
40
+ add_message "flow.access.BlockResponse" do
41
+ optional :block, :message, 1, "flow.entities.Block"
42
+ end
43
+ add_message "flow.access.GetCollectionByIDRequest" do
44
+ optional :id, :bytes, 1
45
+ end
46
+ add_message "flow.access.CollectionResponse" do
47
+ optional :collection, :message, 1, "flow.entities.Collection"
48
+ end
49
+ add_message "flow.access.SendTransactionRequest" do
50
+ optional :transaction, :message, 1, "flow.entities.Transaction"
51
+ end
52
+ add_message "flow.access.SendTransactionResponse" do
53
+ optional :id, :bytes, 1
54
+ end
55
+ add_message "flow.access.GetTransactionRequest" do
56
+ optional :id, :bytes, 1
57
+ end
58
+ add_message "flow.access.TransactionResponse" do
59
+ optional :transaction, :message, 1, "flow.entities.Transaction"
60
+ end
61
+ add_message "flow.access.TransactionResultResponse" do
62
+ optional :status, :enum, 1, "flow.entities.TransactionStatus"
63
+ optional :status_code, :uint32, 2
64
+ optional :error_message, :string, 3
65
+ repeated :events, :message, 4, "flow.entities.Event"
66
+ optional :block_id, :bytes, 5
67
+ end
68
+ add_message "flow.access.GetAccountRequest" do
69
+ optional :address, :bytes, 1
70
+ end
71
+ add_message "flow.access.GetAccountResponse" do
72
+ optional :account, :message, 1, "flow.entities.Account"
73
+ end
74
+ add_message "flow.access.GetAccountAtLatestBlockRequest" do
75
+ optional :address, :bytes, 1
76
+ end
77
+ add_message "flow.access.AccountResponse" do
78
+ optional :account, :message, 1, "flow.entities.Account"
79
+ end
80
+ add_message "flow.access.GetAccountAtBlockHeightRequest" do
81
+ optional :address, :bytes, 1
82
+ optional :block_height, :uint64, 2
83
+ end
84
+ add_message "flow.access.ExecuteScriptAtLatestBlockRequest" do
85
+ optional :script, :bytes, 1
86
+ repeated :arguments, :bytes, 2
87
+ end
88
+ add_message "flow.access.ExecuteScriptAtBlockIDRequest" do
89
+ optional :block_id, :bytes, 1
90
+ optional :script, :bytes, 2
91
+ repeated :arguments, :bytes, 3
92
+ end
93
+ add_message "flow.access.ExecuteScriptAtBlockHeightRequest" do
94
+ optional :block_height, :uint64, 1
95
+ optional :script, :bytes, 2
96
+ repeated :arguments, :bytes, 3
97
+ end
98
+ add_message "flow.access.ExecuteScriptResponse" do
99
+ optional :value, :bytes, 1
100
+ end
101
+ add_message "flow.access.GetEventsForHeightRangeRequest" do
102
+ optional :type, :string, 1
103
+ optional :start_height, :uint64, 2
104
+ optional :end_height, :uint64, 3
105
+ end
106
+ add_message "flow.access.GetEventsForBlockIDsRequest" do
107
+ optional :type, :string, 1
108
+ repeated :block_ids, :bytes, 2
109
+ end
110
+ add_message "flow.access.EventsResponse" do
111
+ repeated :results, :message, 1, "flow.access.EventsResponse.Result"
112
+ end
113
+ add_message "flow.access.EventsResponse.Result" do
114
+ optional :block_id, :bytes, 1
115
+ optional :block_height, :uint64, 2
116
+ repeated :events, :message, 3, "flow.entities.Event"
117
+ optional :block_timestamp, :message, 4, "google.protobuf.Timestamp"
118
+ end
119
+ add_message "flow.access.GetNetworkParametersRequest" do
120
+ end
121
+ add_message "flow.access.GetNetworkParametersResponse" do
122
+ optional :chain_id, :string, 1
123
+ end
124
+ add_message "flow.access.GetLatestProtocolStateSnapshotRequest" do
125
+ end
126
+ add_message "flow.access.ProtocolStateSnapshotResponse" do
127
+ optional :serializedSnapshot, :bytes, 1
128
+ end
129
+ end
130
+ end
131
+
132
+
133
+ module Access
134
+ PingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.PingRequest").msgclass
135
+ PingResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.PingResponse").msgclass
136
+ GetLatestBlockHeaderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.GetLatestBlockHeaderRequest").msgclass
137
+ GetBlockHeaderByIDRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.GetBlockHeaderByIDRequest").msgclass
138
+ GetBlockHeaderByHeightRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.GetBlockHeaderByHeightRequest").msgclass
139
+ BlockHeaderResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.BlockHeaderResponse").msgclass
140
+ GetLatestBlockRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.GetLatestBlockRequest").msgclass
141
+ GetBlockByIDRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.GetBlockByIDRequest").msgclass
142
+ GetBlockByHeightRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.GetBlockByHeightRequest").msgclass
143
+ BlockResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.BlockResponse").msgclass
144
+ GetCollectionByIDRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.GetCollectionByIDRequest").msgclass
145
+ CollectionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.CollectionResponse").msgclass
146
+ SendTransactionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.SendTransactionRequest").msgclass
147
+ SendTransactionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.SendTransactionResponse").msgclass
148
+ GetTransactionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.GetTransactionRequest").msgclass
149
+ TransactionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.TransactionResponse").msgclass
150
+ TransactionResultResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.TransactionResultResponse").msgclass
151
+ GetAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.GetAccountRequest").msgclass
152
+ GetAccountResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.GetAccountResponse").msgclass
153
+ GetAccountAtLatestBlockRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.GetAccountAtLatestBlockRequest").msgclass
154
+ AccountResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.AccountResponse").msgclass
155
+ GetAccountAtBlockHeightRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.GetAccountAtBlockHeightRequest").msgclass
156
+ ExecuteScriptAtLatestBlockRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.ExecuteScriptAtLatestBlockRequest").msgclass
157
+ ExecuteScriptAtBlockIDRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.ExecuteScriptAtBlockIDRequest").msgclass
158
+ ExecuteScriptAtBlockHeightRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.ExecuteScriptAtBlockHeightRequest").msgclass
159
+ ExecuteScriptResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.ExecuteScriptResponse").msgclass
160
+ GetEventsForHeightRangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.GetEventsForHeightRangeRequest").msgclass
161
+ GetEventsForBlockIDsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.GetEventsForBlockIDsRequest").msgclass
162
+ EventsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.EventsResponse").msgclass
163
+ EventsResponse::Result = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.EventsResponse.Result").msgclass
164
+ GetNetworkParametersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.GetNetworkParametersRequest").msgclass
165
+ GetNetworkParametersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.GetNetworkParametersResponse").msgclass
166
+ GetLatestProtocolStateSnapshotRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.GetLatestProtocolStateSnapshotRequest").msgclass
167
+ ProtocolStateSnapshotResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.access.ProtocolStateSnapshotResponse").msgclass
168
+ end
@@ -0,0 +1,96 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # Source: flow/access/access.proto for package 'flow.access'
3
+
4
+ require 'grpc'
5
+ require 'flow/access/access_pb'
6
+
7
+ module Access
8
+ module AccessAPI
9
+ # AccessAPI is the public-facing API provided by access nodes.
10
+ class Service
11
+
12
+ include ::GRPC::GenericService
13
+
14
+ self.marshal_class_method = :encode
15
+ self.unmarshal_class_method = :decode
16
+ self.service_name = 'flow.access.AccessAPI'
17
+
18
+ # Ping is used to check if the access node is alive and healthy.
19
+ rpc :Ping, ::Access::PingRequest, ::Access::PingResponse
20
+ # Block Headers
21
+ #
22
+ # GetLatestBlockHeader gets the latest sealed or unsealed block header.
23
+ rpc :GetLatestBlockHeader, ::Access::GetLatestBlockHeaderRequest, ::Access::BlockHeaderResponse
24
+ # GetBlockHeaderByID gets a block header by ID.
25
+ rpc :GetBlockHeaderByID, ::Access::GetBlockHeaderByIDRequest, ::Access::BlockHeaderResponse
26
+ # GetBlockHeaderByHeight gets a block header by height.
27
+ rpc :GetBlockHeaderByHeight, ::Access::GetBlockHeaderByHeightRequest, ::Access::BlockHeaderResponse
28
+ # Blocks
29
+ #
30
+ # GetLatestBlock gets the full payload of the latest sealed or unsealed
31
+ # block.
32
+ rpc :GetLatestBlock, ::Access::GetLatestBlockRequest, ::Access::BlockResponse
33
+ # GetBlockByID gets a full block by ID.
34
+ rpc :GetBlockByID, ::Access::GetBlockByIDRequest, ::Access::BlockResponse
35
+ # GetBlockByHeight gets a full block by height.
36
+ rpc :GetBlockByHeight, ::Access::GetBlockByHeightRequest, ::Access::BlockResponse
37
+ # Collections
38
+ #
39
+ # GetCollectionByID gets a collection by ID.
40
+ rpc :GetCollectionByID, ::Access::GetCollectionByIDRequest, ::Access::CollectionResponse
41
+ # Transactions
42
+ #
43
+ # SendTransaction submits a transaction to the network.
44
+ rpc :SendTransaction, ::Access::SendTransactionRequest, ::Access::SendTransactionResponse
45
+ # GetTransaction gets a transaction by ID.
46
+ rpc :GetTransaction, ::Access::GetTransactionRequest, ::Access::TransactionResponse
47
+ # GetTransactionResult gets the result of a transaction.
48
+ rpc :GetTransactionResult, ::Access::GetTransactionRequest, ::Access::TransactionResultResponse
49
+ # Accounts
50
+ #
51
+ # GetAccount is an alias for GetAccountAtLatestBlock.
52
+ #
53
+ # Warning: this function is deprecated. It behaves identically to
54
+ # GetAccountAtLatestBlock and will be removed in a future version.
55
+ rpc :GetAccount, ::Access::GetAccountRequest, ::Access::GetAccountResponse
56
+ # GetAccountAtLatestBlock gets an account by address from the latest sealed
57
+ # execution state.
58
+ rpc :GetAccountAtLatestBlock, ::Access::GetAccountAtLatestBlockRequest, ::Access::AccountResponse
59
+ # GetAccountAtBlockHeight gets an account by address at the given block
60
+ # height
61
+ rpc :GetAccountAtBlockHeight, ::Access::GetAccountAtBlockHeightRequest, ::Access::AccountResponse
62
+ # Scripts
63
+ #
64
+ # ExecuteScriptAtLatestBlock executes a read-only Cadence script against the
65
+ # latest sealed execution state.
66
+ rpc :ExecuteScriptAtLatestBlock, ::Access::ExecuteScriptAtLatestBlockRequest, ::Access::ExecuteScriptResponse
67
+ # ExecuteScriptAtBlockID executes a ready-only Cadence script against the
68
+ # execution state at the block with the given ID.
69
+ rpc :ExecuteScriptAtBlockID, ::Access::ExecuteScriptAtBlockIDRequest, ::Access::ExecuteScriptResponse
70
+ # ExecuteScriptAtBlockHeight executes a ready-only Cadence script against the
71
+ # execution state at the given block height.
72
+ rpc :ExecuteScriptAtBlockHeight, ::Access::ExecuteScriptAtBlockHeightRequest, ::Access::ExecuteScriptResponse
73
+ # Events
74
+ #
75
+ # GetEventsForHeightRange retrieves events emitted within the specified block
76
+ # range.
77
+ rpc :GetEventsForHeightRange, ::Access::GetEventsForHeightRangeRequest, ::Access::EventsResponse
78
+ # GetEventsForBlockIDs retrieves events for the specified block IDs and event
79
+ # type.
80
+ rpc :GetEventsForBlockIDs, ::Access::GetEventsForBlockIDsRequest, ::Access::EventsResponse
81
+ # NetworkParameters
82
+ #
83
+ # GetNetworkParameters retrieves the Flow network details
84
+ rpc :GetNetworkParameters, ::Access::GetNetworkParametersRequest, ::Access::GetNetworkParametersResponse
85
+ # ProtocolState
86
+ #
87
+ # GetLatestProtocolStateSnapshot retrieves the latest sealed protocol state
88
+ # snapshot. Used by Flow nodes joining the network to bootstrap a
89
+ # space-efficient local state.
90
+ rpc :GetLatestProtocolStateSnapshot, ::Access::GetLatestProtocolStateSnapshotRequest, ::Access::ProtocolStateSnapshotResponse
91
+ end
92
+
93
+ Stub = Service.rpc_stub_class
94
+ end
95
+ end
96
+
@@ -0,0 +1,30 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: flow/entities/account.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_file("flow/entities/account.proto", :syntax => :proto3) do
8
+ add_message "flow.entities.Account" do
9
+ optional :address, :bytes, 1
10
+ optional :balance, :uint64, 2
11
+ optional :code, :bytes, 3
12
+ repeated :keys, :message, 4, "flow.entities.AccountKey"
13
+ map :contracts, :string, :bytes, 5
14
+ end
15
+ add_message "flow.entities.AccountKey" do
16
+ optional :index, :uint32, 1
17
+ optional :public_key, :bytes, 2
18
+ optional :sign_algo, :uint32, 3
19
+ optional :hash_algo, :uint32, 4
20
+ optional :weight, :uint32, 5
21
+ optional :sequence_number, :uint32, 6
22
+ optional :revoked, :bool, 7
23
+ end
24
+ end
25
+ end
26
+
27
+ module Entities
28
+ Account = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.entities.Account").msgclass
29
+ AccountKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.entities.AccountKey").msgclass
30
+ end
@@ -0,0 +1,20 @@
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 Entities
19
+ BlockHeader = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.entities.BlockHeader").msgclass
20
+ end
@@ -0,0 +1,25 @@
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 Entities
24
+ Block = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.entities.Block").msgclass
25
+ end
@@ -0,0 +1,19 @@
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 Entities
18
+ BlockSeal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.entities.BlockSeal").msgclass
19
+ end