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.
- checksums.yaml +7 -0
- data/.github/workflows/ruby.yml +35 -0
- data/.gitignore +12 -0
- data/.rspec +3 -0
- data/.rubocop.yml +20 -0
- data/CHANGELOG.md +5 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/Gemfile +14 -0
- data/Gemfile.lock +115 -0
- data/Guardfile +79 -0
- data/LICENSE.txt +21 -0
- data/README.md +93 -0
- data/Rakefile +12 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/flow_client.gemspec +44 -0
- data/lib/flow/access/access_pb.rb +168 -0
- data/lib/flow/access/access_services_pb.rb +96 -0
- data/lib/flow/entities/account_pb.rb +30 -0
- data/lib/flow/entities/block_header_pb.rb +20 -0
- data/lib/flow/entities/block_pb.rb +25 -0
- data/lib/flow/entities/block_seal_pb.rb +19 -0
- data/lib/flow/entities/collection_pb.rb +23 -0
- data/lib/flow/entities/event_pb.rb +20 -0
- data/lib/flow/entities/transaction_pb.rb +47 -0
- data/lib/flow/execution/execution_pb.rb +65 -0
- data/lib/flow/execution/execution_services_pb.rb +43 -0
- data/lib/flow/legacy/access/access_pb.rb +157 -0
- data/lib/flow/legacy/access/access_services_pb.rb +89 -0
- data/lib/flow/legacy/entities/account_pb.rb +28 -0
- data/lib/flow/legacy/entities/block_header_pb.rb +20 -0
- data/lib/flow/legacy/entities/block_pb.rb +25 -0
- data/lib/flow/legacy/entities/block_seal_pb.rb +19 -0
- data/lib/flow/legacy/entities/collection_pb.rb +22 -0
- data/lib/flow/legacy/entities/event_pb.rb +20 -0
- data/lib/flow/legacy/entities/transaction_pb.rb +45 -0
- data/lib/flow/legacy/execution/execution_pb.rb +65 -0
- data/lib/flow/legacy/execution/execution_services_pb.rb +42 -0
- data/lib/flow_client.rb +14 -0
- data/lib/flow_client/client.rb +98 -0
- data/lib/flow_client/crypto.rb +33 -0
- data/lib/flow_client/transaction.rb +147 -0
- data/lib/flow_client/utils.rb +38 -0
- data/lib/flow_client/version.rb +5 -0
- metadata +201 -0
@@ -0,0 +1,23 @@
|
|
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
|
+
|
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
|
@@ -0,0 +1,20 @@
|
|
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 Entities
|
19
|
+
Event = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.entities.Event").msgclass
|
20
|
+
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
|
+
|
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
|
+
|
@@ -0,0 +1,65 @@
|
|
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 Execution
|
54
|
+
PingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.execution.PingRequest").msgclass
|
55
|
+
PingResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.execution.PingResponse").msgclass
|
56
|
+
GetAccountAtBlockIDRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.execution.GetAccountAtBlockIDRequest").msgclass
|
57
|
+
GetAccountAtBlockIDResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.execution.GetAccountAtBlockIDResponse").msgclass
|
58
|
+
ExecuteScriptAtBlockIDRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.execution.ExecuteScriptAtBlockIDRequest").msgclass
|
59
|
+
ExecuteScriptAtBlockIDResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.execution.ExecuteScriptAtBlockIDResponse").msgclass
|
60
|
+
GetEventsForBlockIDsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.execution.GetEventsForBlockIDsResponse").msgclass
|
61
|
+
GetEventsForBlockIDsResponse::Result = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.execution.GetEventsForBlockIDsResponse.Result").msgclass
|
62
|
+
GetEventsForBlockIDsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.execution.GetEventsForBlockIDsRequest").msgclass
|
63
|
+
GetTransactionResultRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.execution.GetTransactionResultRequest").msgclass
|
64
|
+
GetTransactionResultResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("flow.execution.GetTransactionResultResponse").msgclass
|
65
|
+
end
|
@@ -0,0 +1,43 @@
|
|
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
|
+
|
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, ::Execution::PingRequest, ::Execution::PingResponse
|
21
|
+
# Accounts
|
22
|
+
#
|
23
|
+
# GetAccountAtBlockID gets an account by address at the given block ID
|
24
|
+
rpc :GetAccountAtBlockID, ::Execution::GetAccountAtBlockIDRequest, ::Execution::GetAccountAtBlockIDResponse
|
25
|
+
# Scripts
|
26
|
+
#
|
27
|
+
# ExecuteScriptAtBlockID executes a ready-only Cadence script against the
|
28
|
+
# execution state at the block with the given ID.
|
29
|
+
rpc :ExecuteScriptAtBlockID, ::Execution::ExecuteScriptAtBlockIDRequest, ::Execution::ExecuteScriptAtBlockIDResponse
|
30
|
+
# Events
|
31
|
+
#
|
32
|
+
# GetEventsForBlockIDs retrieves events for all the specified block IDs that
|
33
|
+
# have the given type
|
34
|
+
rpc :GetEventsForBlockIDs, ::Execution::GetEventsForBlockIDsRequest, ::Execution::GetEventsForBlockIDsResponse
|
35
|
+
# Transaction
|
36
|
+
#
|
37
|
+
# GetTransactionResult gets the result of a transaction.
|
38
|
+
rpc :GetTransactionResult, ::Execution::GetTransactionResultRequest, ::Execution::GetTransactionResultResponse
|
39
|
+
end
|
40
|
+
|
41
|
+
Stub = Service.rpc_stub_class
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,157 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: flow/legacy/access/access.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'flow/legacy/entities/account_pb'
|
7
|
+
require 'flow/legacy/entities/block_header_pb'
|
8
|
+
require 'flow/legacy/entities/block_pb'
|
9
|
+
require 'flow/legacy/entities/collection_pb'
|
10
|
+
require 'flow/legacy/entities/event_pb'
|
11
|
+
require 'flow/legacy/entities/transaction_pb'
|
12
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
13
|
+
add_file("flow/legacy/access/access.proto", :syntax => :proto3) do
|
14
|
+
add_message "access.PingRequest" do
|
15
|
+
end
|
16
|
+
add_message "access.PingResponse" do
|
17
|
+
end
|
18
|
+
add_message "access.GetLatestBlockHeaderRequest" do
|
19
|
+
optional :is_sealed, :bool, 1
|
20
|
+
end
|
21
|
+
add_message "access.GetBlockHeaderByIDRequest" do
|
22
|
+
optional :id, :bytes, 1
|
23
|
+
end
|
24
|
+
add_message "access.GetBlockHeaderByHeightRequest" do
|
25
|
+
optional :height, :uint64, 1
|
26
|
+
end
|
27
|
+
add_message "access.BlockHeaderResponse" do
|
28
|
+
optional :block, :message, 1, "entities.BlockHeader"
|
29
|
+
end
|
30
|
+
add_message "access.GetLatestBlockRequest" do
|
31
|
+
optional :is_sealed, :bool, 1
|
32
|
+
end
|
33
|
+
add_message "access.GetBlockByIDRequest" do
|
34
|
+
optional :id, :bytes, 1
|
35
|
+
end
|
36
|
+
add_message "access.GetBlockByHeightRequest" do
|
37
|
+
optional :height, :uint64, 1
|
38
|
+
end
|
39
|
+
add_message "access.BlockResponse" do
|
40
|
+
optional :block, :message, 1, "entities.Block"
|
41
|
+
end
|
42
|
+
add_message "access.GetCollectionByIDRequest" do
|
43
|
+
optional :id, :bytes, 1
|
44
|
+
end
|
45
|
+
add_message "access.CollectionResponse" do
|
46
|
+
optional :collection, :message, 1, "entities.Collection"
|
47
|
+
end
|
48
|
+
add_message "access.SendTransactionRequest" do
|
49
|
+
optional :transaction, :message, 1, "entities.Transaction"
|
50
|
+
end
|
51
|
+
add_message "access.SendTransactionResponse" do
|
52
|
+
optional :id, :bytes, 1
|
53
|
+
end
|
54
|
+
add_message "access.GetTransactionRequest" do
|
55
|
+
optional :id, :bytes, 1
|
56
|
+
end
|
57
|
+
add_message "access.TransactionResponse" do
|
58
|
+
optional :transaction, :message, 1, "entities.Transaction"
|
59
|
+
end
|
60
|
+
add_message "access.TransactionResultResponse" do
|
61
|
+
optional :status, :enum, 1, "entities.TransactionStatus"
|
62
|
+
optional :status_code, :uint32, 2
|
63
|
+
optional :error_message, :string, 3
|
64
|
+
repeated :events, :message, 4, "entities.Event"
|
65
|
+
end
|
66
|
+
add_message "access.GetAccountRequest" do
|
67
|
+
optional :address, :bytes, 1
|
68
|
+
end
|
69
|
+
add_message "access.GetAccountResponse" do
|
70
|
+
optional :account, :message, 1, "entities.Account"
|
71
|
+
end
|
72
|
+
add_message "access.GetAccountAtLatestBlockRequest" do
|
73
|
+
optional :address, :bytes, 1
|
74
|
+
end
|
75
|
+
add_message "access.AccountResponse" do
|
76
|
+
optional :account, :message, 1, "entities.Account"
|
77
|
+
end
|
78
|
+
add_message "access.GetAccountAtBlockHeightRequest" do
|
79
|
+
optional :address, :bytes, 1
|
80
|
+
optional :block_height, :uint64, 2
|
81
|
+
end
|
82
|
+
add_message "access.ExecuteScriptAtLatestBlockRequest" do
|
83
|
+
optional :script, :bytes, 1
|
84
|
+
repeated :arguments, :bytes, 2
|
85
|
+
end
|
86
|
+
add_message "access.ExecuteScriptAtBlockIDRequest" do
|
87
|
+
optional :block_id, :bytes, 1
|
88
|
+
optional :script, :bytes, 2
|
89
|
+
repeated :arguments, :bytes, 3
|
90
|
+
end
|
91
|
+
add_message "access.ExecuteScriptAtBlockHeightRequest" do
|
92
|
+
optional :block_height, :uint64, 1
|
93
|
+
optional :script, :bytes, 2
|
94
|
+
repeated :arguments, :bytes, 3
|
95
|
+
end
|
96
|
+
add_message "access.ExecuteScriptResponse" do
|
97
|
+
optional :value, :bytes, 1
|
98
|
+
end
|
99
|
+
add_message "access.GetEventsForHeightRangeRequest" do
|
100
|
+
optional :type, :string, 1
|
101
|
+
optional :start_height, :uint64, 2
|
102
|
+
optional :end_height, :uint64, 3
|
103
|
+
end
|
104
|
+
add_message "access.GetEventsForBlockIDsRequest" do
|
105
|
+
optional :type, :string, 1
|
106
|
+
repeated :block_ids, :bytes, 2
|
107
|
+
end
|
108
|
+
add_message "access.EventsResponse" do
|
109
|
+
repeated :results, :message, 1, "access.EventsResponse.Result"
|
110
|
+
end
|
111
|
+
add_message "access.EventsResponse.Result" do
|
112
|
+
optional :block_id, :bytes, 1
|
113
|
+
optional :block_height, :uint64, 2
|
114
|
+
repeated :events, :message, 3, "entities.Event"
|
115
|
+
end
|
116
|
+
add_message "access.GetNetworkParametersRequest" do
|
117
|
+
end
|
118
|
+
add_message "access.GetNetworkParametersResponse" do
|
119
|
+
optional :chain_id, :string, 1
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
module Access
|
125
|
+
PingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.PingRequest").msgclass
|
126
|
+
PingResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.PingResponse").msgclass
|
127
|
+
GetLatestBlockHeaderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.GetLatestBlockHeaderRequest").msgclass
|
128
|
+
GetBlockHeaderByIDRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.GetBlockHeaderByIDRequest").msgclass
|
129
|
+
GetBlockHeaderByHeightRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.GetBlockHeaderByHeightRequest").msgclass
|
130
|
+
BlockHeaderResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.BlockHeaderResponse").msgclass
|
131
|
+
GetLatestBlockRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.GetLatestBlockRequest").msgclass
|
132
|
+
GetBlockByIDRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.GetBlockByIDRequest").msgclass
|
133
|
+
GetBlockByHeightRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.GetBlockByHeightRequest").msgclass
|
134
|
+
BlockResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.BlockResponse").msgclass
|
135
|
+
GetCollectionByIDRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.GetCollectionByIDRequest").msgclass
|
136
|
+
CollectionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.CollectionResponse").msgclass
|
137
|
+
SendTransactionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.SendTransactionRequest").msgclass
|
138
|
+
SendTransactionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.SendTransactionResponse").msgclass
|
139
|
+
GetTransactionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.GetTransactionRequest").msgclass
|
140
|
+
TransactionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.TransactionResponse").msgclass
|
141
|
+
TransactionResultResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.TransactionResultResponse").msgclass
|
142
|
+
GetAccountRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.GetAccountRequest").msgclass
|
143
|
+
GetAccountResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.GetAccountResponse").msgclass
|
144
|
+
GetAccountAtLatestBlockRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.GetAccountAtLatestBlockRequest").msgclass
|
145
|
+
AccountResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.AccountResponse").msgclass
|
146
|
+
GetAccountAtBlockHeightRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.GetAccountAtBlockHeightRequest").msgclass
|
147
|
+
ExecuteScriptAtLatestBlockRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.ExecuteScriptAtLatestBlockRequest").msgclass
|
148
|
+
ExecuteScriptAtBlockIDRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.ExecuteScriptAtBlockIDRequest").msgclass
|
149
|
+
ExecuteScriptAtBlockHeightRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.ExecuteScriptAtBlockHeightRequest").msgclass
|
150
|
+
ExecuteScriptResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.ExecuteScriptResponse").msgclass
|
151
|
+
GetEventsForHeightRangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.GetEventsForHeightRangeRequest").msgclass
|
152
|
+
GetEventsForBlockIDsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.GetEventsForBlockIDsRequest").msgclass
|
153
|
+
EventsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.EventsResponse").msgclass
|
154
|
+
EventsResponse::Result = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.EventsResponse.Result").msgclass
|
155
|
+
GetNetworkParametersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.GetNetworkParametersRequest").msgclass
|
156
|
+
GetNetworkParametersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("access.GetNetworkParametersResponse").msgclass
|
157
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: flow/legacy/access/access.proto for package 'access'
|
3
|
+
|
4
|
+
require 'grpc'
|
5
|
+
require 'flow/legacy/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 = '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
|
+
end
|
86
|
+
|
87
|
+
Stub = Service.rpc_stub_class
|
88
|
+
end
|
89
|
+
end
|