decentralcardgame-cardchain-client-ts 0.0.36 → 0.0.37

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 (141) hide show
  1. package/amino_adapter.d.ts +9 -0
  2. package/amino_adapter.js +22 -0
  3. package/cardchain.cardchain/module.js +53 -52
  4. package/cardchain.featureflag/module.js +3 -2
  5. package/client.js +2 -2
  6. package/cosmos.auth.v1beta1/module.js +2 -1
  7. package/cosmos.authz.v1beta1/module.js +4 -3
  8. package/cosmos.bank.v1beta1/module.js +5 -4
  9. package/cosmos.bank.v1beta1/rest.d.ts +20 -20
  10. package/cosmos.bank.v1beta1/rest.js +16 -16
  11. package/cosmos.circuit.v1/module.js +4 -3
  12. package/cosmos.consensus.v1/module.js +2 -1
  13. package/cosmos.crisis.v1beta1/module.js +3 -2
  14. package/cosmos.distribution.v1beta1/module.js +8 -7
  15. package/cosmos.evidence.v1beta1/module.js +2 -1
  16. package/cosmos.feegrant.v1beta1/module.js +4 -3
  17. package/cosmos.gov.v1/module.js +8 -7
  18. package/cosmos.gov.v1beta1/module.js +5 -4
  19. package/cosmos.group.v1/module.js +17 -14
  20. package/cosmos.group.v1/types.d.ts +2 -1
  21. package/cosmos.group.v1/types.js +2 -1
  22. package/cosmos.mint.v1beta1/module.js +2 -1
  23. package/cosmos.nft.v1beta1/module.js +2 -1
  24. package/cosmos.slashing.v1beta1/module.js +3 -2
  25. package/cosmos.staking.v1beta1/module.js +8 -7
  26. package/cosmos.tx.v1beta1/rest.d.ts +8 -0
  27. package/cosmos.upgrade.v1beta1/module.js +3 -2
  28. package/cosmos.vesting.v1beta1/module.js +4 -3
  29. package/ibc.applications.fee.v1/module.js +5 -4
  30. package/ibc.applications.interchain_accounts.controller.v1/module.js +4 -3
  31. package/ibc.applications.interchain_accounts.host.v1/module.js +3 -2
  32. package/ibc.applications.transfer.v1/module.js +3 -2
  33. package/ibc.core.channel.v1/module.js +20 -19
  34. package/ibc.core.client.v1/module.js +8 -7
  35. package/ibc.core.connection.v1/module.js +6 -5
  36. package/index.d.ts +22 -22
  37. package/index.js +7 -7
  38. package/package.json +1 -1
  39. package/types/cosmos/app/runtime/v1alpha1/module.d.ts +13 -1
  40. package/types/cosmos/app/runtime/v1alpha1/module.js +36 -0
  41. package/types/cosmos/app/v1alpha1/query.d.ts +6 -2
  42. package/types/cosmos/auth/module/v1/module.d.ts +6 -0
  43. package/types/cosmos/auth/module/v1/module.js +18 -1
  44. package/types/cosmos/auth/v1beta1/query.d.ts +21 -107
  45. package/types/cosmos/auth/v1beta1/tx.d.ts +1 -9
  46. package/types/cosmos/authz/v1beta1/authz.d.ts +0 -1
  47. package/types/cosmos/authz/v1beta1/event.d.ts +0 -1
  48. package/types/cosmos/authz/v1beta1/genesis.d.ts +0 -1
  49. package/types/cosmos/authz/v1beta1/query.d.ts +2 -11
  50. package/types/cosmos/authz/v1beta1/tx.d.ts +0 -1
  51. package/types/cosmos/autocli/v1/options.d.ts +21 -1
  52. package/types/cosmos/autocli/v1/options.js +65 -2
  53. package/types/cosmos/bank/v1beta1/authz.d.ts +0 -4
  54. package/types/cosmos/bank/v1beta1/bank.d.ts +2 -14
  55. package/types/cosmos/bank/v1beta1/genesis.d.ts +1 -5
  56. package/types/cosmos/bank/v1beta1/query.d.ts +12 -62
  57. package/types/cosmos/bank/v1beta1/query.js +6 -6
  58. package/types/cosmos/bank/v1beta1/tx.d.ts +2 -18
  59. package/types/cosmos/base/abci/v1beta1/abci.d.ts +2 -12
  60. package/types/cosmos/base/reflection/v2alpha1/reflection.d.ts +0 -1
  61. package/types/cosmos/base/tendermint/v1beta1/query.d.ts +0 -5
  62. package/types/cosmos/benchmark/module/v1/module.d.ts +52 -0
  63. package/types/cosmos/benchmark/module/v1/module.js +289 -0
  64. package/types/cosmos/benchmark/v1/benchmark.d.ts +32 -0
  65. package/types/cosmos/benchmark/v1/benchmark.js +164 -0
  66. package/types/cosmos/benchmark/v1/tx.d.ts +51 -0
  67. package/types/cosmos/benchmark/v1/tx.js +196 -0
  68. package/types/cosmos/consensus/v1/query.d.ts +0 -1
  69. package/types/cosmos/consensus/v1/tx.d.ts +0 -4
  70. package/types/cosmos/{orm/module/v1alpha1 → counter/module/v1}/module.d.ts +4 -6
  71. package/types/cosmos/counter/module/v1/module.js +62 -0
  72. package/types/cosmos/counter/v1/query.d.ts +47 -0
  73. package/types/cosmos/counter/v1/query.js +122 -0
  74. package/types/cosmos/counter/v1/tx.d.ts +52 -0
  75. package/types/cosmos/counter/v1/tx.js +153 -0
  76. package/types/cosmos/crisis/v1beta1/tx.d.ts +1 -9
  77. package/types/cosmos/crypto/hd/v1/hd.d.ts +0 -1
  78. package/types/cosmos/crypto/keyring/v1/record.d.ts +0 -1
  79. package/types/cosmos/crypto/secp256r1/keys.d.ts +0 -1
  80. package/types/cosmos/distribution/v1beta1/query.d.ts +5 -1
  81. package/types/cosmos/distribution/v1beta1/tx.d.ts +4 -22
  82. package/types/cosmos/epochs/module/v1/module.d.ts +25 -0
  83. package/types/cosmos/{orm/module/v1alpha1 → epochs/module/v1}/module.js +2 -2
  84. package/types/cosmos/epochs/v1beta1/events.d.ts +32 -0
  85. package/types/cosmos/epochs/v1beta1/events.js +140 -0
  86. package/types/cosmos/epochs/v1beta1/genesis.d.ts +86 -0
  87. package/types/cosmos/epochs/v1beta1/genesis.js +256 -0
  88. package/types/cosmos/epochs/v1beta1/query.d.ts +73 -0
  89. package/types/cosmos/epochs/v1beta1/query.js +233 -0
  90. package/types/cosmos/evidence/v1beta1/query.d.ts +1 -5
  91. package/types/cosmos/feegrant/v1beta1/feegrant.d.ts +0 -1
  92. package/types/cosmos/feegrant/v1beta1/genesis.d.ts +0 -1
  93. package/types/cosmos/feegrant/v1beta1/query.d.ts +3 -16
  94. package/types/cosmos/feegrant/v1beta1/tx.d.ts +3 -16
  95. package/types/cosmos/gov/v1/genesis.d.ts +1 -8
  96. package/types/cosmos/gov/v1/gov.d.ts +9 -50
  97. package/types/cosmos/gov/v1/gov.js +0 -1
  98. package/types/cosmos/gov/v1/query.d.ts +1 -6
  99. package/types/cosmos/gov/v1/tx.d.ts +6 -37
  100. package/types/cosmos/gov/v1beta1/gov.d.ts +2 -10
  101. package/types/cosmos/gov/v1beta1/tx.d.ts +3 -15
  102. package/types/cosmos/group/v1/events.d.ts +8 -1
  103. package/types/cosmos/group/v1/events.js +68 -0
  104. package/types/cosmos/group/v1/genesis.d.ts +0 -1
  105. package/types/cosmos/group/v1/query.d.ts +3 -16
  106. package/types/cosmos/group/v1/tx.d.ts +2 -11
  107. package/types/cosmos/group/v1/tx.js +0 -1
  108. package/types/cosmos/group/v1/types.d.ts +2 -11
  109. package/types/cosmos/group/v1/types.js +0 -1
  110. package/types/cosmos/mint/v1beta1/tx.d.ts +1 -9
  111. package/types/cosmos/params/v1beta1/query.d.ts +1 -11
  112. package/types/cosmos/protocolpool/module/v1/module.d.ts +27 -0
  113. package/types/cosmos/protocolpool/module/v1/module.js +62 -0
  114. package/types/cosmos/protocolpool/v1/genesis.d.ts +33 -0
  115. package/types/cosmos/protocolpool/v1/genesis.js +84 -0
  116. package/types/cosmos/protocolpool/v1/query.d.ts +108 -0
  117. package/types/cosmos/protocolpool/v1/query.js +420 -0
  118. package/types/cosmos/protocolpool/v1/tx.d.ts +159 -0
  119. package/types/cosmos/protocolpool/v1/tx.js +700 -0
  120. package/types/cosmos/protocolpool/v1/types.d.ts +45 -0
  121. package/types/cosmos/protocolpool/v1/types.js +196 -0
  122. package/types/cosmos/slashing/v1beta1/tx.d.ts +1 -9
  123. package/types/cosmos/staking/v1beta1/authz.d.ts +2 -10
  124. package/types/cosmos/staking/v1beta1/authz.js +1 -5
  125. package/types/cosmos/staking/v1beta1/staking.d.ts +1 -5
  126. package/types/cosmos/staking/v1beta1/tx.d.ts +4 -25
  127. package/types/cosmos/store/snapshots/v1/snapshot.d.ts +5 -25
  128. package/types/cosmos/store/v1beta1/listening.d.ts +0 -2
  129. package/types/cosmos/tx/v1beta1/service.d.ts +6 -52
  130. package/types/cosmos/tx/v1beta1/tx.d.ts +37 -17
  131. package/types/cosmos/tx/v1beta1/tx.js +61 -1
  132. package/types/cosmos/upgrade/v1beta1/query.d.ts +4 -25
  133. package/types/cosmos/upgrade/v1beta1/tx.d.ts +5 -28
  134. package/types/cosmos/vesting/v1beta1/tx.d.ts +1 -15
  135. package/types/cosmos/vesting/v1beta1/vesting.d.ts +0 -2
  136. package/types/cosmos/orm/query/v1alpha1/query.d.ts +0 -148
  137. package/types/cosmos/orm/query/v1alpha1/query.js +0 -705
  138. package/types/cosmos/orm/v1/orm.d.ts +0 -115
  139. package/types/cosmos/orm/v1/orm.js +0 -300
  140. package/types/cosmos/orm/v1alpha1/schema.d.ts +0 -77
  141. package/types/cosmos/orm/v1alpha1/schema.js +0 -243
