@burnt-labs/xion-types 16.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/README.md +111 -0
  2. package/package.json +26 -0
  3. package/types/.gitkeep +0 -0
  4. package/types/generated/amino/amino.ts +9 -0
  5. package/types/generated/cosmos/app/v1alpha1/config.ts +336 -0
  6. package/types/generated/cosmos/app/v1alpha1/query.ts +265 -0
  7. package/types/generated/cosmos/auth/v1beta1/auth.ts +520 -0
  8. package/types/generated/cosmos/auth/v1beta1/query.ts +1852 -0
  9. package/types/generated/cosmos/authz/v1beta1/authz.ts +404 -0
  10. package/types/generated/cosmos/authz/v1beta1/query.ts +774 -0
  11. package/types/generated/cosmos/autocli/v1/options.ts +1016 -0
  12. package/types/generated/cosmos/autocli/v1/query.ts +379 -0
  13. package/types/generated/cosmos/bank/v1beta1/bank.ts +752 -0
  14. package/types/generated/cosmos/bank/v1beta1/query.ts +2789 -0
  15. package/types/generated/cosmos/base/abci/v1beta1/abci.ts +1447 -0
  16. package/types/generated/cosmos/base/node/v1beta1/query.ts +587 -0
  17. package/types/generated/cosmos/base/query/v1beta1/pagination.ts +317 -0
  18. package/types/generated/cosmos/base/tendermint/v1beta1/query.ts +2228 -0
  19. package/types/generated/cosmos/base/tendermint/v1beta1/types.ts +522 -0
  20. package/types/generated/cosmos/base/v1beta1/coin.ts +326 -0
  21. package/types/generated/cosmos/circuit/v1/query.ts +606 -0
  22. package/types/generated/cosmos/circuit/v1/types.ts +353 -0
  23. package/types/generated/cosmos/consensus/v1/query.ts +271 -0
  24. package/types/generated/cosmos/crypto/multisig/v1beta1/multisig.ts +212 -0
  25. package/types/generated/cosmos/distribution/v1beta1/distribution.ts +1143 -0
  26. package/types/generated/cosmos/distribution/v1beta1/query.ts +2005 -0
  27. package/types/generated/cosmos/evidence/v1beta1/query.ts +526 -0
  28. package/types/generated/cosmos/feegrant/v1beta1/feegrant.ts +502 -0
  29. package/types/generated/cosmos/feegrant/v1beta1/query.ts +725 -0
  30. package/types/generated/cosmos/gov/v1/gov.ts +1656 -0
  31. package/types/generated/cosmos/gov/v1/query.ts +1847 -0
  32. package/types/generated/cosmos/gov/v1beta1/gov.ts +1239 -0
  33. package/types/generated/cosmos/gov/v1beta1/query.ts +1658 -0
  34. package/types/generated/cosmos/group/v1/query.ts +2840 -0
  35. package/types/generated/cosmos/group/v1/types.ts +1803 -0
  36. package/types/generated/cosmos/ics23/v1/proofs.ts +1685 -0
  37. package/types/generated/cosmos/mint/v1beta1/mint.ts +273 -0
  38. package/types/generated/cosmos/mint/v1beta1/query.ts +589 -0
  39. package/types/generated/cosmos/msg/v1/msg.ts +9 -0
  40. package/types/generated/cosmos/nft/v1beta1/nft.ts +333 -0
  41. package/types/generated/cosmos/nft/v1beta1/query.ts +1362 -0
  42. package/types/generated/cosmos/orm/query/v1alpha1/query.ts +1016 -0
  43. package/types/generated/cosmos/params/v1beta1/params.ts +227 -0
  44. package/types/generated/cosmos/params/v1beta1/query.ts +545 -0
  45. package/types/generated/cosmos/query/v1/query.ts +9 -0
  46. package/types/generated/cosmos/slashing/v1beta1/query.ts +626 -0
  47. package/types/generated/cosmos/slashing/v1beta1/slashing.ts +409 -0
  48. package/types/generated/cosmos/staking/v1beta1/query.ts +2912 -0
  49. package/types/generated/cosmos/staking/v1beta1/staking.ts +2515 -0
  50. package/types/generated/cosmos/tx/signing/v1beta1/signing.ts +608 -0
  51. package/types/generated/cosmos/tx/v1beta1/service.ts +2111 -0
  52. package/types/generated/cosmos/tx/v1beta1/tx.ts +1613 -0
  53. package/types/generated/cosmos/upgrade/v1beta1/query.ts +1007 -0
  54. package/types/generated/cosmos/upgrade/v1beta1/upgrade.ts +507 -0
  55. package/types/generated/cosmos_proto/cosmos.ts +299 -0
  56. package/types/generated/cosmwasm/wasm/v1/query.ts +2984 -0
  57. package/types/generated/cosmwasm/wasm/v1/types.ts +962 -0
  58. package/types/generated/gogoproto/gogo.ts +9 -0
  59. package/types/generated/google/api/annotations.ts +9 -0
  60. package/types/generated/google/api/http.ts +757 -0
  61. package/types/generated/google/protobuf/any.ts +253 -0
  62. package/types/generated/google/protobuf/descriptor.ts +4958 -0
  63. package/types/generated/google/protobuf/duration.ts +186 -0
  64. package/types/generated/google/protobuf/timestamp.ts +215 -0
  65. package/types/generated/ibc/applications/fee/v1/fee.ts +391 -0
  66. package/types/generated/ibc/applications/fee/v1/genesis.ts +553 -0
  67. package/types/generated/ibc/applications/fee/v1/query.ts +2056 -0
  68. package/types/generated/ibc/applications/interchain_accounts/controller/v1/controller.ts +100 -0
  69. package/types/generated/ibc/applications/interchain_accounts/controller/v1/query.ts +447 -0
  70. package/types/generated/ibc/applications/interchain_accounts/host/v1/host.ts +235 -0
  71. package/types/generated/ibc/applications/interchain_accounts/host/v1/query.ts +265 -0
  72. package/types/generated/ibc/applications/transfer/v1/query.ts +1135 -0
  73. package/types/generated/ibc/applications/transfer/v1/transfer.ts +213 -0
  74. package/types/generated/ibc/core/channel/v1/channel.ts +1329 -0
  75. package/types/generated/ibc/core/channel/v1/query.ts +4214 -0
  76. package/types/generated/ibc/core/channel/v1/upgrade.ts +330 -0
  77. package/types/generated/ibc/core/client/v1/client.ts +726 -0
  78. package/types/generated/ibc/core/client/v1/query.ts +2208 -0
  79. package/types/generated/ibc/core/commitment/v1/commitment.ts +329 -0
  80. package/types/generated/ibc/core/connection/v1/connection.ts +813 -0
  81. package/types/generated/ibc/core/connection/v1/query.ts +1442 -0
  82. package/types/generated/ibc/lightclients/wasm/v1/query.ts +484 -0
  83. package/types/generated/tendermint/abci/types.ts +6429 -0
  84. package/types/generated/tendermint/crypto/keys.ts +137 -0
  85. package/types/generated/tendermint/crypto/proof.ts +506 -0
  86. package/types/generated/tendermint/p2p/types.ts +514 -0
  87. package/types/generated/tendermint/types/block.ts +151 -0
  88. package/types/generated/tendermint/types/evidence.ts +493 -0
  89. package/types/generated/tendermint/types/params.ts +687 -0
  90. package/types/generated/tendermint/types/types.ts +2069 -0
  91. package/types/generated/tendermint/types/validator.ts +409 -0
  92. package/types/generated/tendermint/version/types.ts +202 -0
  93. package/types/generated/xion/globalfee/v1/genesis.ts +219 -0
  94. package/types/generated/xion/globalfee/v1/query.ts +269 -0
  95. package/types/generated/xion/jwk/v1/audience.ts +188 -0
  96. package/types/generated/xion/jwk/v1/params.ts +118 -0
  97. package/types/generated/xion/jwk/v1/query.ts +1061 -0
  98. package/types/generated/xion/mint/v1/mint.ts +273 -0
  99. package/types/generated/xion/mint/v1/query.ts +589 -0
  100. package/types/generated/xion/v1/query.ts +878 -0
