neutron-std 9.1.0

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