@@ -0,0 +1,700 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.6.1
4
+ // protoc unknown
5
+ // source: cosmos/protocolpool/v1/tx.proto
6
+ /* eslint-disable */
7
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
8
+ import { Timestamp } from "../../../google/protobuf/timestamp";
9
+ import { Coin } from "../../base/v1beta1/coin";
10
+ import { Params } from "./types";
11
+ export const protobufPackage = "cosmos.protocolpool.v1";
12
+ function createBaseMsgFundCommunityPool() {
13
+ return { depositor: "", amount: [] };
14
+ }
15
+ export const MsgFundCommunityPool = {
16
+ encode(message, writer = new BinaryWriter()) {
17
+ if (message.depositor !== "") {
18
+ writer.uint32(10).string(message.depositor);
19
+ }
20
+ for (const v of message.amount) {
21
+ Coin.encode(v, writer.uint32(18).fork()).join();
22
+ }
23
+ return writer;
24
+ },
25
+ decode(input, length) {
26
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
27
+ let end = length === undefined ? reader.len : reader.pos + length;
28
+ const message = createBaseMsgFundCommunityPool();
29
+ while (reader.pos < end) {
30
+ const tag = reader.uint32();
31
+ switch (tag >>> 3) {
32
+ case 1: {
33
+ if (tag !== 10) {
34
+ break;
35
+ }
36
+ message.depositor = reader.string();
37
+ continue;
38
+ }
39
+ case 2: {
40
+ if (tag !== 18) {
41
+ break;
42
+ }
43
+ message.amount.push(Coin.decode(reader, reader.uint32()));
44
+ continue;
45
+ }
46
+ }
47
+ if ((tag & 7) === 4 || tag === 0) {
48
+ break;
49
+ }
50
+ reader.skip(tag & 7);
51
+ }
52
+ return message;
53
+ },
54
+ fromJSON(object) {
55
+ return {
56
+ depositor: isSet(object.depositor) ? globalThis.String(object.depositor) : "",
57
+ amount: globalThis.Array.isArray(object?.amount) ? object.amount.map((e) => Coin.fromJSON(e)) : [],
58
+ };
59
+ },
60
+ toJSON(message) {
61
+ const obj = {};
62
+ if (message.depositor !== "") {
63
+ obj.depositor = message.depositor;
64
+ }
65
+ if (message.amount?.length) {
66
+ obj.amount = message.amount.map((e) => Coin.toJSON(e));
67
+ }
68
+ return obj;
69
+ },
70
+ create(base) {
71
+ return MsgFundCommunityPool.fromPartial(base ?? {});
72
+ },
73
+ fromPartial(object) {
74
+ const message = createBaseMsgFundCommunityPool();
75
+ message.depositor = object.depositor ?? "";
76
+ message.amount = object.amount?.map((e) => Coin.fromPartial(e)) || [];
77
+ return message;
78
+ },
79
+ };
80
+ function createBaseMsgFundCommunityPoolResponse() {
81
+ return {};
82
+ }
83
+ export const MsgFundCommunityPoolResponse = {
84
+ encode(_, writer = new BinaryWriter()) {
85
+ return writer;
86
+ },
87
+ decode(input, length) {
88
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
89
+ let end = length === undefined ? reader.len : reader.pos + length;
90
+ const message = createBaseMsgFundCommunityPoolResponse();
91
+ while (reader.pos < end) {
92
+ const tag = reader.uint32();
93
+ switch (tag >>> 3) {
94
+ }
95
+ if ((tag & 7) === 4 || tag === 0) {
96
+ break;
97
+ }
98
+ reader.skip(tag & 7);
99
+ }
100
+ return message;
101
+ },
102
+ fromJSON(_) {
103
+ return {};
104
+ },
105
+ toJSON(_) {
106
+ const obj = {};
107
+ return obj;
108
+ },
109
+ create(base) {
110
+ return MsgFundCommunityPoolResponse.fromPartial(base ?? {});
111
+ },
112
+ fromPartial(_) {
113
+ const message = createBaseMsgFundCommunityPoolResponse();
114
+ return message;
115
+ },
116
+ };
117
+ function createBaseMsgCommunityPoolSpend() {
118
+ return { authority: "", recipient: "", amount: [] };
119
+ }
120
+ export const MsgCommunityPoolSpend = {
121
+ encode(message, writer = new BinaryWriter()) {
122
+ if (message.authority !== "") {
123
+ writer.uint32(10).string(message.authority);
124
+ }
125
+ if (message.recipient !== "") {
126
+ writer.uint32(18).string(message.recipient);
127
+ }
128
+ for (const v of message.amount) {
129
+ Coin.encode(v, writer.uint32(26).fork()).join();
130
+ }
131
+ return writer;
132
+ },
133
+ decode(input, length) {
134
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
135
+ let end = length === undefined ? reader.len : reader.pos + length;
136
+ const message = createBaseMsgCommunityPoolSpend();
137
+ while (reader.pos < end) {
138
+ const tag = reader.uint32();
139
+ switch (tag >>> 3) {
140
+ case 1: {
141
+ if (tag !== 10) {
142
+ break;
143
+ }
144
+ message.authority = reader.string();
145
+ continue;
146
+ }
147
+ case 2: {
148
+ if (tag !== 18) {
149
+ break;
150
+ }
151
+ message.recipient = reader.string();
152
+ continue;
153
+ }
154
+ case 3: {
155
+ if (tag !== 26) {
156
+ break;
157
+ }
158
+ message.amount.push(Coin.decode(reader, reader.uint32()));
159
+ continue;
160
+ }
161
+ }
162
+ if ((tag & 7) === 4 || tag === 0) {
163
+ break;
164
+ }
165
+ reader.skip(tag & 7);
166
+ }
167
+ return message;
168
+ },
169
+ fromJSON(object) {
170
+ return {
171
+ authority: isSet(object.authority) ? globalThis.String(object.authority) : "",
172
+ recipient: isSet(object.recipient) ? globalThis.String(object.recipient) : "",
173
+ amount: globalThis.Array.isArray(object?.amount) ? object.amount.map((e) => Coin.fromJSON(e)) : [],
174
+ };
175
+ },
176
+ toJSON(message) {
177
+ const obj = {};
178
+ if (message.authority !== "") {
179
+ obj.authority = message.authority;
180
+ }
181
+ if (message.recipient !== "") {
182
+ obj.recipient = message.recipient;
183
+ }
184
+ if (message.amount?.length) {
185
+ obj.amount = message.amount.map((e) => Coin.toJSON(e));
186
+ }
187
+ return obj;
188
+ },
189
+ create(base) {
190
+ return MsgCommunityPoolSpend.fromPartial(base ?? {});
191
+ },
192
+ fromPartial(object) {
193
+ const message = createBaseMsgCommunityPoolSpend();
194
+ message.authority = object.authority ?? "";
195
+ message.recipient = object.recipient ?? "";
196
+ message.amount = object.amount?.map((e) => Coin.fromPartial(e)) || [];
197
+ return message;
198
+ },
199
+ };
200
+ function createBaseMsgCommunityPoolSpendResponse() {
201
+ return {};
202
+ }
203
+ export const MsgCommunityPoolSpendResponse = {
204
+ encode(_, writer = new BinaryWriter()) {
205
+ return writer;
206
+ },
207
+ decode(input, length) {
208
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
209
+ let end = length === undefined ? reader.len : reader.pos + length;
210
+ const message = createBaseMsgCommunityPoolSpendResponse();
211
+ while (reader.pos < end) {
212
+ const tag = reader.uint32();
213
+ switch (tag >>> 3) {
214
+ }
215
+ if ((tag & 7) === 4 || tag === 0) {
216
+ break;
217
+ }
218
+ reader.skip(tag & 7);
219
+ }
220
+ return message;
221
+ },
222
+ fromJSON(_) {
223
+ return {};
224
+ },
225
+ toJSON(_) {
226
+ const obj = {};
227
+ return obj;
228
+ },
229
+ create(base) {
230
+ return MsgCommunityPoolSpendResponse.fromPartial(base ?? {});
231
+ },
232
+ fromPartial(_) {
233
+ const message = createBaseMsgCommunityPoolSpendResponse();
234
+ return message;
235
+ },
236
+ };
237
+ function createBaseMsgCreateContinuousFund() {
238
+ return { authority: "", recipient: "", percentage: "", expiry: undefined };
239
+ }
240
+ export const MsgCreateContinuousFund = {
241
+ encode(message, writer = new BinaryWriter()) {
242
+ if (message.authority !== "") {
243
+ writer.uint32(10).string(message.authority);
244
+ }
245
+ if (message.recipient !== "") {
246
+ writer.uint32(18).string(message.recipient);
247
+ }
248
+ if (message.percentage !== "") {
249
+ writer.uint32(26).string(message.percentage);
250
+ }
251
+ if (message.expiry !== undefined) {
252
+ Timestamp.encode(toTimestamp(message.expiry), writer.uint32(34).fork()).join();
253
+ }
254
+ return writer;
255
+ },
256
+ decode(input, length) {
257
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
258
+ let end = length === undefined ? reader.len : reader.pos + length;
259
+ const message = createBaseMsgCreateContinuousFund();
260
+ while (reader.pos < end) {
261
+ const tag = reader.uint32();
262
+ switch (tag >>> 3) {
263
+ case 1: {
264
+ if (tag !== 10) {
265
+ break;
266
+ }
267
+ message.authority = reader.string();
268
+ continue;
269
+ }
270
+ case 2: {
271
+ if (tag !== 18) {
272
+ break;
273
+ }
274
+ message.recipient = reader.string();
275
+ continue;
276
+ }
277
+ case 3: {
278
+ if (tag !== 26) {
279
+ break;
280
+ }
281
+ message.percentage = reader.string();
282
+ continue;
283
+ }
284
+ case 4: {
285
+ if (tag !== 34) {
286
+ break;
287
+ }
288
+ message.expiry = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
289
+ continue;
290
+ }
291
+ }
292
+ if ((tag & 7) === 4 || tag === 0) {
293
+ break;
294
+ }
295
+ reader.skip(tag & 7);
296
+ }
297
+ return message;
298
+ },
299
+ fromJSON(object) {
300
+ return {
301
+ authority: isSet(object.authority) ? globalThis.String(object.authority) : "",
302
+ recipient: isSet(object.recipient) ? globalThis.String(object.recipient) : "",
303
+ percentage: isSet(object.percentage) ? globalThis.String(object.percentage) : "",
304
+ expiry: isSet(object.expiry) ? fromJsonTimestamp(object.expiry) : undefined,
305
+ };
306
+ },
307
+ toJSON(message) {
308
+ const obj = {};
309
+ if (message.authority !== "") {
310
+ obj.authority = message.authority;
311
+ }
312
+ if (message.recipient !== "") {
313
+ obj.recipient = message.recipient;
314
+ }
315
+ if (message.percentage !== "") {
316
+ obj.percentage = message.percentage;
317
+ }
318
+ if (message.expiry !== undefined) {
319
+ obj.expiry = message.expiry.toISOString();
320
+ }
321
+ return obj;
322
+ },
323
+ create(base) {
324
+ return MsgCreateContinuousFund.fromPartial(base ?? {});
325
+ },
326
+ fromPartial(object) {
327
+ const message = createBaseMsgCreateContinuousFund();
328
+ message.authority = object.authority ?? "";
329
+ message.recipient = object.recipient ?? "";
330
+ message.percentage = object.percentage ?? "";
331
+ message.expiry = object.expiry ?? undefined;
332
+ return message;
333
+ },
334
+ };
335
+ function createBaseMsgCreateContinuousFundResponse() {
336
+ return {};
337
+ }
338
+ export const MsgCreateContinuousFundResponse = {
339
+ encode(_, writer = new BinaryWriter()) {
340
+ return writer;
341
+ },
342
+ decode(input, length) {
343
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
344
+ let end = length === undefined ? reader.len : reader.pos + length;
345
+ const message = createBaseMsgCreateContinuousFundResponse();
346
+ while (reader.pos < end) {
347
+ const tag = reader.uint32();
348
+ switch (tag >>> 3) {
349
+ }
350
+ if ((tag & 7) === 4 || tag === 0) {
351
+ break;
352
+ }
353
+ reader.skip(tag & 7);
354
+ }
355
+ return message;
356
+ },
357
+ fromJSON(_) {
358
+ return {};
359
+ },
360
+ toJSON(_) {
361
+ const obj = {};
362
+ return obj;
363
+ },
364
+ create(base) {
365
+ return MsgCreateContinuousFundResponse.fromPartial(base ?? {});
366
+ },
367
+ fromPartial(_) {
368
+ const message = createBaseMsgCreateContinuousFundResponse();
369
+ return message;
370
+ },
371
+ };
372
+ function createBaseMsgCancelContinuousFund() {
373
+ return { authority: "", recipient: "" };
374
+ }
375
+ export const MsgCancelContinuousFund = {
376
+ encode(message, writer = new BinaryWriter()) {
377
+ if (message.authority !== "") {
378
+ writer.uint32(10).string(message.authority);
379
+ }
380
+ if (message.recipient !== "") {
381
+ writer.uint32(18).string(message.recipient);
382
+ }
383
+ return writer;
384
+ },
385
+ decode(input, length) {
386
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
387
+ let end = length === undefined ? reader.len : reader.pos + length;
388
+ const message = createBaseMsgCancelContinuousFund();
389
+ while (reader.pos < end) {
390
+ const tag = reader.uint32();
391
+ switch (tag >>> 3) {
392
+ case 1: {
393
+ if (tag !== 10) {
394
+ break;
395
+ }
396
+ message.authority = reader.string();
397
+ continue;
398
+ }
399
+ case 2: {
400
+ if (tag !== 18) {
401
+ break;
402
+ }
403
+ message.recipient = reader.string();
404
+ continue;
405
+ }
406
+ }
407
+ if ((tag & 7) === 4 || tag === 0) {
408
+ break;
409
+ }
410
+ reader.skip(tag & 7);
411
+ }
412
+ return message;
413
+ },
414
+ fromJSON(object) {
415
+ return {
416
+ authority: isSet(object.authority) ? globalThis.String(object.authority) : "",
417
+ recipient: isSet(object.recipient) ? globalThis.String(object.recipient) : "",
418
+ };
419
+ },
420
+ toJSON(message) {
421
+ const obj = {};
422
+ if (message.authority !== "") {
423
+ obj.authority = message.authority;
424
+ }
425
+ if (message.recipient !== "") {
426
+ obj.recipient = message.recipient;
427
+ }
428
+ return obj;
429
+ },
430
+ create(base) {
431
+ return MsgCancelContinuousFund.fromPartial(base ?? {});
432
+ },
433
+ fromPartial(object) {
434
+ const message = createBaseMsgCancelContinuousFund();
435
+ message.authority = object.authority ?? "";
436
+ message.recipient = object.recipient ?? "";
437
+ return message;
438
+ },
439
+ };
440
+ function createBaseMsgCancelContinuousFundResponse() {
441
+ return { canceledTime: undefined, canceledHeight: 0, recipient: "" };
442
+ }
443
+ export const MsgCancelContinuousFundResponse = {
444
+ encode(message, writer = new BinaryWriter()) {
445
+ if (message.canceledTime !== undefined) {
446
+ Timestamp.encode(toTimestamp(message.canceledTime), writer.uint32(10).fork()).join();
447
+ }
448
+ if (message.canceledHeight !== 0) {
449
+ writer.uint32(16).uint64(message.canceledHeight);
450
+ }
451
+ if (message.recipient !== "") {
452
+ writer.uint32(26).string(message.recipient);
453
+ }
454
+ return writer;
455
+ },
456
+ decode(input, length) {
457
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
458
+ let end = length === undefined ? reader.len : reader.pos + length;
459
+ const message = createBaseMsgCancelContinuousFundResponse();
460
+ while (reader.pos < end) {
461
+ const tag = reader.uint32();
462
+ switch (tag >>> 3) {
463
+ case 1: {
464
+ if (tag !== 10) {
465
+ break;
466
+ }
467
+ message.canceledTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
468
+ continue;
469
+ }
470
+ case 2: {
471
+ if (tag !== 16) {
472
+ break;
473
+ }
474
+ message.canceledHeight = longToNumber(reader.uint64());
475
+ continue;
476
+ }
477
+ case 3: {
478
+ if (tag !== 26) {
479
+ break;
480
+ }
481
+ message.recipient = reader.string();
482
+ continue;
483
+ }
484
+ }
485
+ if ((tag & 7) === 4 || tag === 0) {
486
+ break;
487
+ }
488
+ reader.skip(tag & 7);
489
+ }
490
+ return message;
491
+ },
492
+ fromJSON(object) {
493
+ return {
494
+ canceledTime: isSet(object.canceledTime) ? fromJsonTimestamp(object.canceledTime) : undefined,
495
+ canceledHeight: isSet(object.canceledHeight) ? globalThis.Number(object.canceledHeight) : 0,
496
+ recipient: isSet(object.recipient) ? globalThis.String(object.recipient) : "",
497
+ };
498
+ },
499
+ toJSON(message) {
500
+ const obj = {};
501
+ if (message.canceledTime !== undefined) {
502
+ obj.canceledTime = message.canceledTime.toISOString();
503
+ }
504
+ if (message.canceledHeight !== 0) {
505
+ obj.canceledHeight = Math.round(message.canceledHeight);
506
+ }
507
+ if (message.recipient !== "") {
508
+ obj.recipient = message.recipient;
509
+ }
510
+ return obj;
511
+ },
512
+ create(base) {
513
+ return MsgCancelContinuousFundResponse.fromPartial(base ?? {});
514
+ },
515
+ fromPartial(object) {
516
+ const message = createBaseMsgCancelContinuousFundResponse();
517
+ message.canceledTime = object.canceledTime ?? undefined;
518
+ message.canceledHeight = object.canceledHeight ?? 0;
519
+ message.recipient = object.recipient ?? "";
520
+ return message;
521
+ },
522
+ };
523
+ function createBaseMsgUpdateParams() {
524
+ return { authority: "", params: undefined };
525
+ }
526
+ export const MsgUpdateParams = {
527
+ encode(message, writer = new BinaryWriter()) {
528
+ if (message.authority !== "") {
529
+ writer.uint32(10).string(message.authority);
530
+ }
531
+ if (message.params !== undefined) {
532
+ Params.encode(message.params, writer.uint32(18).fork()).join();
533
+ }
534
+ return writer;
535
+ },
536
+ decode(input, length) {
537
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
538
+ let end = length === undefined ? reader.len : reader.pos + length;
539
+ const message = createBaseMsgUpdateParams();
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
+ message.authority = reader.string();
548
+ continue;
549
+ }
550
+ case 2: {
551
+ if (tag !== 18) {
552
+ break;
553
+ }
554
+ message.params = Params.decode(reader, reader.uint32());
555
+ continue;
556
+ }
557
+ }
558
+ if ((tag & 7) === 4 || tag === 0) {
559
+ break;
560
+ }
561
+ reader.skip(tag & 7);
562
+ }
563
+ return message;
564
+ },
565
+ fromJSON(object) {
566
+ return {
567
+ authority: isSet(object.authority) ? globalThis.String(object.authority) : "",
568
+ params: isSet(object.params) ? Params.fromJSON(object.params) : undefined,
569
+ };
570
+ },
571
+ toJSON(message) {
572
+ const obj = {};
573
+ if (message.authority !== "") {
574
+ obj.authority = message.authority;
575
+ }
576
+ if (message.params !== undefined) {
577
+ obj.params = Params.toJSON(message.params);
578
+ }
579
+ return obj;
580
+ },
581
+ create(base) {
582
+ return MsgUpdateParams.fromPartial(base ?? {});
583
+ },
584
+ fromPartial(object) {
585
+ const message = createBaseMsgUpdateParams();
586
+ message.authority = object.authority ?? "";
587
+ message.params = (object.params !== undefined && object.params !== null)
588
+ ? Params.fromPartial(object.params)
589
+ : undefined;
590
+ return message;
591
+ },
592
+ };
593
+ function createBaseMsgUpdateParamsResponse() {
594
+ return {};
595
+ }
596
+ export const MsgUpdateParamsResponse = {
597
+ encode(_, writer = new BinaryWriter()) {
598
+ return writer;
599
+ },
600
+ decode(input, length) {
601
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
602
+ let end = length === undefined ? reader.len : reader.pos + length;
603
+ const message = createBaseMsgUpdateParamsResponse();
604
+ while (reader.pos < end) {
605
+ const tag = reader.uint32();
606
+ switch (tag >>> 3) {
607
+ }
608
+ if ((tag & 7) === 4 || tag === 0) {
609
+ break;
610
+ }
611
+ reader.skip(tag & 7);
612
+ }
613
+ return message;
614
+ },
615
+ fromJSON(_) {
616
+ return {};
617
+ },
618
+ toJSON(_) {
619
+ const obj = {};
620
+ return obj;
621
+ },
622
+ create(base) {
623
+ return MsgUpdateParamsResponse.fromPartial(base ?? {});
624
+ },
625
+ fromPartial(_) {
626
+ const message = createBaseMsgUpdateParamsResponse();
627
+ return message;
628
+ },
629
+ };
630
+ export const MsgServiceName = "cosmos.protocolpool.v1.Msg";
631
+ export class MsgClientImpl {
632
+ constructor(rpc, opts) {
633
+ this.service = opts?.service || MsgServiceName;
634
+ this.rpc = rpc;
635
+ this.FundCommunityPool = this.FundCommunityPool.bind(this);
636
+ this.CommunityPoolSpend = this.CommunityPoolSpend.bind(this);
637
+ this.CreateContinuousFund = this.CreateContinuousFund.bind(this);
638
+ this.CancelContinuousFund = this.CancelContinuousFund.bind(this);
639
+ this.UpdateParams = this.UpdateParams.bind(this);
640
+ }
641
+ FundCommunityPool(request) {
642
+ const data = MsgFundCommunityPool.encode(request).finish();
643
+ const promise = this.rpc.request(this.service, "FundCommunityPool", data);
644
+ return promise.then((data) => MsgFundCommunityPoolResponse.decode(new BinaryReader(data)));
645
+ }
646
+ CommunityPoolSpend(request) {
647
+ const data = MsgCommunityPoolSpend.encode(request).finish();
648
+ const promise = this.rpc.request(this.service, "CommunityPoolSpend", data);
649
+ return promise.then((data) => MsgCommunityPoolSpendResponse.decode(new BinaryReader(data)));
650
+ }
651
+ CreateContinuousFund(request) {
652
+ const data = MsgCreateContinuousFund.encode(request).finish();
653
+ const promise = this.rpc.request(this.service, "CreateContinuousFund", data);
654
+ return promise.then((data) => MsgCreateContinuousFundResponse.decode(new BinaryReader(data)));
655
+ }
656
+ CancelContinuousFund(request) {
657
+ const data = MsgCancelContinuousFund.encode(request).finish();
658
+ const promise = this.rpc.request(this.service, "CancelContinuousFund", data);
659
+ return promise.then((data) => MsgCancelContinuousFundResponse.decode(new BinaryReader(data)));
660
+ }
661
+ UpdateParams(request) {
662
+ const data = MsgUpdateParams.encode(request).finish();
663
+ const promise = this.rpc.request(this.service, "UpdateParams", data);
664
+ return promise.then((data) => MsgUpdateParamsResponse.decode(new BinaryReader(data)));
665
+ }
666
+ }
667
+ function toTimestamp(date) {
668
+ const seconds = Math.trunc(date.getTime() / 1000);
669
+ const nanos = (date.getTime() % 1000) * 1000000;
670
+ return { seconds, nanos };
671
+ }
672
+ function fromTimestamp(t) {
673
+ let millis = (t.seconds || 0) * 1000;
674
+ millis += (t.nanos || 0) / 1000000;
675
+ return new globalThis.Date(millis);
676
+ }
677
+ function fromJsonTimestamp(o) {
678
+ if (o instanceof globalThis.Date) {
679
+ return o;
680
+ }
681
+ else if (typeof o === "string") {
682
+ return new globalThis.Date(o);
683
+ }
684
+ else {
685
+ return fromTimestamp(Timestamp.fromJSON(o));
686
+ }
687
+ }
688
+ function longToNumber(int64) {
689
+ const num = globalThis.Number(int64.toString());
690
+ if (num > globalThis.Number.MAX_SAFE_INTEGER) {
691
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
692
+ }
693
+ if (num < globalThis.Number.MIN_SAFE_INTEGER) {
694
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
695
+ }
696
+ return num;
697
+ }
698
+ function isSet(value) {
699
+ return value !== null && value !== undefined;
700
+ }