neutron_std/types/neutron/
interchainqueries.rs

1use neutron_std_derive::CosmwasmExt;
2/// The parameters for the module.
3#[allow(clippy::derive_partial_eq_without_eq)]
4#[derive(
5    Clone,
6    PartialEq,
7    Eq,
8    ::prost::Message,
9    ::serde::Serialize,
10    ::serde::Deserialize,
11    ::schemars::JsonSchema,
12    CosmwasmExt,
13)]
14#[proto_message(type_url = "/neutron.interchainqueries.Params")]
15pub struct Params {
16    /// The duration, measured in blocks, that must pass since the query's registration or its last
17    /// result submission before the query becomes eligible for removal by anyone. Is used to set
18    /// `submit_timeout` on Interchain Query registration.
19    #[prost(uint64, tag = "1")]
20    #[serde(
21        serialize_with = "crate::serde::as_str::serialize",
22        deserialize_with = "crate::serde::as_str::deserialize"
23    )]
24    pub query_submit_timeout: u64,
25    /// Amount of coins required to be provided as deposit on Interchain Query registration.
26    #[prost(message, repeated, tag = "2")]
27    pub query_deposit: ::prost::alloc::vec::Vec<super::super::cosmos::base::v1beta1::Coin>,
28    /// Amount of tx hashes to be removed during a single EndBlock. Can vary to balance between
29    /// network cleaning speed and EndBlock duration. A zero value means no limit.
30    #[prost(uint64, tag = "3")]
31    #[serde(
32        serialize_with = "crate::serde::as_str::serialize",
33        deserialize_with = "crate::serde::as_str::deserialize"
34    )]
35    pub tx_query_removal_limit: u64,
36    /// Maximum amount of keys in a registered key value query
37    #[prost(uint64, tag = "4")]
38    #[serde(
39        serialize_with = "crate::serde::as_str::serialize",
40        deserialize_with = "crate::serde::as_str::deserialize"
41    )]
42    pub max_kv_query_keys_count: u64,
43    /// max_transactions_filters defines maximum allowed amount of tx filters in msgRegisterInterchainQuery
44    #[prost(uint64, tag = "5")]
45    #[serde(
46        serialize_with = "crate::serde::as_str::serialize",
47        deserialize_with = "crate::serde::as_str::deserialize"
48    )]
49    pub max_transactions_filters: u64,
50}
51/// Information about an Interchain Query registered in the interchainqueries module.
52#[allow(clippy::derive_partial_eq_without_eq)]
53#[derive(
54    Clone,
55    PartialEq,
56    Eq,
57    ::prost::Message,
58    ::serde::Serialize,
59    ::serde::Deserialize,
60    ::schemars::JsonSchema,
61    CosmwasmExt,
62)]
63#[proto_message(type_url = "/neutron.interchainqueries.RegisteredQuery")]
64pub struct RegisteredQuery {
65    /// The unique id of the registered query.
66    #[prost(uint64, tag = "1")]
67    #[serde(alias = "ID")]
68    #[serde(
69        serialize_with = "crate::serde::as_str::serialize",
70        deserialize_with = "crate::serde::as_str::deserialize"
71    )]
72    pub id: u64,
73    /// The address of the contract that registered the query.
74    #[prost(string, tag = "2")]
75    pub owner: ::prost::alloc::string::String,
76    /// The query type identifier: `kv` or `tx`.
77    #[prost(string, tag = "3")]
78    pub query_type: ::prost::alloc::string::String,
79    /// The KV-storage keys for which to get values from the remote chain. Only applicable for the
80    /// KV Interchain Queries. Max amount of keys is limited by the module's `max_kv_query_keys_count`
81    /// parameters.
82    #[prost(message, repeated, tag = "4")]
83    pub keys: ::prost::alloc::vec::Vec<KvKey>,
84    /// A stringified list of filters for remote transactions search. Only applicable for the TX
85    /// Interchain Queries. Example: "\[{\"field\":\"tx.height\",\"op\":\"Gte\",\"value\":2644737}\]".
86    /// Supported operators: "eq", "lt", "gt", "lte", "gte". Max amount of filter conditions is limited
87    /// by the module's `max_transactions_filters` parameters.
88    #[prost(string, tag = "5")]
89    pub transactions_filter: ::prost::alloc::string::String,
90    /// The IBC connection ID to the remote chain (the source of querying data). Is used for getting
91    /// ConsensusState from the respective IBC client to verify query result proofs.
92    #[prost(string, tag = "6")]
93    #[serde(alias = "connectionID")]
94    pub connection_id: ::prost::alloc::string::String,
95    /// Parameter that defines the minimal delay between consecutive query executions (i.e. the
96    /// minimal delay between query results update).
97    #[prost(uint64, tag = "7")]
98    #[serde(
99        serialize_with = "crate::serde::as_str::serialize",
100        deserialize_with = "crate::serde::as_str::deserialize"
101    )]
102    pub update_period: u64,
103    /// The local chain block height of the last query results update.
104    #[prost(uint64, tag = "8")]
105    #[serde(
106        serialize_with = "crate::serde::as_str::serialize",
107        deserialize_with = "crate::serde::as_str::deserialize"
108    )]
109    pub last_submitted_result_local_height: u64,
110    /// The remote chain block height that corresponds to the last query result update.
111    #[prost(message, optional, tag = "9")]
112    pub last_submitted_result_remote_height:
113        ::core::option::Option<super::super::ibc::core::client::v1::Height>,
114    /// Amount of coins paid for the Interchain Query registration. The deposit is paid back to the
115    /// remover. The remover can be either the query owner (during the submit timeout) or anybody.
116    #[prost(message, repeated, tag = "10")]
117    pub deposit: ::prost::alloc::vec::Vec<super::super::cosmos::base::v1beta1::Coin>,
118    /// The duration, measured in blocks, that must pass since the query's registration or its last
119    /// result submission before the query becomes eligible for removal by anyone.
120    #[prost(uint64, tag = "11")]
121    #[serde(
122        serialize_with = "crate::serde::as_str::serialize",
123        deserialize_with = "crate::serde::as_str::deserialize"
124    )]
125    pub submit_timeout: u64,
126    /// The local chain block height of the Interchain Query registration.
127    #[prost(uint64, tag = "12")]
128    #[serde(
129        serialize_with = "crate::serde::as_str::serialize",
130        deserialize_with = "crate::serde::as_str::deserialize"
131    )]
132    pub registered_at_height: u64,
133}
134/// Represents a path to an IAVL storage node.
135#[allow(clippy::derive_partial_eq_without_eq)]
136#[derive(
137    Clone,
138    PartialEq,
139    Eq,
140    ::prost::Message,
141    ::serde::Serialize,
142    ::serde::Deserialize,
143    ::schemars::JsonSchema,
144    CosmwasmExt,
145)]
146#[proto_message(type_url = "/neutron.interchainqueries.KVKey")]
147pub struct KvKey {
148    /// The substore name used in an Interchain Query. Typically, this corresponds to the keeper's
149    /// storeKey, usually the module's name, such as "bank", "staking", etc.
150    #[prost(string, tag = "1")]
151    pub path: ::prost::alloc::string::String,
152    /// A bytes field representing the key for specific data in the module's storage.
153    #[prost(bytes = "vec", tag = "2")]
154    #[serde(
155        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
156        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
157    )]
158    pub key: ::prost::alloc::vec::Vec<u8>,
159}
160/// The interchainqueries module's genesis state model.
161#[allow(clippy::derive_partial_eq_without_eq)]
162#[derive(
163    Clone,
164    PartialEq,
165    Eq,
166    ::prost::Message,
167    ::serde::Serialize,
168    ::serde::Deserialize,
169    ::schemars::JsonSchema,
170    CosmwasmExt,
171)]
172#[proto_message(type_url = "/neutron.interchainqueries.GenesisState")]
173pub struct GenesisState {
174    /// The parameters of the module.
175    #[prost(message, optional, tag = "1")]
176    pub params: ::core::option::Option<Params>,
177    /// A list of registered Interchain Queries.
178    #[prost(message, repeated, tag = "2")]
179    pub registered_queries: ::prost::alloc::vec::Vec<RegisteredQuery>,
180}
181/// Request type for the Msg/RegisterInterchainQuery RPC method.
182#[allow(clippy::derive_partial_eq_without_eq)]
183#[derive(
184    Clone,
185    PartialEq,
186    Eq,
187    ::prost::Message,
188    ::serde::Serialize,
189    ::serde::Deserialize,
190    ::schemars::JsonSchema,
191    CosmwasmExt,
192)]
193#[proto_message(type_url = "/neutron.interchainqueries.MsgRegisterInterchainQuery")]
194pub struct MsgRegisterInterchainQuery {
195    /// The query type identifier: `kv` or `tx`.
196    #[prost(string, tag = "1")]
197    pub query_type: ::prost::alloc::string::String,
198    /// The KV-storage keys for which we want to get values from remote chain. Only applicable for the
199    /// KV Interchain Queries. Max amount of keys is limited by the module's `max_kv_query_keys_count`
200    /// parameters.
201    #[prost(message, repeated, tag = "2")]
202    pub keys: ::prost::alloc::vec::Vec<KvKey>,
203    /// A stringified list of filters for remote transactions search. Only applicable for the TX
204    /// Interchain Queries. Example: "\[{\"field\":\"tx.height\",\"op\":\"Gte\",\"value\":2644737}\]".
205    /// Supported operators: "eq", "lt", "gt", "lte", "gte". Max amount of filter conditions is
206    /// limited by the module's `max_transactions_filters` parameters.
207    #[prost(string, tag = "3")]
208    pub transactions_filter: ::prost::alloc::string::String,
209    /// The IBC connection ID to the remote chain (the source of querying data). Is used for getting
210    /// ConsensusState from the respective IBC client to verify query result proofs.
211    #[prost(string, tag = "4")]
212    #[serde(alias = "connectionID")]
213    pub connection_id: ::prost::alloc::string::String,
214    /// Parameter that defines the minimal delay between consecutive query executions (i.e. the
215    /// minimal delay between query results update).
216    #[prost(uint64, tag = "5")]
217    #[serde(
218        serialize_with = "crate::serde::as_str::serialize",
219        deserialize_with = "crate::serde::as_str::deserialize"
220    )]
221    pub update_period: u64,
222    /// The signer of the message.
223    #[prost(string, tag = "6")]
224    pub sender: ::prost::alloc::string::String,
225}
226/// Response type for the Msg/RegisterInterchainQuery RPC method.
227#[allow(clippy::derive_partial_eq_without_eq)]
228#[derive(
229    Clone,
230    PartialEq,
231    Eq,
232    ::prost::Message,
233    ::serde::Serialize,
234    ::serde::Deserialize,
235    ::schemars::JsonSchema,
236    CosmwasmExt,
237)]
238#[proto_message(type_url = "/neutron.interchainqueries.MsgRegisterInterchainQueryResponse")]
239pub struct MsgRegisterInterchainQueryResponse {
240    /// The ID assigned to the registered Interchain Query by the module.
241    #[prost(uint64, tag = "1")]
242    #[serde(alias = "ID")]
243    #[serde(
244        serialize_with = "crate::serde::as_str::serialize",
245        deserialize_with = "crate::serde::as_str::deserialize"
246    )]
247    pub id: u64,
248}
249/// Request type for the Msg/SubmitQueryResult RPC method.
250#[allow(clippy::derive_partial_eq_without_eq)]
251#[derive(
252    Clone,
253    PartialEq,
254    Eq,
255    ::prost::Message,
256    ::serde::Serialize,
257    ::serde::Deserialize,
258    ::schemars::JsonSchema,
259    CosmwasmExt,
260)]
261#[proto_message(type_url = "/neutron.interchainqueries.MsgSubmitQueryResult")]
262pub struct MsgSubmitQueryResult {
263    /// The ID of the Interchain Query.
264    #[prost(uint64, tag = "1")]
265    #[serde(alias = "queryID")]
266    #[serde(
267        serialize_with = "crate::serde::as_str::serialize",
268        deserialize_with = "crate::serde::as_str::deserialize"
269    )]
270    pub query_id: u64,
271    /// The signer of the message.
272    #[prost(string, tag = "2")]
273    pub sender: ::prost::alloc::string::String,
274    /// The IBC client ID that corresponds to the IBC connection to the remote chain (where the
275    /// query result is coming from).
276    /// Deprecated: populating this field does not make any affect
277    #[deprecated]
278    #[prost(string, tag = "3")]
279    #[serde(alias = "clientID")]
280    pub client_id: ::prost::alloc::string::String,
281    /// The result of the Interchain Query execution.
282    #[prost(message, optional, tag = "4")]
283    pub result: ::core::option::Option<QueryResult>,
284}
285/// Contains different information about a single Interchain Query execution result. Currently,
286/// this structure is used both in query result submission via an ICQ Relayer and as a query result
287/// storage for read/write operations to interchainqueries module, but the structure fields are
288/// populated in a bit different ways. When submitting a query result, all fields are populated and
289/// provided to the interchainqueries module in order to verify the result against the IBC client's
290/// state. But in order to lighten the chain state, the interchainqueries module removes the block
291/// field and proofs from the kv_results.
292#[allow(clippy::derive_partial_eq_without_eq)]
293#[derive(
294    Clone,
295    PartialEq,
296    Eq,
297    ::prost::Message,
298    ::serde::Serialize,
299    ::serde::Deserialize,
300    ::schemars::JsonSchema,
301    CosmwasmExt,
302)]
303#[proto_message(type_url = "/neutron.interchainqueries.QueryResult")]
304pub struct QueryResult {
305    /// A list of a KV Interchain Query execution results. Each result contains query parameters, a
306    /// response value and a proof.
307    #[prost(message, repeated, tag = "1")]
308    pub kv_results: ::prost::alloc::vec::Vec<StorageValue>,
309    /// A TX Interchain Query execution result. Contains metainformation about the blocks of the query
310    /// execution height. Only populated when submitting an Interchain Query result for verification
311    /// and emptied when saving the result on chain.
312    #[prost(message, optional, tag = "2")]
313    pub block: ::core::option::Option<Block>,
314    /// The height of the chain at the moment of the Interchain Query execution.
315    #[prost(uint64, tag = "3")]
316    #[serde(
317        serialize_with = "crate::serde::as_str::serialize",
318        deserialize_with = "crate::serde::as_str::deserialize"
319    )]
320    pub height: u64,
321    /// The revision number of the chain at the moment of the Interchain Query execution.
322    #[prost(uint64, tag = "4")]
323    #[serde(
324        serialize_with = "crate::serde::as_str::serialize",
325        deserialize_with = "crate::serde::as_str::deserialize"
326    )]
327    pub revision: u64,
328    /// Whether to send the query result to the owner contract as a sudo message. Only applicable for
329    /// KV type of Interchain Queries.
330    #[prost(bool, tag = "5")]
331    pub allow_kv_callbacks: bool,
332}
333/// A verifiable result of performing a single KVKey read.
334#[allow(clippy::derive_partial_eq_without_eq)]
335#[derive(
336    Clone,
337    PartialEq,
338    Eq,
339    ::prost::Message,
340    ::serde::Serialize,
341    ::serde::Deserialize,
342    ::schemars::JsonSchema,
343    CosmwasmExt,
344)]
345#[proto_message(type_url = "/neutron.interchainqueries.StorageValue")]
346pub struct StorageValue {
347    /// The substore name used in the read operation. Typically, this corresponds to the keeper's
348    /// storeKey, usually the module's name, such as "bank", "staking", etc.
349    #[prost(string, tag = "1")]
350    pub storage_prefix: ::prost::alloc::string::String,
351    /// A bytes field representing the key of the data read from the module's storage.
352    #[prost(bytes = "vec", tag = "2")]
353    #[serde(
354        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
355        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
356    )]
357    pub key: ::prost::alloc::vec::Vec<u8>,
358    /// A bytes field containing the value associated with the key in the store.
359    #[prost(bytes = "vec", tag = "3")]
360    #[serde(
361        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
362        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
363    )]
364    pub value: ::prost::alloc::vec::Vec<u8>,
365    /// The Merkle Proof which proves existence/nonexistence of key-value pair in IAVL storage. Is
366    /// used to verify
367    /// the pair against the respective remote chain's header.
368    #[prost(message, optional, tag = "4")]
369    pub proof: ::core::option::Option<super::super::tendermint::crypto::ProofOps>,
370}
371/// A single verifiable result of an Interchain Query of TX type.
372#[allow(clippy::derive_partial_eq_without_eq)]
373#[derive(
374    Clone,
375    PartialEq,
376    Eq,
377    ::prost::Message,
378    ::serde::Serialize,
379    ::serde::Deserialize,
380    ::schemars::JsonSchema,
381    CosmwasmExt,
382)]
383#[proto_message(type_url = "/neutron.interchainqueries.Block")]
384pub struct Block {
385    /// The header of the block next to the block the transaction is included in. It is needed to know
386    /// block X+1 header to verify response of transaction for block X since LastResultsHash is root
387    /// hash of all results of the txs from the previous block.
388    #[prost(message, optional, tag = "1")]
389    pub next_block_header: ::core::option::Option<crate::shim::Any>,
390    /// The header of the block the transaction is included in. It is needed to know block header to
391    /// verify inclusion of the transaction.
392    #[prost(message, optional, tag = "2")]
393    pub header: ::core::option::Option<crate::shim::Any>,
394    /// The transaction matched by the Interchain Query's transaction filter.
395    #[prost(message, optional, tag = "3")]
396    pub tx: ::core::option::Option<TxValue>,
397}
398/// Contains transaction body, response, and proofs of inclusion and delivery.
399#[allow(clippy::derive_partial_eq_without_eq)]
400#[derive(
401    Clone,
402    PartialEq,
403    Eq,
404    ::prost::Message,
405    ::serde::Serialize,
406    ::serde::Deserialize,
407    ::schemars::JsonSchema,
408    CosmwasmExt,
409)]
410#[proto_message(type_url = "/neutron.interchainqueries.TxValue")]
411pub struct TxValue {
412    /// The result of the transaction execution.
413    #[prost(message, optional, tag = "1")]
414    pub response: ::core::option::Option<super::super::tendermint::abci::ExecTxResult>,
415    /// The Merkle Proof which proves existence of response in the block next to the block the
416    /// transaction is included in.
417    #[prost(message, optional, tag = "2")]
418    pub delivery_proof: ::core::option::Option<super::super::tendermint::crypto::Proof>,
419    /// The Merkle Proof which proves inclusion of the transaction in the block.
420    #[prost(message, optional, tag = "3")]
421    pub inclusion_proof: ::core::option::Option<super::super::tendermint::crypto::Proof>,
422    /// The arbitrary data typed body of the transaction.
423    #[prost(bytes = "vec", tag = "4")]
424    #[serde(
425        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
426        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
427    )]
428    pub data: ::prost::alloc::vec::Vec<u8>,
429}
430/// Response type for the Msg/SubmitQueryResult RPC method.
431#[allow(clippy::derive_partial_eq_without_eq)]
432#[derive(
433    Clone,
434    PartialEq,
435    Eq,
436    ::prost::Message,
437    ::serde::Serialize,
438    ::serde::Deserialize,
439    ::schemars::JsonSchema,
440    CosmwasmExt,
441)]
442#[proto_message(type_url = "/neutron.interchainqueries.MsgSubmitQueryResultResponse")]
443pub struct MsgSubmitQueryResultResponse {}
444/// Request type for the Msg/RemoveInterchainQuery RPC method.
445#[allow(clippy::derive_partial_eq_without_eq)]
446#[derive(
447    Clone,
448    PartialEq,
449    Eq,
450    ::prost::Message,
451    ::serde::Serialize,
452    ::serde::Deserialize,
453    ::schemars::JsonSchema,
454    CosmwasmExt,
455)]
456#[proto_message(type_url = "/neutron.interchainqueries.MsgRemoveInterchainQueryRequest")]
457pub struct MsgRemoveInterchainQueryRequest {
458    /// The ID of the query to remove.
459    #[prost(uint64, tag = "1")]
460    #[serde(alias = "queryID")]
461    #[serde(
462        serialize_with = "crate::serde::as_str::serialize",
463        deserialize_with = "crate::serde::as_str::deserialize"
464    )]
465    pub query_id: u64,
466    /// The signer of the message.
467    #[prost(string, tag = "2")]
468    pub sender: ::prost::alloc::string::String,
469}
470/// Response type for the Msg/RemoveInterchainQuery RPC method.
471#[allow(clippy::derive_partial_eq_without_eq)]
472#[derive(
473    Clone,
474    PartialEq,
475    Eq,
476    ::prost::Message,
477    ::serde::Serialize,
478    ::serde::Deserialize,
479    ::schemars::JsonSchema,
480    CosmwasmExt,
481)]
482#[proto_message(type_url = "/neutron.interchainqueries.MsgRemoveInterchainQueryResponse")]
483pub struct MsgRemoveInterchainQueryResponse {}
484/// Request type for the Msg/UpdateInterchainQuery RPC method.
485#[allow(clippy::derive_partial_eq_without_eq)]
486#[derive(
487    Clone,
488    PartialEq,
489    Eq,
490    ::prost::Message,
491    ::serde::Serialize,
492    ::serde::Deserialize,
493    ::schemars::JsonSchema,
494    CosmwasmExt,
495)]
496#[proto_message(type_url = "/neutron.interchainqueries.MsgUpdateInterchainQueryRequest")]
497pub struct MsgUpdateInterchainQueryRequest {
498    /// The ID of the query to update.
499    #[prost(uint64, tag = "1")]
500    #[serde(alias = "queryID")]
501    #[serde(
502        serialize_with = "crate::serde::as_str::serialize",
503        deserialize_with = "crate::serde::as_str::deserialize"
504    )]
505    pub query_id: u64,
506    /// A new list of KV-storage keys for which to get values from the remote chain. Only applicable
507    /// for a KV Interchain Query. Max amount of keys is limited by the module's `max_kv_query_keys_count`
508    /// parameters.
509    #[prost(message, repeated, tag = "2")]
510    pub new_keys: ::prost::alloc::vec::Vec<KvKey>,
511    /// A new minimal delay between consecutive query executions.
512    #[prost(uint64, tag = "3")]
513    #[serde(
514        serialize_with = "crate::serde::as_str::serialize",
515        deserialize_with = "crate::serde::as_str::deserialize"
516    )]
517    pub new_update_period: u64,
518    /// A new list of filters for remote transactions search. Only applicable for a TX Interchain
519    /// Query. Example: "\[{\"field\":\"tx.height\",\"op\":\"Gte\",\"value\":2644737}\]".
520    /// Supported operators: "eq", "lt", "gt", "lte", "gte". Max amount of filter conditions is
521    /// limited by the module's `max_transactions_filters` parameters.
522    #[prost(string, tag = "4")]
523    pub new_transactions_filter: ::prost::alloc::string::String,
524    /// The signer of the message.
525    #[prost(string, tag = "5")]
526    pub sender: ::prost::alloc::string::String,
527}
528/// Response type for the Msg/UpdateInterchainQuery RPC method.
529#[allow(clippy::derive_partial_eq_without_eq)]
530#[derive(
531    Clone,
532    PartialEq,
533    Eq,
534    ::prost::Message,
535    ::serde::Serialize,
536    ::serde::Deserialize,
537    ::schemars::JsonSchema,
538    CosmwasmExt,
539)]
540#[proto_message(type_url = "/neutron.interchainqueries.MsgUpdateInterchainQueryResponse")]
541pub struct MsgUpdateInterchainQueryResponse {}
542/// Request type for the Msg/UpdateParams RPC method.
543#[allow(clippy::derive_partial_eq_without_eq)]
544#[derive(
545    Clone,
546    PartialEq,
547    Eq,
548    ::prost::Message,
549    ::serde::Serialize,
550    ::serde::Deserialize,
551    ::schemars::JsonSchema,
552    CosmwasmExt,
553)]
554#[proto_message(type_url = "/neutron.interchainqueries.MsgUpdateParams")]
555pub struct MsgUpdateParams {
556    /// The address of the authority of the module.
557    #[prost(string, tag = "1")]
558    pub authority: ::prost::alloc::string::String,
559    /// The new parameters of the module. All parameters must be supplied.
560    #[prost(message, optional, tag = "2")]
561    pub params: ::core::option::Option<Params>,
562}
563/// Response type for the Msg/UpdateParams RPC method.
564#[allow(clippy::derive_partial_eq_without_eq)]
565#[derive(
566    Clone,
567    PartialEq,
568    Eq,
569    ::prost::Message,
570    ::serde::Serialize,
571    ::serde::Deserialize,
572    ::schemars::JsonSchema,
573    CosmwasmExt,
574)]
575#[proto_message(type_url = "/neutron.interchainqueries.MsgUpdateParamsResponse")]
576pub struct MsgUpdateParamsResponse {}
577/// Request type for the Query/Params RPC method.
578#[allow(clippy::derive_partial_eq_without_eq)]
579#[derive(
580    Clone,
581    PartialEq,
582    Eq,
583    ::prost::Message,
584    ::serde::Serialize,
585    ::serde::Deserialize,
586    ::schemars::JsonSchema,
587    CosmwasmExt,
588)]
589#[proto_message(type_url = "/neutron.interchainqueries.QueryParamsRequest")]
590#[proto_query(
591    path = "/neutron.interchainqueries.Query/Params",
592    response_type = QueryParamsResponse
593)]
594pub struct QueryParamsRequest {}
595/// Response type for the Query/Params RPC method.
596#[allow(clippy::derive_partial_eq_without_eq)]
597#[derive(
598    Clone,
599    PartialEq,
600    Eq,
601    ::prost::Message,
602    ::serde::Serialize,
603    ::serde::Deserialize,
604    ::schemars::JsonSchema,
605    CosmwasmExt,
606)]
607#[proto_message(type_url = "/neutron.interchainqueries.QueryParamsResponse")]
608pub struct QueryParamsResponse {
609    /// Contains all parameters of the module.
610    #[prost(message, optional, tag = "1")]
611    pub params: ::core::option::Option<Params>,
612}
613/// Request type for the Query/RegisteredQueries RPC method.
614#[allow(clippy::derive_partial_eq_without_eq)]
615#[derive(
616    Clone,
617    PartialEq,
618    Eq,
619    ::prost::Message,
620    ::serde::Serialize,
621    ::serde::Deserialize,
622    ::schemars::JsonSchema,
623    CosmwasmExt,
624)]
625#[proto_message(type_url = "/neutron.interchainqueries.QueryRegisteredQueriesRequest")]
626#[proto_query(
627    path = "/neutron.interchainqueries.Query/RegisteredQueries",
628    response_type = QueryRegisteredQueriesResponse
629)]
630pub struct QueryRegisteredQueriesRequest {
631    /// A list of owners of Interchain Queries. Query response will contain only Interchain Queries
632    /// that are owned by one of the owners in the list. If none, Interchain Queries are not filtered
633    /// out by the owner field.
634    #[prost(string, repeated, tag = "1")]
635    pub owners: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
636    /// IBC connection ID. Query response will contain only Interchain Queries that have the same IBC
637    /// connection ID parameter. If none, Interchain Queries are not filtered out by the connection ID
638    /// field.
639    #[prost(string, tag = "2")]
640    #[serde(alias = "connectionID")]
641    pub connection_id: ::prost::alloc::string::String,
642    /// Pagination parameters for the request. Use values from previous response in the next request
643    /// in consecutive requests with paginated responses.
644    #[prost(message, optional, tag = "3")]
645    pub pagination: ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageRequest>,
646}
647/// Response type for the Query/RegisteredQueries RPC method.
648#[allow(clippy::derive_partial_eq_without_eq)]
649#[derive(
650    Clone,
651    PartialEq,
652    Eq,
653    ::prost::Message,
654    ::serde::Serialize,
655    ::serde::Deserialize,
656    ::schemars::JsonSchema,
657    CosmwasmExt,
658)]
659#[proto_message(type_url = "/neutron.interchainqueries.QueryRegisteredQueriesResponse")]
660pub struct QueryRegisteredQueriesResponse {
661    /// A list of registered Interchain Queries.
662    #[prost(message, repeated, tag = "1")]
663    pub registered_queries: ::prost::alloc::vec::Vec<RegisteredQuery>,
664    /// Current page information. Use values from previous response in the next request in consecutive
665    /// requests with paginated responses.
666    #[prost(message, optional, tag = "2")]
667    pub pagination:
668        ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageResponse>,
669}
670/// Request type for the Query/RegisteredQuery RPC method.
671#[allow(clippy::derive_partial_eq_without_eq)]
672#[derive(
673    Clone,
674    PartialEq,
675    Eq,
676    ::prost::Message,
677    ::serde::Serialize,
678    ::serde::Deserialize,
679    ::schemars::JsonSchema,
680    CosmwasmExt,
681)]
682#[proto_message(type_url = "/neutron.interchainqueries.QueryRegisteredQueryRequest")]
683#[proto_query(
684    path = "/neutron.interchainqueries.Query/RegisteredQuery",
685    response_type = QueryRegisteredQueryResponse
686)]
687pub struct QueryRegisteredQueryRequest {
688    /// ID of an Interchain Query.
689    #[prost(uint64, tag = "1")]
690    #[serde(alias = "queryID")]
691    #[serde(
692        serialize_with = "crate::serde::as_str::serialize",
693        deserialize_with = "crate::serde::as_str::deserialize"
694    )]
695    pub query_id: u64,
696}
697/// Response type for the Query/RegisteredQuery RPC method.
698#[allow(clippy::derive_partial_eq_without_eq)]
699#[derive(
700    Clone,
701    PartialEq,
702    Eq,
703    ::prost::Message,
704    ::serde::Serialize,
705    ::serde::Deserialize,
706    ::schemars::JsonSchema,
707    CosmwasmExt,
708)]
709#[proto_message(type_url = "/neutron.interchainqueries.QueryRegisteredQueryResponse")]
710pub struct QueryRegisteredQueryResponse {
711    /// A registered Interchain Query.
712    #[prost(message, optional, tag = "1")]
713    pub registered_query: ::core::option::Option<RegisteredQuery>,
714}
715/// Request type for the Query/QueryResult RPC method.
716#[allow(clippy::derive_partial_eq_without_eq)]
717#[derive(
718    Clone,
719    PartialEq,
720    Eq,
721    ::prost::Message,
722    ::serde::Serialize,
723    ::serde::Deserialize,
724    ::schemars::JsonSchema,
725    CosmwasmExt,
726)]
727#[proto_message(type_url = "/neutron.interchainqueries.QueryRegisteredQueryResultRequest")]
728#[proto_query(
729    path = "/neutron.interchainqueries.Query/QueryResult",
730    response_type = QueryRegisteredQueryResultResponse
731)]
732pub struct QueryRegisteredQueryResultRequest {
733    /// ID of an Interchain Query.
734    #[prost(uint64, tag = "1")]
735    #[serde(alias = "queryID")]
736    #[serde(
737        serialize_with = "crate::serde::as_str::serialize",
738        deserialize_with = "crate::serde::as_str::deserialize"
739    )]
740    pub query_id: u64,
741}
742/// Response type for the Query/QueryResult RPC method.
743#[allow(clippy::derive_partial_eq_without_eq)]
744#[derive(
745    Clone,
746    PartialEq,
747    Eq,
748    ::prost::Message,
749    ::serde::Serialize,
750    ::serde::Deserialize,
751    ::schemars::JsonSchema,
752    CosmwasmExt,
753)]
754#[proto_message(type_url = "/neutron.interchainqueries.QueryRegisteredQueryResultResponse")]
755pub struct QueryRegisteredQueryResultResponse {
756    /// The last successfully submitted result of an Interchain Query.
757    #[prost(message, optional, tag = "1")]
758    pub result: ::core::option::Option<QueryResult>,
759}
760#[allow(clippy::derive_partial_eq_without_eq)]
761#[derive(
762    Clone,
763    PartialEq,
764    Eq,
765    ::prost::Message,
766    ::serde::Serialize,
767    ::serde::Deserialize,
768    ::schemars::JsonSchema,
769    CosmwasmExt,
770)]
771#[proto_message(type_url = "/neutron.interchainqueries.Transaction")]
772pub struct Transaction {
773    #[prost(uint64, tag = "1")]
774    #[serde(alias = "ID")]
775    #[serde(
776        serialize_with = "crate::serde::as_str::serialize",
777        deserialize_with = "crate::serde::as_str::deserialize"
778    )]
779    pub id: u64,
780    #[prost(uint64, tag = "2")]
781    #[serde(
782        serialize_with = "crate::serde::as_str::serialize",
783        deserialize_with = "crate::serde::as_str::deserialize"
784    )]
785    pub height: u64,
786    #[prost(bytes = "vec", tag = "3")]
787    #[serde(
788        serialize_with = "crate::serde::as_base64_encoded_string::serialize",
789        deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
790    )]
791    pub data: ::prost::alloc::vec::Vec<u8>,
792}
793/// Request type for the Query/LastRemoteHeight RPC method.
794#[allow(clippy::derive_partial_eq_without_eq)]
795#[derive(
796    Clone,
797    PartialEq,
798    Eq,
799    ::prost::Message,
800    ::serde::Serialize,
801    ::serde::Deserialize,
802    ::schemars::JsonSchema,
803    CosmwasmExt,
804)]
805#[proto_message(type_url = "/neutron.interchainqueries.QueryLastRemoteHeight")]
806#[proto_query(
807    path = "/neutron.interchainqueries.Query/LastRemoteHeight",
808    response_type = QueryLastRemoteHeightResponse
809)]
810pub struct QueryLastRemoteHeight {
811    /// Connection ID of an IBC connection to a remote chain. Determines the IBC client used in query
812    /// handling.
813    #[prost(string, tag = "1")]
814    #[serde(alias = "connectionID")]
815    pub connection_id: ::prost::alloc::string::String,
816}
817/// Response type for the Query/LastRemoteHeight RPC method.
818#[allow(clippy::derive_partial_eq_without_eq)]
819#[derive(
820    Clone,
821    PartialEq,
822    Eq,
823    ::prost::Message,
824    ::serde::Serialize,
825    ::serde::Deserialize,
826    ::schemars::JsonSchema,
827    CosmwasmExt,
828)]
829#[proto_message(type_url = "/neutron.interchainqueries.QueryLastRemoteHeightResponse")]
830pub struct QueryLastRemoteHeightResponse {
831    /// The height of the chain that the IBC client is currently on.
832    #[prost(uint64, tag = "1")]
833    #[serde(
834        serialize_with = "crate::serde::as_str::serialize",
835        deserialize_with = "crate::serde::as_str::deserialize"
836    )]
837    pub height: u64,
838    /// The revision of the chain that the IBC client is currently on.
839    #[prost(uint64, tag = "2")]
840    #[serde(
841        serialize_with = "crate::serde::as_str::serialize",
842        deserialize_with = "crate::serde::as_str::deserialize"
843    )]
844    pub revision: u64,
845}
846pub struct InterchainqueriesQuerier<'a, Q: cosmwasm_std::CustomQuery> {
847    querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>,
848}
849impl<'a, Q: cosmwasm_std::CustomQuery> InterchainqueriesQuerier<'a, Q> {
850    pub fn new(querier: &'a cosmwasm_std::QuerierWrapper<'a, Q>) -> Self {
851        Self { querier }
852    }
853    pub fn params(&self) -> Result<QueryParamsResponse, cosmwasm_std::StdError> {
854        QueryParamsRequest {}.query(self.querier)
855    }
856    pub fn registered_queries(
857        &self,
858        owners: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
859        connection_id: ::prost::alloc::string::String,
860        pagination: ::core::option::Option<super::super::cosmos::base::query::v1beta1::PageRequest>,
861    ) -> Result<QueryRegisteredQueriesResponse, cosmwasm_std::StdError> {
862        QueryRegisteredQueriesRequest {
863            owners,
864            connection_id,
865            pagination,
866        }
867        .query(self.querier)
868    }
869    pub fn registered_query(
870        &self,
871        query_id: u64,
872    ) -> Result<QueryRegisteredQueryResponse, cosmwasm_std::StdError> {
873        QueryRegisteredQueryRequest { query_id }.query(self.querier)
874    }
875    pub fn query_result(
876        &self,
877        query_id: u64,
878    ) -> Result<QueryRegisteredQueryResultResponse, cosmwasm_std::StdError> {
879        QueryRegisteredQueryResultRequest { query_id }.query(self.querier)
880    }
881    pub fn last_remote_height(
882        &self,
883        connection_id: ::prost::alloc::string::String,
884    ) -> Result<QueryLastRemoteHeightResponse, cosmwasm_std::StdError> {
885        QueryLastRemoteHeight { connection_id }.query(self.querier)
886    }
887}