@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,1143 @@
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/distribution.proto
6
+
7
+ /* eslint-disable */
8
+ import Long from "long";
9
+ import _m0 from "protobufjs/minimal";
10
+ import { Coin, DecCoin } from "../../base/v1beta1/coin";
11
+
12
+ export const protobufPackage = "cosmos.distribution.v1beta1";
13
+
14
+ /** Params defines the set of params for the distribution module. */
15
+ export interface Params {
16
+ communityTax: string;
17
+ /**
18
+ * Deprecated: The base_proposer_reward field is deprecated and is no longer used
19
+ * in the x/distribution module's reward mechanism.
20
+ *
21
+ * @deprecated
22
+ */
23
+ baseProposerReward: string;
24
+ /**
25
+ * Deprecated: The bonus_proposer_reward field is deprecated and is no longer used
26
+ * in the x/distribution module's reward mechanism.
27
+ *
28
+ * @deprecated
29
+ */
30
+ bonusProposerReward: string;
31
+ withdrawAddrEnabled: boolean;
32
+ }
33
+
34
+ /**
35
+ * ValidatorHistoricalRewards represents historical rewards for a validator.
36
+ * Height is implicit within the store key.
37
+ * Cumulative reward ratio is the sum from the zeroeth period
38
+ * until this period of rewards / tokens, per the spec.
39
+ * The reference count indicates the number of objects
40
+ * which might need to reference this historical entry at any point.
41
+ * ReferenceCount =
42
+ * number of outstanding delegations which ended the associated period (and
43
+ * might need to read that record)
44
+ * + number of slashes which ended the associated period (and might need to
45
+ * read that record)
46
+ * + one per validator for the zeroeth period, set on initialization
47
+ */
48
+ export interface ValidatorHistoricalRewards {
49
+ cumulativeRewardRatio: DecCoin[];
50
+ referenceCount: number;
51
+ }
52
+
53
+ /**
54
+ * ValidatorCurrentRewards represents current rewards and current
55
+ * period for a validator kept as a running counter and incremented
56
+ * each block as long as the validator's tokens remain constant.
57
+ */
58
+ export interface ValidatorCurrentRewards {
59
+ rewards: DecCoin[];
60
+ period: Long;
61
+ }
62
+
63
+ /**
64
+ * ValidatorAccumulatedCommission represents accumulated commission
65
+ * for a validator kept as a running counter, can be withdrawn at any time.
66
+ */
67
+ export interface ValidatorAccumulatedCommission {
68
+ commission: DecCoin[];
69
+ }
70
+
71
+ /**
72
+ * ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards
73
+ * for a validator inexpensive to track, allows simple sanity checks.
74
+ */
75
+ export interface ValidatorOutstandingRewards {
76
+ rewards: DecCoin[];
77
+ }
78
+
79
+ /**
80
+ * ValidatorSlashEvent represents a validator slash event.
81
+ * Height is implicit within the store key.
82
+ * This is needed to calculate appropriate amount of staking tokens
83
+ * for delegations which are withdrawn after a slash has occurred.
84
+ */
85
+ export interface ValidatorSlashEvent {
86
+ validatorPeriod: Long;
87
+ fraction: string;
88
+ }
89
+
90
+ /** ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. */
91
+ export interface ValidatorSlashEvents {
92
+ validatorSlashEvents: ValidatorSlashEvent[];
93
+ }
94
+
95
+ /** FeePool is the global fee pool for distribution. */
96
+ export interface FeePool {
97
+ communityPool: DecCoin[];
98
+ }
99
+
100
+ /**
101
+ * CommunityPoolSpendProposal details a proposal for use of community funds,
102
+ * together with how many coins are proposed to be spent, and to which
103
+ * recipient account.
104
+ *
105
+ * Deprecated: Do not use. As of the Cosmos SDK release v0.47.x, there is no
106
+ * longer a need for an explicit CommunityPoolSpendProposal. To spend community
107
+ * pool funds, a simple MsgCommunityPoolSpend can be invoked from the x/gov
108
+ * module via a v1 governance proposal.
109
+ *
110
+ * @deprecated
111
+ */
112
+ export interface CommunityPoolSpendProposal {
113
+ title: string;
114
+ description: string;
115
+ recipient: string;
116
+ amount: Coin[];
117
+ }
118
+
119
+ /**
120
+ * DelegatorStartingInfo represents the starting info for a delegator reward
121
+ * period. It tracks the previous validator period, the delegation's amount of
122
+ * staking token, and the creation height (to check later on if any slashes have
123
+ * occurred). NOTE: Even though validators are slashed to whole staking tokens,
124
+ * the delegators within the validator may be left with less than a full token,
125
+ * thus sdk.Dec is used.
126
+ */
127
+ export interface DelegatorStartingInfo {
128
+ previousPeriod: Long;
129
+ stake: string;
130
+ height: Long;
131
+ }
132
+
133
+ /**
134
+ * DelegationDelegatorReward represents the properties
135
+ * of a delegator's delegation reward.
136
+ */
137
+ export interface DelegationDelegatorReward {
138
+ validatorAddress: string;
139
+ reward: DecCoin[];
140
+ }
141
+
142
+ /**
143
+ * CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal
144
+ * with a deposit
145
+ */
146
+ export interface CommunityPoolSpendProposalWithDeposit {
147
+ title: string;
148
+ description: string;
149
+ recipient: string;
150
+ amount: string;
151
+ deposit: string;
152
+ }
153
+
154
+ function createBaseParams(): Params {
155
+ return { communityTax: "", baseProposerReward: "", bonusProposerReward: "", withdrawAddrEnabled: false };
156
+ }
157
+
158
+ export const Params = {
159
+ encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
160
+ if (message.communityTax !== "") {
161
+ writer.uint32(10).string(message.communityTax);
162
+ }
163
+ if (message.baseProposerReward !== "") {
164
+ writer.uint32(18).string(message.baseProposerReward);
165
+ }
166
+ if (message.bonusProposerReward !== "") {
167
+ writer.uint32(26).string(message.bonusProposerReward);
168
+ }
169
+ if (message.withdrawAddrEnabled !== false) {
170
+ writer.uint32(32).bool(message.withdrawAddrEnabled);
171
+ }
172
+ return writer;
173
+ },
174
+
175
+ decode(input: _m0.Reader | Uint8Array, length?: number): Params {
176
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
177
+ let end = length === undefined ? reader.len : reader.pos + length;
178
+ const message = createBaseParams();
179
+ while (reader.pos < end) {
180
+ const tag = reader.uint32();
181
+ switch (tag >>> 3) {
182
+ case 1:
183
+ if (tag !== 10) {
184
+ break;
185
+ }
186
+
187
+ message.communityTax = reader.string();
188
+ continue;
189
+ case 2:
190
+ if (tag !== 18) {
191
+ break;
192
+ }
193
+
194
+ message.baseProposerReward = reader.string();
195
+ continue;
196
+ case 3:
197
+ if (tag !== 26) {
198
+ break;
199
+ }
200
+
201
+ message.bonusProposerReward = reader.string();
202
+ continue;
203
+ case 4:
204
+ if (tag !== 32) {
205
+ break;
206
+ }
207
+
208
+ message.withdrawAddrEnabled = reader.bool();
209
+ continue;
210
+ }
211
+ if ((tag & 7) === 4 || tag === 0) {
212
+ break;
213
+ }
214
+ reader.skipType(tag & 7);
215
+ }
216
+ return message;
217
+ },
218
+
219
+ fromJSON(object: any): Params {
220
+ return {
221
+ communityTax: isSet(object.communityTax) ? globalThis.String(object.communityTax) : "",
222
+ baseProposerReward: isSet(object.baseProposerReward) ? globalThis.String(object.baseProposerReward) : "",
223
+ bonusProposerReward: isSet(object.bonusProposerReward) ? globalThis.String(object.bonusProposerReward) : "",
224
+ withdrawAddrEnabled: isSet(object.withdrawAddrEnabled) ? globalThis.Boolean(object.withdrawAddrEnabled) : false,
225
+ };
226
+ },
227
+
228
+ toJSON(message: Params): unknown {
229
+ const obj: any = {};
230
+ if (message.communityTax !== "") {
231
+ obj.communityTax = message.communityTax;
232
+ }
233
+ if (message.baseProposerReward !== "") {
234
+ obj.baseProposerReward = message.baseProposerReward;
235
+ }
236
+ if (message.bonusProposerReward !== "") {
237
+ obj.bonusProposerReward = message.bonusProposerReward;
238
+ }
239
+ if (message.withdrawAddrEnabled !== false) {
240
+ obj.withdrawAddrEnabled = message.withdrawAddrEnabled;
241
+ }
242
+ return obj;
243
+ },
244
+
245
+ create<I extends Exact<DeepPartial<Params>, I>>(base?: I): Params {
246
+ return Params.fromPartial(base ?? ({} as any));
247
+ },
248
+ fromPartial<I extends Exact<DeepPartial<Params>, I>>(object: I): Params {
249
+ const message = createBaseParams();
250
+ message.communityTax = object.communityTax ?? "";
251
+ message.baseProposerReward = object.baseProposerReward ?? "";
252
+ message.bonusProposerReward = object.bonusProposerReward ?? "";
253
+ message.withdrawAddrEnabled = object.withdrawAddrEnabled ?? false;
254
+ return message;
255
+ },
256
+ };
257
+
258
+ function createBaseValidatorHistoricalRewards(): ValidatorHistoricalRewards {
259
+ return { cumulativeRewardRatio: [], referenceCount: 0 };
260
+ }
261
+
262
+ export const ValidatorHistoricalRewards = {
263
+ encode(message: ValidatorHistoricalRewards, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
264
+ for (const v of message.cumulativeRewardRatio) {
265
+ DecCoin.encode(v!, writer.uint32(10).fork()).ldelim();
266
+ }
267
+ if (message.referenceCount !== 0) {
268
+ writer.uint32(16).uint32(message.referenceCount);
269
+ }
270
+ return writer;
271
+ },
272
+
273
+ decode(input: _m0.Reader | Uint8Array, length?: number): ValidatorHistoricalRewards {
274
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
275
+ let end = length === undefined ? reader.len : reader.pos + length;
276
+ const message = createBaseValidatorHistoricalRewards();
277
+ while (reader.pos < end) {
278
+ const tag = reader.uint32();
279
+ switch (tag >>> 3) {
280
+ case 1:
281
+ if (tag !== 10) {
282
+ break;
283
+ }
284
+
285
+ message.cumulativeRewardRatio.push(DecCoin.decode(reader, reader.uint32()));
286
+ continue;
287
+ case 2:
288
+ if (tag !== 16) {
289
+ break;
290
+ }
291
+
292
+ message.referenceCount = reader.uint32();
293
+ continue;
294
+ }
295
+ if ((tag & 7) === 4 || tag === 0) {
296
+ break;
297
+ }
298
+ reader.skipType(tag & 7);
299
+ }
300
+ return message;
301
+ },
302
+
303
+ fromJSON(object: any): ValidatorHistoricalRewards {
304
+ return {
305
+ cumulativeRewardRatio: globalThis.Array.isArray(object?.cumulativeRewardRatio)
306
+ ? object.cumulativeRewardRatio.map((e: any) => DecCoin.fromJSON(e))
307
+ : [],
308
+ referenceCount: isSet(object.referenceCount) ? globalThis.Number(object.referenceCount) : 0,
309
+ };
310
+ },
311
+
312
+ toJSON(message: ValidatorHistoricalRewards): unknown {
313
+ const obj: any = {};
314
+ if (message.cumulativeRewardRatio?.length) {
315
+ obj.cumulativeRewardRatio = message.cumulativeRewardRatio.map((e) => DecCoin.toJSON(e));
316
+ }
317
+ if (message.referenceCount !== 0) {
318
+ obj.referenceCount = Math.round(message.referenceCount);
319
+ }
320
+ return obj;
321
+ },
322
+
323
+ create<I extends Exact<DeepPartial<ValidatorHistoricalRewards>, I>>(base?: I): ValidatorHistoricalRewards {
324
+ return ValidatorHistoricalRewards.fromPartial(base ?? ({} as any));
325
+ },
326
+ fromPartial<I extends Exact<DeepPartial<ValidatorHistoricalRewards>, I>>(object: I): ValidatorHistoricalRewards {
327
+ const message = createBaseValidatorHistoricalRewards();
328
+ message.cumulativeRewardRatio = object.cumulativeRewardRatio?.map((e) => DecCoin.fromPartial(e)) || [];
329
+ message.referenceCount = object.referenceCount ?? 0;
330
+ return message;
331
+ },
332
+ };
333
+
334
+ function createBaseValidatorCurrentRewards(): ValidatorCurrentRewards {
335
+ return { rewards: [], period: Long.UZERO };
336
+ }
337
+
338
+ export const ValidatorCurrentRewards = {
339
+ encode(message: ValidatorCurrentRewards, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
340
+ for (const v of message.rewards) {
341
+ DecCoin.encode(v!, writer.uint32(10).fork()).ldelim();
342
+ }
343
+ if (!message.period.equals(Long.UZERO)) {
344
+ writer.uint32(16).uint64(message.period);
345
+ }
346
+ return writer;
347
+ },
348
+
349
+ decode(input: _m0.Reader | Uint8Array, length?: number): ValidatorCurrentRewards {
350
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
351
+ let end = length === undefined ? reader.len : reader.pos + length;
352
+ const message = createBaseValidatorCurrentRewards();
353
+ while (reader.pos < end) {
354
+ const tag = reader.uint32();
355
+ switch (tag >>> 3) {
356
+ case 1:
357
+ if (tag !== 10) {
358
+ break;
359
+ }
360
+
361
+ message.rewards.push(DecCoin.decode(reader, reader.uint32()));
362
+ continue;
363
+ case 2:
364
+ if (tag !== 16) {
365
+ break;
366
+ }
367
+
368
+ message.period = reader.uint64() as Long;
369
+ continue;
370
+ }
371
+ if ((tag & 7) === 4 || tag === 0) {
372
+ break;
373
+ }
374
+ reader.skipType(tag & 7);
375
+ }
376
+ return message;
377
+ },
378
+
379
+ fromJSON(object: any): ValidatorCurrentRewards {
380
+ return {
381
+ rewards: globalThis.Array.isArray(object?.rewards) ? object.rewards.map((e: any) => DecCoin.fromJSON(e)) : [],
382
+ period: isSet(object.period) ? Long.fromValue(object.period) : Long.UZERO,
383
+ };
384
+ },
385
+
386
+ toJSON(message: ValidatorCurrentRewards): unknown {
387
+ const obj: any = {};
388
+ if (message.rewards?.length) {
389
+ obj.rewards = message.rewards.map((e) => DecCoin.toJSON(e));
390
+ }
391
+ if (!message.period.equals(Long.UZERO)) {
392
+ obj.period = (message.period || Long.UZERO).toString();
393
+ }
394
+ return obj;
395
+ },
396
+
397
+ create<I extends Exact<DeepPartial<ValidatorCurrentRewards>, I>>(base?: I): ValidatorCurrentRewards {
398
+ return ValidatorCurrentRewards.fromPartial(base ?? ({} as any));
399
+ },
400
+ fromPartial<I extends Exact<DeepPartial<ValidatorCurrentRewards>, I>>(object: I): ValidatorCurrentRewards {
401
+ const message = createBaseValidatorCurrentRewards();
402
+ message.rewards = object.rewards?.map((e) => DecCoin.fromPartial(e)) || [];
403
+ message.period = (object.period !== undefined && object.period !== null)
404
+ ? Long.fromValue(object.period)
405
+ : Long.UZERO;
406
+ return message;
407
+ },
408
+ };
409
+
410
+ function createBaseValidatorAccumulatedCommission(): ValidatorAccumulatedCommission {
411
+ return { commission: [] };
412
+ }
413
+
414
+ export const ValidatorAccumulatedCommission = {
415
+ encode(message: ValidatorAccumulatedCommission, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
416
+ for (const v of message.commission) {
417
+ DecCoin.encode(v!, writer.uint32(10).fork()).ldelim();
418
+ }
419
+ return writer;
420
+ },
421
+
422
+ decode(input: _m0.Reader | Uint8Array, length?: number): ValidatorAccumulatedCommission {
423
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
424
+ let end = length === undefined ? reader.len : reader.pos + length;
425
+ const message = createBaseValidatorAccumulatedCommission();
426
+ while (reader.pos < end) {
427
+ const tag = reader.uint32();
428
+ switch (tag >>> 3) {
429
+ case 1:
430
+ if (tag !== 10) {
431
+ break;
432
+ }
433
+
434
+ message.commission.push(DecCoin.decode(reader, reader.uint32()));
435
+ continue;
436
+ }
437
+ if ((tag & 7) === 4 || tag === 0) {
438
+ break;
439
+ }
440
+ reader.skipType(tag & 7);
441
+ }
442
+ return message;
443
+ },
444
+
445
+ fromJSON(object: any): ValidatorAccumulatedCommission {
446
+ return {
447
+ commission: globalThis.Array.isArray(object?.commission)
448
+ ? object.commission.map((e: any) => DecCoin.fromJSON(e))
449
+ : [],
450
+ };
451
+ },
452
+
453
+ toJSON(message: ValidatorAccumulatedCommission): unknown {
454
+ const obj: any = {};
455
+ if (message.commission?.length) {
456
+ obj.commission = message.commission.map((e) => DecCoin.toJSON(e));
457
+ }
458
+ return obj;
459
+ },
460
+
461
+ create<I extends Exact<DeepPartial<ValidatorAccumulatedCommission>, I>>(base?: I): ValidatorAccumulatedCommission {
462
+ return ValidatorAccumulatedCommission.fromPartial(base ?? ({} as any));
463
+ },
464
+ fromPartial<I extends Exact<DeepPartial<ValidatorAccumulatedCommission>, I>>(
465
+ object: I,
466
+ ): ValidatorAccumulatedCommission {
467
+ const message = createBaseValidatorAccumulatedCommission();
468
+ message.commission = object.commission?.map((e) => DecCoin.fromPartial(e)) || [];
469
+ return message;
470
+ },
471
+ };
472
+
473
+ function createBaseValidatorOutstandingRewards(): ValidatorOutstandingRewards {
474
+ return { rewards: [] };
475
+ }
476
+
477
+ export const ValidatorOutstandingRewards = {
478
+ encode(message: ValidatorOutstandingRewards, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
479
+ for (const v of message.rewards) {
480
+ DecCoin.encode(v!, writer.uint32(10).fork()).ldelim();
481
+ }
482
+ return writer;
483
+ },
484
+
485
+ decode(input: _m0.Reader | Uint8Array, length?: number): ValidatorOutstandingRewards {
486
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
487
+ let end = length === undefined ? reader.len : reader.pos + length;
488
+ const message = createBaseValidatorOutstandingRewards();
489
+ while (reader.pos < end) {
490
+ const tag = reader.uint32();
491
+ switch (tag >>> 3) {
492
+ case 1:
493
+ if (tag !== 10) {
494
+ break;
495
+ }
496
+
497
+ message.rewards.push(DecCoin.decode(reader, reader.uint32()));
498
+ continue;
499
+ }
500
+ if ((tag & 7) === 4 || tag === 0) {
501
+ break;
502
+ }
503
+ reader.skipType(tag & 7);
504
+ }
505
+ return message;
506
+ },
507
+
508
+ fromJSON(object: any): ValidatorOutstandingRewards {
509
+ return {
510
+ rewards: globalThis.Array.isArray(object?.rewards) ? object.rewards.map((e: any) => DecCoin.fromJSON(e)) : [],
511
+ };
512
+ },
513
+
514
+ toJSON(message: ValidatorOutstandingRewards): unknown {
515
+ const obj: any = {};
516
+ if (message.rewards?.length) {
517
+ obj.rewards = message.rewards.map((e) => DecCoin.toJSON(e));
518
+ }
519
+ return obj;
520
+ },
521
+
522
+ create<I extends Exact<DeepPartial<ValidatorOutstandingRewards>, I>>(base?: I): ValidatorOutstandingRewards {
523
+ return ValidatorOutstandingRewards.fromPartial(base ?? ({} as any));
524
+ },
525
+ fromPartial<I extends Exact<DeepPartial<ValidatorOutstandingRewards>, I>>(object: I): ValidatorOutstandingRewards {
526
+ const message = createBaseValidatorOutstandingRewards();
527
+ message.rewards = object.rewards?.map((e) => DecCoin.fromPartial(e)) || [];
528
+ return message;
529
+ },
530
+ };
531
+
532
+ function createBaseValidatorSlashEvent(): ValidatorSlashEvent {
533
+ return { validatorPeriod: Long.UZERO, fraction: "" };
534
+ }
535
+
536
+ export const ValidatorSlashEvent = {
537
+ encode(message: ValidatorSlashEvent, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
538
+ if (!message.validatorPeriod.equals(Long.UZERO)) {
539
+ writer.uint32(8).uint64(message.validatorPeriod);
540
+ }
541
+ if (message.fraction !== "") {
542
+ writer.uint32(18).string(message.fraction);
543
+ }
544
+ return writer;
545
+ },
546
+
547
+ decode(input: _m0.Reader | Uint8Array, length?: number): ValidatorSlashEvent {
548
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
549
+ let end = length === undefined ? reader.len : reader.pos + length;
550
+ const message = createBaseValidatorSlashEvent();
551
+ while (reader.pos < end) {
552
+ const tag = reader.uint32();
553
+ switch (tag >>> 3) {
554
+ case 1:
555
+ if (tag !== 8) {
556
+ break;
557
+ }
558
+
559
+ message.validatorPeriod = reader.uint64() as Long;
560
+ continue;
561
+ case 2:
562
+ if (tag !== 18) {
563
+ break;
564
+ }
565
+
566
+ message.fraction = reader.string();
567
+ continue;
568
+ }
569
+ if ((tag & 7) === 4 || tag === 0) {
570
+ break;
571
+ }
572
+ reader.skipType(tag & 7);
573
+ }
574
+ return message;
575
+ },
576
+
577
+ fromJSON(object: any): ValidatorSlashEvent {
578
+ return {
579
+ validatorPeriod: isSet(object.validatorPeriod) ? Long.fromValue(object.validatorPeriod) : Long.UZERO,
580
+ fraction: isSet(object.fraction) ? globalThis.String(object.fraction) : "",
581
+ };
582
+ },
583
+
584
+ toJSON(message: ValidatorSlashEvent): unknown {
585
+ const obj: any = {};
586
+ if (!message.validatorPeriod.equals(Long.UZERO)) {
587
+ obj.validatorPeriod = (message.validatorPeriod || Long.UZERO).toString();
588
+ }
589
+ if (message.fraction !== "") {
590
+ obj.fraction = message.fraction;
591
+ }
592
+ return obj;
593
+ },
594
+
595
+ create<I extends Exact<DeepPartial<ValidatorSlashEvent>, I>>(base?: I): ValidatorSlashEvent {
596
+ return ValidatorSlashEvent.fromPartial(base ?? ({} as any));
597
+ },
598
+ fromPartial<I extends Exact<DeepPartial<ValidatorSlashEvent>, I>>(object: I): ValidatorSlashEvent {
599
+ const message = createBaseValidatorSlashEvent();
600
+ message.validatorPeriod = (object.validatorPeriod !== undefined && object.validatorPeriod !== null)
601
+ ? Long.fromValue(object.validatorPeriod)
602
+ : Long.UZERO;
603
+ message.fraction = object.fraction ?? "";
604
+ return message;
605
+ },
606
+ };
607
+
608
+ function createBaseValidatorSlashEvents(): ValidatorSlashEvents {
609
+ return { validatorSlashEvents: [] };
610
+ }
611
+
612
+ export const ValidatorSlashEvents = {
613
+ encode(message: ValidatorSlashEvents, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
614
+ for (const v of message.validatorSlashEvents) {
615
+ ValidatorSlashEvent.encode(v!, writer.uint32(10).fork()).ldelim();
616
+ }
617
+ return writer;
618
+ },
619
+
620
+ decode(input: _m0.Reader | Uint8Array, length?: number): ValidatorSlashEvents {
621
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
622
+ let end = length === undefined ? reader.len : reader.pos + length;
623
+ const message = createBaseValidatorSlashEvents();
624
+ while (reader.pos < end) {
625
+ const tag = reader.uint32();
626
+ switch (tag >>> 3) {
627
+ case 1:
628
+ if (tag !== 10) {
629
+ break;
630
+ }
631
+
632
+ message.validatorSlashEvents.push(ValidatorSlashEvent.decode(reader, reader.uint32()));
633
+ continue;
634
+ }
635
+ if ((tag & 7) === 4 || tag === 0) {
636
+ break;
637
+ }
638
+ reader.skipType(tag & 7);
639
+ }
640
+ return message;
641
+ },
642
+
643
+ fromJSON(object: any): ValidatorSlashEvents {
644
+ return {
645
+ validatorSlashEvents: globalThis.Array.isArray(object?.validatorSlashEvents)
646
+ ? object.validatorSlashEvents.map((e: any) => ValidatorSlashEvent.fromJSON(e))
647
+ : [],
648
+ };
649
+ },
650
+
651
+ toJSON(message: ValidatorSlashEvents): unknown {
652
+ const obj: any = {};
653
+ if (message.validatorSlashEvents?.length) {
654
+ obj.validatorSlashEvents = message.validatorSlashEvents.map((e) => ValidatorSlashEvent.toJSON(e));
655
+ }
656
+ return obj;
657
+ },
658
+
659
+ create<I extends Exact<DeepPartial<ValidatorSlashEvents>, I>>(base?: I): ValidatorSlashEvents {
660
+ return ValidatorSlashEvents.fromPartial(base ?? ({} as any));
661
+ },
662
+ fromPartial<I extends Exact<DeepPartial<ValidatorSlashEvents>, I>>(object: I): ValidatorSlashEvents {
663
+ const message = createBaseValidatorSlashEvents();
664
+ message.validatorSlashEvents = object.validatorSlashEvents?.map((e) => ValidatorSlashEvent.fromPartial(e)) || [];
665
+ return message;
666
+ },
667
+ };
668
+
669
+ function createBaseFeePool(): FeePool {
670
+ return { communityPool: [] };
671
+ }
672
+
673
+ export const FeePool = {
674
+ encode(message: FeePool, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
675
+ for (const v of message.communityPool) {
676
+ DecCoin.encode(v!, writer.uint32(10).fork()).ldelim();
677
+ }
678
+ return writer;
679
+ },
680
+
681
+ decode(input: _m0.Reader | Uint8Array, length?: number): FeePool {
682
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
683
+ let end = length === undefined ? reader.len : reader.pos + length;
684
+ const message = createBaseFeePool();
685
+ while (reader.pos < end) {
686
+ const tag = reader.uint32();
687
+ switch (tag >>> 3) {
688
+ case 1:
689
+ if (tag !== 10) {
690
+ break;
691
+ }
692
+
693
+ message.communityPool.push(DecCoin.decode(reader, reader.uint32()));
694
+ continue;
695
+ }
696
+ if ((tag & 7) === 4 || tag === 0) {
697
+ break;
698
+ }
699
+ reader.skipType(tag & 7);
700
+ }
701
+ return message;
702
+ },
703
+
704
+ fromJSON(object: any): FeePool {
705
+ return {
706
+ communityPool: globalThis.Array.isArray(object?.communityPool)
707
+ ? object.communityPool.map((e: any) => DecCoin.fromJSON(e))
708
+ : [],
709
+ };
710
+ },
711
+
712
+ toJSON(message: FeePool): unknown {
713
+ const obj: any = {};
714
+ if (message.communityPool?.length) {
715
+ obj.communityPool = message.communityPool.map((e) => DecCoin.toJSON(e));
716
+ }
717
+ return obj;
718
+ },
719
+
720
+ create<I extends Exact<DeepPartial<FeePool>, I>>(base?: I): FeePool {
721
+ return FeePool.fromPartial(base ?? ({} as any));
722
+ },
723
+ fromPartial<I extends Exact<DeepPartial<FeePool>, I>>(object: I): FeePool {
724
+ const message = createBaseFeePool();
725
+ message.communityPool = object.communityPool?.map((e) => DecCoin.fromPartial(e)) || [];
726
+ return message;
727
+ },
728
+ };
729
+
730
+ function createBaseCommunityPoolSpendProposal(): CommunityPoolSpendProposal {
731
+ return { title: "", description: "", recipient: "", amount: [] };
732
+ }
733
+
734
+ export const CommunityPoolSpendProposal = {
735
+ encode(message: CommunityPoolSpendProposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
736
+ if (message.title !== "") {
737
+ writer.uint32(10).string(message.title);
738
+ }
739
+ if (message.description !== "") {
740
+ writer.uint32(18).string(message.description);
741
+ }
742
+ if (message.recipient !== "") {
743
+ writer.uint32(26).string(message.recipient);
744
+ }
745
+ for (const v of message.amount) {
746
+ Coin.encode(v!, writer.uint32(34).fork()).ldelim();
747
+ }
748
+ return writer;
749
+ },
750
+
751
+ decode(input: _m0.Reader | Uint8Array, length?: number): CommunityPoolSpendProposal {
752
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
753
+ let end = length === undefined ? reader.len : reader.pos + length;
754
+ const message = createBaseCommunityPoolSpendProposal();
755
+ while (reader.pos < end) {
756
+ const tag = reader.uint32();
757
+ switch (tag >>> 3) {
758
+ case 1:
759
+ if (tag !== 10) {
760
+ break;
761
+ }
762
+
763
+ message.title = reader.string();
764
+ continue;
765
+ case 2:
766
+ if (tag !== 18) {
767
+ break;
768
+ }
769
+
770
+ message.description = reader.string();
771
+ continue;
772
+ case 3:
773
+ if (tag !== 26) {
774
+ break;
775
+ }
776
+
777
+ message.recipient = reader.string();
778
+ continue;
779
+ case 4:
780
+ if (tag !== 34) {
781
+ break;
782
+ }
783
+
784
+ message.amount.push(Coin.decode(reader, reader.uint32()));
785
+ continue;
786
+ }
787
+ if ((tag & 7) === 4 || tag === 0) {
788
+ break;
789
+ }
790
+ reader.skipType(tag & 7);
791
+ }
792
+ return message;
793
+ },
794
+
795
+ fromJSON(object: any): CommunityPoolSpendProposal {
796
+ return {
797
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
798
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
799
+ recipient: isSet(object.recipient) ? globalThis.String(object.recipient) : "",
800
+ amount: globalThis.Array.isArray(object?.amount) ? object.amount.map((e: any) => Coin.fromJSON(e)) : [],
801
+ };
802
+ },
803
+
804
+ toJSON(message: CommunityPoolSpendProposal): unknown {
805
+ const obj: any = {};
806
+ if (message.title !== "") {
807
+ obj.title = message.title;
808
+ }
809
+ if (message.description !== "") {
810
+ obj.description = message.description;
811
+ }
812
+ if (message.recipient !== "") {
813
+ obj.recipient = message.recipient;
814
+ }
815
+ if (message.amount?.length) {
816
+ obj.amount = message.amount.map((e) => Coin.toJSON(e));
817
+ }
818
+ return obj;
819
+ },
820
+
821
+ create<I extends Exact<DeepPartial<CommunityPoolSpendProposal>, I>>(base?: I): CommunityPoolSpendProposal {
822
+ return CommunityPoolSpendProposal.fromPartial(base ?? ({} as any));
823
+ },
824
+ fromPartial<I extends Exact<DeepPartial<CommunityPoolSpendProposal>, I>>(object: I): CommunityPoolSpendProposal {
825
+ const message = createBaseCommunityPoolSpendProposal();
826
+ message.title = object.title ?? "";
827
+ message.description = object.description ?? "";
828
+ message.recipient = object.recipient ?? "";
829
+ message.amount = object.amount?.map((e) => Coin.fromPartial(e)) || [];
830
+ return message;
831
+ },
832
+ };
833
+
834
+ function createBaseDelegatorStartingInfo(): DelegatorStartingInfo {
835
+ return { previousPeriod: Long.UZERO, stake: "", height: Long.UZERO };
836
+ }
837
+
838
+ export const DelegatorStartingInfo = {
839
+ encode(message: DelegatorStartingInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
840
+ if (!message.previousPeriod.equals(Long.UZERO)) {
841
+ writer.uint32(8).uint64(message.previousPeriod);
842
+ }
843
+ if (message.stake !== "") {
844
+ writer.uint32(18).string(message.stake);
845
+ }
846
+ if (!message.height.equals(Long.UZERO)) {
847
+ writer.uint32(24).uint64(message.height);
848
+ }
849
+ return writer;
850
+ },
851
+
852
+ decode(input: _m0.Reader | Uint8Array, length?: number): DelegatorStartingInfo {
853
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
854
+ let end = length === undefined ? reader.len : reader.pos + length;
855
+ const message = createBaseDelegatorStartingInfo();
856
+ while (reader.pos < end) {
857
+ const tag = reader.uint32();
858
+ switch (tag >>> 3) {
859
+ case 1:
860
+ if (tag !== 8) {
861
+ break;
862
+ }
863
+
864
+ message.previousPeriod = reader.uint64() as Long;
865
+ continue;
866
+ case 2:
867
+ if (tag !== 18) {
868
+ break;
869
+ }
870
+
871
+ message.stake = reader.string();
872
+ continue;
873
+ case 3:
874
+ if (tag !== 24) {
875
+ break;
876
+ }
877
+
878
+ message.height = reader.uint64() as Long;
879
+ continue;
880
+ }
881
+ if ((tag & 7) === 4 || tag === 0) {
882
+ break;
883
+ }
884
+ reader.skipType(tag & 7);
885
+ }
886
+ return message;
887
+ },
888
+
889
+ fromJSON(object: any): DelegatorStartingInfo {
890
+ return {
891
+ previousPeriod: isSet(object.previousPeriod) ? Long.fromValue(object.previousPeriod) : Long.UZERO,
892
+ stake: isSet(object.stake) ? globalThis.String(object.stake) : "",
893
+ height: isSet(object.height) ? Long.fromValue(object.height) : Long.UZERO,
894
+ };
895
+ },
896
+
897
+ toJSON(message: DelegatorStartingInfo): unknown {
898
+ const obj: any = {};
899
+ if (!message.previousPeriod.equals(Long.UZERO)) {
900
+ obj.previousPeriod = (message.previousPeriod || Long.UZERO).toString();
901
+ }
902
+ if (message.stake !== "") {
903
+ obj.stake = message.stake;
904
+ }
905
+ if (!message.height.equals(Long.UZERO)) {
906
+ obj.height = (message.height || Long.UZERO).toString();
907
+ }
908
+ return obj;
909
+ },
910
+
911
+ create<I extends Exact<DeepPartial<DelegatorStartingInfo>, I>>(base?: I): DelegatorStartingInfo {
912
+ return DelegatorStartingInfo.fromPartial(base ?? ({} as any));
913
+ },
914
+ fromPartial<I extends Exact<DeepPartial<DelegatorStartingInfo>, I>>(object: I): DelegatorStartingInfo {
915
+ const message = createBaseDelegatorStartingInfo();
916
+ message.previousPeriod = (object.previousPeriod !== undefined && object.previousPeriod !== null)
917
+ ? Long.fromValue(object.previousPeriod)
918
+ : Long.UZERO;
919
+ message.stake = object.stake ?? "";
920
+ message.height = (object.height !== undefined && object.height !== null)
921
+ ? Long.fromValue(object.height)
922
+ : Long.UZERO;
923
+ return message;
924
+ },
925
+ };
926
+
927
+ function createBaseDelegationDelegatorReward(): DelegationDelegatorReward {
928
+ return { validatorAddress: "", reward: [] };
929
+ }
930
+
931
+ export const DelegationDelegatorReward = {
932
+ encode(message: DelegationDelegatorReward, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
933
+ if (message.validatorAddress !== "") {
934
+ writer.uint32(10).string(message.validatorAddress);
935
+ }
936
+ for (const v of message.reward) {
937
+ DecCoin.encode(v!, writer.uint32(18).fork()).ldelim();
938
+ }
939
+ return writer;
940
+ },
941
+
942
+ decode(input: _m0.Reader | Uint8Array, length?: number): DelegationDelegatorReward {
943
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
944
+ let end = length === undefined ? reader.len : reader.pos + length;
945
+ const message = createBaseDelegationDelegatorReward();
946
+ while (reader.pos < end) {
947
+ const tag = reader.uint32();
948
+ switch (tag >>> 3) {
949
+ case 1:
950
+ if (tag !== 10) {
951
+ break;
952
+ }
953
+
954
+ message.validatorAddress = reader.string();
955
+ continue;
956
+ case 2:
957
+ if (tag !== 18) {
958
+ break;
959
+ }
960
+
961
+ message.reward.push(DecCoin.decode(reader, reader.uint32()));
962
+ continue;
963
+ }
964
+ if ((tag & 7) === 4 || tag === 0) {
965
+ break;
966
+ }
967
+ reader.skipType(tag & 7);
968
+ }
969
+ return message;
970
+ },
971
+
972
+ fromJSON(object: any): DelegationDelegatorReward {
973
+ return {
974
+ validatorAddress: isSet(object.validatorAddress) ? globalThis.String(object.validatorAddress) : "",
975
+ reward: globalThis.Array.isArray(object?.reward) ? object.reward.map((e: any) => DecCoin.fromJSON(e)) : [],
976
+ };
977
+ },
978
+
979
+ toJSON(message: DelegationDelegatorReward): unknown {
980
+ const obj: any = {};
981
+ if (message.validatorAddress !== "") {
982
+ obj.validatorAddress = message.validatorAddress;
983
+ }
984
+ if (message.reward?.length) {
985
+ obj.reward = message.reward.map((e) => DecCoin.toJSON(e));
986
+ }
987
+ return obj;
988
+ },
989
+
990
+ create<I extends Exact<DeepPartial<DelegationDelegatorReward>, I>>(base?: I): DelegationDelegatorReward {
991
+ return DelegationDelegatorReward.fromPartial(base ?? ({} as any));
992
+ },
993
+ fromPartial<I extends Exact<DeepPartial<DelegationDelegatorReward>, I>>(object: I): DelegationDelegatorReward {
994
+ const message = createBaseDelegationDelegatorReward();
995
+ message.validatorAddress = object.validatorAddress ?? "";
996
+ message.reward = object.reward?.map((e) => DecCoin.fromPartial(e)) || [];
997
+ return message;
998
+ },
999
+ };
1000
+
1001
+ function createBaseCommunityPoolSpendProposalWithDeposit(): CommunityPoolSpendProposalWithDeposit {
1002
+ return { title: "", description: "", recipient: "", amount: "", deposit: "" };
1003
+ }
1004
+
1005
+ export const CommunityPoolSpendProposalWithDeposit = {
1006
+ encode(message: CommunityPoolSpendProposalWithDeposit, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
1007
+ if (message.title !== "") {
1008
+ writer.uint32(10).string(message.title);
1009
+ }
1010
+ if (message.description !== "") {
1011
+ writer.uint32(18).string(message.description);
1012
+ }
1013
+ if (message.recipient !== "") {
1014
+ writer.uint32(26).string(message.recipient);
1015
+ }
1016
+ if (message.amount !== "") {
1017
+ writer.uint32(34).string(message.amount);
1018
+ }
1019
+ if (message.deposit !== "") {
1020
+ writer.uint32(42).string(message.deposit);
1021
+ }
1022
+ return writer;
1023
+ },
1024
+
1025
+ decode(input: _m0.Reader | Uint8Array, length?: number): CommunityPoolSpendProposalWithDeposit {
1026
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
1027
+ let end = length === undefined ? reader.len : reader.pos + length;
1028
+ const message = createBaseCommunityPoolSpendProposalWithDeposit();
1029
+ while (reader.pos < end) {
1030
+ const tag = reader.uint32();
1031
+ switch (tag >>> 3) {
1032
+ case 1:
1033
+ if (tag !== 10) {
1034
+ break;
1035
+ }
1036
+
1037
+ message.title = reader.string();
1038
+ continue;
1039
+ case 2:
1040
+ if (tag !== 18) {
1041
+ break;
1042
+ }
1043
+
1044
+ message.description = reader.string();
1045
+ continue;
1046
+ case 3:
1047
+ if (tag !== 26) {
1048
+ break;
1049
+ }
1050
+
1051
+ message.recipient = reader.string();
1052
+ continue;
1053
+ case 4:
1054
+ if (tag !== 34) {
1055
+ break;
1056
+ }
1057
+
1058
+ message.amount = reader.string();
1059
+ continue;
1060
+ case 5:
1061
+ if (tag !== 42) {
1062
+ break;
1063
+ }
1064
+
1065
+ message.deposit = reader.string();
1066
+ continue;
1067
+ }
1068
+ if ((tag & 7) === 4 || tag === 0) {
1069
+ break;
1070
+ }
1071
+ reader.skipType(tag & 7);
1072
+ }
1073
+ return message;
1074
+ },
1075
+
1076
+ fromJSON(object: any): CommunityPoolSpendProposalWithDeposit {
1077
+ return {
1078
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
1079
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
1080
+ recipient: isSet(object.recipient) ? globalThis.String(object.recipient) : "",
1081
+ amount: isSet(object.amount) ? globalThis.String(object.amount) : "",
1082
+ deposit: isSet(object.deposit) ? globalThis.String(object.deposit) : "",
1083
+ };
1084
+ },
1085
+
1086
+ toJSON(message: CommunityPoolSpendProposalWithDeposit): unknown {
1087
+ const obj: any = {};
1088
+ if (message.title !== "") {
1089
+ obj.title = message.title;
1090
+ }
1091
+ if (message.description !== "") {
1092
+ obj.description = message.description;
1093
+ }
1094
+ if (message.recipient !== "") {
1095
+ obj.recipient = message.recipient;
1096
+ }
1097
+ if (message.amount !== "") {
1098
+ obj.amount = message.amount;
1099
+ }
1100
+ if (message.deposit !== "") {
1101
+ obj.deposit = message.deposit;
1102
+ }
1103
+ return obj;
1104
+ },
1105
+
1106
+ create<I extends Exact<DeepPartial<CommunityPoolSpendProposalWithDeposit>, I>>(
1107
+ base?: I,
1108
+ ): CommunityPoolSpendProposalWithDeposit {
1109
+ return CommunityPoolSpendProposalWithDeposit.fromPartial(base ?? ({} as any));
1110
+ },
1111
+ fromPartial<I extends Exact<DeepPartial<CommunityPoolSpendProposalWithDeposit>, I>>(
1112
+ object: I,
1113
+ ): CommunityPoolSpendProposalWithDeposit {
1114
+ const message = createBaseCommunityPoolSpendProposalWithDeposit();
1115
+ message.title = object.title ?? "";
1116
+ message.description = object.description ?? "";
1117
+ message.recipient = object.recipient ?? "";
1118
+ message.amount = object.amount ?? "";
1119
+ message.deposit = object.deposit ?? "";
1120
+ return message;
1121
+ },
1122
+ };
1123
+
1124
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
1125
+
1126
+ export type DeepPartial<T> = T extends Builtin ? T
1127
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
1128
+ : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
1129
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
1130
+ : Partial<T>;
1131
+
1132
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
1133
+ export type Exact<P, I extends P> = P extends Builtin ? P
1134
+ : P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
1135
+
1136
+ if (_m0.util.Long !== Long) {
1137
+ _m0.util.Long = Long as any;
1138
+ _m0.configure();
1139
+ }
1140
+
1141
+ function isSet(value: any): boolean {
1142
+ return value !== null && value !== undefined;
1143
+ }