-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathquery.ts
3000 lines (3000 loc) · 121 KB
/
query.ts
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
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import { PageRequest, PageRequestAmino, PageRequestSDKType, PageResponse, PageResponseAmino, PageResponseSDKType } from "../../base/query/v1beta1/pagination";
import { Validator, ValidatorAmino, ValidatorSDKType, DelegationResponse, DelegationResponseAmino, DelegationResponseSDKType, UnbondingDelegation, UnbondingDelegationAmino, UnbondingDelegationSDKType, RedelegationResponse, RedelegationResponseAmino, RedelegationResponseSDKType, HistoricalInfo, HistoricalInfoAmino, HistoricalInfoSDKType, Pool, PoolAmino, PoolSDKType, Params, ParamsAmino, ParamsSDKType } from "./staking";
import { BinaryReader, BinaryWriter } from "../../../binary";
/** QueryValidatorsRequest is request type for Query/Validators RPC method. */
export interface QueryValidatorsRequest {
/** status enables to query for validators matching a given status. */
status: string;
/** pagination defines an optional pagination for the request. */
pagination?: PageRequest | undefined;
}
export interface QueryValidatorsRequestProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.QueryValidatorsRequest";
value: Uint8Array;
}
/** QueryValidatorsRequest is request type for Query/Validators RPC method. */
export interface QueryValidatorsRequestAmino {
/** status enables to query for validators matching a given status. */
status?: string;
/** pagination defines an optional pagination for the request. */
pagination?: PageRequestAmino | undefined;
}
export interface QueryValidatorsRequestAminoMsg {
type: "cosmos-sdk/QueryValidatorsRequest";
value: QueryValidatorsRequestAmino;
}
/** QueryValidatorsRequest is request type for Query/Validators RPC method. */
export interface QueryValidatorsRequestSDKType {
status: string;
pagination?: PageRequestSDKType | undefined;
}
/** QueryValidatorsResponse is response type for the Query/Validators RPC method */
export interface QueryValidatorsResponse {
/** validators contains all the queried validators. */
validators: Validator[];
/** pagination defines the pagination in the response. */
pagination?: PageResponse | undefined;
}
export interface QueryValidatorsResponseProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.QueryValidatorsResponse";
value: Uint8Array;
}
/** QueryValidatorsResponse is response type for the Query/Validators RPC method */
export interface QueryValidatorsResponseAmino {
/** validators contains all the queried validators. */
validators?: ValidatorAmino[];
/** pagination defines the pagination in the response. */
pagination?: PageResponseAmino | undefined;
}
export interface QueryValidatorsResponseAminoMsg {
type: "cosmos-sdk/QueryValidatorsResponse";
value: QueryValidatorsResponseAmino;
}
/** QueryValidatorsResponse is response type for the Query/Validators RPC method */
export interface QueryValidatorsResponseSDKType {
validators: ValidatorSDKType[];
pagination?: PageResponseSDKType | undefined;
}
/** QueryValidatorRequest is response type for the Query/Validator RPC method */
export interface QueryValidatorRequest {
/** validator_addr defines the validator address to query for. */
validatorAddr: string;
}
export interface QueryValidatorRequestProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.QueryValidatorRequest";
value: Uint8Array;
}
/** QueryValidatorRequest is response type for the Query/Validator RPC method */
export interface QueryValidatorRequestAmino {
/** validator_addr defines the validator address to query for. */
validator_addr?: string;
}
export interface QueryValidatorRequestAminoMsg {
type: "cosmos-sdk/QueryValidatorRequest";
value: QueryValidatorRequestAmino;
}
/** QueryValidatorRequest is response type for the Query/Validator RPC method */
export interface QueryValidatorRequestSDKType {
validator_addr: string;
}
/** QueryValidatorResponse is response type for the Query/Validator RPC method */
export interface QueryValidatorResponse {
/** validator defines the the validator info. */
validator: Validator | undefined;
}
export interface QueryValidatorResponseProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.QueryValidatorResponse";
value: Uint8Array;
}
/** QueryValidatorResponse is response type for the Query/Validator RPC method */
export interface QueryValidatorResponseAmino {
/** validator defines the the validator info. */
validator?: ValidatorAmino | undefined;
}
export interface QueryValidatorResponseAminoMsg {
type: "cosmos-sdk/QueryValidatorResponse";
value: QueryValidatorResponseAmino;
}
/** QueryValidatorResponse is response type for the Query/Validator RPC method */
export interface QueryValidatorResponseSDKType {
validator: ValidatorSDKType | undefined;
}
/**
* QueryValidatorDelegationsRequest is request type for the
* Query/ValidatorDelegations RPC method
*/
export interface QueryValidatorDelegationsRequest {
/** validator_addr defines the validator address to query for. */
validatorAddr: string;
/** pagination defines an optional pagination for the request. */
pagination?: PageRequest | undefined;
}
export interface QueryValidatorDelegationsRequestProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.QueryValidatorDelegationsRequest";
value: Uint8Array;
}
/**
* QueryValidatorDelegationsRequest is request type for the
* Query/ValidatorDelegations RPC method
*/
export interface QueryValidatorDelegationsRequestAmino {
/** validator_addr defines the validator address to query for. */
validator_addr?: string;
/** pagination defines an optional pagination for the request. */
pagination?: PageRequestAmino | undefined;
}
export interface QueryValidatorDelegationsRequestAminoMsg {
type: "cosmos-sdk/QueryValidatorDelegationsRequest";
value: QueryValidatorDelegationsRequestAmino;
}
/**
* QueryValidatorDelegationsRequest is request type for the
* Query/ValidatorDelegations RPC method
*/
export interface QueryValidatorDelegationsRequestSDKType {
validator_addr: string;
pagination?: PageRequestSDKType | undefined;
}
/**
* QueryValidatorDelegationsResponse is response type for the
* Query/ValidatorDelegations RPC method
*/
export interface QueryValidatorDelegationsResponse {
delegationResponses: DelegationResponse[];
/** pagination defines the pagination in the response. */
pagination?: PageResponse | undefined;
}
export interface QueryValidatorDelegationsResponseProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.QueryValidatorDelegationsResponse";
value: Uint8Array;
}
/**
* QueryValidatorDelegationsResponse is response type for the
* Query/ValidatorDelegations RPC method
*/
export interface QueryValidatorDelegationsResponseAmino {
delegation_responses?: DelegationResponseAmino[];
/** pagination defines the pagination in the response. */
pagination?: PageResponseAmino | undefined;
}
export interface QueryValidatorDelegationsResponseAminoMsg {
type: "cosmos-sdk/QueryValidatorDelegationsResponse";
value: QueryValidatorDelegationsResponseAmino;
}
/**
* QueryValidatorDelegationsResponse is response type for the
* Query/ValidatorDelegations RPC method
*/
export interface QueryValidatorDelegationsResponseSDKType {
delegation_responses: DelegationResponseSDKType[];
pagination?: PageResponseSDKType | undefined;
}
/**
* QueryValidatorUnbondingDelegationsRequest is required type for the
* Query/ValidatorUnbondingDelegations RPC method
*/
export interface QueryValidatorUnbondingDelegationsRequest {
/** validator_addr defines the validator address to query for. */
validatorAddr: string;
/** pagination defines an optional pagination for the request. */
pagination?: PageRequest | undefined;
}
export interface QueryValidatorUnbondingDelegationsRequestProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsRequest";
value: Uint8Array;
}
/**
* QueryValidatorUnbondingDelegationsRequest is required type for the
* Query/ValidatorUnbondingDelegations RPC method
*/
export interface QueryValidatorUnbondingDelegationsRequestAmino {
/** validator_addr defines the validator address to query for. */
validator_addr?: string;
/** pagination defines an optional pagination for the request. */
pagination?: PageRequestAmino | undefined;
}
export interface QueryValidatorUnbondingDelegationsRequestAminoMsg {
type: "cosmos-sdk/QueryValidatorUnbondingDelegationsRequest";
value: QueryValidatorUnbondingDelegationsRequestAmino;
}
/**
* QueryValidatorUnbondingDelegationsRequest is required type for the
* Query/ValidatorUnbondingDelegations RPC method
*/
export interface QueryValidatorUnbondingDelegationsRequestSDKType {
validator_addr: string;
pagination?: PageRequestSDKType | undefined;
}
/**
* QueryValidatorUnbondingDelegationsResponse is response type for the
* Query/ValidatorUnbondingDelegations RPC method.
*/
export interface QueryValidatorUnbondingDelegationsResponse {
unbondingResponses: UnbondingDelegation[];
/** pagination defines the pagination in the response. */
pagination?: PageResponse | undefined;
}
export interface QueryValidatorUnbondingDelegationsResponseProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse";
value: Uint8Array;
}
/**
* QueryValidatorUnbondingDelegationsResponse is response type for the
* Query/ValidatorUnbondingDelegations RPC method.
*/
export interface QueryValidatorUnbondingDelegationsResponseAmino {
unbonding_responses?: UnbondingDelegationAmino[];
/** pagination defines the pagination in the response. */
pagination?: PageResponseAmino | undefined;
}
export interface QueryValidatorUnbondingDelegationsResponseAminoMsg {
type: "cosmos-sdk/QueryValidatorUnbondingDelegationsResponse";
value: QueryValidatorUnbondingDelegationsResponseAmino;
}
/**
* QueryValidatorUnbondingDelegationsResponse is response type for the
* Query/ValidatorUnbondingDelegations RPC method.
*/
export interface QueryValidatorUnbondingDelegationsResponseSDKType {
unbonding_responses: UnbondingDelegationSDKType[];
pagination?: PageResponseSDKType | undefined;
}
/** QueryDelegationRequest is request type for the Query/Delegation RPC method. */
export interface QueryDelegationRequest {
/** delegator_addr defines the delegator address to query for. */
delegatorAddr: string;
/** validator_addr defines the validator address to query for. */
validatorAddr: string;
}
export interface QueryDelegationRequestProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.QueryDelegationRequest";
value: Uint8Array;
}
/** QueryDelegationRequest is request type for the Query/Delegation RPC method. */
export interface QueryDelegationRequestAmino {
/** delegator_addr defines the delegator address to query for. */
delegator_addr?: string;
/** validator_addr defines the validator address to query for. */
validator_addr?: string;
}
export interface QueryDelegationRequestAminoMsg {
type: "cosmos-sdk/QueryDelegationRequest";
value: QueryDelegationRequestAmino;
}
/** QueryDelegationRequest is request type for the Query/Delegation RPC method. */
export interface QueryDelegationRequestSDKType {
delegator_addr: string;
validator_addr: string;
}
/** QueryDelegationResponse is response type for the Query/Delegation RPC method. */
export interface QueryDelegationResponse {
/** delegation_responses defines the delegation info of a delegation. */
delegationResponse?: DelegationResponse | undefined;
}
export interface QueryDelegationResponseProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.QueryDelegationResponse";
value: Uint8Array;
}
/** QueryDelegationResponse is response type for the Query/Delegation RPC method. */
export interface QueryDelegationResponseAmino {
/** delegation_responses defines the delegation info of a delegation. */
delegation_response?: DelegationResponseAmino | undefined;
}
export interface QueryDelegationResponseAminoMsg {
type: "cosmos-sdk/QueryDelegationResponse";
value: QueryDelegationResponseAmino;
}
/** QueryDelegationResponse is response type for the Query/Delegation RPC method. */
export interface QueryDelegationResponseSDKType {
delegation_response?: DelegationResponseSDKType | undefined;
}
/**
* QueryUnbondingDelegationRequest is request type for the
* Query/UnbondingDelegation RPC method.
*/
export interface QueryUnbondingDelegationRequest {
/** delegator_addr defines the delegator address to query for. */
delegatorAddr: string;
/** validator_addr defines the validator address to query for. */
validatorAddr: string;
}
export interface QueryUnbondingDelegationRequestProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.QueryUnbondingDelegationRequest";
value: Uint8Array;
}
/**
* QueryUnbondingDelegationRequest is request type for the
* Query/UnbondingDelegation RPC method.
*/
export interface QueryUnbondingDelegationRequestAmino {
/** delegator_addr defines the delegator address to query for. */
delegator_addr?: string;
/** validator_addr defines the validator address to query for. */
validator_addr?: string;
}
export interface QueryUnbondingDelegationRequestAminoMsg {
type: "cosmos-sdk/QueryUnbondingDelegationRequest";
value: QueryUnbondingDelegationRequestAmino;
}
/**
* QueryUnbondingDelegationRequest is request type for the
* Query/UnbondingDelegation RPC method.
*/
export interface QueryUnbondingDelegationRequestSDKType {
delegator_addr: string;
validator_addr: string;
}
/**
* QueryDelegationResponse is response type for the Query/UnbondingDelegation
* RPC method.
*/
export interface QueryUnbondingDelegationResponse {
/** unbond defines the unbonding information of a delegation. */
unbond: UnbondingDelegation | undefined;
}
export interface QueryUnbondingDelegationResponseProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.QueryUnbondingDelegationResponse";
value: Uint8Array;
}
/**
* QueryDelegationResponse is response type for the Query/UnbondingDelegation
* RPC method.
*/
export interface QueryUnbondingDelegationResponseAmino {
/** unbond defines the unbonding information of a delegation. */
unbond?: UnbondingDelegationAmino | undefined;
}
export interface QueryUnbondingDelegationResponseAminoMsg {
type: "cosmos-sdk/QueryUnbondingDelegationResponse";
value: QueryUnbondingDelegationResponseAmino;
}
/**
* QueryDelegationResponse is response type for the Query/UnbondingDelegation
* RPC method.
*/
export interface QueryUnbondingDelegationResponseSDKType {
unbond: UnbondingDelegationSDKType | undefined;
}
/**
* QueryDelegatorDelegationsRequest is request type for the
* Query/DelegatorDelegations RPC method.
*/
export interface QueryDelegatorDelegationsRequest {
/** delegator_addr defines the delegator address to query for. */
delegatorAddr: string;
/** pagination defines an optional pagination for the request. */
pagination?: PageRequest | undefined;
}
export interface QueryDelegatorDelegationsRequestProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorDelegationsRequest";
value: Uint8Array;
}
/**
* QueryDelegatorDelegationsRequest is request type for the
* Query/DelegatorDelegations RPC method.
*/
export interface QueryDelegatorDelegationsRequestAmino {
/** delegator_addr defines the delegator address to query for. */
delegator_addr?: string;
/** pagination defines an optional pagination for the request. */
pagination?: PageRequestAmino | undefined;
}
export interface QueryDelegatorDelegationsRequestAminoMsg {
type: "cosmos-sdk/QueryDelegatorDelegationsRequest";
value: QueryDelegatorDelegationsRequestAmino;
}
/**
* QueryDelegatorDelegationsRequest is request type for the
* Query/DelegatorDelegations RPC method.
*/
export interface QueryDelegatorDelegationsRequestSDKType {
delegator_addr: string;
pagination?: PageRequestSDKType | undefined;
}
/**
* QueryDelegatorDelegationsResponse is response type for the
* Query/DelegatorDelegations RPC method.
*/
export interface QueryDelegatorDelegationsResponse {
/** delegation_responses defines all the delegations' info of a delegator. */
delegationResponses: DelegationResponse[];
/** pagination defines the pagination in the response. */
pagination?: PageResponse | undefined;
}
export interface QueryDelegatorDelegationsResponseProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorDelegationsResponse";
value: Uint8Array;
}
/**
* QueryDelegatorDelegationsResponse is response type for the
* Query/DelegatorDelegations RPC method.
*/
export interface QueryDelegatorDelegationsResponseAmino {
/** delegation_responses defines all the delegations' info of a delegator. */
delegation_responses?: DelegationResponseAmino[];
/** pagination defines the pagination in the response. */
pagination?: PageResponseAmino | undefined;
}
export interface QueryDelegatorDelegationsResponseAminoMsg {
type: "cosmos-sdk/QueryDelegatorDelegationsResponse";
value: QueryDelegatorDelegationsResponseAmino;
}
/**
* QueryDelegatorDelegationsResponse is response type for the
* Query/DelegatorDelegations RPC method.
*/
export interface QueryDelegatorDelegationsResponseSDKType {
delegation_responses: DelegationResponseSDKType[];
pagination?: PageResponseSDKType | undefined;
}
/**
* QueryDelegatorUnbondingDelegationsRequest is request type for the
* Query/DelegatorUnbondingDelegations RPC method.
*/
export interface QueryDelegatorUnbondingDelegationsRequest {
/** delegator_addr defines the delegator address to query for. */
delegatorAddr: string;
/** pagination defines an optional pagination for the request. */
pagination?: PageRequest | undefined;
}
export interface QueryDelegatorUnbondingDelegationsRequestProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsRequest";
value: Uint8Array;
}
/**
* QueryDelegatorUnbondingDelegationsRequest is request type for the
* Query/DelegatorUnbondingDelegations RPC method.
*/
export interface QueryDelegatorUnbondingDelegationsRequestAmino {
/** delegator_addr defines the delegator address to query for. */
delegator_addr?: string;
/** pagination defines an optional pagination for the request. */
pagination?: PageRequestAmino | undefined;
}
export interface QueryDelegatorUnbondingDelegationsRequestAminoMsg {
type: "cosmos-sdk/QueryDelegatorUnbondingDelegationsRequest";
value: QueryDelegatorUnbondingDelegationsRequestAmino;
}
/**
* QueryDelegatorUnbondingDelegationsRequest is request type for the
* Query/DelegatorUnbondingDelegations RPC method.
*/
export interface QueryDelegatorUnbondingDelegationsRequestSDKType {
delegator_addr: string;
pagination?: PageRequestSDKType | undefined;
}
/**
* QueryUnbondingDelegatorDelegationsResponse is response type for the
* Query/UnbondingDelegatorDelegations RPC method.
*/
export interface QueryDelegatorUnbondingDelegationsResponse {
unbondingResponses: UnbondingDelegation[];
/** pagination defines the pagination in the response. */
pagination?: PageResponse | undefined;
}
export interface QueryDelegatorUnbondingDelegationsResponseProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorUnbondingDelegationsResponse";
value: Uint8Array;
}
/**
* QueryUnbondingDelegatorDelegationsResponse is response type for the
* Query/UnbondingDelegatorDelegations RPC method.
*/
export interface QueryDelegatorUnbondingDelegationsResponseAmino {
unbonding_responses?: UnbondingDelegationAmino[];
/** pagination defines the pagination in the response. */
pagination?: PageResponseAmino | undefined;
}
export interface QueryDelegatorUnbondingDelegationsResponseAminoMsg {
type: "cosmos-sdk/QueryDelegatorUnbondingDelegationsResponse";
value: QueryDelegatorUnbondingDelegationsResponseAmino;
}
/**
* QueryUnbondingDelegatorDelegationsResponse is response type for the
* Query/UnbondingDelegatorDelegations RPC method.
*/
export interface QueryDelegatorUnbondingDelegationsResponseSDKType {
unbonding_responses: UnbondingDelegationSDKType[];
pagination?: PageResponseSDKType | undefined;
}
/**
* QueryRedelegationsRequest is request type for the Query/Redelegations RPC
* method.
*/
export interface QueryRedelegationsRequest {
/** delegator_addr defines the delegator address to query for. */
delegatorAddr: string;
/** src_validator_addr defines the validator address to redelegate from. */
srcValidatorAddr: string;
/** dst_validator_addr defines the validator address to redelegate to. */
dstValidatorAddr: string;
/** pagination defines an optional pagination for the request. */
pagination?: PageRequest | undefined;
}
export interface QueryRedelegationsRequestProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.QueryRedelegationsRequest";
value: Uint8Array;
}
/**
* QueryRedelegationsRequest is request type for the Query/Redelegations RPC
* method.
*/
export interface QueryRedelegationsRequestAmino {
/** delegator_addr defines the delegator address to query for. */
delegator_addr?: string;
/** src_validator_addr defines the validator address to redelegate from. */
src_validator_addr?: string;
/** dst_validator_addr defines the validator address to redelegate to. */
dst_validator_addr?: string;
/** pagination defines an optional pagination for the request. */
pagination?: PageRequestAmino | undefined;
}
export interface QueryRedelegationsRequestAminoMsg {
type: "cosmos-sdk/QueryRedelegationsRequest";
value: QueryRedelegationsRequestAmino;
}
/**
* QueryRedelegationsRequest is request type for the Query/Redelegations RPC
* method.
*/
export interface QueryRedelegationsRequestSDKType {
delegator_addr: string;
src_validator_addr: string;
dst_validator_addr: string;
pagination?: PageRequestSDKType | undefined;
}
/**
* QueryRedelegationsResponse is response type for the Query/Redelegations RPC
* method.
*/
export interface QueryRedelegationsResponse {
redelegationResponses: RedelegationResponse[];
/** pagination defines the pagination in the response. */
pagination?: PageResponse | undefined;
}
export interface QueryRedelegationsResponseProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.QueryRedelegationsResponse";
value: Uint8Array;
}
/**
* QueryRedelegationsResponse is response type for the Query/Redelegations RPC
* method.
*/
export interface QueryRedelegationsResponseAmino {
redelegation_responses?: RedelegationResponseAmino[];
/** pagination defines the pagination in the response. */
pagination?: PageResponseAmino | undefined;
}
export interface QueryRedelegationsResponseAminoMsg {
type: "cosmos-sdk/QueryRedelegationsResponse";
value: QueryRedelegationsResponseAmino;
}
/**
* QueryRedelegationsResponse is response type for the Query/Redelegations RPC
* method.
*/
export interface QueryRedelegationsResponseSDKType {
redelegation_responses: RedelegationResponseSDKType[];
pagination?: PageResponseSDKType | undefined;
}
/**
* QueryDelegatorValidatorsRequest is request type for the
* Query/DelegatorValidators RPC method.
*/
export interface QueryDelegatorValidatorsRequest {
/** delegator_addr defines the delegator address to query for. */
delegatorAddr: string;
/** pagination defines an optional pagination for the request. */
pagination?: PageRequest | undefined;
}
export interface QueryDelegatorValidatorsRequestProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorsRequest";
value: Uint8Array;
}
/**
* QueryDelegatorValidatorsRequest is request type for the
* Query/DelegatorValidators RPC method.
*/
export interface QueryDelegatorValidatorsRequestAmino {
/** delegator_addr defines the delegator address to query for. */
delegator_addr?: string;
/** pagination defines an optional pagination for the request. */
pagination?: PageRequestAmino | undefined;
}
export interface QueryDelegatorValidatorsRequestAminoMsg {
type: "cosmos-sdk/QueryDelegatorValidatorsRequest";
value: QueryDelegatorValidatorsRequestAmino;
}
/**
* QueryDelegatorValidatorsRequest is request type for the
* Query/DelegatorValidators RPC method.
*/
export interface QueryDelegatorValidatorsRequestSDKType {
delegator_addr: string;
pagination?: PageRequestSDKType | undefined;
}
/**
* QueryDelegatorValidatorsResponse is response type for the
* Query/DelegatorValidators RPC method.
*/
export interface QueryDelegatorValidatorsResponse {
/** validators defines the the validators' info of a delegator. */
validators: Validator[];
/** pagination defines the pagination in the response. */
pagination?: PageResponse | undefined;
}
export interface QueryDelegatorValidatorsResponseProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorsResponse";
value: Uint8Array;
}
/**
* QueryDelegatorValidatorsResponse is response type for the
* Query/DelegatorValidators RPC method.
*/
export interface QueryDelegatorValidatorsResponseAmino {
/** validators defines the the validators' info of a delegator. */
validators?: ValidatorAmino[];
/** pagination defines the pagination in the response. */
pagination?: PageResponseAmino | undefined;
}
export interface QueryDelegatorValidatorsResponseAminoMsg {
type: "cosmos-sdk/QueryDelegatorValidatorsResponse";
value: QueryDelegatorValidatorsResponseAmino;
}
/**
* QueryDelegatorValidatorsResponse is response type for the
* Query/DelegatorValidators RPC method.
*/
export interface QueryDelegatorValidatorsResponseSDKType {
validators: ValidatorSDKType[];
pagination?: PageResponseSDKType | undefined;
}
/**
* QueryDelegatorValidatorRequest is request type for the
* Query/DelegatorValidator RPC method.
*/
export interface QueryDelegatorValidatorRequest {
/** delegator_addr defines the delegator address to query for. */
delegatorAddr: string;
/** validator_addr defines the validator address to query for. */
validatorAddr: string;
}
export interface QueryDelegatorValidatorRequestProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorRequest";
value: Uint8Array;
}
/**
* QueryDelegatorValidatorRequest is request type for the
* Query/DelegatorValidator RPC method.
*/
export interface QueryDelegatorValidatorRequestAmino {
/** delegator_addr defines the delegator address to query for. */
delegator_addr?: string;
/** validator_addr defines the validator address to query for. */
validator_addr?: string;
}
export interface QueryDelegatorValidatorRequestAminoMsg {
type: "cosmos-sdk/QueryDelegatorValidatorRequest";
value: QueryDelegatorValidatorRequestAmino;
}
/**
* QueryDelegatorValidatorRequest is request type for the
* Query/DelegatorValidator RPC method.
*/
export interface QueryDelegatorValidatorRequestSDKType {
delegator_addr: string;
validator_addr: string;
}
/**
* QueryDelegatorValidatorResponse response type for the
* Query/DelegatorValidator RPC method.
*/
export interface QueryDelegatorValidatorResponse {
/** validator defines the the validator info. */
validator: Validator | undefined;
}
export interface QueryDelegatorValidatorResponseProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.QueryDelegatorValidatorResponse";
value: Uint8Array;
}
/**
* QueryDelegatorValidatorResponse response type for the
* Query/DelegatorValidator RPC method.
*/
export interface QueryDelegatorValidatorResponseAmino {
/** validator defines the the validator info. */
validator?: ValidatorAmino | undefined;
}
export interface QueryDelegatorValidatorResponseAminoMsg {
type: "cosmos-sdk/QueryDelegatorValidatorResponse";
value: QueryDelegatorValidatorResponseAmino;
}
/**
* QueryDelegatorValidatorResponse response type for the
* Query/DelegatorValidator RPC method.
*/
export interface QueryDelegatorValidatorResponseSDKType {
validator: ValidatorSDKType | undefined;
}
/**
* QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC
* method.
*/
export interface QueryHistoricalInfoRequest {
/** height defines at which height to query the historical info. */
height: bigint;
}
export interface QueryHistoricalInfoRequestProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.QueryHistoricalInfoRequest";
value: Uint8Array;
}
/**
* QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC
* method.
*/
export interface QueryHistoricalInfoRequestAmino {
/** height defines at which height to query the historical info. */
height?: string;
}
export interface QueryHistoricalInfoRequestAminoMsg {
type: "cosmos-sdk/QueryHistoricalInfoRequest";
value: QueryHistoricalInfoRequestAmino;
}
/**
* QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC
* method.
*/
export interface QueryHistoricalInfoRequestSDKType {
height: bigint;
}
/**
* QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC
* method.
*/
export interface QueryHistoricalInfoResponse {
/** hist defines the historical info at the given height. */
hist?: HistoricalInfo | undefined;
}
export interface QueryHistoricalInfoResponseProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.QueryHistoricalInfoResponse";
value: Uint8Array;
}
/**
* QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC
* method.
*/
export interface QueryHistoricalInfoResponseAmino {
/** hist defines the historical info at the given height. */
hist?: HistoricalInfoAmino | undefined;
}
export interface QueryHistoricalInfoResponseAminoMsg {
type: "cosmos-sdk/QueryHistoricalInfoResponse";
value: QueryHistoricalInfoResponseAmino;
}
/**
* QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC
* method.
*/
export interface QueryHistoricalInfoResponseSDKType {
hist?: HistoricalInfoSDKType | undefined;
}
/** QueryPoolRequest is request type for the Query/Pool RPC method. */
export interface QueryPoolRequest {}
export interface QueryPoolRequestProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.QueryPoolRequest";
value: Uint8Array;
}
/** QueryPoolRequest is request type for the Query/Pool RPC method. */
export interface QueryPoolRequestAmino {}
export interface QueryPoolRequestAminoMsg {
type: "cosmos-sdk/QueryPoolRequest";
value: QueryPoolRequestAmino;
}
/** QueryPoolRequest is request type for the Query/Pool RPC method. */
export interface QueryPoolRequestSDKType {}
/** QueryPoolResponse is response type for the Query/Pool RPC method. */
export interface QueryPoolResponse {
/** pool defines the pool info. */
pool: Pool | undefined;
}
export interface QueryPoolResponseProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.QueryPoolResponse";
value: Uint8Array;
}
/** QueryPoolResponse is response type for the Query/Pool RPC method. */
export interface QueryPoolResponseAmino {
/** pool defines the pool info. */
pool?: PoolAmino | undefined;
}
export interface QueryPoolResponseAminoMsg {
type: "cosmos-sdk/QueryPoolResponse";
value: QueryPoolResponseAmino;
}
/** QueryPoolResponse is response type for the Query/Pool RPC method. */
export interface QueryPoolResponseSDKType {
pool: PoolSDKType | undefined;
}
/** QueryParamsRequest is request type for the Query/Params RPC method. */
export interface QueryParamsRequest {}
export interface QueryParamsRequestProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.QueryParamsRequest";
value: Uint8Array;
}
/** QueryParamsRequest is request type for the Query/Params RPC method. */
export interface QueryParamsRequestAmino {}
export interface QueryParamsRequestAminoMsg {
type: "cosmos-sdk/QueryParamsRequest";
value: QueryParamsRequestAmino;
}
/** QueryParamsRequest is request type for the Query/Params RPC method. */
export interface QueryParamsRequestSDKType {}
/** QueryParamsResponse is response type for the Query/Params RPC method. */
export interface QueryParamsResponse {
/** params holds all the parameters of this module. */
params: Params | undefined;
}
export interface QueryParamsResponseProtoMsg {
typeUrl: "/cosmos.staking.v1beta1.QueryParamsResponse";
value: Uint8Array;
}
/** QueryParamsResponse is response type for the Query/Params RPC method. */
export interface QueryParamsResponseAmino {
/** params holds all the parameters of this module. */
params?: ParamsAmino | undefined;
}
export interface QueryParamsResponseAminoMsg {
type: "cosmos-sdk/QueryParamsResponse";
value: QueryParamsResponseAmino;
}
/** QueryParamsResponse is response type for the Query/Params RPC method. */
export interface QueryParamsResponseSDKType {
params: ParamsSDKType | undefined;
}
function createBaseQueryValidatorsRequest(): QueryValidatorsRequest {
return {
status: "",
pagination: undefined
};
}
export const QueryValidatorsRequest = {
typeUrl: "/cosmos.staking.v1beta1.QueryValidatorsRequest",
encode(message: QueryValidatorsRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.status !== "") {
writer.uint32(10).string(message.status);
}
if (message.pagination !== undefined) {
PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
}
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number): QueryValidatorsRequest {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseQueryValidatorsRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.status = reader.string();
break;
case 2:
message.pagination = PageRequest.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromPartial(object: Partial<QueryValidatorsRequest>): QueryValidatorsRequest {
const message = createBaseQueryValidatorsRequest();
message.status = object.status ?? "";
message.pagination = object.pagination !== undefined && object.pagination !== null ? PageRequest.fromPartial(object.pagination) : undefined;
return message;
},
fromAmino(object: QueryValidatorsRequestAmino): QueryValidatorsRequest {
const message = createBaseQueryValidatorsRequest();
if (object.status !== undefined && object.status !== null) {
message.status = object.status;
}
if (object.pagination !== undefined && object.pagination !== null) {
message.pagination = PageRequest.fromAmino(object.pagination);
}
return message;
},
toAmino(message: QueryValidatorsRequest): QueryValidatorsRequestAmino {
const obj: any = {};
obj.status = message.status === "" ? undefined : message.status;
obj.pagination = message.pagination ? PageRequest.toAmino(message.pagination) : undefined;
return obj;
},
fromAminoMsg(object: QueryValidatorsRequestAminoMsg): QueryValidatorsRequest {
return QueryValidatorsRequest.fromAmino(object.value);
},
toAminoMsg(message: QueryValidatorsRequest): QueryValidatorsRequestAminoMsg {
return {
type: "cosmos-sdk/QueryValidatorsRequest",
value: QueryValidatorsRequest.toAmino(message)
};
},
fromProtoMsg(message: QueryValidatorsRequestProtoMsg): QueryValidatorsRequest {
return QueryValidatorsRequest.decode(message.value);
},
toProto(message: QueryValidatorsRequest): Uint8Array {
return QueryValidatorsRequest.encode(message).finish();
},
toProtoMsg(message: QueryValidatorsRequest): QueryValidatorsRequestProtoMsg {
return {
typeUrl: "/cosmos.staking.v1beta1.QueryValidatorsRequest",
value: QueryValidatorsRequest.encode(message).finish()
};
}
};
function createBaseQueryValidatorsResponse(): QueryValidatorsResponse {
return {
validators: [],
pagination: undefined
};
}
export const QueryValidatorsResponse = {
typeUrl: "/cosmos.staking.v1beta1.QueryValidatorsResponse",
encode(message: QueryValidatorsResponse, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
for (const v of message.validators) {
Validator.encode(v!, writer.uint32(10).fork()).ldelim();
}
if (message.pagination !== undefined) {
PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
}
return writer;
},
decode(input: BinaryReader | Uint8Array, length?: number): QueryValidatorsResponse {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseQueryValidatorsResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.validators.push(Validator.decode(reader, reader.uint32()));
break;
case 2:
message.pagination = PageResponse.decode(reader, reader.uint32());
break;
default:
reader.skipType(tag & 7);
break;
}
}
return message;
},
fromPartial(object: Partial<QueryValidatorsResponse>): QueryValidatorsResponse {
const message = createBaseQueryValidatorsResponse();
message.validators = object.validators?.map(e => Validator.fromPartial(e)) || [];
message.pagination = object.pagination !== undefined && object.pagination !== null ? PageResponse.fromPartial(object.pagination) : undefined;
return message;
},
fromAmino(object: QueryValidatorsResponseAmino): QueryValidatorsResponse {
const message = createBaseQueryValidatorsResponse();
message.validators = object.validators?.map(e => Validator.fromAmino(e)) || [];
if (object.pagination !== undefined && object.pagination !== null) {
message.pagination = PageResponse.fromAmino(object.pagination);
}
return message;
},
toAmino(message: QueryValidatorsResponse): QueryValidatorsResponseAmino {
const obj: any = {};
if (message.validators) {
obj.validators = message.validators.map(e => e ? Validator.toAmino(e) : undefined);
} else {
obj.validators = message.validators;
}
obj.pagination = message.pagination ? PageResponse.toAmino(message.pagination) : undefined;
return obj;
},
fromAminoMsg(object: QueryValidatorsResponseAminoMsg): QueryValidatorsResponse {
return QueryValidatorsResponse.fromAmino(object.value);
},
toAminoMsg(message: QueryValidatorsResponse): QueryValidatorsResponseAminoMsg {
return {
type: "cosmos-sdk/QueryValidatorsResponse",