@agoric/cosmic-proto 0.4.1-dev-7b3ac1e.0 → 0.4.1-dev-33a5708.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.
@@ -1,11 +1,11 @@
1
1
  //@ts-nocheck
2
- import { Timestamp, } from '../../google/protobuf/timestamp.js';
3
2
  import { Header } from '../types/types.js';
4
3
  import { ProofOps } from '../crypto/proof.js';
5
- import { EvidenceParams, ValidatorParams, VersionParams, } from '../types/params.js';
4
+ import { ConsensusParams, } from '../types/params.js';
6
5
  import { PublicKey } from '../crypto/keys.js';
6
+ import { Timestamp, } from '../../google/protobuf/timestamp.js';
7
7
  import { BinaryReader, BinaryWriter } from '../../binary.js';
8
- import { isSet, fromJsonTimestamp, bytesFromBase64, fromTimestamp, base64FromBytes, } from '../../helpers.js';
8
+ import { isSet, bytesFromBase64, base64FromBytes, fromJsonTimestamp, fromTimestamp, } from '../../helpers.js';
9
9
  import {} from '../../json-safe.js';
10
10
  export var CheckTxType;
11
11
  (function (CheckTxType) {
@@ -39,130 +39,6 @@ export function checkTxTypeToJSON(object) {
39
39
  return 'UNRECOGNIZED';
40
40
  }
41
41
  }
42
- export var ResponseOfferSnapshot_Result;
43
- (function (ResponseOfferSnapshot_Result) {
44
- /** UNKNOWN - Unknown result, abort all snapshot restoration */
45
- ResponseOfferSnapshot_Result[ResponseOfferSnapshot_Result["UNKNOWN"] = 0] = "UNKNOWN";
46
- /** ACCEPT - Snapshot accepted, apply chunks */
47
- ResponseOfferSnapshot_Result[ResponseOfferSnapshot_Result["ACCEPT"] = 1] = "ACCEPT";
48
- /** ABORT - Abort all snapshot restoration */
49
- ResponseOfferSnapshot_Result[ResponseOfferSnapshot_Result["ABORT"] = 2] = "ABORT";
50
- /** REJECT - Reject this specific snapshot, try others */
51
- ResponseOfferSnapshot_Result[ResponseOfferSnapshot_Result["REJECT"] = 3] = "REJECT";
52
- /** REJECT_FORMAT - Reject all snapshots of this format, try others */
53
- ResponseOfferSnapshot_Result[ResponseOfferSnapshot_Result["REJECT_FORMAT"] = 4] = "REJECT_FORMAT";
54
- /** REJECT_SENDER - Reject all snapshots from the sender(s), try others */
55
- ResponseOfferSnapshot_Result[ResponseOfferSnapshot_Result["REJECT_SENDER"] = 5] = "REJECT_SENDER";
56
- ResponseOfferSnapshot_Result[ResponseOfferSnapshot_Result["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
57
- })(ResponseOfferSnapshot_Result || (ResponseOfferSnapshot_Result = {}));
58
- export const ResponseOfferSnapshot_ResultSDKType = ResponseOfferSnapshot_Result;
59
- export function responseOfferSnapshot_ResultFromJSON(object) {
60
- switch (object) {
61
- case 0:
62
- case 'UNKNOWN':
63
- return ResponseOfferSnapshot_Result.UNKNOWN;
64
- case 1:
65
- case 'ACCEPT':
66
- return ResponseOfferSnapshot_Result.ACCEPT;
67
- case 2:
68
- case 'ABORT':
69
- return ResponseOfferSnapshot_Result.ABORT;
70
- case 3:
71
- case 'REJECT':
72
- return ResponseOfferSnapshot_Result.REJECT;
73
- case 4:
74
- case 'REJECT_FORMAT':
75
- return ResponseOfferSnapshot_Result.REJECT_FORMAT;
76
- case 5:
77
- case 'REJECT_SENDER':
78
- return ResponseOfferSnapshot_Result.REJECT_SENDER;
79
- case -1:
80
- case 'UNRECOGNIZED':
81
- default:
82
- return ResponseOfferSnapshot_Result.UNRECOGNIZED;
83
- }
84
- }
85
- export function responseOfferSnapshot_ResultToJSON(object) {
86
- switch (object) {
87
- case ResponseOfferSnapshot_Result.UNKNOWN:
88
- return 'UNKNOWN';
89
- case ResponseOfferSnapshot_Result.ACCEPT:
90
- return 'ACCEPT';
91
- case ResponseOfferSnapshot_Result.ABORT:
92
- return 'ABORT';
93
- case ResponseOfferSnapshot_Result.REJECT:
94
- return 'REJECT';
95
- case ResponseOfferSnapshot_Result.REJECT_FORMAT:
96
- return 'REJECT_FORMAT';
97
- case ResponseOfferSnapshot_Result.REJECT_SENDER:
98
- return 'REJECT_SENDER';
99
- case ResponseOfferSnapshot_Result.UNRECOGNIZED:
100
- default:
101
- return 'UNRECOGNIZED';
102
- }
103
- }
104
- export var ResponseApplySnapshotChunk_Result;
105
- (function (ResponseApplySnapshotChunk_Result) {
106
- /** UNKNOWN - Unknown result, abort all snapshot restoration */
107
- ResponseApplySnapshotChunk_Result[ResponseApplySnapshotChunk_Result["UNKNOWN"] = 0] = "UNKNOWN";
108
- /** ACCEPT - Chunk successfully accepted */
109
- ResponseApplySnapshotChunk_Result[ResponseApplySnapshotChunk_Result["ACCEPT"] = 1] = "ACCEPT";
110
- /** ABORT - Abort all snapshot restoration */
111
- ResponseApplySnapshotChunk_Result[ResponseApplySnapshotChunk_Result["ABORT"] = 2] = "ABORT";
112
- /** RETRY - Retry chunk (combine with refetch and reject) */
113
- ResponseApplySnapshotChunk_Result[ResponseApplySnapshotChunk_Result["RETRY"] = 3] = "RETRY";
114
- /** RETRY_SNAPSHOT - Retry snapshot (combine with refetch and reject) */
115
- ResponseApplySnapshotChunk_Result[ResponseApplySnapshotChunk_Result["RETRY_SNAPSHOT"] = 4] = "RETRY_SNAPSHOT";
116
- /** REJECT_SNAPSHOT - Reject this snapshot, try others */
117
- ResponseApplySnapshotChunk_Result[ResponseApplySnapshotChunk_Result["REJECT_SNAPSHOT"] = 5] = "REJECT_SNAPSHOT";
118
- ResponseApplySnapshotChunk_Result[ResponseApplySnapshotChunk_Result["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
119
- })(ResponseApplySnapshotChunk_Result || (ResponseApplySnapshotChunk_Result = {}));
120
- export const ResponseApplySnapshotChunk_ResultSDKType = ResponseApplySnapshotChunk_Result;
121
- export function responseApplySnapshotChunk_ResultFromJSON(object) {
122
- switch (object) {
123
- case 0:
124
- case 'UNKNOWN':
125
- return ResponseApplySnapshotChunk_Result.UNKNOWN;
126
- case 1:
127
- case 'ACCEPT':
128
- return ResponseApplySnapshotChunk_Result.ACCEPT;
129
- case 2:
130
- case 'ABORT':
131
- return ResponseApplySnapshotChunk_Result.ABORT;
132
- case 3:
133
- case 'RETRY':
134
- return ResponseApplySnapshotChunk_Result.RETRY;
135
- case 4:
136
- case 'RETRY_SNAPSHOT':
137
- return ResponseApplySnapshotChunk_Result.RETRY_SNAPSHOT;
138
- case 5:
139
- case 'REJECT_SNAPSHOT':
140
- return ResponseApplySnapshotChunk_Result.REJECT_SNAPSHOT;
141
- case -1:
142
- case 'UNRECOGNIZED':
143
- default:
144
- return ResponseApplySnapshotChunk_Result.UNRECOGNIZED;
145
- }
146
- }
147
- export function responseApplySnapshotChunk_ResultToJSON(object) {
148
- switch (object) {
149
- case ResponseApplySnapshotChunk_Result.UNKNOWN:
150
- return 'UNKNOWN';
151
- case ResponseApplySnapshotChunk_Result.ACCEPT:
152
- return 'ACCEPT';
153
- case ResponseApplySnapshotChunk_Result.ABORT:
154
- return 'ABORT';
155
- case ResponseApplySnapshotChunk_Result.RETRY:
156
- return 'RETRY';
157
- case ResponseApplySnapshotChunk_Result.RETRY_SNAPSHOT:
158
- return 'RETRY_SNAPSHOT';
159
- case ResponseApplySnapshotChunk_Result.REJECT_SNAPSHOT:
160
- return 'REJECT_SNAPSHOT';
161
- case ResponseApplySnapshotChunk_Result.UNRECOGNIZED:
162
- default:
163
- return 'UNRECOGNIZED';
164
- }
165
- }
166
42
  export var EvidenceType;
167
43
  (function (EvidenceType) {
168
44
  EvidenceType[EvidenceType["UNKNOWN"] = 0] = "UNKNOWN";
@@ -201,126 +77,49 @@ export function evidenceTypeToJSON(object) {
201
77
  return 'UNRECOGNIZED';
202
78
  }
203
79
  }
204
- function createBaseRequest() {
80
+ function createBaseRequestQuery() {
205
81
  return {
206
- echo: undefined,
207
- flush: undefined,
208
- info: undefined,
209
- setOption: undefined,
210
- initChain: undefined,
211
- query: undefined,
212
- beginBlock: undefined,
213
- checkTx: undefined,
214
- deliverTx: undefined,
215
- endBlock: undefined,
216
- commit: undefined,
217
- listSnapshots: undefined,
218
- offerSnapshot: undefined,
219
- loadSnapshotChunk: undefined,
220
- applySnapshotChunk: undefined,
82
+ data: new Uint8Array(),
83
+ path: '',
84
+ height: BigInt(0),
85
+ prove: false,
221
86
  };
222
87
  }
223
- export const Request = {
224
- typeUrl: '/tendermint.abci.Request',
88
+ export const RequestQuery = {
89
+ typeUrl: '/tendermint.abci.RequestQuery',
225
90
  encode(message, writer = BinaryWriter.create()) {
226
- if (message.echo !== undefined) {
227
- RequestEcho.encode(message.echo, writer.uint32(10).fork()).ldelim();
228
- }
229
- if (message.flush !== undefined) {
230
- RequestFlush.encode(message.flush, writer.uint32(18).fork()).ldelim();
231
- }
232
- if (message.info !== undefined) {
233
- RequestInfo.encode(message.info, writer.uint32(26).fork()).ldelim();
234
- }
235
- if (message.setOption !== undefined) {
236
- RequestSetOption.encode(message.setOption, writer.uint32(34).fork()).ldelim();
237
- }
238
- if (message.initChain !== undefined) {
239
- RequestInitChain.encode(message.initChain, writer.uint32(42).fork()).ldelim();
240
- }
241
- if (message.query !== undefined) {
242
- RequestQuery.encode(message.query, writer.uint32(50).fork()).ldelim();
243
- }
244
- if (message.beginBlock !== undefined) {
245
- RequestBeginBlock.encode(message.beginBlock, writer.uint32(58).fork()).ldelim();
246
- }
247
- if (message.checkTx !== undefined) {
248
- RequestCheckTx.encode(message.checkTx, writer.uint32(66).fork()).ldelim();
249
- }
250
- if (message.deliverTx !== undefined) {
251
- RequestDeliverTx.encode(message.deliverTx, writer.uint32(74).fork()).ldelim();
252
- }
253
- if (message.endBlock !== undefined) {
254
- RequestEndBlock.encode(message.endBlock, writer.uint32(82).fork()).ldelim();
255
- }
256
- if (message.commit !== undefined) {
257
- RequestCommit.encode(message.commit, writer.uint32(90).fork()).ldelim();
258
- }
259
- if (message.listSnapshots !== undefined) {
260
- RequestListSnapshots.encode(message.listSnapshots, writer.uint32(98).fork()).ldelim();
91
+ if (message.data.length !== 0) {
92
+ writer.uint32(10).bytes(message.data);
261
93
  }
262
- if (message.offerSnapshot !== undefined) {
263
- RequestOfferSnapshot.encode(message.offerSnapshot, writer.uint32(106).fork()).ldelim();
94
+ if (message.path !== '') {
95
+ writer.uint32(18).string(message.path);
264
96
  }
265
- if (message.loadSnapshotChunk !== undefined) {
266
- RequestLoadSnapshotChunk.encode(message.loadSnapshotChunk, writer.uint32(114).fork()).ldelim();
97
+ if (message.height !== BigInt(0)) {
98
+ writer.uint32(24).int64(message.height);
267
99
  }
268
- if (message.applySnapshotChunk !== undefined) {
269
- RequestApplySnapshotChunk.encode(message.applySnapshotChunk, writer.uint32(122).fork()).ldelim();
100
+ if (message.prove === true) {
101
+ writer.uint32(32).bool(message.prove);
270
102
  }
271
103
  return writer;
272
104
  },
273
105
  decode(input, length) {
274
106
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
275
107
  let end = length === undefined ? reader.len : reader.pos + length;
276
- const message = createBaseRequest();
108
+ const message = createBaseRequestQuery();
277
109
  while (reader.pos < end) {
278
110
  const tag = reader.uint32();
279
111
  switch (tag >>> 3) {
280
112
  case 1:
281
- message.echo = RequestEcho.decode(reader, reader.uint32());
113
+ message.data = reader.bytes();
282
114
  break;
283
115
  case 2:
284
- message.flush = RequestFlush.decode(reader, reader.uint32());
116
+ message.path = reader.string();
285
117
  break;
286
118
  case 3:
287
- message.info = RequestInfo.decode(reader, reader.uint32());
119
+ message.height = reader.int64();
288
120
  break;
289
121
  case 4:
290
- message.setOption = RequestSetOption.decode(reader, reader.uint32());
291
- break;
292
- case 5:
293
- message.initChain = RequestInitChain.decode(reader, reader.uint32());
294
- break;
295
- case 6:
296
- message.query = RequestQuery.decode(reader, reader.uint32());
297
- break;
298
- case 7:
299
- message.beginBlock = RequestBeginBlock.decode(reader, reader.uint32());
300
- break;
301
- case 8:
302
- message.checkTx = RequestCheckTx.decode(reader, reader.uint32());
303
- break;
304
- case 9:
305
- message.deliverTx = RequestDeliverTx.decode(reader, reader.uint32());
306
- break;
307
- case 10:
308
- message.endBlock = RequestEndBlock.decode(reader, reader.uint32());
309
- break;
310
- case 11:
311
- message.commit = RequestCommit.decode(reader, reader.uint32());
312
- break;
313
- case 12:
314
- message.listSnapshots = RequestListSnapshots.decode(reader, reader.uint32());
315
- break;
316
- case 13:
317
- message.offerSnapshot = RequestOfferSnapshot.decode(reader, reader.uint32());
318
- break;
319
- case 14:
320
- message.loadSnapshotChunk = RequestLoadSnapshotChunk.decode(reader, reader.uint32());
321
- break;
322
- case 15:
323
- message.applySnapshotChunk = RequestApplySnapshotChunk.decode(reader, reader.uint32());
122
+ message.prove = reader.bool();
324
123
  break;
325
124
  default:
326
125
  reader.skipType(tag & 7);
@@ -331,210 +130,93 @@ export const Request = {
331
130
  },
332
131
  fromJSON(object) {
333
132
  return {
334
- echo: isSet(object.echo) ? RequestEcho.fromJSON(object.echo) : undefined,
335
- flush: isSet(object.flush)
336
- ? RequestFlush.fromJSON(object.flush)
337
- : undefined,
338
- info: isSet(object.info) ? RequestInfo.fromJSON(object.info) : undefined,
339
- setOption: isSet(object.setOption)
340
- ? RequestSetOption.fromJSON(object.setOption)
341
- : undefined,
342
- initChain: isSet(object.initChain)
343
- ? RequestInitChain.fromJSON(object.initChain)
344
- : undefined,
345
- query: isSet(object.query)
346
- ? RequestQuery.fromJSON(object.query)
347
- : undefined,
348
- beginBlock: isSet(object.beginBlock)
349
- ? RequestBeginBlock.fromJSON(object.beginBlock)
350
- : undefined,
351
- checkTx: isSet(object.checkTx)
352
- ? RequestCheckTx.fromJSON(object.checkTx)
353
- : undefined,
354
- deliverTx: isSet(object.deliverTx)
355
- ? RequestDeliverTx.fromJSON(object.deliverTx)
356
- : undefined,
357
- endBlock: isSet(object.endBlock)
358
- ? RequestEndBlock.fromJSON(object.endBlock)
359
- : undefined,
360
- commit: isSet(object.commit)
361
- ? RequestCommit.fromJSON(object.commit)
362
- : undefined,
363
- listSnapshots: isSet(object.listSnapshots)
364
- ? RequestListSnapshots.fromJSON(object.listSnapshots)
365
- : undefined,
366
- offerSnapshot: isSet(object.offerSnapshot)
367
- ? RequestOfferSnapshot.fromJSON(object.offerSnapshot)
368
- : undefined,
369
- loadSnapshotChunk: isSet(object.loadSnapshotChunk)
370
- ? RequestLoadSnapshotChunk.fromJSON(object.loadSnapshotChunk)
371
- : undefined,
372
- applySnapshotChunk: isSet(object.applySnapshotChunk)
373
- ? RequestApplySnapshotChunk.fromJSON(object.applySnapshotChunk)
374
- : undefined,
133
+ data: isSet(object.data)
134
+ ? bytesFromBase64(object.data)
135
+ : new Uint8Array(),
136
+ path: isSet(object.path) ? String(object.path) : '',
137
+ height: isSet(object.height)
138
+ ? BigInt(object.height.toString())
139
+ : BigInt(0),
140
+ prove: isSet(object.prove) ? Boolean(object.prove) : false,
375
141
  };
376
142
  },
377
143
  toJSON(message) {
378
144
  const obj = {};
379
- message.echo !== undefined &&
380
- (obj.echo = message.echo ? RequestEcho.toJSON(message.echo) : undefined);
381
- message.flush !== undefined &&
382
- (obj.flush = message.flush
383
- ? RequestFlush.toJSON(message.flush)
384
- : undefined);
385
- message.info !== undefined &&
386
- (obj.info = message.info ? RequestInfo.toJSON(message.info) : undefined);
387
- message.setOption !== undefined &&
388
- (obj.setOption = message.setOption
389
- ? RequestSetOption.toJSON(message.setOption)
390
- : undefined);
391
- message.initChain !== undefined &&
392
- (obj.initChain = message.initChain
393
- ? RequestInitChain.toJSON(message.initChain)
394
- : undefined);
395
- message.query !== undefined &&
396
- (obj.query = message.query
397
- ? RequestQuery.toJSON(message.query)
398
- : undefined);
399
- message.beginBlock !== undefined &&
400
- (obj.beginBlock = message.beginBlock
401
- ? RequestBeginBlock.toJSON(message.beginBlock)
402
- : undefined);
403
- message.checkTx !== undefined &&
404
- (obj.checkTx = message.checkTx
405
- ? RequestCheckTx.toJSON(message.checkTx)
406
- : undefined);
407
- message.deliverTx !== undefined &&
408
- (obj.deliverTx = message.deliverTx
409
- ? RequestDeliverTx.toJSON(message.deliverTx)
410
- : undefined);
411
- message.endBlock !== undefined &&
412
- (obj.endBlock = message.endBlock
413
- ? RequestEndBlock.toJSON(message.endBlock)
414
- : undefined);
415
- message.commit !== undefined &&
416
- (obj.commit = message.commit
417
- ? RequestCommit.toJSON(message.commit)
418
- : undefined);
419
- message.listSnapshots !== undefined &&
420
- (obj.listSnapshots = message.listSnapshots
421
- ? RequestListSnapshots.toJSON(message.listSnapshots)
422
- : undefined);
423
- message.offerSnapshot !== undefined &&
424
- (obj.offerSnapshot = message.offerSnapshot
425
- ? RequestOfferSnapshot.toJSON(message.offerSnapshot)
426
- : undefined);
427
- message.loadSnapshotChunk !== undefined &&
428
- (obj.loadSnapshotChunk = message.loadSnapshotChunk
429
- ? RequestLoadSnapshotChunk.toJSON(message.loadSnapshotChunk)
430
- : undefined);
431
- message.applySnapshotChunk !== undefined &&
432
- (obj.applySnapshotChunk = message.applySnapshotChunk
433
- ? RequestApplySnapshotChunk.toJSON(message.applySnapshotChunk)
434
- : undefined);
145
+ message.data !== undefined &&
146
+ (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
147
+ message.path !== undefined && (obj.path = message.path);
148
+ message.height !== undefined &&
149
+ (obj.height = (message.height || BigInt(0)).toString());
150
+ message.prove !== undefined && (obj.prove = message.prove);
435
151
  return obj;
436
152
  },
437
153
  fromPartial(object) {
438
- const message = createBaseRequest();
439
- message.echo =
440
- object.echo !== undefined && object.echo !== null
441
- ? RequestEcho.fromPartial(object.echo)
442
- : undefined;
443
- message.flush =
444
- object.flush !== undefined && object.flush !== null
445
- ? RequestFlush.fromPartial(object.flush)
446
- : undefined;
447
- message.info =
448
- object.info !== undefined && object.info !== null
449
- ? RequestInfo.fromPartial(object.info)
450
- : undefined;
451
- message.setOption =
452
- object.setOption !== undefined && object.setOption !== null
453
- ? RequestSetOption.fromPartial(object.setOption)
454
- : undefined;
455
- message.initChain =
456
- object.initChain !== undefined && object.initChain !== null
457
- ? RequestInitChain.fromPartial(object.initChain)
458
- : undefined;
459
- message.query =
460
- object.query !== undefined && object.query !== null
461
- ? RequestQuery.fromPartial(object.query)
462
- : undefined;
463
- message.beginBlock =
464
- object.beginBlock !== undefined && object.beginBlock !== null
465
- ? RequestBeginBlock.fromPartial(object.beginBlock)
466
- : undefined;
467
- message.checkTx =
468
- object.checkTx !== undefined && object.checkTx !== null
469
- ? RequestCheckTx.fromPartial(object.checkTx)
470
- : undefined;
471
- message.deliverTx =
472
- object.deliverTx !== undefined && object.deliverTx !== null
473
- ? RequestDeliverTx.fromPartial(object.deliverTx)
474
- : undefined;
475
- message.endBlock =
476
- object.endBlock !== undefined && object.endBlock !== null
477
- ? RequestEndBlock.fromPartial(object.endBlock)
478
- : undefined;
479
- message.commit =
480
- object.commit !== undefined && object.commit !== null
481
- ? RequestCommit.fromPartial(object.commit)
482
- : undefined;
483
- message.listSnapshots =
484
- object.listSnapshots !== undefined && object.listSnapshots !== null
485
- ? RequestListSnapshots.fromPartial(object.listSnapshots)
486
- : undefined;
487
- message.offerSnapshot =
488
- object.offerSnapshot !== undefined && object.offerSnapshot !== null
489
- ? RequestOfferSnapshot.fromPartial(object.offerSnapshot)
490
- : undefined;
491
- message.loadSnapshotChunk =
492
- object.loadSnapshotChunk !== undefined &&
493
- object.loadSnapshotChunk !== null
494
- ? RequestLoadSnapshotChunk.fromPartial(object.loadSnapshotChunk)
495
- : undefined;
496
- message.applySnapshotChunk =
497
- object.applySnapshotChunk !== undefined &&
498
- object.applySnapshotChunk !== null
499
- ? RequestApplySnapshotChunk.fromPartial(object.applySnapshotChunk)
500
- : undefined;
154
+ const message = createBaseRequestQuery();
155
+ message.data = object.data ?? new Uint8Array();
156
+ message.path = object.path ?? '';
157
+ message.height =
158
+ object.height !== undefined && object.height !== null
159
+ ? BigInt(object.height.toString())
160
+ : BigInt(0);
161
+ message.prove = object.prove ?? false;
501
162
  return message;
502
163
  },
503
164
  fromProtoMsg(message) {
504
- return Request.decode(message.value);
165
+ return RequestQuery.decode(message.value);
505
166
  },
506
167
  toProto(message) {
507
- return Request.encode(message).finish();
168
+ return RequestQuery.encode(message).finish();
508
169
  },
509
170
  toProtoMsg(message) {
510
171
  return {
511
- typeUrl: '/tendermint.abci.Request',
512
- value: Request.encode(message).finish(),
172
+ typeUrl: '/tendermint.abci.RequestQuery',
173
+ value: RequestQuery.encode(message).finish(),
513
174
  };
514
175
  },
515
176
  };
516
- function createBaseRequestEcho() {
177
+ function createBaseRequestBeginBlock() {
517
178
  return {
518
- message: '',
179
+ hash: new Uint8Array(),
180
+ header: Header.fromPartial({}),
181
+ lastCommitInfo: LastCommitInfo.fromPartial({}),
182
+ byzantineValidators: [],
519
183
  };
520
184
  }
521
- export const RequestEcho = {
522
- typeUrl: '/tendermint.abci.RequestEcho',
185
+ export const RequestBeginBlock = {
186
+ typeUrl: '/tendermint.abci.RequestBeginBlock',
523
187
  encode(message, writer = BinaryWriter.create()) {
524
- if (message.message !== '') {
525
- writer.uint32(10).string(message.message);
188
+ if (message.hash.length !== 0) {
189
+ writer.uint32(10).bytes(message.hash);
190
+ }
191
+ if (message.header !== undefined) {
192
+ Header.encode(message.header, writer.uint32(18).fork()).ldelim();
193
+ }
194
+ if (message.lastCommitInfo !== undefined) {
195
+ LastCommitInfo.encode(message.lastCommitInfo, writer.uint32(26).fork()).ldelim();
196
+ }
197
+ for (const v of message.byzantineValidators) {
198
+ Evidence.encode(v, writer.uint32(34).fork()).ldelim();
526
199
  }
527
200
  return writer;
528
201
  },
529
202
  decode(input, length) {
530
203
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
531
204
  let end = length === undefined ? reader.len : reader.pos + length;
532
- const message = createBaseRequestEcho();
205
+ const message = createBaseRequestBeginBlock();
533
206
  while (reader.pos < end) {
534
207
  const tag = reader.uint32();
535
208
  switch (tag >>> 3) {
536
209
  case 1:
537
- message.message = reader.string();
210
+ message.hash = reader.bytes();
211
+ break;
212
+ case 2:
213
+ message.header = Header.decode(reader, reader.uint32());
214
+ break;
215
+ case 3:
216
+ message.lastCommitInfo = LastCommitInfo.decode(reader, reader.uint32());
217
+ break;
218
+ case 4:
219
+ message.byzantineValidators.push(Evidence.decode(reader, reader.uint32()));
538
220
  break;
539
221
  default:
540
222
  reader.skipType(tag & 7);
@@ -545,47 +227,94 @@ export const RequestEcho = {
545
227
  },
546
228
  fromJSON(object) {
547
229
  return {
548
- message: isSet(object.message) ? String(object.message) : '',
230
+ hash: isSet(object.hash)
231
+ ? bytesFromBase64(object.hash)
232
+ : new Uint8Array(),
233
+ header: isSet(object.header) ? Header.fromJSON(object.header) : undefined,
234
+ lastCommitInfo: isSet(object.lastCommitInfo)
235
+ ? LastCommitInfo.fromJSON(object.lastCommitInfo)
236
+ : undefined,
237
+ byzantineValidators: Array.isArray(object?.byzantineValidators)
238
+ ? object.byzantineValidators.map((e) => Evidence.fromJSON(e))
239
+ : [],
549
240
  };
550
241
  },
551
242
  toJSON(message) {
552
243
  const obj = {};
553
- message.message !== undefined && (obj.message = message.message);
244
+ message.hash !== undefined &&
245
+ (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array()));
246
+ message.header !== undefined &&
247
+ (obj.header = message.header ? Header.toJSON(message.header) : undefined);
248
+ message.lastCommitInfo !== undefined &&
249
+ (obj.lastCommitInfo = message.lastCommitInfo
250
+ ? LastCommitInfo.toJSON(message.lastCommitInfo)
251
+ : undefined);
252
+ if (message.byzantineValidators) {
253
+ obj.byzantineValidators = message.byzantineValidators.map(e => e ? Evidence.toJSON(e) : undefined);
254
+ }
255
+ else {
256
+ obj.byzantineValidators = [];
257
+ }
554
258
  return obj;
555
259
  },
556
260
  fromPartial(object) {
557
- const message = createBaseRequestEcho();
558
- message.message = object.message ?? '';
261
+ const message = createBaseRequestBeginBlock();
262
+ message.hash = object.hash ?? new Uint8Array();
263
+ message.header =
264
+ object.header !== undefined && object.header !== null
265
+ ? Header.fromPartial(object.header)
266
+ : undefined;
267
+ message.lastCommitInfo =
268
+ object.lastCommitInfo !== undefined && object.lastCommitInfo !== null
269
+ ? LastCommitInfo.fromPartial(object.lastCommitInfo)
270
+ : undefined;
271
+ message.byzantineValidators =
272
+ object.byzantineValidators?.map(e => Evidence.fromPartial(e)) || [];
559
273
  return message;
560
274
  },
561
275
  fromProtoMsg(message) {
562
- return RequestEcho.decode(message.value);
276
+ return RequestBeginBlock.decode(message.value);
563
277
  },
564
278
  toProto(message) {
565
- return RequestEcho.encode(message).finish();
279
+ return RequestBeginBlock.encode(message).finish();
566
280
  },
567
281
  toProtoMsg(message) {
568
282
  return {
569
- typeUrl: '/tendermint.abci.RequestEcho',
570
- value: RequestEcho.encode(message).finish(),
283
+ typeUrl: '/tendermint.abci.RequestBeginBlock',
284
+ value: RequestBeginBlock.encode(message).finish(),
571
285
  };
572
286
  },
573
287
  };
574
- function createBaseRequestFlush() {
575
- return {};
288
+ function createBaseRequestCheckTx() {
289
+ return {
290
+ tx: new Uint8Array(),
291
+ type: 0,
292
+ };
576
293
  }
577
- export const RequestFlush = {
578
- typeUrl: '/tendermint.abci.RequestFlush',
579
- encode(_, writer = BinaryWriter.create()) {
294
+ export const RequestCheckTx = {
295
+ typeUrl: '/tendermint.abci.RequestCheckTx',
296
+ encode(message, writer = BinaryWriter.create()) {
297
+ if (message.tx.length !== 0) {
298
+ writer.uint32(10).bytes(message.tx);
299
+ }
300
+ if (message.type !== 0) {
301
+ writer.uint32(16).int32(message.type);
302
+ }
580
303
  return writer;
581
304
  },
582
305
  decode(input, length) {
583
306
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
584
307
  let end = length === undefined ? reader.len : reader.pos + length;
585
- const message = createBaseRequestFlush();
308
+ const message = createBaseRequestCheckTx();
586
309
  while (reader.pos < end) {
587
310
  const tag = reader.uint32();
588
311
  switch (tag >>> 3) {
312
+ case 1:
313
+ message.tx = reader.bytes();
314
+ break;
315
+ case 2:
316
+ message.type = reader.int32();
317
+ break;
589
318
  default:
590
319
  reader.skipType(tag & 7);
591
320
  break;
@@ -593,66 +322,60 @@ export const RequestFlush = {
593
322
  }
594
323
  return message;
595
324
  },
596
- fromJSON(_) {
597
- return {};
325
+ fromJSON(object) {
326
+ return {
327
+ tx: isSet(object.tx) ? bytesFromBase64(object.tx) : new Uint8Array(),
328
+ type: isSet(object.type) ? checkTxTypeFromJSON(object.type) : -1,
329
+ };
598
330
  },
599
- toJSON(_) {
331
+ toJSON(message) {
600
332
  const obj = {};
333
+ message.tx !== undefined &&
334
+ (obj.tx = base64FromBytes(message.tx !== undefined ? message.tx : new Uint8Array()));
335
+ message.type !== undefined && (obj.type = checkTxTypeToJSON(message.type));
601
336
  return obj;
602
337
  },
603
- fromPartial(_) {
604
- const message = createBaseRequestFlush();
605
- return message;
606
- },
338
+ fromPartial(object) {
339
+ const message = createBaseRequestCheckTx();
340
+ message.tx = object.tx ?? new Uint8Array();
341
+ message.type = object.type ?? 0;
342
+ return message;
343
+ },
607
344
  fromProtoMsg(message) {
608
- return RequestFlush.decode(message.value);
345
+ return RequestCheckTx.decode(message.value);
609
346
  },
610
347
  toProto(message) {
611
- return RequestFlush.encode(message).finish();
348
+ return RequestCheckTx.encode(message).finish();
612
349
  },
613
350
  toProtoMsg(message) {
614
351
  return {
615
- typeUrl: '/tendermint.abci.RequestFlush',
616
- value: RequestFlush.encode(message).finish(),
352
+ typeUrl: '/tendermint.abci.RequestCheckTx',
353
+ value: RequestCheckTx.encode(message).finish(),
617
354
  };
618
355
  },
619
356
  };
620
- function createBaseRequestInfo() {
357
+ function createBaseRequestDeliverTx() {
621
358
  return {
622
- version: '',
623
- blockVersion: BigInt(0),
624
- p2pVersion: BigInt(0),
359
+ tx: new Uint8Array(),
625
360
  };
626
361
  }
627
- export const RequestInfo = {
628
- typeUrl: '/tendermint.abci.RequestInfo',
362
+ export const RequestDeliverTx = {
363
+ typeUrl: '/tendermint.abci.RequestDeliverTx',
629
364
  encode(message, writer = BinaryWriter.create()) {
630
- if (message.version !== '') {
631
- writer.uint32(10).string(message.version);
632
- }
633
- if (message.blockVersion !== BigInt(0)) {
634
- writer.uint32(16).uint64(message.blockVersion);
635
- }
636
- if (message.p2pVersion !== BigInt(0)) {
637
- writer.uint32(24).uint64(message.p2pVersion);
365
+ if (message.tx.length !== 0) {
366
+ writer.uint32(10).bytes(message.tx);
638
367
  }
639
368
  return writer;
640
369
  },
641
370
  decode(input, length) {
642
371
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
643
372
  let end = length === undefined ? reader.len : reader.pos + length;
644
- const message = createBaseRequestInfo();
373
+ const message = createBaseRequestDeliverTx();
645
374
  while (reader.pos < end) {
646
375
  const tag = reader.uint32();
647
376
  switch (tag >>> 3) {
648
377
  case 1:
649
- message.version = reader.string();
650
- break;
651
- case 2:
652
- message.blockVersion = reader.uint64();
653
- break;
654
- case 3:
655
- message.p2pVersion = reader.uint64();
378
+ message.tx = reader.bytes();
656
379
  break;
657
380
  default:
658
381
  reader.skipType(tag & 7);
@@ -663,79 +386,55 @@ export const RequestInfo = {
663
386
  },
664
387
  fromJSON(object) {
665
388
  return {
666
- version: isSet(object.version) ? String(object.version) : '',
667
- blockVersion: isSet(object.blockVersion)
668
- ? BigInt(object.blockVersion.toString())
669
- : BigInt(0),
670
- p2pVersion: isSet(object.p2pVersion)
671
- ? BigInt(object.p2pVersion.toString())
672
- : BigInt(0),
389
+ tx: isSet(object.tx) ? bytesFromBase64(object.tx) : new Uint8Array(),
673
390
  };
674
391
  },
675
392
  toJSON(message) {
676
393
  const obj = {};
677
- message.version !== undefined && (obj.version = message.version);
678
- message.blockVersion !== undefined &&
679
- (obj.blockVersion = (message.blockVersion || BigInt(0)).toString());
680
- message.p2pVersion !== undefined &&
681
- (obj.p2pVersion = (message.p2pVersion || BigInt(0)).toString());
394
+ message.tx !== undefined &&
395
+ (obj.tx = base64FromBytes(message.tx !== undefined ? message.tx : new Uint8Array()));
682
396
  return obj;
683
397
  },
684
398
  fromPartial(object) {
685
- const message = createBaseRequestInfo();
686
- message.version = object.version ?? '';
687
- message.blockVersion =
688
- object.blockVersion !== undefined && object.blockVersion !== null
689
- ? BigInt(object.blockVersion.toString())
690
- : BigInt(0);
691
- message.p2pVersion =
692
- object.p2pVersion !== undefined && object.p2pVersion !== null
693
- ? BigInt(object.p2pVersion.toString())
694
- : BigInt(0);
399
+ const message = createBaseRequestDeliverTx();
400
+ message.tx = object.tx ?? new Uint8Array();
695
401
  return message;
696
402
  },
697
403
  fromProtoMsg(message) {
698
- return RequestInfo.decode(message.value);
404
+ return RequestDeliverTx.decode(message.value);
699
405
  },
700
406
  toProto(message) {
701
- return RequestInfo.encode(message).finish();
407
+ return RequestDeliverTx.encode(message).finish();
702
408
  },
703
409
  toProtoMsg(message) {
704
410
  return {
705
- typeUrl: '/tendermint.abci.RequestInfo',
706
- value: RequestInfo.encode(message).finish(),
411
+ typeUrl: '/tendermint.abci.RequestDeliverTx',
412
+ value: RequestDeliverTx.encode(message).finish(),
707
413
  };
708
414
  },
709
415
  };
710
- function createBaseRequestSetOption() {
416
+ function createBaseRequestEndBlock() {
711
417
  return {
712
- key: '',
713
- value: '',
418
+ height: BigInt(0),
714
419
  };
715
420
  }
716
- export const RequestSetOption = {
717
- typeUrl: '/tendermint.abci.RequestSetOption',
421
+ export const RequestEndBlock = {
422
+ typeUrl: '/tendermint.abci.RequestEndBlock',
718
423
  encode(message, writer = BinaryWriter.create()) {
719
- if (message.key !== '') {
720
- writer.uint32(10).string(message.key);
721
- }
722
- if (message.value !== '') {
723
- writer.uint32(18).string(message.value);
424
+ if (message.height !== BigInt(0)) {
425
+ writer.uint32(8).int64(message.height);
724
426
  }
725
427
  return writer;
726
428
  },
727
429
  decode(input, length) {
728
430
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
729
431
  let end = length === undefined ? reader.len : reader.pos + length;
730
- const message = createBaseRequestSetOption();
432
+ const message = createBaseRequestEndBlock();
731
433
  while (reader.pos < end) {
732
434
  const tag = reader.uint32();
733
435
  switch (tag >>> 3) {
734
436
  case 1:
735
- message.key = reader.string();
736
- break;
737
- case 2:
738
- message.value = reader.string();
437
+ message.height = reader.int64();
739
438
  break;
740
439
  default:
741
440
  reader.skipType(tag & 7);
@@ -746,93 +445,53 @@ export const RequestSetOption = {
746
445
  },
747
446
  fromJSON(object) {
748
447
  return {
749
- key: isSet(object.key) ? String(object.key) : '',
750
- value: isSet(object.value) ? String(object.value) : '',
448
+ height: isSet(object.height)
449
+ ? BigInt(object.height.toString())
450
+ : BigInt(0),
751
451
  };
752
452
  },
753
453
  toJSON(message) {
754
454
  const obj = {};
755
- message.key !== undefined && (obj.key = message.key);
756
- message.value !== undefined && (obj.value = message.value);
455
+ message.height !== undefined &&
456
+ (obj.height = (message.height || BigInt(0)).toString());
757
457
  return obj;
758
458
  },
759
459
  fromPartial(object) {
760
- const message = createBaseRequestSetOption();
761
- message.key = object.key ?? '';
762
- message.value = object.value ?? '';
460
+ const message = createBaseRequestEndBlock();
461
+ message.height =
462
+ object.height !== undefined && object.height !== null
463
+ ? BigInt(object.height.toString())
464
+ : BigInt(0);
763
465
  return message;
764
466
  },
765
467
  fromProtoMsg(message) {
766
- return RequestSetOption.decode(message.value);
468
+ return RequestEndBlock.decode(message.value);
767
469
  },
768
470
  toProto(message) {
769
- return RequestSetOption.encode(message).finish();
471
+ return RequestEndBlock.encode(message).finish();
770
472
  },
771
473
  toProtoMsg(message) {
772
474
  return {
773
- typeUrl: '/tendermint.abci.RequestSetOption',
774
- value: RequestSetOption.encode(message).finish(),
475
+ typeUrl: '/tendermint.abci.RequestEndBlock',
476
+ value: RequestEndBlock.encode(message).finish(),
775
477
  };
776
478
  },
777
479
  };
778
- function createBaseRequestInitChain() {
779
- return {
780
- time: Timestamp.fromPartial({}),
781
- chainId: '',
782
- consensusParams: undefined,
783
- validators: [],
784
- appStateBytes: new Uint8Array(),
785
- initialHeight: BigInt(0),
786
- };
480
+ function createBaseRequestCommit() {
481
+ return {};
787
482
  }
788
- export const RequestInitChain = {
789
- typeUrl: '/tendermint.abci.RequestInitChain',
790
- encode(message, writer = BinaryWriter.create()) {
791
- if (message.time !== undefined) {
792
- Timestamp.encode(message.time, writer.uint32(10).fork()).ldelim();
793
- }
794
- if (message.chainId !== '') {
795
- writer.uint32(18).string(message.chainId);
796
- }
797
- if (message.consensusParams !== undefined) {
798
- ConsensusParams.encode(message.consensusParams, writer.uint32(26).fork()).ldelim();
799
- }
800
- for (const v of message.validators) {
801
- ValidatorUpdate.encode(v, writer.uint32(34).fork()).ldelim();
802
- }
803
- if (message.appStateBytes.length !== 0) {
804
- writer.uint32(42).bytes(message.appStateBytes);
805
- }
806
- if (message.initialHeight !== BigInt(0)) {
807
- writer.uint32(48).int64(message.initialHeight);
808
- }
483
+ export const RequestCommit = {
484
+ typeUrl: '/tendermint.abci.RequestCommit',
485
+ encode(_, writer = BinaryWriter.create()) {
809
486
  return writer;
810
487
  },
811
488
  decode(input, length) {
812
489
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
813
490
  let end = length === undefined ? reader.len : reader.pos + length;
814
- const message = createBaseRequestInitChain();
491
+ const message = createBaseRequestCommit();
815
492
  while (reader.pos < end) {
816
493
  const tag = reader.uint32();
817
494
  switch (tag >>> 3) {
818
- case 1:
819
- message.time = Timestamp.decode(reader, reader.uint32());
820
- break;
821
- case 2:
822
- message.chainId = reader.string();
823
- break;
824
- case 3:
825
- message.consensusParams = ConsensusParams.decode(reader, reader.uint32());
826
- break;
827
- case 4:
828
- message.validators.push(ValidatorUpdate.decode(reader, reader.uint32()));
829
- break;
830
- case 5:
831
- message.appStateBytes = reader.bytes();
832
- break;
833
- case 6:
834
- message.initialHeight = reader.int64();
835
- break;
836
495
  default:
837
496
  reader.skipType(tag & 7);
838
497
  break;
@@ -840,123 +499,108 @@ export const RequestInitChain = {
840
499
  }
841
500
  return message;
842
501
  },
843
- fromJSON(object) {
844
- return {
845
- time: isSet(object.time) ? fromJsonTimestamp(object.time) : undefined,
846
- chainId: isSet(object.chainId) ? String(object.chainId) : '',
847
- consensusParams: isSet(object.consensusParams)
848
- ? ConsensusParams.fromJSON(object.consensusParams)
849
- : undefined,
850
- validators: Array.isArray(object?.validators)
851
- ? object.validators.map((e) => ValidatorUpdate.fromJSON(e))
852
- : [],
853
- appStateBytes: isSet(object.appStateBytes)
854
- ? bytesFromBase64(object.appStateBytes)
855
- : new Uint8Array(),
856
- initialHeight: isSet(object.initialHeight)
857
- ? BigInt(object.initialHeight.toString())
858
- : BigInt(0),
859
- };
502
+ fromJSON(_) {
503
+ return {};
860
504
  },
861
- toJSON(message) {
505
+ toJSON(_) {
862
506
  const obj = {};
863
- message.time !== undefined &&
864
- (obj.time = fromTimestamp(message.time).toISOString());
865
- message.chainId !== undefined && (obj.chainId = message.chainId);
866
- message.consensusParams !== undefined &&
867
- (obj.consensusParams = message.consensusParams
868
- ? ConsensusParams.toJSON(message.consensusParams)
869
- : undefined);
870
- if (message.validators) {
871
- obj.validators = message.validators.map(e => e ? ValidatorUpdate.toJSON(e) : undefined);
872
- }
873
- else {
874
- obj.validators = [];
875
- }
876
- message.appStateBytes !== undefined &&
877
- (obj.appStateBytes = base64FromBytes(message.appStateBytes !== undefined
878
- ? message.appStateBytes
879
- : new Uint8Array()));
880
- message.initialHeight !== undefined &&
881
- (obj.initialHeight = (message.initialHeight || BigInt(0)).toString());
882
507
  return obj;
883
508
  },
884
- fromPartial(object) {
885
- const message = createBaseRequestInitChain();
886
- message.time =
887
- object.time !== undefined && object.time !== null
888
- ? Timestamp.fromPartial(object.time)
889
- : undefined;
890
- message.chainId = object.chainId ?? '';
891
- message.consensusParams =
892
- object.consensusParams !== undefined && object.consensusParams !== null
893
- ? ConsensusParams.fromPartial(object.consensusParams)
894
- : undefined;
895
- message.validators =
896
- object.validators?.map(e => ValidatorUpdate.fromPartial(e)) || [];
897
- message.appStateBytes = object.appStateBytes ?? new Uint8Array();
898
- message.initialHeight =
899
- object.initialHeight !== undefined && object.initialHeight !== null
900
- ? BigInt(object.initialHeight.toString())
901
- : BigInt(0);
509
+ fromPartial(_) {
510
+ const message = createBaseRequestCommit();
902
511
  return message;
903
512
  },
904
513
  fromProtoMsg(message) {
905
- return RequestInitChain.decode(message.value);
514
+ return RequestCommit.decode(message.value);
906
515
  },
907
516
  toProto(message) {
908
- return RequestInitChain.encode(message).finish();
517
+ return RequestCommit.encode(message).finish();
909
518
  },
910
519
  toProtoMsg(message) {
911
520
  return {
912
- typeUrl: '/tendermint.abci.RequestInitChain',
913
- value: RequestInitChain.encode(message).finish(),
521
+ typeUrl: '/tendermint.abci.RequestCommit',
522
+ value: RequestCommit.encode(message).finish(),
914
523
  };
915
524
  },
916
525
  };
917
- function createBaseRequestQuery() {
526
+ function createBaseResponseQuery() {
918
527
  return {
919
- data: new Uint8Array(),
920
- path: '',
528
+ code: 0,
529
+ log: '',
530
+ info: '',
531
+ index: BigInt(0),
532
+ key: new Uint8Array(),
533
+ value: new Uint8Array(),
534
+ proofOps: undefined,
921
535
  height: BigInt(0),
922
- prove: false,
536
+ codespace: '',
923
537
  };
924
538
  }
925
- export const RequestQuery = {
926
- typeUrl: '/tendermint.abci.RequestQuery',
539
+ export const ResponseQuery = {
540
+ typeUrl: '/tendermint.abci.ResponseQuery',
927
541
  encode(message, writer = BinaryWriter.create()) {
928
- if (message.data.length !== 0) {
929
- writer.uint32(10).bytes(message.data);
542
+ if (message.code !== 0) {
543
+ writer.uint32(8).uint32(message.code);
930
544
  }
931
- if (message.path !== '') {
932
- writer.uint32(18).string(message.path);
545
+ if (message.log !== '') {
546
+ writer.uint32(26).string(message.log);
547
+ }
548
+ if (message.info !== '') {
549
+ writer.uint32(34).string(message.info);
550
+ }
551
+ if (message.index !== BigInt(0)) {
552
+ writer.uint32(40).int64(message.index);
553
+ }
554
+ if (message.key.length !== 0) {
555
+ writer.uint32(50).bytes(message.key);
556
+ }
557
+ if (message.value.length !== 0) {
558
+ writer.uint32(58).bytes(message.value);
559
+ }
560
+ if (message.proofOps !== undefined) {
561
+ ProofOps.encode(message.proofOps, writer.uint32(66).fork()).ldelim();
933
562
  }
934
563
  if (message.height !== BigInt(0)) {
935
- writer.uint32(24).int64(message.height);
564
+ writer.uint32(72).int64(message.height);
936
565
  }
937
- if (message.prove === true) {
938
- writer.uint32(32).bool(message.prove);
566
+ if (message.codespace !== '') {
567
+ writer.uint32(82).string(message.codespace);
939
568
  }
940
569
  return writer;
941
570
  },
942
571
  decode(input, length) {
943
572
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
944
573
  let end = length === undefined ? reader.len : reader.pos + length;
945
- const message = createBaseRequestQuery();
574
+ const message = createBaseResponseQuery();
946
575
  while (reader.pos < end) {
947
576
  const tag = reader.uint32();
948
577
  switch (tag >>> 3) {
949
578
  case 1:
950
- message.data = reader.bytes();
951
- break;
952
- case 2:
953
- message.path = reader.string();
579
+ message.code = reader.uint32();
954
580
  break;
955
581
  case 3:
956
- message.height = reader.int64();
582
+ message.log = reader.string();
957
583
  break;
958
584
  case 4:
959
- message.prove = reader.bool();
585
+ message.info = reader.string();
586
+ break;
587
+ case 5:
588
+ message.index = reader.int64();
589
+ break;
590
+ case 6:
591
+ message.key = reader.bytes();
592
+ break;
593
+ case 7:
594
+ message.value = reader.bytes();
595
+ break;
596
+ case 8:
597
+ message.proofOps = ProofOps.decode(reader, reader.uint32());
598
+ break;
599
+ case 9:
600
+ message.height = reader.int64();
601
+ break;
602
+ case 10:
603
+ message.codespace = reader.string();
960
604
  break;
961
605
  default:
962
606
  reader.skipType(tag & 7);
@@ -967,93 +611,100 @@ export const RequestQuery = {
967
611
  },
968
612
  fromJSON(object) {
969
613
  return {
970
- data: isSet(object.data)
971
- ? bytesFromBase64(object.data)
614
+ code: isSet(object.code) ? Number(object.code) : 0,
615
+ log: isSet(object.log) ? String(object.log) : '',
616
+ info: isSet(object.info) ? String(object.info) : '',
617
+ index: isSet(object.index) ? BigInt(object.index.toString()) : BigInt(0),
618
+ key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(),
619
+ value: isSet(object.value)
620
+ ? bytesFromBase64(object.value)
972
621
  : new Uint8Array(),
973
- path: isSet(object.path) ? String(object.path) : '',
622
+ proofOps: isSet(object.proofOps)
623
+ ? ProofOps.fromJSON(object.proofOps)
624
+ : undefined,
974
625
  height: isSet(object.height)
975
626
  ? BigInt(object.height.toString())
976
627
  : BigInt(0),
977
- prove: isSet(object.prove) ? Boolean(object.prove) : false,
628
+ codespace: isSet(object.codespace) ? String(object.codespace) : '',
978
629
  };
979
630
  },
980
631
  toJSON(message) {
981
632
  const obj = {};
982
- message.data !== undefined &&
983
- (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
984
- message.path !== undefined && (obj.path = message.path);
633
+ message.code !== undefined && (obj.code = Math.round(message.code));
634
+ message.log !== undefined && (obj.log = message.log);
635
+ message.info !== undefined && (obj.info = message.info);
636
+ message.index !== undefined &&
637
+ (obj.index = (message.index || BigInt(0)).toString());
638
+ message.key !== undefined &&
639
+ (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
640
+ message.value !== undefined &&
641
+ (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array()));
642
+ message.proofOps !== undefined &&
643
+ (obj.proofOps = message.proofOps
644
+ ? ProofOps.toJSON(message.proofOps)
645
+ : undefined);
985
646
  message.height !== undefined &&
986
647
  (obj.height = (message.height || BigInt(0)).toString());
987
- message.prove !== undefined && (obj.prove = message.prove);
648
+ message.codespace !== undefined && (obj.codespace = message.codespace);
988
649
  return obj;
989
650
  },
990
651
  fromPartial(object) {
991
- const message = createBaseRequestQuery();
992
- message.data = object.data ?? new Uint8Array();
993
- message.path = object.path ?? '';
652
+ const message = createBaseResponseQuery();
653
+ message.code = object.code ?? 0;
654
+ message.log = object.log ?? '';
655
+ message.info = object.info ?? '';
656
+ message.index =
657
+ object.index !== undefined && object.index !== null
658
+ ? BigInt(object.index.toString())
659
+ : BigInt(0);
660
+ message.key = object.key ?? new Uint8Array();
661
+ message.value = object.value ?? new Uint8Array();
662
+ message.proofOps =
663
+ object.proofOps !== undefined && object.proofOps !== null
664
+ ? ProofOps.fromPartial(object.proofOps)
665
+ : undefined;
994
666
  message.height =
995
667
  object.height !== undefined && object.height !== null
996
668
  ? BigInt(object.height.toString())
997
669
  : BigInt(0);
998
- message.prove = object.prove ?? false;
670
+ message.codespace = object.codespace ?? '';
999
671
  return message;
1000
672
  },
1001
673
  fromProtoMsg(message) {
1002
- return RequestQuery.decode(message.value);
674
+ return ResponseQuery.decode(message.value);
1003
675
  },
1004
676
  toProto(message) {
1005
- return RequestQuery.encode(message).finish();
677
+ return ResponseQuery.encode(message).finish();
1006
678
  },
1007
679
  toProtoMsg(message) {
1008
680
  return {
1009
- typeUrl: '/tendermint.abci.RequestQuery',
1010
- value: RequestQuery.encode(message).finish(),
681
+ typeUrl: '/tendermint.abci.ResponseQuery',
682
+ value: ResponseQuery.encode(message).finish(),
1011
683
  };
1012
684
  },
1013
685
  };
1014
- function createBaseRequestBeginBlock() {
686
+ function createBaseResponseBeginBlock() {
1015
687
  return {
1016
- hash: new Uint8Array(),
1017
- header: Header.fromPartial({}),
1018
- lastCommitInfo: LastCommitInfo.fromPartial({}),
1019
- byzantineValidators: [],
688
+ events: [],
1020
689
  };
1021
690
  }
1022
- export const RequestBeginBlock = {
1023
- typeUrl: '/tendermint.abci.RequestBeginBlock',
691
+ export const ResponseBeginBlock = {
692
+ typeUrl: '/tendermint.abci.ResponseBeginBlock',
1024
693
  encode(message, writer = BinaryWriter.create()) {
1025
- if (message.hash.length !== 0) {
1026
- writer.uint32(10).bytes(message.hash);
1027
- }
1028
- if (message.header !== undefined) {
1029
- Header.encode(message.header, writer.uint32(18).fork()).ldelim();
1030
- }
1031
- if (message.lastCommitInfo !== undefined) {
1032
- LastCommitInfo.encode(message.lastCommitInfo, writer.uint32(26).fork()).ldelim();
1033
- }
1034
- for (const v of message.byzantineValidators) {
1035
- Evidence.encode(v, writer.uint32(34).fork()).ldelim();
694
+ for (const v of message.events) {
695
+ Event.encode(v, writer.uint32(10).fork()).ldelim();
1036
696
  }
1037
697
  return writer;
1038
698
  },
1039
699
  decode(input, length) {
1040
700
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1041
701
  let end = length === undefined ? reader.len : reader.pos + length;
1042
- const message = createBaseRequestBeginBlock();
702
+ const message = createBaseResponseBeginBlock();
1043
703
  while (reader.pos < end) {
1044
704
  const tag = reader.uint32();
1045
705
  switch (tag >>> 3) {
1046
706
  case 1:
1047
- message.hash = reader.bytes();
1048
- break;
1049
- case 2:
1050
- message.header = Header.decode(reader, reader.uint32());
1051
- break;
1052
- case 3:
1053
- message.lastCommitInfo = LastCommitInfo.decode(reader, reader.uint32());
1054
- break;
1055
- case 4:
1056
- message.byzantineValidators.push(Evidence.decode(reader, reader.uint32()));
707
+ message.events.push(Event.decode(reader, reader.uint32()));
1057
708
  break;
1058
709
  default:
1059
710
  reader.skipType(tag & 7);
@@ -1064,93 +715,110 @@ export const RequestBeginBlock = {
1064
715
  },
1065
716
  fromJSON(object) {
1066
717
  return {
1067
- hash: isSet(object.hash)
1068
- ? bytesFromBase64(object.hash)
1069
- : new Uint8Array(),
1070
- header: isSet(object.header) ? Header.fromJSON(object.header) : undefined,
1071
- lastCommitInfo: isSet(object.lastCommitInfo)
1072
- ? LastCommitInfo.fromJSON(object.lastCommitInfo)
1073
- : undefined,
1074
- byzantineValidators: Array.isArray(object?.byzantineValidators)
1075
- ? object.byzantineValidators.map((e) => Evidence.fromJSON(e))
718
+ events: Array.isArray(object?.events)
719
+ ? object.events.map((e) => Event.fromJSON(e))
1076
720
  : [],
1077
721
  };
1078
722
  },
1079
723
  toJSON(message) {
1080
724
  const obj = {};
1081
- message.hash !== undefined &&
1082
- (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array()));
1083
- message.header !== undefined &&
1084
- (obj.header = message.header ? Header.toJSON(message.header) : undefined);
1085
- message.lastCommitInfo !== undefined &&
1086
- (obj.lastCommitInfo = message.lastCommitInfo
1087
- ? LastCommitInfo.toJSON(message.lastCommitInfo)
1088
- : undefined);
1089
- if (message.byzantineValidators) {
1090
- obj.byzantineValidators = message.byzantineValidators.map(e => e ? Evidence.toJSON(e) : undefined);
725
+ if (message.events) {
726
+ obj.events = message.events.map(e => (e ? Event.toJSON(e) : undefined));
1091
727
  }
1092
728
  else {
1093
- obj.byzantineValidators = [];
729
+ obj.events = [];
1094
730
  }
1095
731
  return obj;
1096
732
  },
1097
733
  fromPartial(object) {
1098
- const message = createBaseRequestBeginBlock();
1099
- message.hash = object.hash ?? new Uint8Array();
1100
- message.header =
1101
- object.header !== undefined && object.header !== null
1102
- ? Header.fromPartial(object.header)
1103
- : undefined;
1104
- message.lastCommitInfo =
1105
- object.lastCommitInfo !== undefined && object.lastCommitInfo !== null
1106
- ? LastCommitInfo.fromPartial(object.lastCommitInfo)
1107
- : undefined;
1108
- message.byzantineValidators =
1109
- object.byzantineValidators?.map(e => Evidence.fromPartial(e)) || [];
734
+ const message = createBaseResponseBeginBlock();
735
+ message.events = object.events?.map(e => Event.fromPartial(e)) || [];
1110
736
  return message;
1111
737
  },
1112
738
  fromProtoMsg(message) {
1113
- return RequestBeginBlock.decode(message.value);
739
+ return ResponseBeginBlock.decode(message.value);
1114
740
  },
1115
741
  toProto(message) {
1116
- return RequestBeginBlock.encode(message).finish();
742
+ return ResponseBeginBlock.encode(message).finish();
1117
743
  },
1118
744
  toProtoMsg(message) {
1119
745
  return {
1120
- typeUrl: '/tendermint.abci.RequestBeginBlock',
1121
- value: RequestBeginBlock.encode(message).finish(),
746
+ typeUrl: '/tendermint.abci.ResponseBeginBlock',
747
+ value: ResponseBeginBlock.encode(message).finish(),
1122
748
  };
1123
749
  },
1124
750
  };
1125
- function createBaseRequestCheckTx() {
751
+ function createBaseResponseCheckTx() {
1126
752
  return {
1127
- tx: new Uint8Array(),
1128
- type: 0,
753
+ code: 0,
754
+ data: new Uint8Array(),
755
+ log: '',
756
+ info: '',
757
+ gasWanted: BigInt(0),
758
+ gasUsed: BigInt(0),
759
+ events: [],
760
+ codespace: '',
1129
761
  };
1130
762
  }
1131
- export const RequestCheckTx = {
1132
- typeUrl: '/tendermint.abci.RequestCheckTx',
763
+ export const ResponseCheckTx = {
764
+ typeUrl: '/tendermint.abci.ResponseCheckTx',
1133
765
  encode(message, writer = BinaryWriter.create()) {
1134
- if (message.tx.length !== 0) {
1135
- writer.uint32(10).bytes(message.tx);
766
+ if (message.code !== 0) {
767
+ writer.uint32(8).uint32(message.code);
1136
768
  }
1137
- if (message.type !== 0) {
1138
- writer.uint32(16).int32(message.type);
769
+ if (message.data.length !== 0) {
770
+ writer.uint32(18).bytes(message.data);
771
+ }
772
+ if (message.log !== '') {
773
+ writer.uint32(26).string(message.log);
774
+ }
775
+ if (message.info !== '') {
776
+ writer.uint32(34).string(message.info);
777
+ }
778
+ if (message.gasWanted !== BigInt(0)) {
779
+ writer.uint32(40).int64(message.gasWanted);
780
+ }
781
+ if (message.gasUsed !== BigInt(0)) {
782
+ writer.uint32(48).int64(message.gasUsed);
783
+ }
784
+ for (const v of message.events) {
785
+ Event.encode(v, writer.uint32(58).fork()).ldelim();
786
+ }
787
+ if (message.codespace !== '') {
788
+ writer.uint32(66).string(message.codespace);
1139
789
  }
1140
790
  return writer;
1141
791
  },
1142
792
  decode(input, length) {
1143
793
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1144
794
  let end = length === undefined ? reader.len : reader.pos + length;
1145
- const message = createBaseRequestCheckTx();
795
+ const message = createBaseResponseCheckTx();
1146
796
  while (reader.pos < end) {
1147
797
  const tag = reader.uint32();
1148
798
  switch (tag >>> 3) {
1149
799
  case 1:
1150
- message.tx = reader.bytes();
800
+ message.code = reader.uint32();
1151
801
  break;
1152
802
  case 2:
1153
- message.type = reader.int32();
803
+ message.data = reader.bytes();
804
+ break;
805
+ case 3:
806
+ message.log = reader.string();
807
+ break;
808
+ case 4:
809
+ message.info = reader.string();
810
+ break;
811
+ case 5:
812
+ message.gasWanted = reader.int64();
813
+ break;
814
+ case 6:
815
+ message.gasUsed = reader.int64();
816
+ break;
817
+ case 7:
818
+ message.events.push(Event.decode(reader, reader.uint32()));
819
+ break;
820
+ case 8:
821
+ message.codespace = reader.string();
1154
822
  break;
1155
823
  default:
1156
824
  reader.skipType(tag & 7);
@@ -1161,2215 +829,146 @@ export const RequestCheckTx = {
1161
829
  },
1162
830
  fromJSON(object) {
1163
831
  return {
1164
- tx: isSet(object.tx) ? bytesFromBase64(object.tx) : new Uint8Array(),
1165
- type: isSet(object.type) ? checkTxTypeFromJSON(object.type) : -1,
832
+ code: isSet(object.code) ? Number(object.code) : 0,
833
+ data: isSet(object.data)
834
+ ? bytesFromBase64(object.data)
835
+ : new Uint8Array(),
836
+ log: isSet(object.log) ? String(object.log) : '',
837
+ info: isSet(object.info) ? String(object.info) : '',
838
+ gasWanted: isSet(object.gas_wanted)
839
+ ? BigInt(object.gas_wanted.toString())
840
+ : BigInt(0),
841
+ gasUsed: isSet(object.gas_used)
842
+ ? BigInt(object.gas_used.toString())
843
+ : BigInt(0),
844
+ events: Array.isArray(object?.events)
845
+ ? object.events.map((e) => Event.fromJSON(e))
846
+ : [],
847
+ codespace: isSet(object.codespace) ? String(object.codespace) : '',
1166
848
  };
1167
849
  },
1168
850
  toJSON(message) {
1169
851
  const obj = {};
1170
- message.tx !== undefined &&
1171
- (obj.tx = base64FromBytes(message.tx !== undefined ? message.tx : new Uint8Array()));
1172
- message.type !== undefined && (obj.type = checkTxTypeToJSON(message.type));
852
+ message.code !== undefined && (obj.code = Math.round(message.code));
853
+ message.data !== undefined &&
854
+ (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
855
+ message.log !== undefined && (obj.log = message.log);
856
+ message.info !== undefined && (obj.info = message.info);
857
+ message.gasWanted !== undefined &&
858
+ (obj.gas_wanted = (message.gasWanted || BigInt(0)).toString());
859
+ message.gasUsed !== undefined &&
860
+ (obj.gas_used = (message.gasUsed || BigInt(0)).toString());
861
+ if (message.events) {
862
+ obj.events = message.events.map(e => (e ? Event.toJSON(e) : undefined));
863
+ }
864
+ else {
865
+ obj.events = [];
866
+ }
867
+ message.codespace !== undefined && (obj.codespace = message.codespace);
1173
868
  return obj;
1174
869
  },
1175
870
  fromPartial(object) {
1176
- const message = createBaseRequestCheckTx();
1177
- message.tx = object.tx ?? new Uint8Array();
1178
- message.type = object.type ?? 0;
871
+ const message = createBaseResponseCheckTx();
872
+ message.code = object.code ?? 0;
873
+ message.data = object.data ?? new Uint8Array();
874
+ message.log = object.log ?? '';
875
+ message.info = object.info ?? '';
876
+ message.gasWanted =
877
+ object.gasWanted !== undefined && object.gasWanted !== null
878
+ ? BigInt(object.gasWanted.toString())
879
+ : BigInt(0);
880
+ message.gasUsed =
881
+ object.gasUsed !== undefined && object.gasUsed !== null
882
+ ? BigInt(object.gasUsed.toString())
883
+ : BigInt(0);
884
+ message.events = object.events?.map(e => Event.fromPartial(e)) || [];
885
+ message.codespace = object.codespace ?? '';
1179
886
  return message;
1180
887
  },
1181
888
  fromProtoMsg(message) {
1182
- return RequestCheckTx.decode(message.value);
889
+ return ResponseCheckTx.decode(message.value);
1183
890
  },
1184
891
  toProto(message) {
1185
- return RequestCheckTx.encode(message).finish();
892
+ return ResponseCheckTx.encode(message).finish();
1186
893
  },
1187
894
  toProtoMsg(message) {
1188
895
  return {
1189
- typeUrl: '/tendermint.abci.RequestCheckTx',
1190
- value: RequestCheckTx.encode(message).finish(),
896
+ typeUrl: '/tendermint.abci.ResponseCheckTx',
897
+ value: ResponseCheckTx.encode(message).finish(),
1191
898
  };
1192
899
  },
1193
900
  };
1194
- function createBaseRequestDeliverTx() {
901
+ function createBaseResponseDeliverTx() {
1195
902
  return {
1196
- tx: new Uint8Array(),
903
+ code: 0,
904
+ data: new Uint8Array(),
905
+ log: '',
906
+ info: '',
907
+ gasWanted: BigInt(0),
908
+ gasUsed: BigInt(0),
909
+ events: [],
910
+ codespace: '',
1197
911
  };
1198
912
  }
1199
- export const RequestDeliverTx = {
1200
- typeUrl: '/tendermint.abci.RequestDeliverTx',
913
+ export const ResponseDeliverTx = {
914
+ typeUrl: '/tendermint.abci.ResponseDeliverTx',
1201
915
  encode(message, writer = BinaryWriter.create()) {
1202
- if (message.tx.length !== 0) {
1203
- writer.uint32(10).bytes(message.tx);
916
+ if (message.code !== 0) {
917
+ writer.uint32(8).uint32(message.code);
1204
918
  }
1205
- return writer;
1206
- },
1207
- decode(input, length) {
1208
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1209
- let end = length === undefined ? reader.len : reader.pos + length;
1210
- const message = createBaseRequestDeliverTx();
1211
- while (reader.pos < end) {
1212
- const tag = reader.uint32();
1213
- switch (tag >>> 3) {
1214
- case 1:
1215
- message.tx = reader.bytes();
1216
- break;
1217
- default:
1218
- reader.skipType(tag & 7);
1219
- break;
1220
- }
919
+ if (message.data.length !== 0) {
920
+ writer.uint32(18).bytes(message.data);
1221
921
  }
1222
- return message;
1223
- },
1224
- fromJSON(object) {
1225
- return {
1226
- tx: isSet(object.tx) ? bytesFromBase64(object.tx) : new Uint8Array(),
1227
- };
1228
- },
1229
- toJSON(message) {
1230
- const obj = {};
1231
- message.tx !== undefined &&
1232
- (obj.tx = base64FromBytes(message.tx !== undefined ? message.tx : new Uint8Array()));
1233
- return obj;
1234
- },
1235
- fromPartial(object) {
1236
- const message = createBaseRequestDeliverTx();
1237
- message.tx = object.tx ?? new Uint8Array();
1238
- return message;
1239
- },
1240
- fromProtoMsg(message) {
1241
- return RequestDeliverTx.decode(message.value);
1242
- },
1243
- toProto(message) {
1244
- return RequestDeliverTx.encode(message).finish();
1245
- },
1246
- toProtoMsg(message) {
1247
- return {
1248
- typeUrl: '/tendermint.abci.RequestDeliverTx',
1249
- value: RequestDeliverTx.encode(message).finish(),
1250
- };
1251
- },
1252
- };
1253
- function createBaseRequestEndBlock() {
1254
- return {
1255
- height: BigInt(0),
1256
- };
1257
- }
1258
- export const RequestEndBlock = {
1259
- typeUrl: '/tendermint.abci.RequestEndBlock',
1260
- encode(message, writer = BinaryWriter.create()) {
1261
- if (message.height !== BigInt(0)) {
1262
- writer.uint32(8).int64(message.height);
1263
- }
1264
- return writer;
1265
- },
1266
- decode(input, length) {
1267
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1268
- let end = length === undefined ? reader.len : reader.pos + length;
1269
- const message = createBaseRequestEndBlock();
1270
- while (reader.pos < end) {
1271
- const tag = reader.uint32();
1272
- switch (tag >>> 3) {
1273
- case 1:
1274
- message.height = reader.int64();
1275
- break;
1276
- default:
1277
- reader.skipType(tag & 7);
1278
- break;
1279
- }
1280
- }
1281
- return message;
1282
- },
1283
- fromJSON(object) {
1284
- return {
1285
- height: isSet(object.height)
1286
- ? BigInt(object.height.toString())
1287
- : BigInt(0),
1288
- };
1289
- },
1290
- toJSON(message) {
1291
- const obj = {};
1292
- message.height !== undefined &&
1293
- (obj.height = (message.height || BigInt(0)).toString());
1294
- return obj;
1295
- },
1296
- fromPartial(object) {
1297
- const message = createBaseRequestEndBlock();
1298
- message.height =
1299
- object.height !== undefined && object.height !== null
1300
- ? BigInt(object.height.toString())
1301
- : BigInt(0);
1302
- return message;
1303
- },
1304
- fromProtoMsg(message) {
1305
- return RequestEndBlock.decode(message.value);
1306
- },
1307
- toProto(message) {
1308
- return RequestEndBlock.encode(message).finish();
1309
- },
1310
- toProtoMsg(message) {
1311
- return {
1312
- typeUrl: '/tendermint.abci.RequestEndBlock',
1313
- value: RequestEndBlock.encode(message).finish(),
1314
- };
1315
- },
1316
- };
1317
- function createBaseRequestCommit() {
1318
- return {};
1319
- }
1320
- export const RequestCommit = {
1321
- typeUrl: '/tendermint.abci.RequestCommit',
1322
- encode(_, writer = BinaryWriter.create()) {
1323
- return writer;
1324
- },
1325
- decode(input, length) {
1326
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1327
- let end = length === undefined ? reader.len : reader.pos + length;
1328
- const message = createBaseRequestCommit();
1329
- while (reader.pos < end) {
1330
- const tag = reader.uint32();
1331
- switch (tag >>> 3) {
1332
- default:
1333
- reader.skipType(tag & 7);
1334
- break;
1335
- }
1336
- }
1337
- return message;
1338
- },
1339
- fromJSON(_) {
1340
- return {};
1341
- },
1342
- toJSON(_) {
1343
- const obj = {};
1344
- return obj;
1345
- },
1346
- fromPartial(_) {
1347
- const message = createBaseRequestCommit();
1348
- return message;
1349
- },
1350
- fromProtoMsg(message) {
1351
- return RequestCommit.decode(message.value);
1352
- },
1353
- toProto(message) {
1354
- return RequestCommit.encode(message).finish();
1355
- },
1356
- toProtoMsg(message) {
1357
- return {
1358
- typeUrl: '/tendermint.abci.RequestCommit',
1359
- value: RequestCommit.encode(message).finish(),
1360
- };
1361
- },
1362
- };
1363
- function createBaseRequestListSnapshots() {
1364
- return {};
1365
- }
1366
- export const RequestListSnapshots = {
1367
- typeUrl: '/tendermint.abci.RequestListSnapshots',
1368
- encode(_, writer = BinaryWriter.create()) {
1369
- return writer;
1370
- },
1371
- decode(input, length) {
1372
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1373
- let end = length === undefined ? reader.len : reader.pos + length;
1374
- const message = createBaseRequestListSnapshots();
1375
- while (reader.pos < end) {
1376
- const tag = reader.uint32();
1377
- switch (tag >>> 3) {
1378
- default:
1379
- reader.skipType(tag & 7);
1380
- break;
1381
- }
1382
- }
1383
- return message;
1384
- },
1385
- fromJSON(_) {
1386
- return {};
1387
- },
1388
- toJSON(_) {
1389
- const obj = {};
1390
- return obj;
1391
- },
1392
- fromPartial(_) {
1393
- const message = createBaseRequestListSnapshots();
1394
- return message;
1395
- },
1396
- fromProtoMsg(message) {
1397
- return RequestListSnapshots.decode(message.value);
1398
- },
1399
- toProto(message) {
1400
- return RequestListSnapshots.encode(message).finish();
1401
- },
1402
- toProtoMsg(message) {
1403
- return {
1404
- typeUrl: '/tendermint.abci.RequestListSnapshots',
1405
- value: RequestListSnapshots.encode(message).finish(),
1406
- };
1407
- },
1408
- };
1409
- function createBaseRequestOfferSnapshot() {
1410
- return {
1411
- snapshot: undefined,
1412
- appHash: new Uint8Array(),
1413
- };
1414
- }
1415
- export const RequestOfferSnapshot = {
1416
- typeUrl: '/tendermint.abci.RequestOfferSnapshot',
1417
- encode(message, writer = BinaryWriter.create()) {
1418
- if (message.snapshot !== undefined) {
1419
- Snapshot.encode(message.snapshot, writer.uint32(10).fork()).ldelim();
1420
- }
1421
- if (message.appHash.length !== 0) {
1422
- writer.uint32(18).bytes(message.appHash);
1423
- }
1424
- return writer;
1425
- },
1426
- decode(input, length) {
1427
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1428
- let end = length === undefined ? reader.len : reader.pos + length;
1429
- const message = createBaseRequestOfferSnapshot();
1430
- while (reader.pos < end) {
1431
- const tag = reader.uint32();
1432
- switch (tag >>> 3) {
1433
- case 1:
1434
- message.snapshot = Snapshot.decode(reader, reader.uint32());
1435
- break;
1436
- case 2:
1437
- message.appHash = reader.bytes();
1438
- break;
1439
- default:
1440
- reader.skipType(tag & 7);
1441
- break;
1442
- }
1443
- }
1444
- return message;
1445
- },
1446
- fromJSON(object) {
1447
- return {
1448
- snapshot: isSet(object.snapshot)
1449
- ? Snapshot.fromJSON(object.snapshot)
1450
- : undefined,
1451
- appHash: isSet(object.appHash)
1452
- ? bytesFromBase64(object.appHash)
1453
- : new Uint8Array(),
1454
- };
1455
- },
1456
- toJSON(message) {
1457
- const obj = {};
1458
- message.snapshot !== undefined &&
1459
- (obj.snapshot = message.snapshot
1460
- ? Snapshot.toJSON(message.snapshot)
1461
- : undefined);
1462
- message.appHash !== undefined &&
1463
- (obj.appHash = base64FromBytes(message.appHash !== undefined ? message.appHash : new Uint8Array()));
1464
- return obj;
1465
- },
1466
- fromPartial(object) {
1467
- const message = createBaseRequestOfferSnapshot();
1468
- message.snapshot =
1469
- object.snapshot !== undefined && object.snapshot !== null
1470
- ? Snapshot.fromPartial(object.snapshot)
1471
- : undefined;
1472
- message.appHash = object.appHash ?? new Uint8Array();
1473
- return message;
1474
- },
1475
- fromProtoMsg(message) {
1476
- return RequestOfferSnapshot.decode(message.value);
1477
- },
1478
- toProto(message) {
1479
- return RequestOfferSnapshot.encode(message).finish();
1480
- },
1481
- toProtoMsg(message) {
1482
- return {
1483
- typeUrl: '/tendermint.abci.RequestOfferSnapshot',
1484
- value: RequestOfferSnapshot.encode(message).finish(),
1485
- };
1486
- },
1487
- };
1488
- function createBaseRequestLoadSnapshotChunk() {
1489
- return {
1490
- height: BigInt(0),
1491
- format: 0,
1492
- chunk: 0,
1493
- };
1494
- }
1495
- export const RequestLoadSnapshotChunk = {
1496
- typeUrl: '/tendermint.abci.RequestLoadSnapshotChunk',
1497
- encode(message, writer = BinaryWriter.create()) {
1498
- if (message.height !== BigInt(0)) {
1499
- writer.uint32(8).uint64(message.height);
1500
- }
1501
- if (message.format !== 0) {
1502
- writer.uint32(16).uint32(message.format);
1503
- }
1504
- if (message.chunk !== 0) {
1505
- writer.uint32(24).uint32(message.chunk);
1506
- }
1507
- return writer;
1508
- },
1509
- decode(input, length) {
1510
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1511
- let end = length === undefined ? reader.len : reader.pos + length;
1512
- const message = createBaseRequestLoadSnapshotChunk();
1513
- while (reader.pos < end) {
1514
- const tag = reader.uint32();
1515
- switch (tag >>> 3) {
1516
- case 1:
1517
- message.height = reader.uint64();
1518
- break;
1519
- case 2:
1520
- message.format = reader.uint32();
1521
- break;
1522
- case 3:
1523
- message.chunk = reader.uint32();
1524
- break;
1525
- default:
1526
- reader.skipType(tag & 7);
1527
- break;
1528
- }
1529
- }
1530
- return message;
1531
- },
1532
- fromJSON(object) {
1533
- return {
1534
- height: isSet(object.height)
1535
- ? BigInt(object.height.toString())
1536
- : BigInt(0),
1537
- format: isSet(object.format) ? Number(object.format) : 0,
1538
- chunk: isSet(object.chunk) ? Number(object.chunk) : 0,
1539
- };
1540
- },
1541
- toJSON(message) {
1542
- const obj = {};
1543
- message.height !== undefined &&
1544
- (obj.height = (message.height || BigInt(0)).toString());
1545
- message.format !== undefined && (obj.format = Math.round(message.format));
1546
- message.chunk !== undefined && (obj.chunk = Math.round(message.chunk));
1547
- return obj;
1548
- },
1549
- fromPartial(object) {
1550
- const message = createBaseRequestLoadSnapshotChunk();
1551
- message.height =
1552
- object.height !== undefined && object.height !== null
1553
- ? BigInt(object.height.toString())
1554
- : BigInt(0);
1555
- message.format = object.format ?? 0;
1556
- message.chunk = object.chunk ?? 0;
1557
- return message;
1558
- },
1559
- fromProtoMsg(message) {
1560
- return RequestLoadSnapshotChunk.decode(message.value);
1561
- },
1562
- toProto(message) {
1563
- return RequestLoadSnapshotChunk.encode(message).finish();
1564
- },
1565
- toProtoMsg(message) {
1566
- return {
1567
- typeUrl: '/tendermint.abci.RequestLoadSnapshotChunk',
1568
- value: RequestLoadSnapshotChunk.encode(message).finish(),
1569
- };
1570
- },
1571
- };
1572
- function createBaseRequestApplySnapshotChunk() {
1573
- return {
1574
- index: 0,
1575
- chunk: new Uint8Array(),
1576
- sender: '',
1577
- };
1578
- }
1579
- export const RequestApplySnapshotChunk = {
1580
- typeUrl: '/tendermint.abci.RequestApplySnapshotChunk',
1581
- encode(message, writer = BinaryWriter.create()) {
1582
- if (message.index !== 0) {
1583
- writer.uint32(8).uint32(message.index);
1584
- }
1585
- if (message.chunk.length !== 0) {
1586
- writer.uint32(18).bytes(message.chunk);
1587
- }
1588
- if (message.sender !== '') {
1589
- writer.uint32(26).string(message.sender);
1590
- }
1591
- return writer;
1592
- },
1593
- decode(input, length) {
1594
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1595
- let end = length === undefined ? reader.len : reader.pos + length;
1596
- const message = createBaseRequestApplySnapshotChunk();
1597
- while (reader.pos < end) {
1598
- const tag = reader.uint32();
1599
- switch (tag >>> 3) {
1600
- case 1:
1601
- message.index = reader.uint32();
1602
- break;
1603
- case 2:
1604
- message.chunk = reader.bytes();
1605
- break;
1606
- case 3:
1607
- message.sender = reader.string();
1608
- break;
1609
- default:
1610
- reader.skipType(tag & 7);
1611
- break;
1612
- }
1613
- }
1614
- return message;
1615
- },
1616
- fromJSON(object) {
1617
- return {
1618
- index: isSet(object.index) ? Number(object.index) : 0,
1619
- chunk: isSet(object.chunk)
1620
- ? bytesFromBase64(object.chunk)
1621
- : new Uint8Array(),
1622
- sender: isSet(object.sender) ? String(object.sender) : '',
1623
- };
1624
- },
1625
- toJSON(message) {
1626
- const obj = {};
1627
- message.index !== undefined && (obj.index = Math.round(message.index));
1628
- message.chunk !== undefined &&
1629
- (obj.chunk = base64FromBytes(message.chunk !== undefined ? message.chunk : new Uint8Array()));
1630
- message.sender !== undefined && (obj.sender = message.sender);
1631
- return obj;
1632
- },
1633
- fromPartial(object) {
1634
- const message = createBaseRequestApplySnapshotChunk();
1635
- message.index = object.index ?? 0;
1636
- message.chunk = object.chunk ?? new Uint8Array();
1637
- message.sender = object.sender ?? '';
1638
- return message;
1639
- },
1640
- fromProtoMsg(message) {
1641
- return RequestApplySnapshotChunk.decode(message.value);
1642
- },
1643
- toProto(message) {
1644
- return RequestApplySnapshotChunk.encode(message).finish();
1645
- },
1646
- toProtoMsg(message) {
1647
- return {
1648
- typeUrl: '/tendermint.abci.RequestApplySnapshotChunk',
1649
- value: RequestApplySnapshotChunk.encode(message).finish(),
1650
- };
1651
- },
1652
- };
1653
- function createBaseResponse() {
1654
- return {
1655
- exception: undefined,
1656
- echo: undefined,
1657
- flush: undefined,
1658
- info: undefined,
1659
- setOption: undefined,
1660
- initChain: undefined,
1661
- query: undefined,
1662
- beginBlock: undefined,
1663
- checkTx: undefined,
1664
- deliverTx: undefined,
1665
- endBlock: undefined,
1666
- commit: undefined,
1667
- listSnapshots: undefined,
1668
- offerSnapshot: undefined,
1669
- loadSnapshotChunk: undefined,
1670
- applySnapshotChunk: undefined,
1671
- };
1672
- }
1673
- export const Response = {
1674
- typeUrl: '/tendermint.abci.Response',
1675
- encode(message, writer = BinaryWriter.create()) {
1676
- if (message.exception !== undefined) {
1677
- ResponseException.encode(message.exception, writer.uint32(10).fork()).ldelim();
1678
- }
1679
- if (message.echo !== undefined) {
1680
- ResponseEcho.encode(message.echo, writer.uint32(18).fork()).ldelim();
1681
- }
1682
- if (message.flush !== undefined) {
1683
- ResponseFlush.encode(message.flush, writer.uint32(26).fork()).ldelim();
1684
- }
1685
- if (message.info !== undefined) {
1686
- ResponseInfo.encode(message.info, writer.uint32(34).fork()).ldelim();
1687
- }
1688
- if (message.setOption !== undefined) {
1689
- ResponseSetOption.encode(message.setOption, writer.uint32(42).fork()).ldelim();
1690
- }
1691
- if (message.initChain !== undefined) {
1692
- ResponseInitChain.encode(message.initChain, writer.uint32(50).fork()).ldelim();
1693
- }
1694
- if (message.query !== undefined) {
1695
- ResponseQuery.encode(message.query, writer.uint32(58).fork()).ldelim();
1696
- }
1697
- if (message.beginBlock !== undefined) {
1698
- ResponseBeginBlock.encode(message.beginBlock, writer.uint32(66).fork()).ldelim();
1699
- }
1700
- if (message.checkTx !== undefined) {
1701
- ResponseCheckTx.encode(message.checkTx, writer.uint32(74).fork()).ldelim();
1702
- }
1703
- if (message.deliverTx !== undefined) {
1704
- ResponseDeliverTx.encode(message.deliverTx, writer.uint32(82).fork()).ldelim();
1705
- }
1706
- if (message.endBlock !== undefined) {
1707
- ResponseEndBlock.encode(message.endBlock, writer.uint32(90).fork()).ldelim();
1708
- }
1709
- if (message.commit !== undefined) {
1710
- ResponseCommit.encode(message.commit, writer.uint32(98).fork()).ldelim();
1711
- }
1712
- if (message.listSnapshots !== undefined) {
1713
- ResponseListSnapshots.encode(message.listSnapshots, writer.uint32(106).fork()).ldelim();
1714
- }
1715
- if (message.offerSnapshot !== undefined) {
1716
- ResponseOfferSnapshot.encode(message.offerSnapshot, writer.uint32(114).fork()).ldelim();
1717
- }
1718
- if (message.loadSnapshotChunk !== undefined) {
1719
- ResponseLoadSnapshotChunk.encode(message.loadSnapshotChunk, writer.uint32(122).fork()).ldelim();
1720
- }
1721
- if (message.applySnapshotChunk !== undefined) {
1722
- ResponseApplySnapshotChunk.encode(message.applySnapshotChunk, writer.uint32(130).fork()).ldelim();
1723
- }
1724
- return writer;
1725
- },
1726
- decode(input, length) {
1727
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1728
- let end = length === undefined ? reader.len : reader.pos + length;
1729
- const message = createBaseResponse();
1730
- while (reader.pos < end) {
1731
- const tag = reader.uint32();
1732
- switch (tag >>> 3) {
1733
- case 1:
1734
- message.exception = ResponseException.decode(reader, reader.uint32());
1735
- break;
1736
- case 2:
1737
- message.echo = ResponseEcho.decode(reader, reader.uint32());
1738
- break;
1739
- case 3:
1740
- message.flush = ResponseFlush.decode(reader, reader.uint32());
1741
- break;
1742
- case 4:
1743
- message.info = ResponseInfo.decode(reader, reader.uint32());
1744
- break;
1745
- case 5:
1746
- message.setOption = ResponseSetOption.decode(reader, reader.uint32());
1747
- break;
1748
- case 6:
1749
- message.initChain = ResponseInitChain.decode(reader, reader.uint32());
1750
- break;
1751
- case 7:
1752
- message.query = ResponseQuery.decode(reader, reader.uint32());
1753
- break;
1754
- case 8:
1755
- message.beginBlock = ResponseBeginBlock.decode(reader, reader.uint32());
1756
- break;
1757
- case 9:
1758
- message.checkTx = ResponseCheckTx.decode(reader, reader.uint32());
1759
- break;
1760
- case 10:
1761
- message.deliverTx = ResponseDeliverTx.decode(reader, reader.uint32());
1762
- break;
1763
- case 11:
1764
- message.endBlock = ResponseEndBlock.decode(reader, reader.uint32());
1765
- break;
1766
- case 12:
1767
- message.commit = ResponseCommit.decode(reader, reader.uint32());
1768
- break;
1769
- case 13:
1770
- message.listSnapshots = ResponseListSnapshots.decode(reader, reader.uint32());
1771
- break;
1772
- case 14:
1773
- message.offerSnapshot = ResponseOfferSnapshot.decode(reader, reader.uint32());
1774
- break;
1775
- case 15:
1776
- message.loadSnapshotChunk = ResponseLoadSnapshotChunk.decode(reader, reader.uint32());
1777
- break;
1778
- case 16:
1779
- message.applySnapshotChunk = ResponseApplySnapshotChunk.decode(reader, reader.uint32());
1780
- break;
1781
- default:
1782
- reader.skipType(tag & 7);
1783
- break;
1784
- }
1785
- }
1786
- return message;
1787
- },
1788
- fromJSON(object) {
1789
- return {
1790
- exception: isSet(object.exception)
1791
- ? ResponseException.fromJSON(object.exception)
1792
- : undefined,
1793
- echo: isSet(object.echo) ? ResponseEcho.fromJSON(object.echo) : undefined,
1794
- flush: isSet(object.flush)
1795
- ? ResponseFlush.fromJSON(object.flush)
1796
- : undefined,
1797
- info: isSet(object.info) ? ResponseInfo.fromJSON(object.info) : undefined,
1798
- setOption: isSet(object.setOption)
1799
- ? ResponseSetOption.fromJSON(object.setOption)
1800
- : undefined,
1801
- initChain: isSet(object.initChain)
1802
- ? ResponseInitChain.fromJSON(object.initChain)
1803
- : undefined,
1804
- query: isSet(object.query)
1805
- ? ResponseQuery.fromJSON(object.query)
1806
- : undefined,
1807
- beginBlock: isSet(object.beginBlock)
1808
- ? ResponseBeginBlock.fromJSON(object.beginBlock)
1809
- : undefined,
1810
- checkTx: isSet(object.checkTx)
1811
- ? ResponseCheckTx.fromJSON(object.checkTx)
1812
- : undefined,
1813
- deliverTx: isSet(object.deliverTx)
1814
- ? ResponseDeliverTx.fromJSON(object.deliverTx)
1815
- : undefined,
1816
- endBlock: isSet(object.endBlock)
1817
- ? ResponseEndBlock.fromJSON(object.endBlock)
1818
- : undefined,
1819
- commit: isSet(object.commit)
1820
- ? ResponseCommit.fromJSON(object.commit)
1821
- : undefined,
1822
- listSnapshots: isSet(object.listSnapshots)
1823
- ? ResponseListSnapshots.fromJSON(object.listSnapshots)
1824
- : undefined,
1825
- offerSnapshot: isSet(object.offerSnapshot)
1826
- ? ResponseOfferSnapshot.fromJSON(object.offerSnapshot)
1827
- : undefined,
1828
- loadSnapshotChunk: isSet(object.loadSnapshotChunk)
1829
- ? ResponseLoadSnapshotChunk.fromJSON(object.loadSnapshotChunk)
1830
- : undefined,
1831
- applySnapshotChunk: isSet(object.applySnapshotChunk)
1832
- ? ResponseApplySnapshotChunk.fromJSON(object.applySnapshotChunk)
1833
- : undefined,
1834
- };
1835
- },
1836
- toJSON(message) {
1837
- const obj = {};
1838
- message.exception !== undefined &&
1839
- (obj.exception = message.exception
1840
- ? ResponseException.toJSON(message.exception)
1841
- : undefined);
1842
- message.echo !== undefined &&
1843
- (obj.echo = message.echo ? ResponseEcho.toJSON(message.echo) : undefined);
1844
- message.flush !== undefined &&
1845
- (obj.flush = message.flush
1846
- ? ResponseFlush.toJSON(message.flush)
1847
- : undefined);
1848
- message.info !== undefined &&
1849
- (obj.info = message.info ? ResponseInfo.toJSON(message.info) : undefined);
1850
- message.setOption !== undefined &&
1851
- (obj.setOption = message.setOption
1852
- ? ResponseSetOption.toJSON(message.setOption)
1853
- : undefined);
1854
- message.initChain !== undefined &&
1855
- (obj.initChain = message.initChain
1856
- ? ResponseInitChain.toJSON(message.initChain)
1857
- : undefined);
1858
- message.query !== undefined &&
1859
- (obj.query = message.query
1860
- ? ResponseQuery.toJSON(message.query)
1861
- : undefined);
1862
- message.beginBlock !== undefined &&
1863
- (obj.beginBlock = message.beginBlock
1864
- ? ResponseBeginBlock.toJSON(message.beginBlock)
1865
- : undefined);
1866
- message.checkTx !== undefined &&
1867
- (obj.checkTx = message.checkTx
1868
- ? ResponseCheckTx.toJSON(message.checkTx)
1869
- : undefined);
1870
- message.deliverTx !== undefined &&
1871
- (obj.deliverTx = message.deliverTx
1872
- ? ResponseDeliverTx.toJSON(message.deliverTx)
1873
- : undefined);
1874
- message.endBlock !== undefined &&
1875
- (obj.endBlock = message.endBlock
1876
- ? ResponseEndBlock.toJSON(message.endBlock)
1877
- : undefined);
1878
- message.commit !== undefined &&
1879
- (obj.commit = message.commit
1880
- ? ResponseCommit.toJSON(message.commit)
1881
- : undefined);
1882
- message.listSnapshots !== undefined &&
1883
- (obj.listSnapshots = message.listSnapshots
1884
- ? ResponseListSnapshots.toJSON(message.listSnapshots)
1885
- : undefined);
1886
- message.offerSnapshot !== undefined &&
1887
- (obj.offerSnapshot = message.offerSnapshot
1888
- ? ResponseOfferSnapshot.toJSON(message.offerSnapshot)
1889
- : undefined);
1890
- message.loadSnapshotChunk !== undefined &&
1891
- (obj.loadSnapshotChunk = message.loadSnapshotChunk
1892
- ? ResponseLoadSnapshotChunk.toJSON(message.loadSnapshotChunk)
1893
- : undefined);
1894
- message.applySnapshotChunk !== undefined &&
1895
- (obj.applySnapshotChunk = message.applySnapshotChunk
1896
- ? ResponseApplySnapshotChunk.toJSON(message.applySnapshotChunk)
1897
- : undefined);
1898
- return obj;
1899
- },
1900
- fromPartial(object) {
1901
- const message = createBaseResponse();
1902
- message.exception =
1903
- object.exception !== undefined && object.exception !== null
1904
- ? ResponseException.fromPartial(object.exception)
1905
- : undefined;
1906
- message.echo =
1907
- object.echo !== undefined && object.echo !== null
1908
- ? ResponseEcho.fromPartial(object.echo)
1909
- : undefined;
1910
- message.flush =
1911
- object.flush !== undefined && object.flush !== null
1912
- ? ResponseFlush.fromPartial(object.flush)
1913
- : undefined;
1914
- message.info =
1915
- object.info !== undefined && object.info !== null
1916
- ? ResponseInfo.fromPartial(object.info)
1917
- : undefined;
1918
- message.setOption =
1919
- object.setOption !== undefined && object.setOption !== null
1920
- ? ResponseSetOption.fromPartial(object.setOption)
1921
- : undefined;
1922
- message.initChain =
1923
- object.initChain !== undefined && object.initChain !== null
1924
- ? ResponseInitChain.fromPartial(object.initChain)
1925
- : undefined;
1926
- message.query =
1927
- object.query !== undefined && object.query !== null
1928
- ? ResponseQuery.fromPartial(object.query)
1929
- : undefined;
1930
- message.beginBlock =
1931
- object.beginBlock !== undefined && object.beginBlock !== null
1932
- ? ResponseBeginBlock.fromPartial(object.beginBlock)
1933
- : undefined;
1934
- message.checkTx =
1935
- object.checkTx !== undefined && object.checkTx !== null
1936
- ? ResponseCheckTx.fromPartial(object.checkTx)
1937
- : undefined;
1938
- message.deliverTx =
1939
- object.deliverTx !== undefined && object.deliverTx !== null
1940
- ? ResponseDeliverTx.fromPartial(object.deliverTx)
1941
- : undefined;
1942
- message.endBlock =
1943
- object.endBlock !== undefined && object.endBlock !== null
1944
- ? ResponseEndBlock.fromPartial(object.endBlock)
1945
- : undefined;
1946
- message.commit =
1947
- object.commit !== undefined && object.commit !== null
1948
- ? ResponseCommit.fromPartial(object.commit)
1949
- : undefined;
1950
- message.listSnapshots =
1951
- object.listSnapshots !== undefined && object.listSnapshots !== null
1952
- ? ResponseListSnapshots.fromPartial(object.listSnapshots)
1953
- : undefined;
1954
- message.offerSnapshot =
1955
- object.offerSnapshot !== undefined && object.offerSnapshot !== null
1956
- ? ResponseOfferSnapshot.fromPartial(object.offerSnapshot)
1957
- : undefined;
1958
- message.loadSnapshotChunk =
1959
- object.loadSnapshotChunk !== undefined &&
1960
- object.loadSnapshotChunk !== null
1961
- ? ResponseLoadSnapshotChunk.fromPartial(object.loadSnapshotChunk)
1962
- : undefined;
1963
- message.applySnapshotChunk =
1964
- object.applySnapshotChunk !== undefined &&
1965
- object.applySnapshotChunk !== null
1966
- ? ResponseApplySnapshotChunk.fromPartial(object.applySnapshotChunk)
1967
- : undefined;
1968
- return message;
1969
- },
1970
- fromProtoMsg(message) {
1971
- return Response.decode(message.value);
1972
- },
1973
- toProto(message) {
1974
- return Response.encode(message).finish();
1975
- },
1976
- toProtoMsg(message) {
1977
- return {
1978
- typeUrl: '/tendermint.abci.Response',
1979
- value: Response.encode(message).finish(),
1980
- };
1981
- },
1982
- };
1983
- function createBaseResponseException() {
1984
- return {
1985
- error: '',
1986
- };
1987
- }
1988
- export const ResponseException = {
1989
- typeUrl: '/tendermint.abci.ResponseException',
1990
- encode(message, writer = BinaryWriter.create()) {
1991
- if (message.error !== '') {
1992
- writer.uint32(10).string(message.error);
1993
- }
1994
- return writer;
1995
- },
1996
- decode(input, length) {
1997
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1998
- let end = length === undefined ? reader.len : reader.pos + length;
1999
- const message = createBaseResponseException();
2000
- while (reader.pos < end) {
2001
- const tag = reader.uint32();
2002
- switch (tag >>> 3) {
2003
- case 1:
2004
- message.error = reader.string();
2005
- break;
2006
- default:
2007
- reader.skipType(tag & 7);
2008
- break;
2009
- }
2010
- }
2011
- return message;
2012
- },
2013
- fromJSON(object) {
2014
- return {
2015
- error: isSet(object.error) ? String(object.error) : '',
2016
- };
2017
- },
2018
- toJSON(message) {
2019
- const obj = {};
2020
- message.error !== undefined && (obj.error = message.error);
2021
- return obj;
2022
- },
2023
- fromPartial(object) {
2024
- const message = createBaseResponseException();
2025
- message.error = object.error ?? '';
2026
- return message;
2027
- },
2028
- fromProtoMsg(message) {
2029
- return ResponseException.decode(message.value);
2030
- },
2031
- toProto(message) {
2032
- return ResponseException.encode(message).finish();
2033
- },
2034
- toProtoMsg(message) {
2035
- return {
2036
- typeUrl: '/tendermint.abci.ResponseException',
2037
- value: ResponseException.encode(message).finish(),
2038
- };
2039
- },
2040
- };
2041
- function createBaseResponseEcho() {
2042
- return {
2043
- message: '',
2044
- };
2045
- }
2046
- export const ResponseEcho = {
2047
- typeUrl: '/tendermint.abci.ResponseEcho',
2048
- encode(message, writer = BinaryWriter.create()) {
2049
- if (message.message !== '') {
2050
- writer.uint32(10).string(message.message);
2051
- }
2052
- return writer;
2053
- },
2054
- decode(input, length) {
2055
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2056
- let end = length === undefined ? reader.len : reader.pos + length;
2057
- const message = createBaseResponseEcho();
2058
- while (reader.pos < end) {
2059
- const tag = reader.uint32();
2060
- switch (tag >>> 3) {
2061
- case 1:
2062
- message.message = reader.string();
2063
- break;
2064
- default:
2065
- reader.skipType(tag & 7);
2066
- break;
2067
- }
2068
- }
2069
- return message;
2070
- },
2071
- fromJSON(object) {
2072
- return {
2073
- message: isSet(object.message) ? String(object.message) : '',
2074
- };
2075
- },
2076
- toJSON(message) {
2077
- const obj = {};
2078
- message.message !== undefined && (obj.message = message.message);
2079
- return obj;
2080
- },
2081
- fromPartial(object) {
2082
- const message = createBaseResponseEcho();
2083
- message.message = object.message ?? '';
2084
- return message;
2085
- },
2086
- fromProtoMsg(message) {
2087
- return ResponseEcho.decode(message.value);
2088
- },
2089
- toProto(message) {
2090
- return ResponseEcho.encode(message).finish();
2091
- },
2092
- toProtoMsg(message) {
2093
- return {
2094
- typeUrl: '/tendermint.abci.ResponseEcho',
2095
- value: ResponseEcho.encode(message).finish(),
2096
- };
2097
- },
2098
- };
2099
- function createBaseResponseFlush() {
2100
- return {};
2101
- }
2102
- export const ResponseFlush = {
2103
- typeUrl: '/tendermint.abci.ResponseFlush',
2104
- encode(_, writer = BinaryWriter.create()) {
2105
- return writer;
2106
- },
2107
- decode(input, length) {
2108
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2109
- let end = length === undefined ? reader.len : reader.pos + length;
2110
- const message = createBaseResponseFlush();
2111
- while (reader.pos < end) {
2112
- const tag = reader.uint32();
2113
- switch (tag >>> 3) {
2114
- default:
2115
- reader.skipType(tag & 7);
2116
- break;
2117
- }
2118
- }
2119
- return message;
2120
- },
2121
- fromJSON(_) {
2122
- return {};
2123
- },
2124
- toJSON(_) {
2125
- const obj = {};
2126
- return obj;
2127
- },
2128
- fromPartial(_) {
2129
- const message = createBaseResponseFlush();
2130
- return message;
2131
- },
2132
- fromProtoMsg(message) {
2133
- return ResponseFlush.decode(message.value);
2134
- },
2135
- toProto(message) {
2136
- return ResponseFlush.encode(message).finish();
2137
- },
2138
- toProtoMsg(message) {
2139
- return {
2140
- typeUrl: '/tendermint.abci.ResponseFlush',
2141
- value: ResponseFlush.encode(message).finish(),
2142
- };
2143
- },
2144
- };
2145
- function createBaseResponseInfo() {
2146
- return {
2147
- data: '',
2148
- version: '',
2149
- appVersion: BigInt(0),
2150
- lastBlockHeight: BigInt(0),
2151
- lastBlockAppHash: new Uint8Array(),
2152
- };
2153
- }
2154
- export const ResponseInfo = {
2155
- typeUrl: '/tendermint.abci.ResponseInfo',
2156
- encode(message, writer = BinaryWriter.create()) {
2157
- if (message.data !== '') {
2158
- writer.uint32(10).string(message.data);
2159
- }
2160
- if (message.version !== '') {
2161
- writer.uint32(18).string(message.version);
2162
- }
2163
- if (message.appVersion !== BigInt(0)) {
2164
- writer.uint32(24).uint64(message.appVersion);
2165
- }
2166
- if (message.lastBlockHeight !== BigInt(0)) {
2167
- writer.uint32(32).int64(message.lastBlockHeight);
2168
- }
2169
- if (message.lastBlockAppHash.length !== 0) {
2170
- writer.uint32(42).bytes(message.lastBlockAppHash);
2171
- }
2172
- return writer;
2173
- },
2174
- decode(input, length) {
2175
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2176
- let end = length === undefined ? reader.len : reader.pos + length;
2177
- const message = createBaseResponseInfo();
2178
- while (reader.pos < end) {
2179
- const tag = reader.uint32();
2180
- switch (tag >>> 3) {
2181
- case 1:
2182
- message.data = reader.string();
2183
- break;
2184
- case 2:
2185
- message.version = reader.string();
2186
- break;
2187
- case 3:
2188
- message.appVersion = reader.uint64();
2189
- break;
2190
- case 4:
2191
- message.lastBlockHeight = reader.int64();
2192
- break;
2193
- case 5:
2194
- message.lastBlockAppHash = reader.bytes();
2195
- break;
2196
- default:
2197
- reader.skipType(tag & 7);
2198
- break;
2199
- }
2200
- }
2201
- return message;
2202
- },
2203
- fromJSON(object) {
2204
- return {
2205
- data: isSet(object.data) ? String(object.data) : '',
2206
- version: isSet(object.version) ? String(object.version) : '',
2207
- appVersion: isSet(object.appVersion)
2208
- ? BigInt(object.appVersion.toString())
2209
- : BigInt(0),
2210
- lastBlockHeight: isSet(object.lastBlockHeight)
2211
- ? BigInt(object.lastBlockHeight.toString())
2212
- : BigInt(0),
2213
- lastBlockAppHash: isSet(object.lastBlockAppHash)
2214
- ? bytesFromBase64(object.lastBlockAppHash)
2215
- : new Uint8Array(),
2216
- };
2217
- },
2218
- toJSON(message) {
2219
- const obj = {};
2220
- message.data !== undefined && (obj.data = message.data);
2221
- message.version !== undefined && (obj.version = message.version);
2222
- message.appVersion !== undefined &&
2223
- (obj.appVersion = (message.appVersion || BigInt(0)).toString());
2224
- message.lastBlockHeight !== undefined &&
2225
- (obj.lastBlockHeight = (message.lastBlockHeight || BigInt(0)).toString());
2226
- message.lastBlockAppHash !== undefined &&
2227
- (obj.lastBlockAppHash = base64FromBytes(message.lastBlockAppHash !== undefined
2228
- ? message.lastBlockAppHash
2229
- : new Uint8Array()));
2230
- return obj;
2231
- },
2232
- fromPartial(object) {
2233
- const message = createBaseResponseInfo();
2234
- message.data = object.data ?? '';
2235
- message.version = object.version ?? '';
2236
- message.appVersion =
2237
- object.appVersion !== undefined && object.appVersion !== null
2238
- ? BigInt(object.appVersion.toString())
2239
- : BigInt(0);
2240
- message.lastBlockHeight =
2241
- object.lastBlockHeight !== undefined && object.lastBlockHeight !== null
2242
- ? BigInt(object.lastBlockHeight.toString())
2243
- : BigInt(0);
2244
- message.lastBlockAppHash = object.lastBlockAppHash ?? new Uint8Array();
2245
- return message;
2246
- },
2247
- fromProtoMsg(message) {
2248
- return ResponseInfo.decode(message.value);
2249
- },
2250
- toProto(message) {
2251
- return ResponseInfo.encode(message).finish();
2252
- },
2253
- toProtoMsg(message) {
2254
- return {
2255
- typeUrl: '/tendermint.abci.ResponseInfo',
2256
- value: ResponseInfo.encode(message).finish(),
2257
- };
2258
- },
2259
- };
2260
- function createBaseResponseSetOption() {
2261
- return {
2262
- code: 0,
2263
- log: '',
2264
- info: '',
2265
- };
2266
- }
2267
- export const ResponseSetOption = {
2268
- typeUrl: '/tendermint.abci.ResponseSetOption',
2269
- encode(message, writer = BinaryWriter.create()) {
2270
- if (message.code !== 0) {
2271
- writer.uint32(8).uint32(message.code);
2272
- }
2273
- if (message.log !== '') {
2274
- writer.uint32(26).string(message.log);
2275
- }
2276
- if (message.info !== '') {
2277
- writer.uint32(34).string(message.info);
2278
- }
2279
- return writer;
2280
- },
2281
- decode(input, length) {
2282
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2283
- let end = length === undefined ? reader.len : reader.pos + length;
2284
- const message = createBaseResponseSetOption();
2285
- while (reader.pos < end) {
2286
- const tag = reader.uint32();
2287
- switch (tag >>> 3) {
2288
- case 1:
2289
- message.code = reader.uint32();
2290
- break;
2291
- case 3:
2292
- message.log = reader.string();
2293
- break;
2294
- case 4:
2295
- message.info = reader.string();
2296
- break;
2297
- default:
2298
- reader.skipType(tag & 7);
2299
- break;
2300
- }
2301
- }
2302
- return message;
2303
- },
2304
- fromJSON(object) {
2305
- return {
2306
- code: isSet(object.code) ? Number(object.code) : 0,
2307
- log: isSet(object.log) ? String(object.log) : '',
2308
- info: isSet(object.info) ? String(object.info) : '',
2309
- };
2310
- },
2311
- toJSON(message) {
2312
- const obj = {};
2313
- message.code !== undefined && (obj.code = Math.round(message.code));
2314
- message.log !== undefined && (obj.log = message.log);
2315
- message.info !== undefined && (obj.info = message.info);
2316
- return obj;
2317
- },
2318
- fromPartial(object) {
2319
- const message = createBaseResponseSetOption();
2320
- message.code = object.code ?? 0;
2321
- message.log = object.log ?? '';
2322
- message.info = object.info ?? '';
2323
- return message;
2324
- },
2325
- fromProtoMsg(message) {
2326
- return ResponseSetOption.decode(message.value);
2327
- },
2328
- toProto(message) {
2329
- return ResponseSetOption.encode(message).finish();
2330
- },
2331
- toProtoMsg(message) {
2332
- return {
2333
- typeUrl: '/tendermint.abci.ResponseSetOption',
2334
- value: ResponseSetOption.encode(message).finish(),
2335
- };
2336
- },
2337
- };
2338
- function createBaseResponseInitChain() {
2339
- return {
2340
- consensusParams: undefined,
2341
- validators: [],
2342
- appHash: new Uint8Array(),
2343
- };
2344
- }
2345
- export const ResponseInitChain = {
2346
- typeUrl: '/tendermint.abci.ResponseInitChain',
2347
- encode(message, writer = BinaryWriter.create()) {
2348
- if (message.consensusParams !== undefined) {
2349
- ConsensusParams.encode(message.consensusParams, writer.uint32(10).fork()).ldelim();
2350
- }
2351
- for (const v of message.validators) {
2352
- ValidatorUpdate.encode(v, writer.uint32(18).fork()).ldelim();
2353
- }
2354
- if (message.appHash.length !== 0) {
2355
- writer.uint32(26).bytes(message.appHash);
2356
- }
2357
- return writer;
2358
- },
2359
- decode(input, length) {
2360
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2361
- let end = length === undefined ? reader.len : reader.pos + length;
2362
- const message = createBaseResponseInitChain();
2363
- while (reader.pos < end) {
2364
- const tag = reader.uint32();
2365
- switch (tag >>> 3) {
2366
- case 1:
2367
- message.consensusParams = ConsensusParams.decode(reader, reader.uint32());
2368
- break;
2369
- case 2:
2370
- message.validators.push(ValidatorUpdate.decode(reader, reader.uint32()));
2371
- break;
2372
- case 3:
2373
- message.appHash = reader.bytes();
2374
- break;
2375
- default:
2376
- reader.skipType(tag & 7);
2377
- break;
2378
- }
2379
- }
2380
- return message;
2381
- },
2382
- fromJSON(object) {
2383
- return {
2384
- consensusParams: isSet(object.consensusParams)
2385
- ? ConsensusParams.fromJSON(object.consensusParams)
2386
- : undefined,
2387
- validators: Array.isArray(object?.validators)
2388
- ? object.validators.map((e) => ValidatorUpdate.fromJSON(e))
2389
- : [],
2390
- appHash: isSet(object.appHash)
2391
- ? bytesFromBase64(object.appHash)
2392
- : new Uint8Array(),
2393
- };
2394
- },
2395
- toJSON(message) {
2396
- const obj = {};
2397
- message.consensusParams !== undefined &&
2398
- (obj.consensusParams = message.consensusParams
2399
- ? ConsensusParams.toJSON(message.consensusParams)
2400
- : undefined);
2401
- if (message.validators) {
2402
- obj.validators = message.validators.map(e => e ? ValidatorUpdate.toJSON(e) : undefined);
2403
- }
2404
- else {
2405
- obj.validators = [];
2406
- }
2407
- message.appHash !== undefined &&
2408
- (obj.appHash = base64FromBytes(message.appHash !== undefined ? message.appHash : new Uint8Array()));
2409
- return obj;
2410
- },
2411
- fromPartial(object) {
2412
- const message = createBaseResponseInitChain();
2413
- message.consensusParams =
2414
- object.consensusParams !== undefined && object.consensusParams !== null
2415
- ? ConsensusParams.fromPartial(object.consensusParams)
2416
- : undefined;
2417
- message.validators =
2418
- object.validators?.map(e => ValidatorUpdate.fromPartial(e)) || [];
2419
- message.appHash = object.appHash ?? new Uint8Array();
2420
- return message;
2421
- },
2422
- fromProtoMsg(message) {
2423
- return ResponseInitChain.decode(message.value);
2424
- },
2425
- toProto(message) {
2426
- return ResponseInitChain.encode(message).finish();
2427
- },
2428
- toProtoMsg(message) {
2429
- return {
2430
- typeUrl: '/tendermint.abci.ResponseInitChain',
2431
- value: ResponseInitChain.encode(message).finish(),
2432
- };
2433
- },
2434
- };
2435
- function createBaseResponseQuery() {
2436
- return {
2437
- code: 0,
2438
- log: '',
2439
- info: '',
2440
- index: BigInt(0),
2441
- key: new Uint8Array(),
2442
- value: new Uint8Array(),
2443
- proofOps: undefined,
2444
- height: BigInt(0),
2445
- codespace: '',
2446
- };
2447
- }
2448
- export const ResponseQuery = {
2449
- typeUrl: '/tendermint.abci.ResponseQuery',
2450
- encode(message, writer = BinaryWriter.create()) {
2451
- if (message.code !== 0) {
2452
- writer.uint32(8).uint32(message.code);
2453
- }
2454
- if (message.log !== '') {
2455
- writer.uint32(26).string(message.log);
2456
- }
2457
- if (message.info !== '') {
2458
- writer.uint32(34).string(message.info);
2459
- }
2460
- if (message.index !== BigInt(0)) {
2461
- writer.uint32(40).int64(message.index);
2462
- }
2463
- if (message.key.length !== 0) {
2464
- writer.uint32(50).bytes(message.key);
2465
- }
2466
- if (message.value.length !== 0) {
2467
- writer.uint32(58).bytes(message.value);
2468
- }
2469
- if (message.proofOps !== undefined) {
2470
- ProofOps.encode(message.proofOps, writer.uint32(66).fork()).ldelim();
2471
- }
2472
- if (message.height !== BigInt(0)) {
2473
- writer.uint32(72).int64(message.height);
2474
- }
2475
- if (message.codespace !== '') {
2476
- writer.uint32(82).string(message.codespace);
2477
- }
2478
- return writer;
2479
- },
2480
- decode(input, length) {
2481
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2482
- let end = length === undefined ? reader.len : reader.pos + length;
2483
- const message = createBaseResponseQuery();
2484
- while (reader.pos < end) {
2485
- const tag = reader.uint32();
2486
- switch (tag >>> 3) {
2487
- case 1:
2488
- message.code = reader.uint32();
2489
- break;
2490
- case 3:
2491
- message.log = reader.string();
2492
- break;
2493
- case 4:
2494
- message.info = reader.string();
2495
- break;
2496
- case 5:
2497
- message.index = reader.int64();
2498
- break;
2499
- case 6:
2500
- message.key = reader.bytes();
2501
- break;
2502
- case 7:
2503
- message.value = reader.bytes();
2504
- break;
2505
- case 8:
2506
- message.proofOps = ProofOps.decode(reader, reader.uint32());
2507
- break;
2508
- case 9:
2509
- message.height = reader.int64();
2510
- break;
2511
- case 10:
2512
- message.codespace = reader.string();
2513
- break;
2514
- default:
2515
- reader.skipType(tag & 7);
2516
- break;
2517
- }
2518
- }
2519
- return message;
2520
- },
2521
- fromJSON(object) {
2522
- return {
2523
- code: isSet(object.code) ? Number(object.code) : 0,
2524
- log: isSet(object.log) ? String(object.log) : '',
2525
- info: isSet(object.info) ? String(object.info) : '',
2526
- index: isSet(object.index) ? BigInt(object.index.toString()) : BigInt(0),
2527
- key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(),
2528
- value: isSet(object.value)
2529
- ? bytesFromBase64(object.value)
2530
- : new Uint8Array(),
2531
- proofOps: isSet(object.proofOps)
2532
- ? ProofOps.fromJSON(object.proofOps)
2533
- : undefined,
2534
- height: isSet(object.height)
2535
- ? BigInt(object.height.toString())
2536
- : BigInt(0),
2537
- codespace: isSet(object.codespace) ? String(object.codespace) : '',
2538
- };
2539
- },
2540
- toJSON(message) {
2541
- const obj = {};
2542
- message.code !== undefined && (obj.code = Math.round(message.code));
2543
- message.log !== undefined && (obj.log = message.log);
2544
- message.info !== undefined && (obj.info = message.info);
2545
- message.index !== undefined &&
2546
- (obj.index = (message.index || BigInt(0)).toString());
2547
- message.key !== undefined &&
2548
- (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
2549
- message.value !== undefined &&
2550
- (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array()));
2551
- message.proofOps !== undefined &&
2552
- (obj.proofOps = message.proofOps
2553
- ? ProofOps.toJSON(message.proofOps)
2554
- : undefined);
2555
- message.height !== undefined &&
2556
- (obj.height = (message.height || BigInt(0)).toString());
2557
- message.codespace !== undefined && (obj.codespace = message.codespace);
2558
- return obj;
2559
- },
2560
- fromPartial(object) {
2561
- const message = createBaseResponseQuery();
2562
- message.code = object.code ?? 0;
2563
- message.log = object.log ?? '';
2564
- message.info = object.info ?? '';
2565
- message.index =
2566
- object.index !== undefined && object.index !== null
2567
- ? BigInt(object.index.toString())
2568
- : BigInt(0);
2569
- message.key = object.key ?? new Uint8Array();
2570
- message.value = object.value ?? new Uint8Array();
2571
- message.proofOps =
2572
- object.proofOps !== undefined && object.proofOps !== null
2573
- ? ProofOps.fromPartial(object.proofOps)
2574
- : undefined;
2575
- message.height =
2576
- object.height !== undefined && object.height !== null
2577
- ? BigInt(object.height.toString())
2578
- : BigInt(0);
2579
- message.codespace = object.codespace ?? '';
2580
- return message;
2581
- },
2582
- fromProtoMsg(message) {
2583
- return ResponseQuery.decode(message.value);
2584
- },
2585
- toProto(message) {
2586
- return ResponseQuery.encode(message).finish();
2587
- },
2588
- toProtoMsg(message) {
2589
- return {
2590
- typeUrl: '/tendermint.abci.ResponseQuery',
2591
- value: ResponseQuery.encode(message).finish(),
2592
- };
2593
- },
2594
- };
2595
- function createBaseResponseBeginBlock() {
2596
- return {
2597
- events: [],
2598
- };
2599
- }
2600
- export const ResponseBeginBlock = {
2601
- typeUrl: '/tendermint.abci.ResponseBeginBlock',
2602
- encode(message, writer = BinaryWriter.create()) {
2603
- for (const v of message.events) {
2604
- Event.encode(v, writer.uint32(10).fork()).ldelim();
2605
- }
2606
- return writer;
2607
- },
2608
- decode(input, length) {
2609
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2610
- let end = length === undefined ? reader.len : reader.pos + length;
2611
- const message = createBaseResponseBeginBlock();
2612
- while (reader.pos < end) {
2613
- const tag = reader.uint32();
2614
- switch (tag >>> 3) {
2615
- case 1:
2616
- message.events.push(Event.decode(reader, reader.uint32()));
2617
- break;
2618
- default:
2619
- reader.skipType(tag & 7);
2620
- break;
2621
- }
2622
- }
2623
- return message;
2624
- },
2625
- fromJSON(object) {
2626
- return {
2627
- events: Array.isArray(object?.events)
2628
- ? object.events.map((e) => Event.fromJSON(e))
2629
- : [],
2630
- };
2631
- },
2632
- toJSON(message) {
2633
- const obj = {};
2634
- if (message.events) {
2635
- obj.events = message.events.map(e => (e ? Event.toJSON(e) : undefined));
2636
- }
2637
- else {
2638
- obj.events = [];
2639
- }
2640
- return obj;
2641
- },
2642
- fromPartial(object) {
2643
- const message = createBaseResponseBeginBlock();
2644
- message.events = object.events?.map(e => Event.fromPartial(e)) || [];
2645
- return message;
2646
- },
2647
- fromProtoMsg(message) {
2648
- return ResponseBeginBlock.decode(message.value);
2649
- },
2650
- toProto(message) {
2651
- return ResponseBeginBlock.encode(message).finish();
2652
- },
2653
- toProtoMsg(message) {
2654
- return {
2655
- typeUrl: '/tendermint.abci.ResponseBeginBlock',
2656
- value: ResponseBeginBlock.encode(message).finish(),
2657
- };
2658
- },
2659
- };
2660
- function createBaseResponseCheckTx() {
2661
- return {
2662
- code: 0,
2663
- data: new Uint8Array(),
2664
- log: '',
2665
- info: '',
2666
- gasWanted: BigInt(0),
2667
- gasUsed: BigInt(0),
2668
- events: [],
2669
- codespace: '',
2670
- };
2671
- }
2672
- export const ResponseCheckTx = {
2673
- typeUrl: '/tendermint.abci.ResponseCheckTx',
2674
- encode(message, writer = BinaryWriter.create()) {
2675
- if (message.code !== 0) {
2676
- writer.uint32(8).uint32(message.code);
2677
- }
2678
- if (message.data.length !== 0) {
2679
- writer.uint32(18).bytes(message.data);
2680
- }
2681
- if (message.log !== '') {
2682
- writer.uint32(26).string(message.log);
2683
- }
2684
- if (message.info !== '') {
2685
- writer.uint32(34).string(message.info);
2686
- }
2687
- if (message.gasWanted !== BigInt(0)) {
2688
- writer.uint32(40).int64(message.gasWanted);
2689
- }
2690
- if (message.gasUsed !== BigInt(0)) {
2691
- writer.uint32(48).int64(message.gasUsed);
2692
- }
2693
- for (const v of message.events) {
2694
- Event.encode(v, writer.uint32(58).fork()).ldelim();
2695
- }
2696
- if (message.codespace !== '') {
2697
- writer.uint32(66).string(message.codespace);
2698
- }
2699
- return writer;
2700
- },
2701
- decode(input, length) {
2702
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2703
- let end = length === undefined ? reader.len : reader.pos + length;
2704
- const message = createBaseResponseCheckTx();
2705
- while (reader.pos < end) {
2706
- const tag = reader.uint32();
2707
- switch (tag >>> 3) {
2708
- case 1:
2709
- message.code = reader.uint32();
2710
- break;
2711
- case 2:
2712
- message.data = reader.bytes();
2713
- break;
2714
- case 3:
2715
- message.log = reader.string();
2716
- break;
2717
- case 4:
2718
- message.info = reader.string();
2719
- break;
2720
- case 5:
2721
- message.gasWanted = reader.int64();
2722
- break;
2723
- case 6:
2724
- message.gasUsed = reader.int64();
2725
- break;
2726
- case 7:
2727
- message.events.push(Event.decode(reader, reader.uint32()));
2728
- break;
2729
- case 8:
2730
- message.codespace = reader.string();
2731
- break;
2732
- default:
2733
- reader.skipType(tag & 7);
2734
- break;
2735
- }
2736
- }
2737
- return message;
2738
- },
2739
- fromJSON(object) {
2740
- return {
2741
- code: isSet(object.code) ? Number(object.code) : 0,
2742
- data: isSet(object.data)
2743
- ? bytesFromBase64(object.data)
2744
- : new Uint8Array(),
2745
- log: isSet(object.log) ? String(object.log) : '',
2746
- info: isSet(object.info) ? String(object.info) : '',
2747
- gasWanted: isSet(object.gas_wanted)
2748
- ? BigInt(object.gas_wanted.toString())
2749
- : BigInt(0),
2750
- gasUsed: isSet(object.gas_used)
2751
- ? BigInt(object.gas_used.toString())
2752
- : BigInt(0),
2753
- events: Array.isArray(object?.events)
2754
- ? object.events.map((e) => Event.fromJSON(e))
2755
- : [],
2756
- codespace: isSet(object.codespace) ? String(object.codespace) : '',
2757
- };
2758
- },
2759
- toJSON(message) {
2760
- const obj = {};
2761
- message.code !== undefined && (obj.code = Math.round(message.code));
2762
- message.data !== undefined &&
2763
- (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
2764
- message.log !== undefined && (obj.log = message.log);
2765
- message.info !== undefined && (obj.info = message.info);
2766
- message.gasWanted !== undefined &&
2767
- (obj.gas_wanted = (message.gasWanted || BigInt(0)).toString());
2768
- message.gasUsed !== undefined &&
2769
- (obj.gas_used = (message.gasUsed || BigInt(0)).toString());
2770
- if (message.events) {
2771
- obj.events = message.events.map(e => (e ? Event.toJSON(e) : undefined));
2772
- }
2773
- else {
2774
- obj.events = [];
2775
- }
2776
- message.codespace !== undefined && (obj.codespace = message.codespace);
2777
- return obj;
2778
- },
2779
- fromPartial(object) {
2780
- const message = createBaseResponseCheckTx();
2781
- message.code = object.code ?? 0;
2782
- message.data = object.data ?? new Uint8Array();
2783
- message.log = object.log ?? '';
2784
- message.info = object.info ?? '';
2785
- message.gasWanted =
2786
- object.gasWanted !== undefined && object.gasWanted !== null
2787
- ? BigInt(object.gasWanted.toString())
2788
- : BigInt(0);
2789
- message.gasUsed =
2790
- object.gasUsed !== undefined && object.gasUsed !== null
2791
- ? BigInt(object.gasUsed.toString())
2792
- : BigInt(0);
2793
- message.events = object.events?.map(e => Event.fromPartial(e)) || [];
2794
- message.codespace = object.codespace ?? '';
2795
- return message;
2796
- },
2797
- fromProtoMsg(message) {
2798
- return ResponseCheckTx.decode(message.value);
2799
- },
2800
- toProto(message) {
2801
- return ResponseCheckTx.encode(message).finish();
2802
- },
2803
- toProtoMsg(message) {
2804
- return {
2805
- typeUrl: '/tendermint.abci.ResponseCheckTx',
2806
- value: ResponseCheckTx.encode(message).finish(),
2807
- };
2808
- },
2809
- };
2810
- function createBaseResponseDeliverTx() {
2811
- return {
2812
- code: 0,
2813
- data: new Uint8Array(),
2814
- log: '',
2815
- info: '',
2816
- gasWanted: BigInt(0),
2817
- gasUsed: BigInt(0),
2818
- events: [],
2819
- codespace: '',
2820
- };
2821
- }
2822
- export const ResponseDeliverTx = {
2823
- typeUrl: '/tendermint.abci.ResponseDeliverTx',
2824
- encode(message, writer = BinaryWriter.create()) {
2825
- if (message.code !== 0) {
2826
- writer.uint32(8).uint32(message.code);
2827
- }
2828
- if (message.data.length !== 0) {
2829
- writer.uint32(18).bytes(message.data);
2830
- }
2831
- if (message.log !== '') {
2832
- writer.uint32(26).string(message.log);
2833
- }
2834
- if (message.info !== '') {
2835
- writer.uint32(34).string(message.info);
2836
- }
2837
- if (message.gasWanted !== BigInt(0)) {
2838
- writer.uint32(40).int64(message.gasWanted);
2839
- }
2840
- if (message.gasUsed !== BigInt(0)) {
2841
- writer.uint32(48).int64(message.gasUsed);
2842
- }
2843
- for (const v of message.events) {
2844
- Event.encode(v, writer.uint32(58).fork()).ldelim();
2845
- }
2846
- if (message.codespace !== '') {
2847
- writer.uint32(66).string(message.codespace);
2848
- }
2849
- return writer;
2850
- },
2851
- decode(input, length) {
2852
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2853
- let end = length === undefined ? reader.len : reader.pos + length;
2854
- const message = createBaseResponseDeliverTx();
2855
- while (reader.pos < end) {
2856
- const tag = reader.uint32();
2857
- switch (tag >>> 3) {
2858
- case 1:
2859
- message.code = reader.uint32();
2860
- break;
2861
- case 2:
2862
- message.data = reader.bytes();
2863
- break;
2864
- case 3:
2865
- message.log = reader.string();
2866
- break;
2867
- case 4:
2868
- message.info = reader.string();
2869
- break;
2870
- case 5:
2871
- message.gasWanted = reader.int64();
2872
- break;
2873
- case 6:
2874
- message.gasUsed = reader.int64();
2875
- break;
2876
- case 7:
2877
- message.events.push(Event.decode(reader, reader.uint32()));
2878
- break;
2879
- case 8:
2880
- message.codespace = reader.string();
2881
- break;
2882
- default:
2883
- reader.skipType(tag & 7);
2884
- break;
2885
- }
2886
- }
2887
- return message;
2888
- },
2889
- fromJSON(object) {
2890
- return {
2891
- code: isSet(object.code) ? Number(object.code) : 0,
2892
- data: isSet(object.data)
2893
- ? bytesFromBase64(object.data)
2894
- : new Uint8Array(),
2895
- log: isSet(object.log) ? String(object.log) : '',
2896
- info: isSet(object.info) ? String(object.info) : '',
2897
- gasWanted: isSet(object.gas_wanted)
2898
- ? BigInt(object.gas_wanted.toString())
2899
- : BigInt(0),
2900
- gasUsed: isSet(object.gas_used)
2901
- ? BigInt(object.gas_used.toString())
2902
- : BigInt(0),
2903
- events: Array.isArray(object?.events)
2904
- ? object.events.map((e) => Event.fromJSON(e))
2905
- : [],
2906
- codespace: isSet(object.codespace) ? String(object.codespace) : '',
2907
- };
2908
- },
2909
- toJSON(message) {
2910
- const obj = {};
2911
- message.code !== undefined && (obj.code = Math.round(message.code));
2912
- message.data !== undefined &&
2913
- (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
2914
- message.log !== undefined && (obj.log = message.log);
2915
- message.info !== undefined && (obj.info = message.info);
2916
- message.gasWanted !== undefined &&
2917
- (obj.gas_wanted = (message.gasWanted || BigInt(0)).toString());
2918
- message.gasUsed !== undefined &&
2919
- (obj.gas_used = (message.gasUsed || BigInt(0)).toString());
2920
- if (message.events) {
2921
- obj.events = message.events.map(e => (e ? Event.toJSON(e) : undefined));
2922
- }
2923
- else {
2924
- obj.events = [];
2925
- }
2926
- message.codespace !== undefined && (obj.codespace = message.codespace);
2927
- return obj;
2928
- },
2929
- fromPartial(object) {
2930
- const message = createBaseResponseDeliverTx();
2931
- message.code = object.code ?? 0;
2932
- message.data = object.data ?? new Uint8Array();
2933
- message.log = object.log ?? '';
2934
- message.info = object.info ?? '';
2935
- message.gasWanted =
2936
- object.gasWanted !== undefined && object.gasWanted !== null
2937
- ? BigInt(object.gasWanted.toString())
2938
- : BigInt(0);
2939
- message.gasUsed =
2940
- object.gasUsed !== undefined && object.gasUsed !== null
2941
- ? BigInt(object.gasUsed.toString())
2942
- : BigInt(0);
2943
- message.events = object.events?.map(e => Event.fromPartial(e)) || [];
2944
- message.codespace = object.codespace ?? '';
2945
- return message;
2946
- },
2947
- fromProtoMsg(message) {
2948
- return ResponseDeliverTx.decode(message.value);
2949
- },
2950
- toProto(message) {
2951
- return ResponseDeliverTx.encode(message).finish();
2952
- },
2953
- toProtoMsg(message) {
2954
- return {
2955
- typeUrl: '/tendermint.abci.ResponseDeliverTx',
2956
- value: ResponseDeliverTx.encode(message).finish(),
2957
- };
2958
- },
2959
- };
2960
- function createBaseResponseEndBlock() {
2961
- return {
2962
- validatorUpdates: [],
2963
- consensusParamUpdates: undefined,
2964
- events: [],
2965
- };
2966
- }
2967
- export const ResponseEndBlock = {
2968
- typeUrl: '/tendermint.abci.ResponseEndBlock',
2969
- encode(message, writer = BinaryWriter.create()) {
2970
- for (const v of message.validatorUpdates) {
2971
- ValidatorUpdate.encode(v, writer.uint32(10).fork()).ldelim();
2972
- }
2973
- if (message.consensusParamUpdates !== undefined) {
2974
- ConsensusParams.encode(message.consensusParamUpdates, writer.uint32(18).fork()).ldelim();
2975
- }
2976
- for (const v of message.events) {
2977
- Event.encode(v, writer.uint32(26).fork()).ldelim();
2978
- }
2979
- return writer;
2980
- },
2981
- decode(input, length) {
2982
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2983
- let end = length === undefined ? reader.len : reader.pos + length;
2984
- const message = createBaseResponseEndBlock();
2985
- while (reader.pos < end) {
2986
- const tag = reader.uint32();
2987
- switch (tag >>> 3) {
2988
- case 1:
2989
- message.validatorUpdates.push(ValidatorUpdate.decode(reader, reader.uint32()));
2990
- break;
2991
- case 2:
2992
- message.consensusParamUpdates = ConsensusParams.decode(reader, reader.uint32());
2993
- break;
2994
- case 3:
2995
- message.events.push(Event.decode(reader, reader.uint32()));
2996
- break;
2997
- default:
2998
- reader.skipType(tag & 7);
2999
- break;
3000
- }
3001
- }
3002
- return message;
3003
- },
3004
- fromJSON(object) {
3005
- return {
3006
- validatorUpdates: Array.isArray(object?.validatorUpdates)
3007
- ? object.validatorUpdates.map((e) => ValidatorUpdate.fromJSON(e))
3008
- : [],
3009
- consensusParamUpdates: isSet(object.consensusParamUpdates)
3010
- ? ConsensusParams.fromJSON(object.consensusParamUpdates)
3011
- : undefined,
3012
- events: Array.isArray(object?.events)
3013
- ? object.events.map((e) => Event.fromJSON(e))
3014
- : [],
3015
- };
3016
- },
3017
- toJSON(message) {
3018
- const obj = {};
3019
- if (message.validatorUpdates) {
3020
- obj.validatorUpdates = message.validatorUpdates.map(e => e ? ValidatorUpdate.toJSON(e) : undefined);
3021
- }
3022
- else {
3023
- obj.validatorUpdates = [];
3024
- }
3025
- message.consensusParamUpdates !== undefined &&
3026
- (obj.consensusParamUpdates = message.consensusParamUpdates
3027
- ? ConsensusParams.toJSON(message.consensusParamUpdates)
3028
- : undefined);
3029
- if (message.events) {
3030
- obj.events = message.events.map(e => (e ? Event.toJSON(e) : undefined));
3031
- }
3032
- else {
3033
- obj.events = [];
3034
- }
3035
- return obj;
3036
- },
3037
- fromPartial(object) {
3038
- const message = createBaseResponseEndBlock();
3039
- message.validatorUpdates =
3040
- object.validatorUpdates?.map(e => ValidatorUpdate.fromPartial(e)) || [];
3041
- message.consensusParamUpdates =
3042
- object.consensusParamUpdates !== undefined &&
3043
- object.consensusParamUpdates !== null
3044
- ? ConsensusParams.fromPartial(object.consensusParamUpdates)
3045
- : undefined;
3046
- message.events = object.events?.map(e => Event.fromPartial(e)) || [];
3047
- return message;
3048
- },
3049
- fromProtoMsg(message) {
3050
- return ResponseEndBlock.decode(message.value);
3051
- },
3052
- toProto(message) {
3053
- return ResponseEndBlock.encode(message).finish();
3054
- },
3055
- toProtoMsg(message) {
3056
- return {
3057
- typeUrl: '/tendermint.abci.ResponseEndBlock',
3058
- value: ResponseEndBlock.encode(message).finish(),
3059
- };
3060
- },
3061
- };
3062
- function createBaseResponseCommit() {
3063
- return {
3064
- data: new Uint8Array(),
3065
- retainHeight: BigInt(0),
3066
- };
3067
- }
3068
- export const ResponseCommit = {
3069
- typeUrl: '/tendermint.abci.ResponseCommit',
3070
- encode(message, writer = BinaryWriter.create()) {
3071
- if (message.data.length !== 0) {
3072
- writer.uint32(18).bytes(message.data);
3073
- }
3074
- if (message.retainHeight !== BigInt(0)) {
3075
- writer.uint32(24).int64(message.retainHeight);
3076
- }
3077
- return writer;
3078
- },
3079
- decode(input, length) {
3080
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3081
- let end = length === undefined ? reader.len : reader.pos + length;
3082
- const message = createBaseResponseCommit();
3083
- while (reader.pos < end) {
3084
- const tag = reader.uint32();
3085
- switch (tag >>> 3) {
3086
- case 2:
3087
- message.data = reader.bytes();
3088
- break;
3089
- case 3:
3090
- message.retainHeight = reader.int64();
3091
- break;
3092
- default:
3093
- reader.skipType(tag & 7);
3094
- break;
3095
- }
3096
- }
3097
- return message;
3098
- },
3099
- fromJSON(object) {
3100
- return {
3101
- data: isSet(object.data)
3102
- ? bytesFromBase64(object.data)
3103
- : new Uint8Array(),
3104
- retainHeight: isSet(object.retainHeight)
3105
- ? BigInt(object.retainHeight.toString())
3106
- : BigInt(0),
3107
- };
3108
- },
3109
- toJSON(message) {
3110
- const obj = {};
3111
- message.data !== undefined &&
3112
- (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
3113
- message.retainHeight !== undefined &&
3114
- (obj.retainHeight = (message.retainHeight || BigInt(0)).toString());
3115
- return obj;
3116
- },
3117
- fromPartial(object) {
3118
- const message = createBaseResponseCommit();
3119
- message.data = object.data ?? new Uint8Array();
3120
- message.retainHeight =
3121
- object.retainHeight !== undefined && object.retainHeight !== null
3122
- ? BigInt(object.retainHeight.toString())
3123
- : BigInt(0);
3124
- return message;
3125
- },
3126
- fromProtoMsg(message) {
3127
- return ResponseCommit.decode(message.value);
3128
- },
3129
- toProto(message) {
3130
- return ResponseCommit.encode(message).finish();
3131
- },
3132
- toProtoMsg(message) {
3133
- return {
3134
- typeUrl: '/tendermint.abci.ResponseCommit',
3135
- value: ResponseCommit.encode(message).finish(),
3136
- };
3137
- },
3138
- };
3139
- function createBaseResponseListSnapshots() {
3140
- return {
3141
- snapshots: [],
3142
- };
3143
- }
3144
- export const ResponseListSnapshots = {
3145
- typeUrl: '/tendermint.abci.ResponseListSnapshots',
3146
- encode(message, writer = BinaryWriter.create()) {
3147
- for (const v of message.snapshots) {
3148
- Snapshot.encode(v, writer.uint32(10).fork()).ldelim();
3149
- }
3150
- return writer;
3151
- },
3152
- decode(input, length) {
3153
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3154
- let end = length === undefined ? reader.len : reader.pos + length;
3155
- const message = createBaseResponseListSnapshots();
3156
- while (reader.pos < end) {
3157
- const tag = reader.uint32();
3158
- switch (tag >>> 3) {
3159
- case 1:
3160
- message.snapshots.push(Snapshot.decode(reader, reader.uint32()));
3161
- break;
3162
- default:
3163
- reader.skipType(tag & 7);
3164
- break;
3165
- }
3166
- }
3167
- return message;
3168
- },
3169
- fromJSON(object) {
3170
- return {
3171
- snapshots: Array.isArray(object?.snapshots)
3172
- ? object.snapshots.map((e) => Snapshot.fromJSON(e))
3173
- : [],
3174
- };
3175
- },
3176
- toJSON(message) {
3177
- const obj = {};
3178
- if (message.snapshots) {
3179
- obj.snapshots = message.snapshots.map(e => e ? Snapshot.toJSON(e) : undefined);
3180
- }
3181
- else {
3182
- obj.snapshots = [];
3183
- }
3184
- return obj;
3185
- },
3186
- fromPartial(object) {
3187
- const message = createBaseResponseListSnapshots();
3188
- message.snapshots =
3189
- object.snapshots?.map(e => Snapshot.fromPartial(e)) || [];
3190
- return message;
3191
- },
3192
- fromProtoMsg(message) {
3193
- return ResponseListSnapshots.decode(message.value);
3194
- },
3195
- toProto(message) {
3196
- return ResponseListSnapshots.encode(message).finish();
3197
- },
3198
- toProtoMsg(message) {
3199
- return {
3200
- typeUrl: '/tendermint.abci.ResponseListSnapshots',
3201
- value: ResponseListSnapshots.encode(message).finish(),
3202
- };
3203
- },
3204
- };
3205
- function createBaseResponseOfferSnapshot() {
3206
- return {
3207
- result: 0,
3208
- };
3209
- }
3210
- export const ResponseOfferSnapshot = {
3211
- typeUrl: '/tendermint.abci.ResponseOfferSnapshot',
3212
- encode(message, writer = BinaryWriter.create()) {
3213
- if (message.result !== 0) {
3214
- writer.uint32(8).int32(message.result);
3215
- }
3216
- return writer;
3217
- },
3218
- decode(input, length) {
3219
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3220
- let end = length === undefined ? reader.len : reader.pos + length;
3221
- const message = createBaseResponseOfferSnapshot();
3222
- while (reader.pos < end) {
3223
- const tag = reader.uint32();
3224
- switch (tag >>> 3) {
3225
- case 1:
3226
- message.result = reader.int32();
3227
- break;
3228
- default:
3229
- reader.skipType(tag & 7);
3230
- break;
3231
- }
922
+ if (message.log !== '') {
923
+ writer.uint32(26).string(message.log);
3232
924
  }
3233
- return message;
3234
- },
3235
- fromJSON(object) {
3236
- return {
3237
- result: isSet(object.result)
3238
- ? responseOfferSnapshot_ResultFromJSON(object.result)
3239
- : -1,
3240
- };
3241
- },
3242
- toJSON(message) {
3243
- const obj = {};
3244
- message.result !== undefined &&
3245
- (obj.result = responseOfferSnapshot_ResultToJSON(message.result));
3246
- return obj;
3247
- },
3248
- fromPartial(object) {
3249
- const message = createBaseResponseOfferSnapshot();
3250
- message.result = object.result ?? 0;
3251
- return message;
3252
- },
3253
- fromProtoMsg(message) {
3254
- return ResponseOfferSnapshot.decode(message.value);
3255
- },
3256
- toProto(message) {
3257
- return ResponseOfferSnapshot.encode(message).finish();
3258
- },
3259
- toProtoMsg(message) {
3260
- return {
3261
- typeUrl: '/tendermint.abci.ResponseOfferSnapshot',
3262
- value: ResponseOfferSnapshot.encode(message).finish(),
3263
- };
3264
- },
3265
- };
3266
- function createBaseResponseLoadSnapshotChunk() {
3267
- return {
3268
- chunk: new Uint8Array(),
3269
- };
3270
- }
3271
- export const ResponseLoadSnapshotChunk = {
3272
- typeUrl: '/tendermint.abci.ResponseLoadSnapshotChunk',
3273
- encode(message, writer = BinaryWriter.create()) {
3274
- if (message.chunk.length !== 0) {
3275
- writer.uint32(10).bytes(message.chunk);
925
+ if (message.info !== '') {
926
+ writer.uint32(34).string(message.info);
3276
927
  }
3277
- return writer;
3278
- },
3279
- decode(input, length) {
3280
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3281
- let end = length === undefined ? reader.len : reader.pos + length;
3282
- const message = createBaseResponseLoadSnapshotChunk();
3283
- while (reader.pos < end) {
3284
- const tag = reader.uint32();
3285
- switch (tag >>> 3) {
3286
- case 1:
3287
- message.chunk = reader.bytes();
3288
- break;
3289
- default:
3290
- reader.skipType(tag & 7);
3291
- break;
3292
- }
928
+ if (message.gasWanted !== BigInt(0)) {
929
+ writer.uint32(40).int64(message.gasWanted);
3293
930
  }
3294
- return message;
3295
- },
3296
- fromJSON(object) {
3297
- return {
3298
- chunk: isSet(object.chunk)
3299
- ? bytesFromBase64(object.chunk)
3300
- : new Uint8Array(),
3301
- };
3302
- },
3303
- toJSON(message) {
3304
- const obj = {};
3305
- message.chunk !== undefined &&
3306
- (obj.chunk = base64FromBytes(message.chunk !== undefined ? message.chunk : new Uint8Array()));
3307
- return obj;
3308
- },
3309
- fromPartial(object) {
3310
- const message = createBaseResponseLoadSnapshotChunk();
3311
- message.chunk = object.chunk ?? new Uint8Array();
3312
- return message;
3313
- },
3314
- fromProtoMsg(message) {
3315
- return ResponseLoadSnapshotChunk.decode(message.value);
3316
- },
3317
- toProto(message) {
3318
- return ResponseLoadSnapshotChunk.encode(message).finish();
3319
- },
3320
- toProtoMsg(message) {
3321
- return {
3322
- typeUrl: '/tendermint.abci.ResponseLoadSnapshotChunk',
3323
- value: ResponseLoadSnapshotChunk.encode(message).finish(),
3324
- };
3325
- },
3326
- };
3327
- function createBaseResponseApplySnapshotChunk() {
3328
- return {
3329
- result: 0,
3330
- refetchChunks: [],
3331
- rejectSenders: [],
3332
- };
3333
- }
3334
- export const ResponseApplySnapshotChunk = {
3335
- typeUrl: '/tendermint.abci.ResponseApplySnapshotChunk',
3336
- encode(message, writer = BinaryWriter.create()) {
3337
- if (message.result !== 0) {
3338
- writer.uint32(8).int32(message.result);
931
+ if (message.gasUsed !== BigInt(0)) {
932
+ writer.uint32(48).int64(message.gasUsed);
3339
933
  }
3340
- writer.uint32(18).fork();
3341
- for (const v of message.refetchChunks) {
3342
- writer.uint32(v);
934
+ for (const v of message.events) {
935
+ Event.encode(v, writer.uint32(58).fork()).ldelim();
3343
936
  }
3344
- writer.ldelim();
3345
- for (const v of message.rejectSenders) {
3346
- writer.uint32(26).string(v);
937
+ if (message.codespace !== '') {
938
+ writer.uint32(66).string(message.codespace);
3347
939
  }
3348
940
  return writer;
3349
941
  },
3350
942
  decode(input, length) {
3351
943
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3352
944
  let end = length === undefined ? reader.len : reader.pos + length;
3353
- const message = createBaseResponseApplySnapshotChunk();
945
+ const message = createBaseResponseDeliverTx();
3354
946
  while (reader.pos < end) {
3355
947
  const tag = reader.uint32();
3356
948
  switch (tag >>> 3) {
3357
949
  case 1:
3358
- message.result = reader.int32();
950
+ message.code = reader.uint32();
3359
951
  break;
3360
952
  case 2:
3361
- if ((tag & 7) === 2) {
3362
- const end2 = reader.uint32() + reader.pos;
3363
- while (reader.pos < end2) {
3364
- message.refetchChunks.push(reader.uint32());
3365
- }
3366
- }
3367
- else {
3368
- message.refetchChunks.push(reader.uint32());
3369
- }
953
+ message.data = reader.bytes();
3370
954
  break;
3371
955
  case 3:
3372
- message.rejectSenders.push(reader.string());
956
+ message.log = reader.string();
957
+ break;
958
+ case 4:
959
+ message.info = reader.string();
960
+ break;
961
+ case 5:
962
+ message.gasWanted = reader.int64();
963
+ break;
964
+ case 6:
965
+ message.gasUsed = reader.int64();
966
+ break;
967
+ case 7:
968
+ message.events.push(Event.decode(reader, reader.uint32()));
969
+ break;
970
+ case 8:
971
+ message.codespace = reader.string();
3373
972
  break;
3374
973
  default:
3375
974
  reader.skipType(tag & 7);
@@ -3380,98 +979,111 @@ export const ResponseApplySnapshotChunk = {
3380
979
  },
3381
980
  fromJSON(object) {
3382
981
  return {
3383
- result: isSet(object.result)
3384
- ? responseApplySnapshotChunk_ResultFromJSON(object.result)
3385
- : -1,
3386
- refetchChunks: Array.isArray(object?.refetchChunks)
3387
- ? object.refetchChunks.map((e) => Number(e))
3388
- : [],
3389
- rejectSenders: Array.isArray(object?.rejectSenders)
3390
- ? object.rejectSenders.map((e) => String(e))
982
+ code: isSet(object.code) ? Number(object.code) : 0,
983
+ data: isSet(object.data)
984
+ ? bytesFromBase64(object.data)
985
+ : new Uint8Array(),
986
+ log: isSet(object.log) ? String(object.log) : '',
987
+ info: isSet(object.info) ? String(object.info) : '',
988
+ gasWanted: isSet(object.gas_wanted)
989
+ ? BigInt(object.gas_wanted.toString())
990
+ : BigInt(0),
991
+ gasUsed: isSet(object.gas_used)
992
+ ? BigInt(object.gas_used.toString())
993
+ : BigInt(0),
994
+ events: Array.isArray(object?.events)
995
+ ? object.events.map((e) => Event.fromJSON(e))
3391
996
  : [],
997
+ codespace: isSet(object.codespace) ? String(object.codespace) : '',
3392
998
  };
3393
999
  },
3394
1000
  toJSON(message) {
3395
1001
  const obj = {};
3396
- message.result !== undefined &&
3397
- (obj.result = responseApplySnapshotChunk_ResultToJSON(message.result));
3398
- if (message.refetchChunks) {
3399
- obj.refetchChunks = message.refetchChunks.map(e => Math.round(e));
3400
- }
3401
- else {
3402
- obj.refetchChunks = [];
3403
- }
3404
- if (message.rejectSenders) {
3405
- obj.rejectSenders = message.rejectSenders.map(e => e);
1002
+ message.code !== undefined && (obj.code = Math.round(message.code));
1003
+ message.data !== undefined &&
1004
+ (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
1005
+ message.log !== undefined && (obj.log = message.log);
1006
+ message.info !== undefined && (obj.info = message.info);
1007
+ message.gasWanted !== undefined &&
1008
+ (obj.gas_wanted = (message.gasWanted || BigInt(0)).toString());
1009
+ message.gasUsed !== undefined &&
1010
+ (obj.gas_used = (message.gasUsed || BigInt(0)).toString());
1011
+ if (message.events) {
1012
+ obj.events = message.events.map(e => (e ? Event.toJSON(e) : undefined));
3406
1013
  }
3407
1014
  else {
3408
- obj.rejectSenders = [];
1015
+ obj.events = [];
3409
1016
  }
1017
+ message.codespace !== undefined && (obj.codespace = message.codespace);
3410
1018
  return obj;
3411
1019
  },
3412
1020
  fromPartial(object) {
3413
- const message = createBaseResponseApplySnapshotChunk();
3414
- message.result = object.result ?? 0;
3415
- message.refetchChunks = object.refetchChunks?.map(e => e) || [];
3416
- message.rejectSenders = object.rejectSenders?.map(e => e) || [];
1021
+ const message = createBaseResponseDeliverTx();
1022
+ message.code = object.code ?? 0;
1023
+ message.data = object.data ?? new Uint8Array();
1024
+ message.log = object.log ?? '';
1025
+ message.info = object.info ?? '';
1026
+ message.gasWanted =
1027
+ object.gasWanted !== undefined && object.gasWanted !== null
1028
+ ? BigInt(object.gasWanted.toString())
1029
+ : BigInt(0);
1030
+ message.gasUsed =
1031
+ object.gasUsed !== undefined && object.gasUsed !== null
1032
+ ? BigInt(object.gasUsed.toString())
1033
+ : BigInt(0);
1034
+ message.events = object.events?.map(e => Event.fromPartial(e)) || [];
1035
+ message.codespace = object.codespace ?? '';
3417
1036
  return message;
3418
1037
  },
3419
1038
  fromProtoMsg(message) {
3420
- return ResponseApplySnapshotChunk.decode(message.value);
1039
+ return ResponseDeliverTx.decode(message.value);
3421
1040
  },
3422
1041
  toProto(message) {
3423
- return ResponseApplySnapshotChunk.encode(message).finish();
1042
+ return ResponseDeliverTx.encode(message).finish();
3424
1043
  },
3425
1044
  toProtoMsg(message) {
3426
1045
  return {
3427
- typeUrl: '/tendermint.abci.ResponseApplySnapshotChunk',
3428
- value: ResponseApplySnapshotChunk.encode(message).finish(),
1046
+ typeUrl: '/tendermint.abci.ResponseDeliverTx',
1047
+ value: ResponseDeliverTx.encode(message).finish(),
3429
1048
  };
3430
1049
  },
3431
1050
  };
3432
- function createBaseConsensusParams() {
1051
+ function createBaseResponseEndBlock() {
3433
1052
  return {
3434
- block: undefined,
3435
- evidence: undefined,
3436
- validator: undefined,
3437
- version: undefined,
1053
+ validatorUpdates: [],
1054
+ consensusParamUpdates: undefined,
1055
+ events: [],
3438
1056
  };
3439
1057
  }
3440
- export const ConsensusParams = {
3441
- typeUrl: '/tendermint.abci.ConsensusParams',
1058
+ export const ResponseEndBlock = {
1059
+ typeUrl: '/tendermint.abci.ResponseEndBlock',
3442
1060
  encode(message, writer = BinaryWriter.create()) {
3443
- if (message.block !== undefined) {
3444
- BlockParams.encode(message.block, writer.uint32(10).fork()).ldelim();
3445
- }
3446
- if (message.evidence !== undefined) {
3447
- EvidenceParams.encode(message.evidence, writer.uint32(18).fork()).ldelim();
1061
+ for (const v of message.validatorUpdates) {
1062
+ ValidatorUpdate.encode(v, writer.uint32(10).fork()).ldelim();
3448
1063
  }
3449
- if (message.validator !== undefined) {
3450
- ValidatorParams.encode(message.validator, writer.uint32(26).fork()).ldelim();
1064
+ if (message.consensusParamUpdates !== undefined) {
1065
+ ConsensusParams.encode(message.consensusParamUpdates, writer.uint32(18).fork()).ldelim();
3451
1066
  }
3452
- if (message.version !== undefined) {
3453
- VersionParams.encode(message.version, writer.uint32(34).fork()).ldelim();
1067
+ for (const v of message.events) {
1068
+ Event.encode(v, writer.uint32(26).fork()).ldelim();
3454
1069
  }
3455
1070
  return writer;
3456
1071
  },
3457
1072
  decode(input, length) {
3458
1073
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3459
1074
  let end = length === undefined ? reader.len : reader.pos + length;
3460
- const message = createBaseConsensusParams();
1075
+ const message = createBaseResponseEndBlock();
3461
1076
  while (reader.pos < end) {
3462
1077
  const tag = reader.uint32();
3463
1078
  switch (tag >>> 3) {
3464
1079
  case 1:
3465
- message.block = BlockParams.decode(reader, reader.uint32());
1080
+ message.validatorUpdates.push(ValidatorUpdate.decode(reader, reader.uint32()));
3466
1081
  break;
3467
1082
  case 2:
3468
- message.evidence = EvidenceParams.decode(reader, reader.uint32());
1083
+ message.consensusParamUpdates = ConsensusParams.decode(reader, reader.uint32());
3469
1084
  break;
3470
1085
  case 3:
3471
- message.validator = ValidatorParams.decode(reader, reader.uint32());
3472
- break;
3473
- case 4:
3474
- message.version = VersionParams.decode(reader, reader.uint32());
1086
+ message.events.push(Event.decode(reader, reader.uint32()));
3475
1087
  break;
3476
1088
  default:
3477
1089
  reader.skipType(tag & 7);
@@ -3482,102 +1094,91 @@ export const ConsensusParams = {
3482
1094
  },
3483
1095
  fromJSON(object) {
3484
1096
  return {
3485
- block: isSet(object.block)
3486
- ? BlockParams.fromJSON(object.block)
3487
- : undefined,
3488
- evidence: isSet(object.evidence)
3489
- ? EvidenceParams.fromJSON(object.evidence)
3490
- : undefined,
3491
- validator: isSet(object.validator)
3492
- ? ValidatorParams.fromJSON(object.validator)
3493
- : undefined,
3494
- version: isSet(object.version)
3495
- ? VersionParams.fromJSON(object.version)
1097
+ validatorUpdates: Array.isArray(object?.validatorUpdates)
1098
+ ? object.validatorUpdates.map((e) => ValidatorUpdate.fromJSON(e))
1099
+ : [],
1100
+ consensusParamUpdates: isSet(object.consensusParamUpdates)
1101
+ ? ConsensusParams.fromJSON(object.consensusParamUpdates)
3496
1102
  : undefined,
1103
+ events: Array.isArray(object?.events)
1104
+ ? object.events.map((e) => Event.fromJSON(e))
1105
+ : [],
3497
1106
  };
3498
1107
  },
3499
1108
  toJSON(message) {
3500
1109
  const obj = {};
3501
- message.block !== undefined &&
3502
- (obj.block = message.block
3503
- ? BlockParams.toJSON(message.block)
3504
- : undefined);
3505
- message.evidence !== undefined &&
3506
- (obj.evidence = message.evidence
3507
- ? EvidenceParams.toJSON(message.evidence)
3508
- : undefined);
3509
- message.validator !== undefined &&
3510
- (obj.validator = message.validator
3511
- ? ValidatorParams.toJSON(message.validator)
3512
- : undefined);
3513
- message.version !== undefined &&
3514
- (obj.version = message.version
3515
- ? VersionParams.toJSON(message.version)
1110
+ if (message.validatorUpdates) {
1111
+ obj.validatorUpdates = message.validatorUpdates.map(e => e ? ValidatorUpdate.toJSON(e) : undefined);
1112
+ }
1113
+ else {
1114
+ obj.validatorUpdates = [];
1115
+ }
1116
+ message.consensusParamUpdates !== undefined &&
1117
+ (obj.consensusParamUpdates = message.consensusParamUpdates
1118
+ ? ConsensusParams.toJSON(message.consensusParamUpdates)
3516
1119
  : undefined);
1120
+ if (message.events) {
1121
+ obj.events = message.events.map(e => (e ? Event.toJSON(e) : undefined));
1122
+ }
1123
+ else {
1124
+ obj.events = [];
1125
+ }
3517
1126
  return obj;
3518
1127
  },
3519
1128
  fromPartial(object) {
3520
- const message = createBaseConsensusParams();
3521
- message.block =
3522
- object.block !== undefined && object.block !== null
3523
- ? BlockParams.fromPartial(object.block)
3524
- : undefined;
3525
- message.evidence =
3526
- object.evidence !== undefined && object.evidence !== null
3527
- ? EvidenceParams.fromPartial(object.evidence)
3528
- : undefined;
3529
- message.validator =
3530
- object.validator !== undefined && object.validator !== null
3531
- ? ValidatorParams.fromPartial(object.validator)
3532
- : undefined;
3533
- message.version =
3534
- object.version !== undefined && object.version !== null
3535
- ? VersionParams.fromPartial(object.version)
1129
+ const message = createBaseResponseEndBlock();
1130
+ message.validatorUpdates =
1131
+ object.validatorUpdates?.map(e => ValidatorUpdate.fromPartial(e)) || [];
1132
+ message.consensusParamUpdates =
1133
+ object.consensusParamUpdates !== undefined &&
1134
+ object.consensusParamUpdates !== null
1135
+ ? ConsensusParams.fromPartial(object.consensusParamUpdates)
3536
1136
  : undefined;
1137
+ message.events = object.events?.map(e => Event.fromPartial(e)) || [];
3537
1138
  return message;
3538
1139
  },
3539
1140
  fromProtoMsg(message) {
3540
- return ConsensusParams.decode(message.value);
1141
+ return ResponseEndBlock.decode(message.value);
3541
1142
  },
3542
1143
  toProto(message) {
3543
- return ConsensusParams.encode(message).finish();
1144
+ return ResponseEndBlock.encode(message).finish();
3544
1145
  },
3545
1146
  toProtoMsg(message) {
3546
1147
  return {
3547
- typeUrl: '/tendermint.abci.ConsensusParams',
3548
- value: ConsensusParams.encode(message).finish(),
1148
+ typeUrl: '/tendermint.abci.ResponseEndBlock',
1149
+ value: ResponseEndBlock.encode(message).finish(),
3549
1150
  };
3550
1151
  },
3551
1152
  };
3552
- function createBaseBlockParams() {
1153
+ function createBaseResponseCommit() {
3553
1154
  return {
3554
- maxBytes: BigInt(0),
3555
- maxGas: BigInt(0),
1155
+ data: new Uint8Array(),
1156
+ retainHeight: BigInt(0),
3556
1157
  };
3557
1158
  }
3558
- export const BlockParams = {
3559
- typeUrl: '/tendermint.abci.BlockParams',
1159
+ export const ResponseCommit = {
1160
+ typeUrl: '/tendermint.abci.ResponseCommit',
3560
1161
  encode(message, writer = BinaryWriter.create()) {
3561
- if (message.maxBytes !== BigInt(0)) {
3562
- writer.uint32(8).int64(message.maxBytes);
1162
+ if (message.data.length !== 0) {
1163
+ writer.uint32(18).bytes(message.data);
3563
1164
  }
3564
- if (message.maxGas !== BigInt(0)) {
3565
- writer.uint32(16).int64(message.maxGas);
1165
+ if (message.retainHeight !== BigInt(0)) {
1166
+ writer.uint32(24).int64(message.retainHeight);
3566
1167
  }
3567
1168
  return writer;
3568
1169
  },
3569
1170
  decode(input, length) {
3570
1171
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3571
1172
  let end = length === undefined ? reader.len : reader.pos + length;
3572
- const message = createBaseBlockParams();
1173
+ const message = createBaseResponseCommit();
3573
1174
  while (reader.pos < end) {
3574
1175
  const tag = reader.uint32();
3575
1176
  switch (tag >>> 3) {
3576
- case 1:
3577
- message.maxBytes = reader.int64();
3578
- break;
3579
1177
  case 2:
3580
- message.maxGas = reader.int64();
1178
+ message.data = reader.bytes();
1179
+ break;
1180
+ case 3:
1181
+ message.retainHeight = reader.int64();
3581
1182
  break;
3582
1183
  default:
3583
1184
  reader.skipType(tag & 7);
@@ -3588,44 +1189,41 @@ export const BlockParams = {
3588
1189
  },
3589
1190
  fromJSON(object) {
3590
1191
  return {
3591
- maxBytes: isSet(object.maxBytes)
3592
- ? BigInt(object.maxBytes.toString())
3593
- : BigInt(0),
3594
- maxGas: isSet(object.maxGas)
3595
- ? BigInt(object.maxGas.toString())
1192
+ data: isSet(object.data)
1193
+ ? bytesFromBase64(object.data)
1194
+ : new Uint8Array(),
1195
+ retainHeight: isSet(object.retainHeight)
1196
+ ? BigInt(object.retainHeight.toString())
3596
1197
  : BigInt(0),
3597
1198
  };
3598
1199
  },
3599
1200
  toJSON(message) {
3600
1201
  const obj = {};
3601
- message.maxBytes !== undefined &&
3602
- (obj.maxBytes = (message.maxBytes || BigInt(0)).toString());
3603
- message.maxGas !== undefined &&
3604
- (obj.maxGas = (message.maxGas || BigInt(0)).toString());
1202
+ message.data !== undefined &&
1203
+ (obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
1204
+ message.retainHeight !== undefined &&
1205
+ (obj.retainHeight = (message.retainHeight || BigInt(0)).toString());
3605
1206
  return obj;
3606
1207
  },
3607
1208
  fromPartial(object) {
3608
- const message = createBaseBlockParams();
3609
- message.maxBytes =
3610
- object.maxBytes !== undefined && object.maxBytes !== null
3611
- ? BigInt(object.maxBytes.toString())
3612
- : BigInt(0);
3613
- message.maxGas =
3614
- object.maxGas !== undefined && object.maxGas !== null
3615
- ? BigInt(object.maxGas.toString())
1209
+ const message = createBaseResponseCommit();
1210
+ message.data = object.data ?? new Uint8Array();
1211
+ message.retainHeight =
1212
+ object.retainHeight !== undefined && object.retainHeight !== null
1213
+ ? BigInt(object.retainHeight.toString())
3616
1214
  : BigInt(0);
3617
1215
  return message;
3618
1216
  },
3619
1217
  fromProtoMsg(message) {
3620
- return BlockParams.decode(message.value);
1218
+ return ResponseCommit.decode(message.value);
3621
1219
  },
3622
1220
  toProto(message) {
3623
- return BlockParams.encode(message).finish();
1221
+ return ResponseCommit.encode(message).finish();
3624
1222
  },
3625
1223
  toProtoMsg(message) {
3626
1224
  return {
3627
- typeUrl: '/tendermint.abci.BlockParams',
3628
- value: BlockParams.encode(message).finish(),
1225
+ typeUrl: '/tendermint.abci.ResponseCommit',
1226
+ value: ResponseCommit.encode(message).finish(),
3629
1227
  };
3630
1228
  },
3631
1229
  };
@@ -4321,114 +1919,4 @@ export const Evidence = {
4321
1919
  };
4322
1920
  },
4323
1921
  };
4324
- function createBaseSnapshot() {
4325
- return {
4326
- height: BigInt(0),
4327
- format: 0,
4328
- chunks: 0,
4329
- hash: new Uint8Array(),
4330
- metadata: new Uint8Array(),
4331
- };
4332
- }
4333
- export const Snapshot = {
4334
- typeUrl: '/tendermint.abci.Snapshot',
4335
- encode(message, writer = BinaryWriter.create()) {
4336
- if (message.height !== BigInt(0)) {
4337
- writer.uint32(8).uint64(message.height);
4338
- }
4339
- if (message.format !== 0) {
4340
- writer.uint32(16).uint32(message.format);
4341
- }
4342
- if (message.chunks !== 0) {
4343
- writer.uint32(24).uint32(message.chunks);
4344
- }
4345
- if (message.hash.length !== 0) {
4346
- writer.uint32(34).bytes(message.hash);
4347
- }
4348
- if (message.metadata.length !== 0) {
4349
- writer.uint32(42).bytes(message.metadata);
4350
- }
4351
- return writer;
4352
- },
4353
- decode(input, length) {
4354
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4355
- let end = length === undefined ? reader.len : reader.pos + length;
4356
- const message = createBaseSnapshot();
4357
- while (reader.pos < end) {
4358
- const tag = reader.uint32();
4359
- switch (tag >>> 3) {
4360
- case 1:
4361
- message.height = reader.uint64();
4362
- break;
4363
- case 2:
4364
- message.format = reader.uint32();
4365
- break;
4366
- case 3:
4367
- message.chunks = reader.uint32();
4368
- break;
4369
- case 4:
4370
- message.hash = reader.bytes();
4371
- break;
4372
- case 5:
4373
- message.metadata = reader.bytes();
4374
- break;
4375
- default:
4376
- reader.skipType(tag & 7);
4377
- break;
4378
- }
4379
- }
4380
- return message;
4381
- },
4382
- fromJSON(object) {
4383
- return {
4384
- height: isSet(object.height)
4385
- ? BigInt(object.height.toString())
4386
- : BigInt(0),
4387
- format: isSet(object.format) ? Number(object.format) : 0,
4388
- chunks: isSet(object.chunks) ? Number(object.chunks) : 0,
4389
- hash: isSet(object.hash)
4390
- ? bytesFromBase64(object.hash)
4391
- : new Uint8Array(),
4392
- metadata: isSet(object.metadata)
4393
- ? bytesFromBase64(object.metadata)
4394
- : new Uint8Array(),
4395
- };
4396
- },
4397
- toJSON(message) {
4398
- const obj = {};
4399
- message.height !== undefined &&
4400
- (obj.height = (message.height || BigInt(0)).toString());
4401
- message.format !== undefined && (obj.format = Math.round(message.format));
4402
- message.chunks !== undefined && (obj.chunks = Math.round(message.chunks));
4403
- message.hash !== undefined &&
4404
- (obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array()));
4405
- message.metadata !== undefined &&
4406
- (obj.metadata = base64FromBytes(message.metadata !== undefined ? message.metadata : new Uint8Array()));
4407
- return obj;
4408
- },
4409
- fromPartial(object) {
4410
- const message = createBaseSnapshot();
4411
- message.height =
4412
- object.height !== undefined && object.height !== null
4413
- ? BigInt(object.height.toString())
4414
- : BigInt(0);
4415
- message.format = object.format ?? 0;
4416
- message.chunks = object.chunks ?? 0;
4417
- message.hash = object.hash ?? new Uint8Array();
4418
- message.metadata = object.metadata ?? new Uint8Array();
4419
- return message;
4420
- },
4421
- fromProtoMsg(message) {
4422
- return Snapshot.decode(message.value);
4423
- },
4424
- toProto(message) {
4425
- return Snapshot.encode(message).finish();
4426
- },
4427
- toProtoMsg(message) {
4428
- return {
4429
- typeUrl: '/tendermint.abci.Snapshot',
4430
- value: Snapshot.encode(message).finish(),
4431
- };
4432
- },
4433
- };
4434
1922
  //# sourceMappingURL=types.js.map