@@ -0,0 +1,2005 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v1.181.2
4
+ // protoc unknown
5
+ // source: cosmos/distribution/v1beta1/query.proto
6
+
7
+ /* eslint-disable */
8
+ import { grpc } from "@improbable-eng/grpc-web";
9
+ import { BrowserHeaders } from "browser-headers";
10
+ import Long from "long";
11
+ import _m0 from "protobufjs/minimal";
12
+ import { PageRequest, PageResponse } from "../../base/query/v1beta1/pagination";
13
+ import { DecCoin } from "../../base/v1beta1/coin";
14
+ import {
15
+ DelegationDelegatorReward,
16
+ Params,
17
+ ValidatorAccumulatedCommission,
18
+ ValidatorOutstandingRewards,
19
+ ValidatorSlashEvent,
20
+ } from "./distribution";
21
+
22
+ export const protobufPackage = "cosmos.distribution.v1beta1";
23
+
24
+ /** QueryParamsRequest is the request type for the Query/Params RPC method. */
25
+ export interface QueryParamsRequest {
26
+ }
27
+
28
+ /** QueryParamsResponse is the response type for the Query/Params RPC method. */
29
+ export interface QueryParamsResponse {
30
+ /** params defines the parameters of the module. */
31
+ params?: Params | undefined;
32
+ }
33
+
34
+ /** QueryValidatorDistributionInfoRequest is the request type for the Query/ValidatorDistributionInfo RPC method. */
35
+ export interface QueryValidatorDistributionInfoRequest {
36
+ /** validator_address defines the validator address to query for. */
37
+ validatorAddress: string;
38
+ }
39
+
40
+ /** QueryValidatorDistributionInfoResponse is the response type for the Query/ValidatorDistributionInfo RPC method. */
41
+ export interface QueryValidatorDistributionInfoResponse {
42
+ /** operator_address defines the validator operator address. */
43
+ operatorAddress: string;
44
+ /** self_bond_rewards defines the self delegations rewards. */
45
+ selfBondRewards: DecCoin[];
46
+ /** commission defines the commission the validator received. */
47
+ commission: DecCoin[];
48
+ }
49
+
50
+ /**
51
+ * QueryValidatorOutstandingRewardsRequest is the request type for the
52
+ * Query/ValidatorOutstandingRewards RPC method.
53
+ */
54
+ export interface QueryValidatorOutstandingRewardsRequest {
55
+ /** validator_address defines the validator address to query for. */
56
+ validatorAddress: string;
57
+ }
58
+
59
+ /**
60
+ * QueryValidatorOutstandingRewardsResponse is the response type for the
61
+ * Query/ValidatorOutstandingRewards RPC method.
62
+ */
63
+ export interface QueryValidatorOutstandingRewardsResponse {
64
+ rewards?: ValidatorOutstandingRewards | undefined;
65
+ }
66
+
67
+ /**
68
+ * QueryValidatorCommissionRequest is the request type for the
69
+ * Query/ValidatorCommission RPC method
70
+ */
71
+ export interface QueryValidatorCommissionRequest {
72
+ /** validator_address defines the validator address to query for. */
73
+ validatorAddress: string;
74
+ }
75
+
76
+ /**
77
+ * QueryValidatorCommissionResponse is the response type for the
78
+ * Query/ValidatorCommission RPC method
79
+ */
80
+ export interface QueryValidatorCommissionResponse {
81
+ /** commission defines the commission the validator received. */
82
+ commission?: ValidatorAccumulatedCommission | undefined;
83
+ }
84
+
85
+ /**
86
+ * QueryValidatorSlashesRequest is the request type for the
87
+ * Query/ValidatorSlashes RPC method
88
+ */
89
+ export interface QueryValidatorSlashesRequest {
90
+ /** validator_address defines the validator address to query for. */
91
+ validatorAddress: string;
92
+ /** starting_height defines the optional starting height to query the slashes. */
93
+ startingHeight: Long;
94
+ /** starting_height defines the optional ending height to query the slashes. */
95
+ endingHeight: Long;
96
+ /** pagination defines an optional pagination for the request. */
97
+ pagination?: PageRequest | undefined;
98
+ }
99
+
100
+ /**
101
+ * QueryValidatorSlashesResponse is the response type for the
102
+ * Query/ValidatorSlashes RPC method.
103
+ */
104
+ export interface QueryValidatorSlashesResponse {
105
+ /** slashes defines the slashes the validator received. */
106
+ slashes: ValidatorSlashEvent[];
107
+ /** pagination defines the pagination in the response. */
108
+ pagination?: PageResponse | undefined;
109
+ }
110
+
111
+ /**
112
+ * QueryDelegationRewardsRequest is the request type for the
113
+ * Query/DelegationRewards RPC method.
114
+ */
115
+ export interface QueryDelegationRewardsRequest {
116
+ /** delegator_address defines the delegator address to query for. */
117
+ delegatorAddress: string;
118
+ /** validator_address defines the validator address to query for. */
119
+ validatorAddress: string;
120
+ }
121
+
122
+ /**
123
+ * QueryDelegationRewardsResponse is the response type for the
124
+ * Query/DelegationRewards RPC method.
125
+ */
126
+ export interface QueryDelegationRewardsResponse {
127
+ /** rewards defines the rewards accrued by a delegation. */
128
+ rewards: DecCoin[];
129
+ }
130
+
131
+ /**
132
+ * QueryDelegationTotalRewardsRequest is the request type for the
133
+ * Query/DelegationTotalRewards RPC method.
134
+ */
135
+ export interface QueryDelegationTotalRewardsRequest {
136
+ /** delegator_address defines the delegator address to query for. */
137
+ delegatorAddress: string;
138
+ }
139
+
140
+ /**
141
+ * QueryDelegationTotalRewardsResponse is the response type for the
142
+ * Query/DelegationTotalRewards RPC method.
143
+ */
144
+ export interface QueryDelegationTotalRewardsResponse {
145
+ /** rewards defines all the rewards accrued by a delegator. */
146
+ rewards: DelegationDelegatorReward[];
147
+ /** total defines the sum of all the rewards. */
148
+ total: DecCoin[];
149
+ }
150
+
151
+ /**
152
+ * QueryDelegatorValidatorsRequest is the request type for the
153
+ * Query/DelegatorValidators RPC method.
154
+ */
155
+ export interface QueryDelegatorValidatorsRequest {
156
+ /** delegator_address defines the delegator address to query for. */
157
+ delegatorAddress: string;
158
+ }
159
+
160
+ /**
161
+ * QueryDelegatorValidatorsResponse is the response type for the
162
+ * Query/DelegatorValidators RPC method.
163
+ */
164
+ export interface QueryDelegatorValidatorsResponse {
165
+ /** validators defines the validators a delegator is delegating for. */
166
+ validators: string[];
167
+ }
168
+
169
+ /**
170
+ * QueryDelegatorWithdrawAddressRequest is the request type for the
171
+ * Query/DelegatorWithdrawAddress RPC method.
172
+ */
173
+ export interface QueryDelegatorWithdrawAddressRequest {
174
+ /** delegator_address defines the delegator address to query for. */
175
+ delegatorAddress: string;
176
+ }
177
+
178
+ /**
179
+ * QueryDelegatorWithdrawAddressResponse is the response type for the
180
+ * Query/DelegatorWithdrawAddress RPC method.
181
+ */
182
+ export interface QueryDelegatorWithdrawAddressResponse {
183
+ /** withdraw_address defines the delegator address to query for. */
184
+ withdrawAddress: string;
185
+ }
186
+
187
+ /**
188
+ * QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC
189
+ * method.
190
+ */
191
+ export interface QueryCommunityPoolRequest {
192
+ }
193
+
194
+ /**
195
+ * QueryCommunityPoolResponse is the response type for the Query/CommunityPool
196
+ * RPC method.
197
+ */
198
+ export interface QueryCommunityPoolResponse {
199
+ /** pool defines community pool's coins. */
200
+ pool: DecCoin[];
201
+ }
202
+
203
+ function createBaseQueryParamsRequest(): QueryParamsRequest {
204
+ return {};
205
+ }
206
+
207
+ export const QueryParamsRequest = {
208
+ encode(_: QueryParamsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
209
+ return writer;
210
+ },
211
+
212
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryParamsRequest {
213
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
214
+ let end = length === undefined ? reader.len : reader.pos + length;
215
+ const message = createBaseQueryParamsRequest();
216
+ while (reader.pos < end) {
217
+ const tag = reader.uint32();
218
+ switch (tag >>> 3) {
219
+ }
220
+ if ((tag & 7) === 4 || tag === 0) {
221
+ break;
222
+ }
223
+ reader.skipType(tag & 7);
224
+ }
225
+ return message;
226
+ },
227
+
228
+ fromJSON(_: any): QueryParamsRequest {
229
+ return {};
230
+ },
231
+
232
+ toJSON(_: QueryParamsRequest): unknown {
233
+ const obj: any = {};
234
+ return obj;
235
+ },
236
+
237
+ create<I extends Exact<DeepPartial<QueryParamsRequest>, I>>(base?: I): QueryParamsRequest {
238
+ return QueryParamsRequest.fromPartial(base ?? ({} as any));
239
+ },
240
+ fromPartial<I extends Exact<DeepPartial<QueryParamsRequest>, I>>(_: I): QueryParamsRequest {
241
+ const message = createBaseQueryParamsRequest();
242
+ return message;
243
+ },
244
+ };
245
+
246
+ function createBaseQueryParamsResponse(): QueryParamsResponse {
247
+ return { params: undefined };
248
+ }
249
+
250
+ export const QueryParamsResponse = {
251
+ encode(message: QueryParamsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
252
+ if (message.params !== undefined) {
253
+ Params.encode(message.params, writer.uint32(10).fork()).ldelim();
254
+ }
255
+ return writer;
256
+ },
257
+
258
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryParamsResponse {
259
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
260
+ let end = length === undefined ? reader.len : reader.pos + length;
261
+ const message = createBaseQueryParamsResponse();
262
+ while (reader.pos < end) {
263
+ const tag = reader.uint32();
264
+ switch (tag >>> 3) {
265
+ case 1:
266
+ if (tag !== 10) {
267
+ break;
268
+ }
269
+
270
+ message.params = Params.decode(reader, reader.uint32());
271
+ continue;
272
+ }
273
+ if ((tag & 7) === 4 || tag === 0) {
274
+ break;
275
+ }
276
+ reader.skipType(tag & 7);
277
+ }
278
+ return message;
279
+ },
280
+
281
+ fromJSON(object: any): QueryParamsResponse {
282
+ return { params: isSet(object.params) ? Params.fromJSON(object.params) : undefined };
283
+ },
284
+
285
+ toJSON(message: QueryParamsResponse): unknown {
286
+ const obj: any = {};
287
+ if (message.params !== undefined) {
288
+ obj.params = Params.toJSON(message.params);
289
+ }
290
+ return obj;
291
+ },
292
+
293
+ create<I extends Exact<DeepPartial<QueryParamsResponse>, I>>(base?: I): QueryParamsResponse {
294
+ return QueryParamsResponse.fromPartial(base ?? ({} as any));
295
+ },
296
+ fromPartial<I extends Exact<DeepPartial<QueryParamsResponse>, I>>(object: I): QueryParamsResponse {
297
+ const message = createBaseQueryParamsResponse();
298
+ message.params = (object.params !== undefined && object.params !== null)
299
+ ? Params.fromPartial(object.params)
300
+ : undefined;
301
+ return message;
302
+ },
303
+ };
304
+
305
+ function createBaseQueryValidatorDistributionInfoRequest(): QueryValidatorDistributionInfoRequest {
306
+ return { validatorAddress: "" };
307
+ }
308
+
309
+ export const QueryValidatorDistributionInfoRequest = {
310
+ encode(message: QueryValidatorDistributionInfoRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
311
+ if (message.validatorAddress !== "") {
312
+ writer.uint32(10).string(message.validatorAddress);
313
+ }
314
+ return writer;
315
+ },
316
+
317
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryValidatorDistributionInfoRequest {
318
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
319
+ let end = length === undefined ? reader.len : reader.pos + length;
320
+ const message = createBaseQueryValidatorDistributionInfoRequest();
321
+ while (reader.pos < end) {
322
+ const tag = reader.uint32();
323
+ switch (tag >>> 3) {
324
+ case 1:
325
+ if (tag !== 10) {
326
+ break;
327
+ }
328
+
329
+ message.validatorAddress = reader.string();
330
+ continue;
331
+ }
332
+ if ((tag & 7) === 4 || tag === 0) {
333
+ break;
334
+ }
335
+ reader.skipType(tag & 7);
336
+ }
337
+ return message;
338
+ },
339
+
340
+ fromJSON(object: any): QueryValidatorDistributionInfoRequest {
341
+ return { validatorAddress: isSet(object.validatorAddress) ? globalThis.String(object.validatorAddress) : "" };
342
+ },
343
+
344
+ toJSON(message: QueryValidatorDistributionInfoRequest): unknown {
345
+ const obj: any = {};
346
+ if (message.validatorAddress !== "") {
347
+ obj.validatorAddress = message.validatorAddress;
348
+ }
349
+ return obj;
350
+ },
351
+
352
+ create<I extends Exact<DeepPartial<QueryValidatorDistributionInfoRequest>, I>>(
353
+ base?: I,
354
+ ): QueryValidatorDistributionInfoRequest {
355
+ return QueryValidatorDistributionInfoRequest.fromPartial(base ?? ({} as any));
356
+ },
357
+ fromPartial<I extends Exact<DeepPartial<QueryValidatorDistributionInfoRequest>, I>>(
358
+ object: I,
359
+ ): QueryValidatorDistributionInfoRequest {
360
+ const message = createBaseQueryValidatorDistributionInfoRequest();
361
+ message.validatorAddress = object.validatorAddress ?? "";
362
+ return message;
363
+ },
364
+ };
365
+
366
+ function createBaseQueryValidatorDistributionInfoResponse(): QueryValidatorDistributionInfoResponse {
367
+ return { operatorAddress: "", selfBondRewards: [], commission: [] };
368
+ }
369
+
370
+ export const QueryValidatorDistributionInfoResponse = {
371
+ encode(message: QueryValidatorDistributionInfoResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
372
+ if (message.operatorAddress !== "") {
373
+ writer.uint32(10).string(message.operatorAddress);
374
+ }
375
+ for (const v of message.selfBondRewards) {
376
+ DecCoin.encode(v!, writer.uint32(18).fork()).ldelim();
377
+ }
378
+ for (const v of message.commission) {
379
+ DecCoin.encode(v!, writer.uint32(26).fork()).ldelim();
380
+ }
381
+ return writer;
382
+ },
383
+
384
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryValidatorDistributionInfoResponse {
385
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
386
+ let end = length === undefined ? reader.len : reader.pos + length;
387
+ const message = createBaseQueryValidatorDistributionInfoResponse();
388
+ while (reader.pos < end) {
389
+ const tag = reader.uint32();
390
+ switch (tag >>> 3) {
391
+ case 1:
392
+ if (tag !== 10) {
393
+ break;
394
+ }
395
+
396
+ message.operatorAddress = reader.string();
397
+ continue;
398
+ case 2:
399
+ if (tag !== 18) {
400
+ break;
401
+ }
402
+
403
+ message.selfBondRewards.push(DecCoin.decode(reader, reader.uint32()));
404
+ continue;
405
+ case 3:
406
+ if (tag !== 26) {
407
+ break;
408
+ }
409
+
410
+ message.commission.push(DecCoin.decode(reader, reader.uint32()));
411
+ continue;
412
+ }
413
+ if ((tag & 7) === 4 || tag === 0) {
414
+ break;
415
+ }
416
+ reader.skipType(tag & 7);
417
+ }
418
+ return message;
419
+ },
420
+
421
+ fromJSON(object: any): QueryValidatorDistributionInfoResponse {
422
+ return {
423
+ operatorAddress: isSet(object.operatorAddress) ? globalThis.String(object.operatorAddress) : "",
424
+ selfBondRewards: globalThis.Array.isArray(object?.selfBondRewards)
425
+ ? object.selfBondRewards.map((e: any) => DecCoin.fromJSON(e))
426
+ : [],
427
+ commission: globalThis.Array.isArray(object?.commission)
428
+ ? object.commission.map((e: any) => DecCoin.fromJSON(e))
429
+ : [],
430
+ };
431
+ },
432
+
433
+ toJSON(message: QueryValidatorDistributionInfoResponse): unknown {
434
+ const obj: any = {};
435
+ if (message.operatorAddress !== "") {
436
+ obj.operatorAddress = message.operatorAddress;
437
+ }
438
+ if (message.selfBondRewards?.length) {
439
+ obj.selfBondRewards = message.selfBondRewards.map((e) => DecCoin.toJSON(e));
440
+ }
441
+ if (message.commission?.length) {
442
+ obj.commission = message.commission.map((e) => DecCoin.toJSON(e));
443
+ }
444
+ return obj;
445
+ },
446
+
447
+ create<I extends Exact<DeepPartial<QueryValidatorDistributionInfoResponse>, I>>(
448
+ base?: I,
449
+ ): QueryValidatorDistributionInfoResponse {
450
+ return QueryValidatorDistributionInfoResponse.fromPartial(base ?? ({} as any));
451
+ },
452
+ fromPartial<I extends Exact<DeepPartial<QueryValidatorDistributionInfoResponse>, I>>(
453
+ object: I,
454
+ ): QueryValidatorDistributionInfoResponse {
455
+ const message = createBaseQueryValidatorDistributionInfoResponse();
456
+ message.operatorAddress = object.operatorAddress ?? "";
457
+ message.selfBondRewards = object.selfBondRewards?.map((e) => DecCoin.fromPartial(e)) || [];
458
+ message.commission = object.commission?.map((e) => DecCoin.fromPartial(e)) || [];
459
+ return message;
460
+ },
461
+ };
462
+
463
+ function createBaseQueryValidatorOutstandingRewardsRequest(): QueryValidatorOutstandingRewardsRequest {
464
+ return { validatorAddress: "" };
465
+ }
466
+
467
+ export const QueryValidatorOutstandingRewardsRequest = {
468
+ encode(message: QueryValidatorOutstandingRewardsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
469
+ if (message.validatorAddress !== "") {
470
+ writer.uint32(10).string(message.validatorAddress);
471
+ }
472
+ return writer;
473
+ },
474
+
475
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryValidatorOutstandingRewardsRequest {
476
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
477
+ let end = length === undefined ? reader.len : reader.pos + length;
478
+ const message = createBaseQueryValidatorOutstandingRewardsRequest();
479
+ while (reader.pos < end) {
480
+ const tag = reader.uint32();
481
+ switch (tag >>> 3) {
482
+ case 1:
483
+ if (tag !== 10) {
484
+ break;
485
+ }
486
+
487
+ message.validatorAddress = reader.string();
488
+ continue;
489
+ }
490
+ if ((tag & 7) === 4 || tag === 0) {
491
+ break;
492
+ }
493
+ reader.skipType(tag & 7);
494
+ }
495
+ return message;
496
+ },
497
+
498
+ fromJSON(object: any): QueryValidatorOutstandingRewardsRequest {
499
+ return { validatorAddress: isSet(object.validatorAddress) ? globalThis.String(object.validatorAddress) : "" };
500
+ },
501
+
502
+ toJSON(message: QueryValidatorOutstandingRewardsRequest): unknown {
503
+ const obj: any = {};
504
+ if (message.validatorAddress !== "") {
505
+ obj.validatorAddress = message.validatorAddress;
506
+ }
507
+ return obj;
508
+ },
509
+
510
+ create<I extends Exact<DeepPartial<QueryValidatorOutstandingRewardsRequest>, I>>(
511
+ base?: I,
512
+ ): QueryValidatorOutstandingRewardsRequest {
513
+ return QueryValidatorOutstandingRewardsRequest.fromPartial(base ?? ({} as any));
514
+ },
515
+ fromPartial<I extends Exact<DeepPartial<QueryValidatorOutstandingRewardsRequest>, I>>(
516
+ object: I,
517
+ ): QueryValidatorOutstandingRewardsRequest {
518
+ const message = createBaseQueryValidatorOutstandingRewardsRequest();
519
+ message.validatorAddress = object.validatorAddress ?? "";
520
+ return message;
521
+ },
522
+ };
523
+
524
+ function createBaseQueryValidatorOutstandingRewardsResponse(): QueryValidatorOutstandingRewardsResponse {
525
+ return { rewards: undefined };
526
+ }
527
+
528
+ export const QueryValidatorOutstandingRewardsResponse = {
529
+ encode(message: QueryValidatorOutstandingRewardsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
530
+ if (message.rewards !== undefined) {
531
+ ValidatorOutstandingRewards.encode(message.rewards, writer.uint32(10).fork()).ldelim();
532
+ }
533
+ return writer;
534
+ },
535
+
536
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryValidatorOutstandingRewardsResponse {
537
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
538
+ let end = length === undefined ? reader.len : reader.pos + length;
539
+ const message = createBaseQueryValidatorOutstandingRewardsResponse();
540
+ while (reader.pos < end) {
541
+ const tag = reader.uint32();
542
+ switch (tag >>> 3) {
543
+ case 1:
544
+ if (tag !== 10) {
545
+ break;
546
+ }
547
+
548
+ message.rewards = ValidatorOutstandingRewards.decode(reader, reader.uint32());
549
+ continue;
550
+ }
551
+ if ((tag & 7) === 4 || tag === 0) {
552
+ break;
553
+ }
554
+ reader.skipType(tag & 7);
555
+ }
556
+ return message;
557
+ },
558
+
559
+ fromJSON(object: any): QueryValidatorOutstandingRewardsResponse {
560
+ return { rewards: isSet(object.rewards) ? ValidatorOutstandingRewards.fromJSON(object.rewards) : undefined };
561
+ },
562
+
563
+ toJSON(message: QueryValidatorOutstandingRewardsResponse): unknown {
564
+ const obj: any = {};
565
+ if (message.rewards !== undefined) {
566
+ obj.rewards = ValidatorOutstandingRewards.toJSON(message.rewards);
567
+ }
568
+ return obj;
569
+ },
570
+
571
+ create<I extends Exact<DeepPartial<QueryValidatorOutstandingRewardsResponse>, I>>(
572
+ base?: I,
573
+ ): QueryValidatorOutstandingRewardsResponse {
574
+ return QueryValidatorOutstandingRewardsResponse.fromPartial(base ?? ({} as any));
575
+ },
576
+ fromPartial<I extends Exact<DeepPartial<QueryValidatorOutstandingRewardsResponse>, I>>(
577
+ object: I,
578
+ ): QueryValidatorOutstandingRewardsResponse {
579
+ const message = createBaseQueryValidatorOutstandingRewardsResponse();
580
+ message.rewards = (object.rewards !== undefined && object.rewards !== null)
581
+ ? ValidatorOutstandingRewards.fromPartial(object.rewards)
582
+ : undefined;
583
+ return message;
584
+ },
585
+ };
586
+
587
+ function createBaseQueryValidatorCommissionRequest(): QueryValidatorCommissionRequest {
588
+ return { validatorAddress: "" };
589
+ }
590
+
591
+ export const QueryValidatorCommissionRequest = {
592
+ encode(message: QueryValidatorCommissionRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
593
+ if (message.validatorAddress !== "") {
594
+ writer.uint32(10).string(message.validatorAddress);
595
+ }
596
+ return writer;
597
+ },
598
+
599
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryValidatorCommissionRequest {
600
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
601
+ let end = length === undefined ? reader.len : reader.pos + length;
602
+ const message = createBaseQueryValidatorCommissionRequest();
603
+ while (reader.pos < end) {
604
+ const tag = reader.uint32();
605
+ switch (tag >>> 3) {
606
+ case 1:
607
+ if (tag !== 10) {
608
+ break;
609
+ }
610
+
611
+ message.validatorAddress = reader.string();
612
+ continue;
613
+ }
614
+ if ((tag & 7) === 4 || tag === 0) {
615
+ break;
616
+ }
617
+ reader.skipType(tag & 7);
618
+ }
619
+ return message;
620
+ },
621
+
622
+ fromJSON(object: any): QueryValidatorCommissionRequest {
623
+ return { validatorAddress: isSet(object.validatorAddress) ? globalThis.String(object.validatorAddress) : "" };
624
+ },
625
+
626
+ toJSON(message: QueryValidatorCommissionRequest): unknown {
627
+ const obj: any = {};
628
+ if (message.validatorAddress !== "") {
629
+ obj.validatorAddress = message.validatorAddress;
630
+ }
631
+ return obj;
632
+ },
633
+
634
+ create<I extends Exact<DeepPartial<QueryValidatorCommissionRequest>, I>>(base?: I): QueryValidatorCommissionRequest {
635
+ return QueryValidatorCommissionRequest.fromPartial(base ?? ({} as any));
636
+ },
637
+ fromPartial<I extends Exact<DeepPartial<QueryValidatorCommissionRequest>, I>>(
638
+ object: I,
639
+ ): QueryValidatorCommissionRequest {
640
+ const message = createBaseQueryValidatorCommissionRequest();
641
+ message.validatorAddress = object.validatorAddress ?? "";
642
+ return message;
643
+ },
644
+ };
645
+
646
+ function createBaseQueryValidatorCommissionResponse(): QueryValidatorCommissionResponse {
647
+ return { commission: undefined };
648
+ }
649
+
650
+ export const QueryValidatorCommissionResponse = {
651
+ encode(message: QueryValidatorCommissionResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
652
+ if (message.commission !== undefined) {
653
+ ValidatorAccumulatedCommission.encode(message.commission, writer.uint32(10).fork()).ldelim();
654
+ }
655
+ return writer;
656
+ },
657
+
658
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryValidatorCommissionResponse {
659
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
660
+ let end = length === undefined ? reader.len : reader.pos + length;
661
+ const message = createBaseQueryValidatorCommissionResponse();
662
+ while (reader.pos < end) {
663
+ const tag = reader.uint32();
664
+ switch (tag >>> 3) {
665
+ case 1:
666
+ if (tag !== 10) {
667
+ break;
668
+ }
669
+
670
+ message.commission = ValidatorAccumulatedCommission.decode(reader, reader.uint32());
671
+ continue;
672
+ }
673
+ if ((tag & 7) === 4 || tag === 0) {
674
+ break;
675
+ }
676
+ reader.skipType(tag & 7);
677
+ }
678
+ return message;
679
+ },
680
+
681
+ fromJSON(object: any): QueryValidatorCommissionResponse {
682
+ return {
683
+ commission: isSet(object.commission) ? ValidatorAccumulatedCommission.fromJSON(object.commission) : undefined,
684
+ };
685
+ },
686
+
687
+ toJSON(message: QueryValidatorCommissionResponse): unknown {
688
+ const obj: any = {};
689
+ if (message.commission !== undefined) {
690
+ obj.commission = ValidatorAccumulatedCommission.toJSON(message.commission);
691
+ }
692
+ return obj;
693
+ },
694
+
695
+ create<I extends Exact<DeepPartial<QueryValidatorCommissionResponse>, I>>(
696
+ base?: I,
697
+ ): QueryValidatorCommissionResponse {
698
+ return QueryValidatorCommissionResponse.fromPartial(base ?? ({} as any));
699
+ },
700
+ fromPartial<I extends Exact<DeepPartial<QueryValidatorCommissionResponse>, I>>(
701
+ object: I,
702
+ ): QueryValidatorCommissionResponse {
703
+ const message = createBaseQueryValidatorCommissionResponse();
704
+ message.commission = (object.commission !== undefined && object.commission !== null)
705
+ ? ValidatorAccumulatedCommission.fromPartial(object.commission)
706
+ : undefined;
707
+ return message;
708
+ },
709
+ };
710
+
711
+ function createBaseQueryValidatorSlashesRequest(): QueryValidatorSlashesRequest {
712
+ return { validatorAddress: "", startingHeight: Long.UZERO, endingHeight: Long.UZERO, pagination: undefined };
713
+ }
714
+
715
+ export const QueryValidatorSlashesRequest = {
716
+ encode(message: QueryValidatorSlashesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
717
+ if (message.validatorAddress !== "") {
718
+ writer.uint32(10).string(message.validatorAddress);
719
+ }
720
+ if (!message.startingHeight.equals(Long.UZERO)) {
721
+ writer.uint32(16).uint64(message.startingHeight);
722
+ }
723
+ if (!message.endingHeight.equals(Long.UZERO)) {
724
+ writer.uint32(24).uint64(message.endingHeight);
725
+ }
726
+ if (message.pagination !== undefined) {
727
+ PageRequest.encode(message.pagination, writer.uint32(34).fork()).ldelim();
728
+ }
729
+ return writer;
730
+ },
731
+
732
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryValidatorSlashesRequest {
733
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
734
+ let end = length === undefined ? reader.len : reader.pos + length;
735
+ const message = createBaseQueryValidatorSlashesRequest();
736
+ while (reader.pos < end) {
737
+ const tag = reader.uint32();
738
+ switch (tag >>> 3) {
739
+ case 1:
740
+ if (tag !== 10) {
741
+ break;
742
+ }
743
+
744
+ message.validatorAddress = reader.string();
745
+ continue;
746
+ case 2:
747
+ if (tag !== 16) {
748
+ break;
749
+ }
750
+
751
+ message.startingHeight = reader.uint64() as Long;
752
+ continue;
753
+ case 3:
754
+ if (tag !== 24) {
755
+ break;
756
+ }
757
+
758
+ message.endingHeight = reader.uint64() as Long;
759
+ continue;
760
+ case 4:
761
+ if (tag !== 34) {
762
+ break;
763
+ }
764
+
765
+ message.pagination = PageRequest.decode(reader, reader.uint32());
766
+ continue;
767
+ }
768
+ if ((tag & 7) === 4 || tag === 0) {
769
+ break;
770
+ }
771
+ reader.skipType(tag & 7);
772
+ }
773
+ return message;
774
+ },
775
+
776
+ fromJSON(object: any): QueryValidatorSlashesRequest {
777
+ return {
778
+ validatorAddress: isSet(object.validatorAddress) ? globalThis.String(object.validatorAddress) : "",
779
+ startingHeight: isSet(object.startingHeight) ? Long.fromValue(object.startingHeight) : Long.UZERO,
780
+ endingHeight: isSet(object.endingHeight) ? Long.fromValue(object.endingHeight) : Long.UZERO,
781
+ pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined,
782
+ };
783
+ },
784
+
785
+ toJSON(message: QueryValidatorSlashesRequest): unknown {
786
+ const obj: any = {};
787
+ if (message.validatorAddress !== "") {
788
+ obj.validatorAddress = message.validatorAddress;
789
+ }
790
+ if (!message.startingHeight.equals(Long.UZERO)) {
791
+ obj.startingHeight = (message.startingHeight || Long.UZERO).toString();
792
+ }
793
+ if (!message.endingHeight.equals(Long.UZERO)) {
794
+ obj.endingHeight = (message.endingHeight || Long.UZERO).toString();
795
+ }
796
+ if (message.pagination !== undefined) {
797
+ obj.pagination = PageRequest.toJSON(message.pagination);
798
+ }
799
+ return obj;
800
+ },
801
+
802
+ create<I extends Exact<DeepPartial<QueryValidatorSlashesRequest>, I>>(base?: I): QueryValidatorSlashesRequest {
803
+ return QueryValidatorSlashesRequest.fromPartial(base ?? ({} as any));
804
+ },
805
+ fromPartial<I extends Exact<DeepPartial<QueryValidatorSlashesRequest>, I>>(object: I): QueryValidatorSlashesRequest {
806
+ const message = createBaseQueryValidatorSlashesRequest();
807
+ message.validatorAddress = object.validatorAddress ?? "";
808
+ message.startingHeight = (object.startingHeight !== undefined && object.startingHeight !== null)
809
+ ? Long.fromValue(object.startingHeight)
810
+ : Long.UZERO;
811
+ message.endingHeight = (object.endingHeight !== undefined && object.endingHeight !== null)
812
+ ? Long.fromValue(object.endingHeight)
813
+ : Long.UZERO;
814
+ message.pagination = (object.pagination !== undefined && object.pagination !== null)
815
+ ? PageRequest.fromPartial(object.pagination)
816
+ : undefined;
817
+ return message;
818
+ },
819
+ };
820
+
821
+ function createBaseQueryValidatorSlashesResponse(): QueryValidatorSlashesResponse {
822
+ return { slashes: [], pagination: undefined };
823
+ }
824
+
825
+ export const QueryValidatorSlashesResponse = {
826
+ encode(message: QueryValidatorSlashesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
827
+ for (const v of message.slashes) {
828
+ ValidatorSlashEvent.encode(v!, writer.uint32(10).fork()).ldelim();
829
+ }
830
+ if (message.pagination !== undefined) {
831
+ PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
832
+ }
833
+ return writer;
834
+ },
835
+
836
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryValidatorSlashesResponse {
837
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
838
+ let end = length === undefined ? reader.len : reader.pos + length;
839
+ const message = createBaseQueryValidatorSlashesResponse();
840
+ while (reader.pos < end) {
841
+ const tag = reader.uint32();
842
+ switch (tag >>> 3) {
843
+ case 1:
844
+ if (tag !== 10) {
845
+ break;
846
+ }
847
+
848
+ message.slashes.push(ValidatorSlashEvent.decode(reader, reader.uint32()));
849
+ continue;
850
+ case 2:
851
+ if (tag !== 18) {
852
+ break;
853
+ }
854
+
855
+ message.pagination = PageResponse.decode(reader, reader.uint32());
856
+ continue;
857
+ }
858
+ if ((tag & 7) === 4 || tag === 0) {
859
+ break;
860
+ }
861
+ reader.skipType(tag & 7);
862
+ }
863
+ return message;
864
+ },
865
+
866
+ fromJSON(object: any): QueryValidatorSlashesResponse {
867
+ return {
868
+ slashes: globalThis.Array.isArray(object?.slashes)
869
+ ? object.slashes.map((e: any) => ValidatorSlashEvent.fromJSON(e))
870
+ : [],
871
+ pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined,
872
+ };
873
+ },
874
+
875
+ toJSON(message: QueryValidatorSlashesResponse): unknown {
876
+ const obj: any = {};
877
+ if (message.slashes?.length) {
878
+ obj.slashes = message.slashes.map((e) => ValidatorSlashEvent.toJSON(e));
879
+ }
880
+ if (message.pagination !== undefined) {
881
+ obj.pagination = PageResponse.toJSON(message.pagination);
882
+ }
883
+ return obj;
884
+ },
885
+
886
+ create<I extends Exact<DeepPartial<QueryValidatorSlashesResponse>, I>>(base?: I): QueryValidatorSlashesResponse {
887
+ return QueryValidatorSlashesResponse.fromPartial(base ?? ({} as any));
888
+ },
889
+ fromPartial<I extends Exact<DeepPartial<QueryValidatorSlashesResponse>, I>>(
890
+ object: I,
891
+ ): QueryValidatorSlashesResponse {
892
+ const message = createBaseQueryValidatorSlashesResponse();
893
+ message.slashes = object.slashes?.map((e) => ValidatorSlashEvent.fromPartial(e)) || [];
894
+ message.pagination = (object.pagination !== undefined && object.pagination !== null)
895
+ ? PageResponse.fromPartial(object.pagination)
896
+ : undefined;
897
+ return message;
898
+ },
899
+ };
900
+
901
+ function createBaseQueryDelegationRewardsRequest(): QueryDelegationRewardsRequest {
902
+ return { delegatorAddress: "", validatorAddress: "" };
903
+ }
904
+
905
+ export const QueryDelegationRewardsRequest = {
906
+ encode(message: QueryDelegationRewardsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
907
+ if (message.delegatorAddress !== "") {
908
+ writer.uint32(10).string(message.delegatorAddress);
909
+ }
910
+ if (message.validatorAddress !== "") {
911
+ writer.uint32(18).string(message.validatorAddress);
912
+ }
913
+ return writer;
914
+ },
915
+
916
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryDelegationRewardsRequest {
917
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
918
+ let end = length === undefined ? reader.len : reader.pos + length;
919
+ const message = createBaseQueryDelegationRewardsRequest();
920
+ while (reader.pos < end) {
921
+ const tag = reader.uint32();
922
+ switch (tag >>> 3) {
923
+ case 1:
924
+ if (tag !== 10) {
925
+ break;
926
+ }
927
+
928
+ message.delegatorAddress = reader.string();
929
+ continue;
930
+ case 2:
931
+ if (tag !== 18) {
932
+ break;
933
+ }
934
+
935
+ message.validatorAddress = reader.string();
936
+ continue;
937
+ }
938
+ if ((tag & 7) === 4 || tag === 0) {
939
+ break;
940
+ }
941
+ reader.skipType(tag & 7);
942
+ }
943
+ return message;
944
+ },
945
+
946
+ fromJSON(object: any): QueryDelegationRewardsRequest {
947
+ return {
948
+ delegatorAddress: isSet(object.delegatorAddress) ? globalThis.String(object.delegatorAddress) : "",
949
+ validatorAddress: isSet(object.validatorAddress) ? globalThis.String(object.validatorAddress) : "",
950
+ };
951
+ },
952
+
953
+ toJSON(message: QueryDelegationRewardsRequest): unknown {
954
+ const obj: any = {};
955
+ if (message.delegatorAddress !== "") {
956
+ obj.delegatorAddress = message.delegatorAddress;
957
+ }
958
+ if (message.validatorAddress !== "") {
959
+ obj.validatorAddress = message.validatorAddress;
960
+ }
961
+ return obj;
962
+ },
963
+
964
+ create<I extends Exact<DeepPartial<QueryDelegationRewardsRequest>, I>>(base?: I): QueryDelegationRewardsRequest {
965
+ return QueryDelegationRewardsRequest.fromPartial(base ?? ({} as any));
966
+ },
967
+ fromPartial<I extends Exact<DeepPartial<QueryDelegationRewardsRequest>, I>>(
968
+ object: I,
969
+ ): QueryDelegationRewardsRequest {
970
+ const message = createBaseQueryDelegationRewardsRequest();
971
+ message.delegatorAddress = object.delegatorAddress ?? "";
972
+ message.validatorAddress = object.validatorAddress ?? "";
973
+ return message;
974
+ },
975
+ };
976
+
977
+ function createBaseQueryDelegationRewardsResponse(): QueryDelegationRewardsResponse {
978
+ return { rewards: [] };
979
+ }
980
+
981
+ export const QueryDelegationRewardsResponse = {
982
+ encode(message: QueryDelegationRewardsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
983
+ for (const v of message.rewards) {
984
+ DecCoin.encode(v!, writer.uint32(10).fork()).ldelim();
985
+ }
986
+ return writer;
987
+ },
988
+
989
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryDelegationRewardsResponse {
990
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
991
+ let end = length === undefined ? reader.len : reader.pos + length;
992
+ const message = createBaseQueryDelegationRewardsResponse();
993
+ while (reader.pos < end) {
994
+ const tag = reader.uint32();
995
+ switch (tag >>> 3) {
996
+ case 1:
997
+ if (tag !== 10) {
998
+ break;
999
+ }
1000
+
1001
+ message.rewards.push(DecCoin.decode(reader, reader.uint32()));
1002
+ continue;
1003
+ }
1004
+ if ((tag & 7) === 4 || tag === 0) {
1005
+ break;
1006
+ }
1007
+ reader.skipType(tag & 7);
1008
+ }
1009
+ return message;
1010
+ },
1011
+
1012
+ fromJSON(object: any): QueryDelegationRewardsResponse {
1013
+ return {
1014
+ rewards: globalThis.Array.isArray(object?.rewards) ? object.rewards.map((e: any) => DecCoin.fromJSON(e)) : [],
1015
+ };
1016
+ },
1017
+
1018
+ toJSON(message: QueryDelegationRewardsResponse): unknown {
1019
+ const obj: any = {};
1020
+ if (message.rewards?.length) {
1021
+ obj.rewards = message.rewards.map((e) => DecCoin.toJSON(e));
1022
+ }
1023
+ return obj;
1024
+ },
1025
+
1026
+ create<I extends Exact<DeepPartial<QueryDelegationRewardsResponse>, I>>(base?: I): QueryDelegationRewardsResponse {
1027
+ return QueryDelegationRewardsResponse.fromPartial(base ?? ({} as any));
1028
+ },
1029
+ fromPartial<I extends Exact<DeepPartial<QueryDelegationRewardsResponse>, I>>(
1030
+ object: I,
1031
+ ): QueryDelegationRewardsResponse {
1032
+ const message = createBaseQueryDelegationRewardsResponse();
1033
+ message.rewards = object.rewards?.map((e) => DecCoin.fromPartial(e)) || [];
1034
+ return message;
1035
+ },
1036
+ };
1037
+
1038
+ function createBaseQueryDelegationTotalRewardsRequest(): QueryDelegationTotalRewardsRequest {
1039
+ return { delegatorAddress: "" };
1040
+ }
1041
+
1042
+ export const QueryDelegationTotalRewardsRequest = {
1043
+ encode(message: QueryDelegationTotalRewardsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1044
+ if (message.delegatorAddress !== "") {
1045
+ writer.uint32(10).string(message.delegatorAddress);
1046
+ }
1047
+ return writer;
1048
+ },
1049
+
1050
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryDelegationTotalRewardsRequest {
1051
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
1052
+ let end = length === undefined ? reader.len : reader.pos + length;
1053
+ const message = createBaseQueryDelegationTotalRewardsRequest();
1054
+ while (reader.pos < end) {
1055
+ const tag = reader.uint32();
1056
+ switch (tag >>> 3) {
1057
+ case 1:
1058
+ if (tag !== 10) {
1059
+ break;
1060
+ }
1061
+
1062
+ message.delegatorAddress = reader.string();
1063
+ continue;
1064
+ }
1065
+ if ((tag & 7) === 4 || tag === 0) {
1066
+ break;
1067
+ }
1068
+ reader.skipType(tag & 7);
1069
+ }
1070
+ return message;
1071
+ },
1072
+
1073
+ fromJSON(object: any): QueryDelegationTotalRewardsRequest {
1074
+ return { delegatorAddress: isSet(object.delegatorAddress) ? globalThis.String(object.delegatorAddress) : "" };
1075
+ },
1076
+
1077
+ toJSON(message: QueryDelegationTotalRewardsRequest): unknown {
1078
+ const obj: any = {};
1079
+ if (message.delegatorAddress !== "") {
1080
+ obj.delegatorAddress = message.delegatorAddress;
1081
+ }
1082
+ return obj;
1083
+ },
1084
+
1085
+ create<I extends Exact<DeepPartial<QueryDelegationTotalRewardsRequest>, I>>(
1086
+ base?: I,
1087
+ ): QueryDelegationTotalRewardsRequest {
1088
+ return QueryDelegationTotalRewardsRequest.fromPartial(base ?? ({} as any));
1089
+ },
1090
+ fromPartial<I extends Exact<DeepPartial<QueryDelegationTotalRewardsRequest>, I>>(
1091
+ object: I,
1092
+ ): QueryDelegationTotalRewardsRequest {
1093
+ const message = createBaseQueryDelegationTotalRewardsRequest();
1094
+ message.delegatorAddress = object.delegatorAddress ?? "";
1095
+ return message;
1096
+ },
1097
+ };
1098
+
1099
+ function createBaseQueryDelegationTotalRewardsResponse(): QueryDelegationTotalRewardsResponse {
1100
+ return { rewards: [], total: [] };
1101
+ }
1102
+
1103
+ export const QueryDelegationTotalRewardsResponse = {
1104
+ encode(message: QueryDelegationTotalRewardsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1105
+ for (const v of message.rewards) {
1106
+ DelegationDelegatorReward.encode(v!, writer.uint32(10).fork()).ldelim();
1107
+ }
1108
+ for (const v of message.total) {
1109
+ DecCoin.encode(v!, writer.uint32(18).fork()).ldelim();
1110
+ }
1111
+ return writer;
1112
+ },
1113
+
1114
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryDelegationTotalRewardsResponse {
1115
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
1116
+ let end = length === undefined ? reader.len : reader.pos + length;
1117
+ const message = createBaseQueryDelegationTotalRewardsResponse();
1118
+ while (reader.pos < end) {
1119
+ const tag = reader.uint32();
1120
+ switch (tag >>> 3) {
1121
+ case 1:
1122
+ if (tag !== 10) {
1123
+ break;
1124
+ }
1125
+
1126
+ message.rewards.push(DelegationDelegatorReward.decode(reader, reader.uint32()));
1127
+ continue;
1128
+ case 2:
1129
+ if (tag !== 18) {
1130
+ break;
1131
+ }
1132
+
1133
+ message.total.push(DecCoin.decode(reader, reader.uint32()));
1134
+ continue;
1135
+ }
1136
+ if ((tag & 7) === 4 || tag === 0) {
1137
+ break;
1138
+ }
1139
+ reader.skipType(tag & 7);
1140
+ }
1141
+ return message;
1142
+ },
1143
+
1144
+ fromJSON(object: any): QueryDelegationTotalRewardsResponse {
1145
+ return {
1146
+ rewards: globalThis.Array.isArray(object?.rewards)
1147
+ ? object.rewards.map((e: any) => DelegationDelegatorReward.fromJSON(e))
1148
+ : [],
1149
+ total: globalThis.Array.isArray(object?.total) ? object.total.map((e: any) => DecCoin.fromJSON(e)) : [],
1150
+ };
1151
+ },
1152
+
1153
+ toJSON(message: QueryDelegationTotalRewardsResponse): unknown {
1154
+ const obj: any = {};
1155
+ if (message.rewards?.length) {
1156
+ obj.rewards = message.rewards.map((e) => DelegationDelegatorReward.toJSON(e));
1157
+ }
1158
+ if (message.total?.length) {
1159
+ obj.total = message.total.map((e) => DecCoin.toJSON(e));
1160
+ }
1161
+ return obj;
1162
+ },
1163
+
1164
+ create<I extends Exact<DeepPartial<QueryDelegationTotalRewardsResponse>, I>>(
1165
+ base?: I,
1166
+ ): QueryDelegationTotalRewardsResponse {
1167
+ return QueryDelegationTotalRewardsResponse.fromPartial(base ?? ({} as any));
1168
+ },
1169
+ fromPartial<I extends Exact<DeepPartial<QueryDelegationTotalRewardsResponse>, I>>(
1170
+ object: I,
1171
+ ): QueryDelegationTotalRewardsResponse {
1172
+ const message = createBaseQueryDelegationTotalRewardsResponse();
1173
+ message.rewards = object.rewards?.map((e) => DelegationDelegatorReward.fromPartial(e)) || [];
1174
+ message.total = object.total?.map((e) => DecCoin.fromPartial(e)) || [];
1175
+ return message;
1176
+ },
1177
+ };
1178
+
1179
+ function createBaseQueryDelegatorValidatorsRequest(): QueryDelegatorValidatorsRequest {
1180
+ return { delegatorAddress: "" };
1181
+ }
1182
+
1183
+ export const QueryDelegatorValidatorsRequest = {
1184
+ encode(message: QueryDelegatorValidatorsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1185
+ if (message.delegatorAddress !== "") {
1186
+ writer.uint32(10).string(message.delegatorAddress);
1187
+ }
1188
+ return writer;
1189
+ },
1190
+
1191
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryDelegatorValidatorsRequest {
1192
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
1193
+ let end = length === undefined ? reader.len : reader.pos + length;
1194
+ const message = createBaseQueryDelegatorValidatorsRequest();
1195
+ while (reader.pos < end) {
1196
+ const tag = reader.uint32();
1197
+ switch (tag >>> 3) {
1198
+ case 1:
1199
+ if (tag !== 10) {
1200
+ break;
1201
+ }
1202
+
1203
+ message.delegatorAddress = reader.string();
1204
+ continue;
1205
+ }
1206
+ if ((tag & 7) === 4 || tag === 0) {
1207
+ break;
1208
+ }
1209
+ reader.skipType(tag & 7);
1210
+ }
1211
+ return message;
1212
+ },
1213
+
1214
+ fromJSON(object: any): QueryDelegatorValidatorsRequest {
1215
+ return { delegatorAddress: isSet(object.delegatorAddress) ? globalThis.String(object.delegatorAddress) : "" };
1216
+ },
1217
+
1218
+ toJSON(message: QueryDelegatorValidatorsRequest): unknown {
1219
+ const obj: any = {};
1220
+ if (message.delegatorAddress !== "") {
1221
+ obj.delegatorAddress = message.delegatorAddress;
1222
+ }
1223
+ return obj;
1224
+ },
1225
+
1226
+ create<I extends Exact<DeepPartial<QueryDelegatorValidatorsRequest>, I>>(base?: I): QueryDelegatorValidatorsRequest {
1227
+ return QueryDelegatorValidatorsRequest.fromPartial(base ?? ({} as any));
1228
+ },
1229
+ fromPartial<I extends Exact<DeepPartial<QueryDelegatorValidatorsRequest>, I>>(
1230
+ object: I,
1231
+ ): QueryDelegatorValidatorsRequest {
1232
+ const message = createBaseQueryDelegatorValidatorsRequest();
1233
+ message.delegatorAddress = object.delegatorAddress ?? "";
1234
+ return message;
1235
+ },
1236
+ };
1237
+
1238
+ function createBaseQueryDelegatorValidatorsResponse(): QueryDelegatorValidatorsResponse {
1239
+ return { validators: [] };
1240
+ }
1241
+
1242
+ export const QueryDelegatorValidatorsResponse = {
1243
+ encode(message: QueryDelegatorValidatorsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1244
+ for (const v of message.validators) {
1245
+ writer.uint32(10).string(v!);
1246
+ }
1247
+ return writer;
1248
+ },
1249
+
1250
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryDelegatorValidatorsResponse {
1251
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
1252
+ let end = length === undefined ? reader.len : reader.pos + length;
1253
+ const message = createBaseQueryDelegatorValidatorsResponse();
1254
+ while (reader.pos < end) {
1255
+ const tag = reader.uint32();
1256
+ switch (tag >>> 3) {
1257
+ case 1:
1258
+ if (tag !== 10) {
1259
+ break;
1260
+ }
1261
+
1262
+ message.validators.push(reader.string());
1263
+ continue;
1264
+ }
1265
+ if ((tag & 7) === 4 || tag === 0) {
1266
+ break;
1267
+ }
1268
+ reader.skipType(tag & 7);
1269
+ }
1270
+ return message;
1271
+ },
1272
+
1273
+ fromJSON(object: any): QueryDelegatorValidatorsResponse {
1274
+ return {
1275
+ validators: globalThis.Array.isArray(object?.validators)
1276
+ ? object.validators.map((e: any) => globalThis.String(e))
1277
+ : [],
1278
+ };
1279
+ },
1280
+
1281
+ toJSON(message: QueryDelegatorValidatorsResponse): unknown {
1282
+ const obj: any = {};
1283
+ if (message.validators?.length) {
1284
+ obj.validators = message.validators;
1285
+ }
1286
+ return obj;
1287
+ },
1288
+
1289
+ create<I extends Exact<DeepPartial<QueryDelegatorValidatorsResponse>, I>>(
1290
+ base?: I,
1291
+ ): QueryDelegatorValidatorsResponse {
1292
+ return QueryDelegatorValidatorsResponse.fromPartial(base ?? ({} as any));
1293
+ },
1294
+ fromPartial<I extends Exact<DeepPartial<QueryDelegatorValidatorsResponse>, I>>(
1295
+ object: I,
1296
+ ): QueryDelegatorValidatorsResponse {
1297
+ const message = createBaseQueryDelegatorValidatorsResponse();
1298
+ message.validators = object.validators?.map((e) => e) || [];
1299
+ return message;
1300
+ },
1301
+ };
1302
+
1303
+ function createBaseQueryDelegatorWithdrawAddressRequest(): QueryDelegatorWithdrawAddressRequest {
1304
+ return { delegatorAddress: "" };
1305
+ }
1306
+
1307
+ export const QueryDelegatorWithdrawAddressRequest = {
1308
+ encode(message: QueryDelegatorWithdrawAddressRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1309
+ if (message.delegatorAddress !== "") {
1310
+ writer.uint32(10).string(message.delegatorAddress);
1311
+ }
1312
+ return writer;
1313
+ },
1314
+
1315
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryDelegatorWithdrawAddressRequest {
1316
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
1317
+ let end = length === undefined ? reader.len : reader.pos + length;
1318
+ const message = createBaseQueryDelegatorWithdrawAddressRequest();
1319
+ while (reader.pos < end) {
1320
+ const tag = reader.uint32();
1321
+ switch (tag >>> 3) {
1322
+ case 1:
1323
+ if (tag !== 10) {
1324
+ break;
1325
+ }
1326
+
1327
+ message.delegatorAddress = reader.string();
1328
+ continue;
1329
+ }
1330
+ if ((tag & 7) === 4 || tag === 0) {
1331
+ break;
1332
+ }
1333
+ reader.skipType(tag & 7);
1334
+ }
1335
+ return message;
1336
+ },
1337
+
1338
+ fromJSON(object: any): QueryDelegatorWithdrawAddressRequest {
1339
+ return { delegatorAddress: isSet(object.delegatorAddress) ? globalThis.String(object.delegatorAddress) : "" };
1340
+ },
1341
+
1342
+ toJSON(message: QueryDelegatorWithdrawAddressRequest): unknown {
1343
+ const obj: any = {};
1344
+ if (message.delegatorAddress !== "") {
1345
+ obj.delegatorAddress = message.delegatorAddress;
1346
+ }
1347
+ return obj;
1348
+ },
1349
+
1350
+ create<I extends Exact<DeepPartial<QueryDelegatorWithdrawAddressRequest>, I>>(
1351
+ base?: I,
1352
+ ): QueryDelegatorWithdrawAddressRequest {
1353
+ return QueryDelegatorWithdrawAddressRequest.fromPartial(base ?? ({} as any));
1354
+ },
1355
+ fromPartial<I extends Exact<DeepPartial<QueryDelegatorWithdrawAddressRequest>, I>>(
1356
+ object: I,
1357
+ ): QueryDelegatorWithdrawAddressRequest {
1358
+ const message = createBaseQueryDelegatorWithdrawAddressRequest();
1359
+ message.delegatorAddress = object.delegatorAddress ?? "";
1360
+ return message;
1361
+ },
1362
+ };
1363
+
1364
+ function createBaseQueryDelegatorWithdrawAddressResponse(): QueryDelegatorWithdrawAddressResponse {
1365
+ return { withdrawAddress: "" };
1366
+ }
1367
+
1368
+ export const QueryDelegatorWithdrawAddressResponse = {
1369
+ encode(message: QueryDelegatorWithdrawAddressResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1370
+ if (message.withdrawAddress !== "") {
1371
+ writer.uint32(10).string(message.withdrawAddress);
1372
+ }
1373
+ return writer;
1374
+ },
1375
+
1376
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryDelegatorWithdrawAddressResponse {
1377
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
1378
+ let end = length === undefined ? reader.len : reader.pos + length;
1379
+ const message = createBaseQueryDelegatorWithdrawAddressResponse();
1380
+ while (reader.pos < end) {
1381
+ const tag = reader.uint32();
1382
+ switch (tag >>> 3) {
1383
+ case 1:
1384
+ if (tag !== 10) {
1385
+ break;
1386
+ }
1387
+
1388
+ message.withdrawAddress = reader.string();
1389
+ continue;
1390
+ }
1391
+ if ((tag & 7) === 4 || tag === 0) {
1392
+ break;
1393
+ }
1394
+ reader.skipType(tag & 7);
1395
+ }
1396
+ return message;
1397
+ },
1398
+
1399
+ fromJSON(object: any): QueryDelegatorWithdrawAddressResponse {
1400
+ return { withdrawAddress: isSet(object.withdrawAddress) ? globalThis.String(object.withdrawAddress) : "" };
1401
+ },
1402
+
1403
+ toJSON(message: QueryDelegatorWithdrawAddressResponse): unknown {
1404
+ const obj: any = {};
1405
+ if (message.withdrawAddress !== "") {
1406
+ obj.withdrawAddress = message.withdrawAddress;
1407
+ }
1408
+ return obj;
1409
+ },
1410
+
1411
+ create<I extends Exact<DeepPartial<QueryDelegatorWithdrawAddressResponse>, I>>(
1412
+ base?: I,
1413
+ ): QueryDelegatorWithdrawAddressResponse {
1414
+ return QueryDelegatorWithdrawAddressResponse.fromPartial(base ?? ({} as any));
1415
+ },
1416
+ fromPartial<I extends Exact<DeepPartial<QueryDelegatorWithdrawAddressResponse>, I>>(
1417
+ object: I,
1418
+ ): QueryDelegatorWithdrawAddressResponse {
1419
+ const message = createBaseQueryDelegatorWithdrawAddressResponse();
1420
+ message.withdrawAddress = object.withdrawAddress ?? "";
1421
+ return message;
1422
+ },
1423
+ };
1424
+
1425
+ function createBaseQueryCommunityPoolRequest(): QueryCommunityPoolRequest {
1426
+ return {};
1427
+ }
1428
+
1429
+ export const QueryCommunityPoolRequest = {
1430
+ encode(_: QueryCommunityPoolRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1431
+ return writer;
1432
+ },
1433
+
1434
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryCommunityPoolRequest {
1435
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
1436
+ let end = length === undefined ? reader.len : reader.pos + length;
1437
+ const message = createBaseQueryCommunityPoolRequest();
1438
+ while (reader.pos < end) {
1439
+ const tag = reader.uint32();
1440
+ switch (tag >>> 3) {
1441
+ }
1442
+ if ((tag & 7) === 4 || tag === 0) {
1443
+ break;
1444
+ }
1445
+ reader.skipType(tag & 7);
1446
+ }
1447
+ return message;
1448
+ },
1449
+
1450
+ fromJSON(_: any): QueryCommunityPoolRequest {
1451
+ return {};
1452
+ },
1453
+
1454
+ toJSON(_: QueryCommunityPoolRequest): unknown {
1455
+ const obj: any = {};
1456
+ return obj;
1457
+ },
1458
+
1459
+ create<I extends Exact<DeepPartial<QueryCommunityPoolRequest>, I>>(base?: I): QueryCommunityPoolRequest {
1460
+ return QueryCommunityPoolRequest.fromPartial(base ?? ({} as any));
1461
+ },
1462
+ fromPartial<I extends Exact<DeepPartial<QueryCommunityPoolRequest>, I>>(_: I): QueryCommunityPoolRequest {
1463
+ const message = createBaseQueryCommunityPoolRequest();
1464
+ return message;
1465
+ },
1466
+ };
1467
+
1468
+ function createBaseQueryCommunityPoolResponse(): QueryCommunityPoolResponse {
1469
+ return { pool: [] };
1470
+ }
1471
+
1472
+ export const QueryCommunityPoolResponse = {
1473
+ encode(message: QueryCommunityPoolResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1474
+ for (const v of message.pool) {
1475
+ DecCoin.encode(v!, writer.uint32(10).fork()).ldelim();
1476
+ }
1477
+ return writer;
1478
+ },
1479
+
1480
+ decode(input: _m0.Reader | Uint8Array, length?: number): QueryCommunityPoolResponse {
1481
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
1482
+ let end = length === undefined ? reader.len : reader.pos + length;
1483
+ const message = createBaseQueryCommunityPoolResponse();
1484
+ while (reader.pos < end) {
1485
+ const tag = reader.uint32();
1486
+ switch (tag >>> 3) {
1487
+ case 1:
1488
+ if (tag !== 10) {
1489
+ break;
1490
+ }
1491
+
1492
+ message.pool.push(DecCoin.decode(reader, reader.uint32()));
1493
+ continue;
1494
+ }
1495
+ if ((tag & 7) === 4 || tag === 0) {
1496
+ break;
1497
+ }
1498
+ reader.skipType(tag & 7);
1499
+ }
1500
+ return message;
1501
+ },
1502
+
1503
+ fromJSON(object: any): QueryCommunityPoolResponse {
1504
+ return { pool: globalThis.Array.isArray(object?.pool) ? object.pool.map((e: any) => DecCoin.fromJSON(e)) : [] };
1505
+ },
1506
+
1507
+ toJSON(message: QueryCommunityPoolResponse): unknown {
1508
+ const obj: any = {};
1509
+ if (message.pool?.length) {
1510
+ obj.pool = message.pool.map((e) => DecCoin.toJSON(e));
1511
+ }
1512
+ return obj;
1513
+ },
1514
+
1515
+ create<I extends Exact<DeepPartial<QueryCommunityPoolResponse>, I>>(base?: I): QueryCommunityPoolResponse {
1516
+ return QueryCommunityPoolResponse.fromPartial(base ?? ({} as any));
1517
+ },
1518
+ fromPartial<I extends Exact<DeepPartial<QueryCommunityPoolResponse>, I>>(object: I): QueryCommunityPoolResponse {
1519
+ const message = createBaseQueryCommunityPoolResponse();
1520
+ message.pool = object.pool?.map((e) => DecCoin.fromPartial(e)) || [];
1521
+ return message;
1522
+ },
1523
+ };
1524
+
1525
+ /** Query defines the gRPC querier service for distribution module. */
1526
+ export interface Query {
1527
+ /** Params queries params of the distribution module. */
1528
+ Params(request: DeepPartial<QueryParamsRequest>, metadata?: grpc.Metadata): Promise<QueryParamsResponse>;
1529
+ /** ValidatorDistributionInfo queries validator commission and self-delegation rewards for validator */
1530
+ ValidatorDistributionInfo(
1531
+ request: DeepPartial<QueryValidatorDistributionInfoRequest>,
1532
+ metadata?: grpc.Metadata,
1533
+ ): Promise<QueryValidatorDistributionInfoResponse>;
1534
+ /** ValidatorOutstandingRewards queries rewards of a validator address. */
1535
+ ValidatorOutstandingRewards(
1536
+ request: DeepPartial<QueryValidatorOutstandingRewardsRequest>,
1537
+ metadata?: grpc.Metadata,
1538
+ ): Promise<QueryValidatorOutstandingRewardsResponse>;
1539
+ /** ValidatorCommission queries accumulated commission for a validator. */
1540
+ ValidatorCommission(
1541
+ request: DeepPartial<QueryValidatorCommissionRequest>,
1542
+ metadata?: grpc.Metadata,
1543
+ ): Promise<QueryValidatorCommissionResponse>;
1544
+ /** ValidatorSlashes queries slash events of a validator. */
1545
+ ValidatorSlashes(
1546
+ request: DeepPartial<QueryValidatorSlashesRequest>,
1547
+ metadata?: grpc.Metadata,
1548
+ ): Promise<QueryValidatorSlashesResponse>;
1549
+ /** DelegationRewards queries the total rewards accrued by a delegation. */
1550
+ DelegationRewards(
1551
+ request: DeepPartial<QueryDelegationRewardsRequest>,
1552
+ metadata?: grpc.Metadata,
1553
+ ): Promise<QueryDelegationRewardsResponse>;
1554
+ /**
1555
+ * DelegationTotalRewards queries the total rewards accrued by each
1556
+ * validator.
1557
+ */
1558
+ DelegationTotalRewards(
1559
+ request: DeepPartial<QueryDelegationTotalRewardsRequest>,
1560
+ metadata?: grpc.Metadata,
1561
+ ): Promise<QueryDelegationTotalRewardsResponse>;
1562
+ /** DelegatorValidators queries the validators of a delegator. */
1563
+ DelegatorValidators(
1564
+ request: DeepPartial<QueryDelegatorValidatorsRequest>,
1565
+ metadata?: grpc.Metadata,
1566
+ ): Promise<QueryDelegatorValidatorsResponse>;
1567
+ /** DelegatorWithdrawAddress queries withdraw address of a delegator. */
1568
+ DelegatorWithdrawAddress(
1569
+ request: DeepPartial<QueryDelegatorWithdrawAddressRequest>,
1570
+ metadata?: grpc.Metadata,
1571
+ ): Promise<QueryDelegatorWithdrawAddressResponse>;
1572
+ /** CommunityPool queries the community pool coins. */
1573
+ CommunityPool(
1574
+ request: DeepPartial<QueryCommunityPoolRequest>,
1575
+ metadata?: grpc.Metadata,
1576
+ ): Promise<QueryCommunityPoolResponse>;
1577
+ }
1578
+
1579
+ export class QueryClientImpl implements Query {
1580
+ private readonly rpc: Rpc;
1581
+
1582
+ constructor(rpc: Rpc) {
1583
+ this.rpc = rpc;
1584
+ this.Params = this.Params.bind(this);
1585
+ this.ValidatorDistributionInfo = this.ValidatorDistributionInfo.bind(this);
1586
+ this.ValidatorOutstandingRewards = this.ValidatorOutstandingRewards.bind(this);
1587
+ this.ValidatorCommission = this.ValidatorCommission.bind(this);
1588
+ this.ValidatorSlashes = this.ValidatorSlashes.bind(this);
1589
+ this.DelegationRewards = this.DelegationRewards.bind(this);
1590
+ this.DelegationTotalRewards = this.DelegationTotalRewards.bind(this);
1591
+ this.DelegatorValidators = this.DelegatorValidators.bind(this);
1592
+ this.DelegatorWithdrawAddress = this.DelegatorWithdrawAddress.bind(this);
1593
+ this.CommunityPool = this.CommunityPool.bind(this);
1594
+ }
1595
+
1596
+ Params(request: DeepPartial<QueryParamsRequest>, metadata?: grpc.Metadata): Promise<QueryParamsResponse> {
1597
+ return this.rpc.unary(QueryParamsDesc, QueryParamsRequest.fromPartial(request), metadata);
1598
+ }
1599
+
1600
+ ValidatorDistributionInfo(
1601
+ request: DeepPartial<QueryValidatorDistributionInfoRequest>,
1602
+ metadata?: grpc.Metadata,
1603
+ ): Promise<QueryValidatorDistributionInfoResponse> {
1604
+ return this.rpc.unary(
1605
+ QueryValidatorDistributionInfoDesc,
1606
+ QueryValidatorDistributionInfoRequest.fromPartial(request),
1607
+ metadata,
1608
+ );
1609
+ }
1610
+
1611
+ ValidatorOutstandingRewards(
1612
+ request: DeepPartial<QueryValidatorOutstandingRewardsRequest>,
1613
+ metadata?: grpc.Metadata,
1614
+ ): Promise<QueryValidatorOutstandingRewardsResponse> {
1615
+ return this.rpc.unary(
1616
+ QueryValidatorOutstandingRewardsDesc,
1617
+ QueryValidatorOutstandingRewardsRequest.fromPartial(request),
1618
+ metadata,
1619
+ );
1620
+ }
1621
+
1622
+ ValidatorCommission(
1623
+ request: DeepPartial<QueryValidatorCommissionRequest>,
1624
+ metadata?: grpc.Metadata,
1625
+ ): Promise<QueryValidatorCommissionResponse> {
1626
+ return this.rpc.unary(QueryValidatorCommissionDesc, QueryValidatorCommissionRequest.fromPartial(request), metadata);
1627
+ }
1628
+
1629
+ ValidatorSlashes(
1630
+ request: DeepPartial<QueryValidatorSlashesRequest>,
1631
+ metadata?: grpc.Metadata,
1632
+ ): Promise<QueryValidatorSlashesResponse> {
1633
+ return this.rpc.unary(QueryValidatorSlashesDesc, QueryValidatorSlashesRequest.fromPartial(request), metadata);
1634
+ }
1635
+
1636
+ DelegationRewards(
1637
+ request: DeepPartial<QueryDelegationRewardsRequest>,
1638
+ metadata?: grpc.Metadata,
1639
+ ): Promise<QueryDelegationRewardsResponse> {
1640
+ return this.rpc.unary(QueryDelegationRewardsDesc, QueryDelegationRewardsRequest.fromPartial(request), metadata);
1641
+ }
1642
+
1643
+ DelegationTotalRewards(
1644
+ request: DeepPartial<QueryDelegationTotalRewardsRequest>,
1645
+ metadata?: grpc.Metadata,
1646
+ ): Promise<QueryDelegationTotalRewardsResponse> {
1647
+ return this.rpc.unary(
1648
+ QueryDelegationTotalRewardsDesc,
1649
+ QueryDelegationTotalRewardsRequest.fromPartial(request),
1650
+ metadata,
1651
+ );
1652
+ }
1653
+
1654
+ DelegatorValidators(
1655
+ request: DeepPartial<QueryDelegatorValidatorsRequest>,
1656
+ metadata?: grpc.Metadata,
1657
+ ): Promise<QueryDelegatorValidatorsResponse> {
1658
+ return this.rpc.unary(QueryDelegatorValidatorsDesc, QueryDelegatorValidatorsRequest.fromPartial(request), metadata);
1659
+ }
1660
+
1661
+ DelegatorWithdrawAddress(
1662
+ request: DeepPartial<QueryDelegatorWithdrawAddressRequest>,
1663
+ metadata?: grpc.Metadata,
1664
+ ): Promise<QueryDelegatorWithdrawAddressResponse> {
1665
+ return this.rpc.unary(
1666
+ QueryDelegatorWithdrawAddressDesc,
1667
+ QueryDelegatorWithdrawAddressRequest.fromPartial(request),
1668
+ metadata,
1669
+ );
1670
+ }
1671
+
1672
+ CommunityPool(
1673
+ request: DeepPartial<QueryCommunityPoolRequest>,
1674
+ metadata?: grpc.Metadata,
1675
+ ): Promise<QueryCommunityPoolResponse> {
1676
+ return this.rpc.unary(QueryCommunityPoolDesc, QueryCommunityPoolRequest.fromPartial(request), metadata);
1677
+ }
1678
+ }
1679
+
1680
+ export const QueryDesc = { serviceName: "cosmos.distribution.v1beta1.Query" };
1681
+
1682
+ export const QueryParamsDesc: UnaryMethodDefinitionish = {
1683
+ methodName: "Params",
1684
+ service: QueryDesc,
1685
+ requestStream: false,
1686
+ responseStream: false,
1687
+ requestType: {
1688
+ serializeBinary() {
1689
+ return QueryParamsRequest.encode(this).finish();
1690
+ },
1691
+ } as any,
1692
+ responseType: {
1693
+ deserializeBinary(data: Uint8Array) {
1694
+ const value = QueryParamsResponse.decode(data);
1695
+ return {
1696
+ ...value,
1697
+ toObject() {
1698
+ return value;
1699
+ },
1700
+ };
1701
+ },
1702
+ } as any,
1703
+ };
1704
+
1705
+ export const QueryValidatorDistributionInfoDesc: UnaryMethodDefinitionish = {
1706
+ methodName: "ValidatorDistributionInfo",
1707
+ service: QueryDesc,
1708
+ requestStream: false,
1709
+ responseStream: false,
1710
+ requestType: {
1711
+ serializeBinary() {
1712
+ return QueryValidatorDistributionInfoRequest.encode(this).finish();
1713
+ },
1714
+ } as any,
1715
+ responseType: {
1716
+ deserializeBinary(data: Uint8Array) {
1717
+ const value = QueryValidatorDistributionInfoResponse.decode(data);
1718
+ return {
1719
+ ...value,
1720
+ toObject() {
1721
+ return value;
1722
+ },
1723
+ };
1724
+ },
1725
+ } as any,
1726
+ };
1727
+
1728
+ export const QueryValidatorOutstandingRewardsDesc: UnaryMethodDefinitionish = {
1729
+ methodName: "ValidatorOutstandingRewards",
1730
+ service: QueryDesc,
1731
+ requestStream: false,
1732
+ responseStream: false,
1733
+ requestType: {
1734
+ serializeBinary() {
1735
+ return QueryValidatorOutstandingRewardsRequest.encode(this).finish();
1736
+ },
1737
+ } as any,
1738
+ responseType: {
1739
+ deserializeBinary(data: Uint8Array) {
1740
+ const value = QueryValidatorOutstandingRewardsResponse.decode(data);
1741
+ return {
1742
+ ...value,
1743
+ toObject() {
1744
+ return value;
1745
+ },
1746
+ };
1747
+ },
1748
+ } as any,
1749
+ };
1750
+
1751
+ export const QueryValidatorCommissionDesc: UnaryMethodDefinitionish = {
1752
+ methodName: "ValidatorCommission",
1753
+ service: QueryDesc,
1754
+ requestStream: false,
1755
+ responseStream: false,
1756
+ requestType: {
1757
+ serializeBinary() {
1758
+ return QueryValidatorCommissionRequest.encode(this).finish();
1759
+ },
1760
+ } as any,
1761
+ responseType: {
1762
+ deserializeBinary(data: Uint8Array) {
1763
+ const value = QueryValidatorCommissionResponse.decode(data);
1764
+ return {
1765
+ ...value,
1766
+ toObject() {
1767
+ return value;
1768
+ },
1769
+ };
1770
+ },
1771
+ } as any,
1772
+ };
1773
+
1774
+ export const QueryValidatorSlashesDesc: UnaryMethodDefinitionish = {
1775
+ methodName: "ValidatorSlashes",
1776
+ service: QueryDesc,
1777
+ requestStream: false,
1778
+ responseStream: false,
1779
+ requestType: {
1780
+ serializeBinary() {
1781
+ return QueryValidatorSlashesRequest.encode(this).finish();
1782
+ },
1783
+ } as any,
1784
+ responseType: {
1785
+ deserializeBinary(data: Uint8Array) {
1786
+ const value = QueryValidatorSlashesResponse.decode(data);
1787
+ return {
1788
+ ...value,
1789
+ toObject() {
1790
+ return value;
1791
+ },
1792
+ };
1793
+ },
1794
+ } as any,
1795
+ };
1796
+
1797
+ export const QueryDelegationRewardsDesc: UnaryMethodDefinitionish = {
1798
+ methodName: "DelegationRewards",
1799
+ service: QueryDesc,
1800
+ requestStream: false,
1801
+ responseStream: false,
1802
+ requestType: {
1803
+ serializeBinary() {
1804
+ return QueryDelegationRewardsRequest.encode(this).finish();
1805
+ },
1806
+ } as any,
1807
+ responseType: {
1808
+ deserializeBinary(data: Uint8Array) {
1809
+ const value = QueryDelegationRewardsResponse.decode(data);
1810
+ return {
1811
+ ...value,
1812
+ toObject() {
1813
+ return value;
1814
+ },
1815
+ };
1816
+ },
1817
+ } as any,
1818
+ };
1819
+
1820
+ export const QueryDelegationTotalRewardsDesc: UnaryMethodDefinitionish = {
1821
+ methodName: "DelegationTotalRewards",
1822
+ service: QueryDesc,
1823
+ requestStream: false,
1824
+ responseStream: false,
1825
+ requestType: {
1826
+ serializeBinary() {
1827
+ return QueryDelegationTotalRewardsRequest.encode(this).finish();
1828
+ },
1829
+ } as any,
1830
+ responseType: {
1831
+ deserializeBinary(data: Uint8Array) {
1832
+ const value = QueryDelegationTotalRewardsResponse.decode(data);
1833
+ return {
1834
+ ...value,
1835
+ toObject() {
1836
+ return value;
1837
+ },
1838
+ };
1839
+ },
1840
+ } as any,
1841
+ };
1842
+
1843
+ export const QueryDelegatorValidatorsDesc: UnaryMethodDefinitionish = {
1844
+ methodName: "DelegatorValidators",
1845
+ service: QueryDesc,
1846
+ requestStream: false,
1847
+ responseStream: false,
1848
+ requestType: {
1849
+ serializeBinary() {
1850
+ return QueryDelegatorValidatorsRequest.encode(this).finish();
1851
+ },
1852
+ } as any,
1853
+ responseType: {
1854
+ deserializeBinary(data: Uint8Array) {
1855
+ const value = QueryDelegatorValidatorsResponse.decode(data);
1856
+ return {
1857
+ ...value,
1858
+ toObject() {
1859
+ return value;
1860
+ },
1861
+ };
1862
+ },
1863
+ } as any,
1864
+ };
1865
+
1866
+ export const QueryDelegatorWithdrawAddressDesc: UnaryMethodDefinitionish = {
1867
+ methodName: "DelegatorWithdrawAddress",
1868
+ service: QueryDesc,
1869
+ requestStream: false,
1870
+ responseStream: false,
1871
+ requestType: {
1872
+ serializeBinary() {
1873
+ return QueryDelegatorWithdrawAddressRequest.encode(this).finish();
1874
+ },
1875
+ } as any,
1876
+ responseType: {
1877
+ deserializeBinary(data: Uint8Array) {
1878
+ const value = QueryDelegatorWithdrawAddressResponse.decode(data);
1879
+ return {
1880
+ ...value,
1881
+ toObject() {
1882
+ return value;
1883
+ },
1884
+ };
1885
+ },
1886
+ } as any,
1887
+ };
1888
+
1889
+ export const QueryCommunityPoolDesc: UnaryMethodDefinitionish = {
1890
+ methodName: "CommunityPool",
1891
+ service: QueryDesc,
1892
+ requestStream: false,
1893
+ responseStream: false,
1894
+ requestType: {
1895
+ serializeBinary() {
1896
+ return QueryCommunityPoolRequest.encode(this).finish();
1897
+ },
1898
+ } as any,
1899
+ responseType: {
1900
+ deserializeBinary(data: Uint8Array) {
1901
+ const value = QueryCommunityPoolResponse.decode(data);
1902
+ return {
1903
+ ...value,
1904
+ toObject() {
1905
+ return value;
1906
+ },
1907
+ };
1908
+ },
1909
+ } as any,
1910
+ };
1911
+
1912
+ interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition<any, any> {
1913
+ requestStream: any;
1914
+ responseStream: any;
1915
+ }
1916
+
1917
+ type UnaryMethodDefinitionish = UnaryMethodDefinitionishR;
1918
+
1919
+ interface Rpc {
1920
+ unary<T extends UnaryMethodDefinitionish>(
1921
+ methodDesc: T,
1922
+ request: any,
1923
+ metadata: grpc.Metadata | undefined,
1924
+ ): Promise<any>;
1925
+ }
1926
+
1927
+ export class GrpcWebImpl {
1928
+ private host: string;
1929
+ private options: {
1930
+ transport?: grpc.TransportFactory;
1931
+
1932
+ debug?: boolean;
1933
+ metadata?: grpc.Metadata;
1934
+ upStreamRetryCodes?: number[];
1935
+ };
1936
+
1937
+ constructor(
1938
+ host: string,
1939
+ options: {
1940
+ transport?: grpc.TransportFactory;
1941
+
1942
+ debug?: boolean;
1943
+ metadata?: grpc.Metadata;
1944
+ upStreamRetryCodes?: number[];
1945
+ },
1946
+ ) {
1947
+ this.host = host;
1948
+ this.options = options;
1949
+ }
1950
+
1951
+ unary<T extends UnaryMethodDefinitionish>(
1952
+ methodDesc: T,
1953
+ _request: any,
1954
+ metadata: grpc.Metadata | undefined,
1955
+ ): Promise<any> {
1956
+ const request = { ..._request, ...methodDesc.requestType };
1957
+ const maybeCombinedMetadata = metadata && this.options.metadata
1958
+ ? new BrowserHeaders({ ...this.options?.metadata.headersMap, ...metadata?.headersMap })
1959
+ : metadata ?? this.options.metadata;
1960
+ return new Promise((resolve, reject) => {
1961
+ grpc.unary(methodDesc, {
1962
+ request,
1963
+ host: this.host,
1964
+ metadata: maybeCombinedMetadata ?? {},
1965
+ ...(this.options.transport !== undefined ? { transport: this.options.transport } : {}),
1966
+ debug: this.options.debug ?? false,
1967
+ onEnd: function (response) {
1968
+ if (response.status === grpc.Code.OK) {
1969
+ resolve(response.message!.toObject());
1970
+ } else {
1971
+ const err = new GrpcWebError(response.statusMessage, response.status, response.trailers);
1972
+ reject(err);
1973
+ }
1974
+ },
1975
+ });
1976
+ });
1977
+ }
1978
+ }
1979
+
1980
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
1981
+
1982
+ export type DeepPartial<T> = T extends Builtin ? T
1983
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
1984
+ : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
1985
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
1986
+ : Partial<T>;
1987
+
1988
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
1989
+ export type Exact<P, I extends P> = P extends Builtin ? P
1990
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
1991
+
1992
+ if (_m0.util.Long !== Long) {
1993
+ _m0.util.Long = Long as any;
1994
+ _m0.configure();
1995
+ }
1996
+
1997
+ function isSet(value: any): boolean {
1998
+ return value !== null && value !== undefined;
1999
+ }
2000
+
2001
+ export class GrpcWebError extends globalThis.Error {
2002
+ constructor(message: string, public code: grpc.Code, public metadata: grpc.Metadata) {
2003
+ super(message);
2004
+ }
2005
+ }