flow_client 0.2.3-arm64-darwin-21
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 +37 -0
- data/.gitignore +13 -0
- data/.rspec +3 -0
- data/.rubocop.yml +26 -0
- data/CHANGELOG.md +24 -0
- data/CODE_OF_CONDUCT.md +84 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +114 -0
- data/Guardfile +79 -0
- data/LICENSE.txt +21 -0
- data/README.md +747 -0
- data/Rakefile +12 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/docker-compose.yml +12 -0
- data/flow.json +21 -0
- data/flow_client.gemspec +44 -0
- data/lib/cadence/contracts/NonFungibleToken.cdc +144 -0
- data/lib/cadence/templates/add-account-key.cdc +16 -0
- data/lib/cadence/templates/add-contract.cdc +5 -0
- data/lib/cadence/templates/create-account.cdc +21 -0
- data/lib/cadence/templates/remove-contract.cdc +5 -0
- data/lib/cadence/templates/update-contract.cdc +5 -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/account.rb +31 -0
- data/lib/flow_client/block.rb +81 -0
- data/lib/flow_client/cadence_type.rb +185 -0
- data/lib/flow_client/client.rb +387 -0
- data/lib/flow_client/collection.rb +35 -0
- data/lib/flow_client/crypto.rb +62 -0
- data/lib/flow_client/event.rb +52 -0
- data/lib/flow_client/proposal_key.rb +23 -0
- data/lib/flow_client/signature.rb +23 -0
- data/lib/flow_client/signer.rb +22 -0
- data/lib/flow_client/transaction.rb +190 -0
- data/lib/flow_client/utils.rb +67 -0
- data/lib/flow_client/version.rb +5 -0
- data/lib/flow_client.rb +22 -0
- data/logo.svg +121 -0
- data/logo@2x.png +0 -0
- data/template.md +748 -0
- metadata +192 -0
@@ -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
|
@@ -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
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: flow/legacy/entities/account.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_file("flow/legacy/entities/account.proto", :syntax => :proto3) do
|
8
|
+
add_message "entities.Account" do
|
9
|
+
optional :address, :bytes, 1
|
10
|
+
optional :balance, :uint64, 2
|
11
|
+
optional :code, :bytes, 3
|
12
|
+
repeated :keys, :message, 4, "entities.AccountKey"
|
13
|
+
end
|
14
|
+
add_message "entities.AccountKey" do
|
15
|
+
optional :index, :uint32, 1
|
16
|
+
optional :public_key, :bytes, 2
|
17
|
+
optional :sign_algo, :uint32, 3
|
18
|
+
optional :hash_algo, :uint32, 4
|
19
|
+
optional :weight, :uint32, 5
|
20
|
+
optional :sequence_number, :uint32, 6
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
module Entities
|
26
|
+
Account = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("entities.Account").msgclass
|
27
|
+
AccountKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("entities.AccountKey").msgclass
|
28
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: flow/legacy/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/legacy/entities/block_header.proto", :syntax => :proto3) do
|
9
|
+
add_message "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("entities.BlockHeader").msgclass
|
20
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: flow/legacy/entities/block.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
require 'google/protobuf/timestamp_pb'
|
7
|
+
require 'flow/legacy/entities/collection_pb'
|
8
|
+
require 'flow/legacy/entities/block_seal_pb'
|
9
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
10
|
+
add_file("flow/legacy/entities/block.proto", :syntax => :proto3) do
|
11
|
+
add_message "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, "entities.CollectionGuarantee"
|
17
|
+
repeated :block_seals, :message, 6, "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("entities.Block").msgclass
|
25
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: flow/legacy/entities/block_seal.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_file("flow/legacy/entities/block_seal.proto", :syntax => :proto3) do
|
8
|
+
add_message "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("entities.BlockSeal").msgclass
|
19
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: flow/legacy/entities/collection.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_file("flow/legacy/entities/collection.proto", :syntax => :proto3) do
|
8
|
+
add_message "entities.Collection" do
|
9
|
+
optional :id, :bytes, 1
|
10
|
+
repeated :transaction_ids, :bytes, 2
|
11
|
+
end
|
12
|
+
add_message "entities.CollectionGuarantee" do
|
13
|
+
optional :collection_id, :bytes, 1
|
14
|
+
repeated :signatures, :bytes, 2
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
module Entities
|
20
|
+
Collection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("entities.Collection").msgclass
|
21
|
+
CollectionGuarantee = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("entities.CollectionGuarantee").msgclass
|
22
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: flow/legacy/entities/event.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_file("flow/legacy/entities/event.proto", :syntax => :proto3) do
|
8
|
+
add_message "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("entities.Event").msgclass
|
20
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: flow/legacy/entities/transaction.proto
|
3
|
+
|
4
|
+
require 'google/protobuf'
|
5
|
+
|
6
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
+
add_file("flow/legacy/entities/transaction.proto", :syntax => :proto3) do
|
8
|
+
add_message "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, "entities.Transaction.ProposalKey"
|
14
|
+
optional :payer, :bytes, 6
|
15
|
+
repeated :authorizers, :bytes, 7
|
16
|
+
repeated :payload_signatures, :message, 8, "entities.Transaction.Signature"
|
17
|
+
repeated :envelope_signatures, :message, 9, "entities.Transaction.Signature"
|
18
|
+
end
|
19
|
+
add_message "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 "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 "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 Entities
|
41
|
+
Transaction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("entities.Transaction").msgclass
|
42
|
+
Transaction::ProposalKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("entities.Transaction.ProposalKey").msgclass
|
43
|
+
Transaction::Signature = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("entities.Transaction.Signature").msgclass
|
44
|
+
TransactionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("entities.TransactionStatus").enummodule
|
45
|
+
end
|