-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathquery.proto
246 lines (208 loc) · 8.08 KB
/
query.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
/**
* # Query
* This is the parent message for all queries, and this message is
* serialized and signed, with the signature included in the QueryHeader.
*
* All of the entries in the `query` `oneof` are fully specified elsewhere;
* we only include a short summary here.
*
* ### Keywords
* The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
* "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
* document are to be interpreted as described in
* [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in
* [RFC8174](https://www.ietf.org/rfc/rfc8174).
*/
syntax = "proto3";
package proto;
/*
* Copyright (C) 2018-2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
option java_package = "com.hederahashgraph.api.proto.java";
// <<<pbj.java_package = "com.hedera.hapi.node.transaction">>> This comment is special code for setting PBJ Compiler java package
option java_multiple_files = true;
import "get_by_key.proto";
import "get_by_solidity_id.proto";
import "contract_call_local.proto";
import "contract_get_info.proto";
import "contract_get_bytecode.proto";
import "contract_get_records.proto";
import "crypto_get_account_balance.proto";
import "crypto_get_account_records.proto";
import "crypto_get_info.proto";
import "crypto_get_live_hash.proto";
import "crypto_get_stakers.proto";
import "file_get_contents.proto";
import "file_get_info.proto";
import "transaction_get_receipt.proto";
import "transaction_get_record.proto";
import "transaction_get_fast_record.proto";
import "consensus_get_topic_info.proto";
import "network_get_version_info.proto";
import "network_get_execution_time.proto";
import "token_get_info.proto";
import "schedule_get_info.proto";
import "token_get_account_nft_infos.proto";
import "token_get_nft_info.proto";
import "token_get_nft_infos.proto";
import "get_account_details.proto";
/**
* A query transaction.<br/>
* This message is serialized to bytes and those bytes are signed by the
* submitter, with the signature included in the QueryHeader for the query
* request.
*/
message Query {
oneof query {
/**
* Get all entities associated with a given key.
*/
GetByKeyQuery getByKey = 1;
/**
* Get an Hedera identifier associated with an identifier in EVM
* "Solidity" form.<br/>
* Most often used in smart contracts to find an Hedera account,
* file, or contract identifier to pass to a system contract or
* precompile.
*/
GetBySolidityIDQuery getBySolidityID = 2;
/**
* Call a function of a smart contract.<br/>
* This call is executed exclusively on the node to which it is
* submitted, and is much less expensive than a `contractCall`
* transaction.
*/
ContractCallLocalQuery contractCallLocal = 3;
/**
* Get information about a smart contract.
*/
ContractGetInfoQuery contractGetInfo = 4;
/**
* Get runtime bytecode used by a smart contract.
*/
ContractGetBytecodeQuery contractGetBytecode = 5;
/**
* This query is unsupported and SHALL fail.<br/>
* Requests for this information MUST be directed to a mirror node.
* <p>
* Get Records of a smart contract.
*/
ContractGetRecordsQuery ContractGetRecords = 6 [deprecated = true];
/**
* Get the current HBAR balance of an Hedera account or smart contract.
*/
CryptoGetAccountBalanceQuery cryptogetAccountBalance = 7;
/**
* Get records of all "recent" transactions for which a specified
* account is the effective payer.
*/
CryptoGetAccountRecordsQuery cryptoGetAccountRecords = 8;
/**
* Get information about an account, including the balance.<br/>
* This does not get the list of account records.
*/
CryptoGetInfoQuery cryptoGetInfo = 9;
/**
* This query is unsupported and SHALL fail.<br/>
* Requests for this information MUST be directed to a mirror node.
* <p>
* Get a single livehash from a single account, if present.
*/
CryptoGetLiveHashQuery cryptoGetLiveHash = 10 [deprecated = true];
/**
* This query is unsupported and SHALL fail.<br/>
* Requests for this information MUST be directed to a mirror node.
* <p>
* Get all the accounts that are proxy staking to this account.
*/
CryptoGetStakersQuery cryptoGetProxyStakers = 11 [deprecated = true];
/**
* Get the content of a file.
*/
FileGetContentsQuery fileGetContents = 12;
/**
* Get metadata for a file.
*/
FileGetInfoQuery fileGetInfo = 13;
/**
* Get a receipt for a transaction.<br/>
* This only returns a receipt if the transaction is "recent", which
* is typically within the previous 180 seconds (3 minutes).
*/
TransactionGetReceiptQuery transactionGetReceipt = 14;
/**
* Get a record for a transaction.
* This only returns a record if the transaction is "available", which
* is typically within the previous 1 hour.
*/
TransactionGetRecordQuery transactionGetRecord = 15;
/**
* Get a record for a transaction.
* This only returns a record if the transaction is "recent", which
* is typically within the previous 180 seconds (3 minutes).
*/
TransactionGetFastRecordQuery transactionGetFastRecord = 16;
/**
* Get metadata for a consensus topic.
*/
ConsensusGetTopicInfoQuery consensusGetTopicInfo = 50;
/**
* Get the versions of Hedera Services and the HAPI API deployed on
* the responding consensus node.
*/
NetworkGetVersionInfoQuery networkGetVersionInfo = 51;
/**
* Get metadata for a token.
*/
TokenGetInfoQuery tokenGetInfo = 52;
/**
* Get metadata for a schedule.<br/>
* A schedule is a request to execute a transaction at a future
* time.
*/
ScheduleGetInfoQuery scheduleGetInfo = 53;
/**
* This query is unsupported and SHALL fail.<br/>
* Requests for this information MUST be directed to a mirror node.
* <p>
* Get a list of non-fungible/unique tokens associated with an account.
*/
TokenGetAccountNftInfosQuery tokenGetAccountNftInfos = 54 [deprecated = true];
/**
* Get metadata for a specific, serial numbered, non-fungible/unique
* token (NFT).
*/
TokenGetNftInfoQuery tokenGetNftInfo = 55;
/**
* This query is unsupported and SHALL fail.<br/>
* Requests for this information MUST be directed to a mirror node.
* <p>
* Get metadata for all non-fungible/unique tokens (NFTs) of a single
* type within a range of indices (0-based count of minted tokens).
*/
TokenGetNftInfosQuery tokenGetNftInfos = 56 [deprecated = true];
/**
* This query is unsupported and SHALL fail.<br/>
* Requests for this information MUST be directed to a mirror node.
* <p>
* Get the execution time for a recent transaction.
*/
NetworkGetExecutionTimeQuery networkGetExecutionTime = 57 [deprecated = true];
/**
* Get detail metadata for an account.
*/
GetAccountDetailsQuery accountDetails = 58;
}
}