UNPKG

@bandprotocol/bandchain.js

Version:

Library for interacting with BandChain in browser and Node.js environments

1,153 lines 311 kB
/** * Generated by the protoc-gen-ts. DO NOT EDIT! * compiler version: 3.20.3 * source: tendermint/abci/types.proto * git: https://github.com/thesayyn/protoc-gen-ts */ import * as dependency_1 from "./../crypto/proof"; import * as dependency_2 from "./../crypto/keys"; import * as dependency_3 from "./../types/params"; import * as dependency_4 from "./../types/validator"; import * as dependency_5 from "./../../google/protobuf/timestamp"; import * as dependency_6 from "./../../gogoproto/gogo"; import * as pb_1 from "google-protobuf"; import * as grpc_1 from "@grpc/grpc-js"; export namespace tendermint.abci { export enum CheckTxType { NEW = 0, RECHECK = 1 } export enum MisbehaviorType { UNKNOWN = 0, DUPLICATE_VOTE = 1, LIGHT_CLIENT_ATTACK = 2 } export class Request extends pb_1.Message { #one_of_decls: number[][] = [[1, 2, 3, 5, 6, 8, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]]; constructor(data?: any[] | ({} & (({ echo?: RequestEcho; flush?: never; info?: never; init_chain?: never; query?: never; check_tx?: never; commit?: never; list_snapshots?: never; offer_snapshot?: never; load_snapshot_chunk?: never; apply_snapshot_chunk?: never; prepare_proposal?: never; process_proposal?: never; extend_vote?: never; verify_vote_extension?: never; finalize_block?: never; } | { echo?: never; flush?: RequestFlush; info?: never; init_chain?: never; query?: never; check_tx?: never; commit?: never; list_snapshots?: never; offer_snapshot?: never; load_snapshot_chunk?: never; apply_snapshot_chunk?: never; prepare_proposal?: never; process_proposal?: never; extend_vote?: never; verify_vote_extension?: never; finalize_block?: never; } | { echo?: never; flush?: never; info?: RequestInfo; init_chain?: never; query?: never; check_tx?: never; commit?: never; list_snapshots?: never; offer_snapshot?: never; load_snapshot_chunk?: never; apply_snapshot_chunk?: never; prepare_proposal?: never; process_proposal?: never; extend_vote?: never; verify_vote_extension?: never; finalize_block?: never; } | { echo?: never; flush?: never; info?: never; init_chain?: RequestInitChain; query?: never; check_tx?: never; commit?: never; list_snapshots?: never; offer_snapshot?: never; load_snapshot_chunk?: never; apply_snapshot_chunk?: never; prepare_proposal?: never; process_proposal?: never; extend_vote?: never; verify_vote_extension?: never; finalize_block?: never; } | { echo?: never; flush?: never; info?: never; init_chain?: never; query?: RequestQuery; check_tx?: never; commit?: never; list_snapshots?: never; offer_snapshot?: never; load_snapshot_chunk?: never; apply_snapshot_chunk?: never; prepare_proposal?: never; process_proposal?: never; extend_vote?: never; verify_vote_extension?: never; finalize_block?: never; } | { echo?: never; flush?: never; info?: never; init_chain?: never; query?: never; check_tx?: RequestCheckTx; commit?: never; list_snapshots?: never; offer_snapshot?: never; load_snapshot_chunk?: never; apply_snapshot_chunk?: never; prepare_proposal?: never; process_proposal?: never; extend_vote?: never; verify_vote_extension?: never; finalize_block?: never; } | { echo?: never; flush?: never; info?: never; init_chain?: never; query?: never; check_tx?: never; commit?: RequestCommit; list_snapshots?: never; offer_snapshot?: never; load_snapshot_chunk?: never; apply_snapshot_chunk?: never; prepare_proposal?: never; process_proposal?: never; extend_vote?: never; verify_vote_extension?: never; finalize_block?: never; } | { echo?: never; flush?: never; info?: never; init_chain?: never; query?: never; check_tx?: never; commit?: never; list_snapshots?: RequestListSnapshots; offer_snapshot?: never; load_snapshot_chunk?: never; apply_snapshot_chunk?: never; prepare_proposal?: never; process_proposal?: never; extend_vote?: never; verify_vote_extension?: never; finalize_block?: never; } | { echo?: never; flush?: never; info?: never; init_chain?: never; query?: never; check_tx?: never; commit?: never; list_snapshots?: never; offer_snapshot?: RequestOfferSnapshot; load_snapshot_chunk?: never; apply_snapshot_chunk?: never; prepare_proposal?: never; process_proposal?: never; extend_vote?: never; verify_vote_extension?: never; finalize_block?: never; } | { echo?: never; flush?: never; info?: never; init_chain?: never; query?: never; check_tx?: never; commit?: never; list_snapshots?: never; offer_snapshot?: never; load_snapshot_chunk?: RequestLoadSnapshotChunk; apply_snapshot_chunk?: never; prepare_proposal?: never; process_proposal?: never; extend_vote?: never; verify_vote_extension?: never; finalize_block?: never; } | { echo?: never; flush?: never; info?: never; init_chain?: never; query?: never; check_tx?: never; commit?: never; list_snapshots?: never; offer_snapshot?: never; load_snapshot_chunk?: never; apply_snapshot_chunk?: RequestApplySnapshotChunk; prepare_proposal?: never; process_proposal?: never; extend_vote?: never; verify_vote_extension?: never; finalize_block?: never; } | { echo?: never; flush?: never; info?: never; init_chain?: never; query?: never; check_tx?: never; commit?: never; list_snapshots?: never; offer_snapshot?: never; load_snapshot_chunk?: never; apply_snapshot_chunk?: never; prepare_proposal?: RequestPrepareProposal; process_proposal?: never; extend_vote?: never; verify_vote_extension?: never; finalize_block?: never; } | { echo?: never; flush?: never; info?: never; init_chain?: never; query?: never; check_tx?: never; commit?: never; list_snapshots?: never; offer_snapshot?: never; load_snapshot_chunk?: never; apply_snapshot_chunk?: never; prepare_proposal?: never; process_proposal?: RequestProcessProposal; extend_vote?: never; verify_vote_extension?: never; finalize_block?: never; } | { echo?: never; flush?: never; info?: never; init_chain?: never; query?: never; check_tx?: never; commit?: never; list_snapshots?: never; offer_snapshot?: never; load_snapshot_chunk?: never; apply_snapshot_chunk?: never; prepare_proposal?: never; process_proposal?: never; extend_vote?: RequestExtendVote; verify_vote_extension?: never; finalize_block?: never; } | { echo?: never; flush?: never; info?: never; init_chain?: never; query?: never; check_tx?: never; commit?: never; list_snapshots?: never; offer_snapshot?: never; load_snapshot_chunk?: never; apply_snapshot_chunk?: never; prepare_proposal?: never; process_proposal?: never; extend_vote?: never; verify_vote_extension?: RequestVerifyVoteExtension; finalize_block?: never; } | { echo?: never; flush?: never; info?: never; init_chain?: never; query?: never; check_tx?: never; commit?: never; list_snapshots?: never; offer_snapshot?: never; load_snapshot_chunk?: never; apply_snapshot_chunk?: never; prepare_proposal?: never; process_proposal?: never; extend_vote?: never; verify_vote_extension?: never; finalize_block?: RequestFinalizeBlock; })))) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); if (!Array.isArray(data) && typeof data == "object") { if ("echo" in data && data.echo != undefined) { this.echo = data.echo; } if ("flush" in data && data.flush != undefined) { this.flush = data.flush; } if ("info" in data && data.info != undefined) { this.info = data.info; } if ("init_chain" in data && data.init_chain != undefined) { this.init_chain = data.init_chain; } if ("query" in data && data.query != undefined) { this.query = data.query; } if ("check_tx" in data && data.check_tx != undefined) { this.check_tx = data.check_tx; } if ("commit" in data && data.commit != undefined) { this.commit = data.commit; } if ("list_snapshots" in data && data.list_snapshots != undefined) { this.list_snapshots = data.list_snapshots; } if ("offer_snapshot" in data && data.offer_snapshot != undefined) { this.offer_snapshot = data.offer_snapshot; } if ("load_snapshot_chunk" in data && data.load_snapshot_chunk != undefined) { this.load_snapshot_chunk = data.load_snapshot_chunk; } if ("apply_snapshot_chunk" in data && data.apply_snapshot_chunk != undefined) { this.apply_snapshot_chunk = data.apply_snapshot_chunk; } if ("prepare_proposal" in data && data.prepare_proposal != undefined) { this.prepare_proposal = data.prepare_proposal; } if ("process_proposal" in data && data.process_proposal != undefined) { this.process_proposal = data.process_proposal; } if ("extend_vote" in data && data.extend_vote != undefined) { this.extend_vote = data.extend_vote; } if ("verify_vote_extension" in data && data.verify_vote_extension != undefined) { this.verify_vote_extension = data.verify_vote_extension; } if ("finalize_block" in data && data.finalize_block != undefined) { this.finalize_block = data.finalize_block; } } } get echo() { return pb_1.Message.getWrapperField(this, RequestEcho, 1) as RequestEcho; } set echo(value: RequestEcho) { pb_1.Message.setOneofWrapperField(this, 1, this.#one_of_decls[0], value); } get has_echo() { return pb_1.Message.getField(this, 1) != null; } get flush() { return pb_1.Message.getWrapperField(this, RequestFlush, 2) as RequestFlush; } set flush(value: RequestFlush) { pb_1.Message.setOneofWrapperField(this, 2, this.#one_of_decls[0], value); } get has_flush() { return pb_1.Message.getField(this, 2) != null; } get info() { return pb_1.Message.getWrapperField(this, RequestInfo, 3) as RequestInfo; } set info(value: RequestInfo) { pb_1.Message.setOneofWrapperField(this, 3, this.#one_of_decls[0], value); } get has_info() { return pb_1.Message.getField(this, 3) != null; } get init_chain() { return pb_1.Message.getWrapperField(this, RequestInitChain, 5) as RequestInitChain; } set init_chain(value: RequestInitChain) { pb_1.Message.setOneofWrapperField(this, 5, this.#one_of_decls[0], value); } get has_init_chain() { return pb_1.Message.getField(this, 5) != null; } get query() { return pb_1.Message.getWrapperField(this, RequestQuery, 6) as RequestQuery; } set query(value: RequestQuery) { pb_1.Message.setOneofWrapperField(this, 6, this.#one_of_decls[0], value); } get has_query() { return pb_1.Message.getField(this, 6) != null; } get check_tx() { return pb_1.Message.getWrapperField(this, RequestCheckTx, 8) as RequestCheckTx; } set check_tx(value: RequestCheckTx) { pb_1.Message.setOneofWrapperField(this, 8, this.#one_of_decls[0], value); } get has_check_tx() { return pb_1.Message.getField(this, 8) != null; } get commit() { return pb_1.Message.getWrapperField(this, RequestCommit, 11) as RequestCommit; } set commit(value: RequestCommit) { pb_1.Message.setOneofWrapperField(this, 11, this.#one_of_decls[0], value); } get has_commit() { return pb_1.Message.getField(this, 11) != null; } get list_snapshots() { return pb_1.Message.getWrapperField(this, RequestListSnapshots, 12) as RequestListSnapshots; } set list_snapshots(value: RequestListSnapshots) { pb_1.Message.setOneofWrapperField(this, 12, this.#one_of_decls[0], value); } get has_list_snapshots() { return pb_1.Message.getField(this, 12) != null; } get offer_snapshot() { return pb_1.Message.getWrapperField(this, RequestOfferSnapshot, 13) as RequestOfferSnapshot; } set offer_snapshot(value: RequestOfferSnapshot) { pb_1.Message.setOneofWrapperField(this, 13, this.#one_of_decls[0], value); } get has_offer_snapshot() { return pb_1.Message.getField(this, 13) != null; } get load_snapshot_chunk() { return pb_1.Message.getWrapperField(this, RequestLoadSnapshotChunk, 14) as RequestLoadSnapshotChunk; } set load_snapshot_chunk(value: RequestLoadSnapshotChunk) { pb_1.Message.setOneofWrapperField(this, 14, this.#one_of_decls[0], value); } get has_load_snapshot_chunk() { return pb_1.Message.getField(this, 14) != null; } get apply_snapshot_chunk() { return pb_1.Message.getWrapperField(this, RequestApplySnapshotChunk, 15) as RequestApplySnapshotChunk; } set apply_snapshot_chunk(value: RequestApplySnapshotChunk) { pb_1.Message.setOneofWrapperField(this, 15, this.#one_of_decls[0], value); } get has_apply_snapshot_chunk() { return pb_1.Message.getField(this, 15) != null; } get prepare_proposal() { return pb_1.Message.getWrapperField(this, RequestPrepareProposal, 16) as RequestPrepareProposal; } set prepare_proposal(value: RequestPrepareProposal) { pb_1.Message.setOneofWrapperField(this, 16, this.#one_of_decls[0], value); } get has_prepare_proposal() { return pb_1.Message.getField(this, 16) != null; } get process_proposal() { return pb_1.Message.getWrapperField(this, RequestProcessProposal, 17) as RequestProcessProposal; } set process_proposal(value: RequestProcessProposal) { pb_1.Message.setOneofWrapperField(this, 17, this.#one_of_decls[0], value); } get has_process_proposal() { return pb_1.Message.getField(this, 17) != null; } get extend_vote() { return pb_1.Message.getWrapperField(this, RequestExtendVote, 18) as RequestExtendVote; } set extend_vote(value: RequestExtendVote) { pb_1.Message.setOneofWrapperField(this, 18, this.#one_of_decls[0], value); } get has_extend_vote() { return pb_1.Message.getField(this, 18) != null; } get verify_vote_extension() { return pb_1.Message.getWrapperField(this, RequestVerifyVoteExtension, 19) as RequestVerifyVoteExtension; } set verify_vote_extension(value: RequestVerifyVoteExtension) { pb_1.Message.setOneofWrapperField(this, 19, this.#one_of_decls[0], value); } get has_verify_vote_extension() { return pb_1.Message.getField(this, 19) != null; } get finalize_block() { return pb_1.Message.getWrapperField(this, RequestFinalizeBlock, 20) as RequestFinalizeBlock; } set finalize_block(value: RequestFinalizeBlock) { pb_1.Message.setOneofWrapperField(this, 20, this.#one_of_decls[0], value); } get has_finalize_block() { return pb_1.Message.getField(this, 20) != null; } get value() { const cases: { [index: number]: "none" | "echo" | "flush" | "info" | "init_chain" | "query" | "check_tx" | "commit" | "list_snapshots" | "offer_snapshot" | "load_snapshot_chunk" | "apply_snapshot_chunk" | "prepare_proposal" | "process_proposal" | "extend_vote" | "verify_vote_extension" | "finalize_block"; } = { 0: "none", 1: "echo", 2: "flush", 3: "info", 5: "init_chain", 6: "query", 8: "check_tx", 11: "commit", 12: "list_snapshots", 13: "offer_snapshot", 14: "load_snapshot_chunk", 15: "apply_snapshot_chunk", 16: "prepare_proposal", 17: "process_proposal", 18: "extend_vote", 19: "verify_vote_extension", 20: "finalize_block" }; return cases[pb_1.Message.computeOneofCase(this, [1, 2, 3, 5, 6, 8, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20])]; } static fromObject(data: { echo?: ReturnType<typeof RequestEcho.prototype.toObject>; flush?: ReturnType<typeof RequestFlush.prototype.toObject>; info?: ReturnType<typeof RequestInfo.prototype.toObject>; init_chain?: ReturnType<typeof RequestInitChain.prototype.toObject>; query?: ReturnType<typeof RequestQuery.prototype.toObject>; check_tx?: ReturnType<typeof RequestCheckTx.prototype.toObject>; commit?: ReturnType<typeof RequestCommit.prototype.toObject>; list_snapshots?: ReturnType<typeof RequestListSnapshots.prototype.toObject>; offer_snapshot?: ReturnType<typeof RequestOfferSnapshot.prototype.toObject>; load_snapshot_chunk?: ReturnType<typeof RequestLoadSnapshotChunk.prototype.toObject>; apply_snapshot_chunk?: ReturnType<typeof RequestApplySnapshotChunk.prototype.toObject>; prepare_proposal?: ReturnType<typeof RequestPrepareProposal.prototype.toObject>; process_proposal?: ReturnType<typeof RequestProcessProposal.prototype.toObject>; extend_vote?: ReturnType<typeof RequestExtendVote.prototype.toObject>; verify_vote_extension?: ReturnType<typeof RequestVerifyVoteExtension.prototype.toObject>; finalize_block?: ReturnType<typeof RequestFinalizeBlock.prototype.toObject>; }): Request { const message = new Request({}); if (data.echo != null) { message.echo = RequestEcho.fromObject(data.echo); } if (data.flush != null) { message.flush = RequestFlush.fromObject(data.flush); } if (data.info != null) { message.info = RequestInfo.fromObject(data.info); } if (data.init_chain != null) { message.init_chain = RequestInitChain.fromObject(data.init_chain); } if (data.query != null) { message.query = RequestQuery.fromObject(data.query); } if (data.check_tx != null) { message.check_tx = RequestCheckTx.fromObject(data.check_tx); } if (data.commit != null) { message.commit = RequestCommit.fromObject(data.commit); } if (data.list_snapshots != null) { message.list_snapshots = RequestListSnapshots.fromObject(data.list_snapshots); } if (data.offer_snapshot != null) { message.offer_snapshot = RequestOfferSnapshot.fromObject(data.offer_snapshot); } if (data.load_snapshot_chunk != null) { message.load_snapshot_chunk = RequestLoadSnapshotChunk.fromObject(data.load_snapshot_chunk); } if (data.apply_snapshot_chunk != null) { message.apply_snapshot_chunk = RequestApplySnapshotChunk.fromObject(data.apply_snapshot_chunk); } if (data.prepare_proposal != null) { message.prepare_proposal = RequestPrepareProposal.fromObject(data.prepare_proposal); } if (data.process_proposal != null) { message.process_proposal = RequestProcessProposal.fromObject(data.process_proposal); } if (data.extend_vote != null) { message.extend_vote = RequestExtendVote.fromObject(data.extend_vote); } if (data.verify_vote_extension != null) { message.verify_vote_extension = RequestVerifyVoteExtension.fromObject(data.verify_vote_extension); } if (data.finalize_block != null) { message.finalize_block = RequestFinalizeBlock.fromObject(data.finalize_block); } return message; } toObject() { const data: { echo?: ReturnType<typeof RequestEcho.prototype.toObject>; flush?: ReturnType<typeof RequestFlush.prototype.toObject>; info?: ReturnType<typeof RequestInfo.prototype.toObject>; init_chain?: ReturnType<typeof RequestInitChain.prototype.toObject>; query?: ReturnType<typeof RequestQuery.prototype.toObject>; check_tx?: ReturnType<typeof RequestCheckTx.prototype.toObject>; commit?: ReturnType<typeof RequestCommit.prototype.toObject>; list_snapshots?: ReturnType<typeof RequestListSnapshots.prototype.toObject>; offer_snapshot?: ReturnType<typeof RequestOfferSnapshot.prototype.toObject>; load_snapshot_chunk?: ReturnType<typeof RequestLoadSnapshotChunk.prototype.toObject>; apply_snapshot_chunk?: ReturnType<typeof RequestApplySnapshotChunk.prototype.toObject>; prepare_proposal?: ReturnType<typeof RequestPrepareProposal.prototype.toObject>; process_proposal?: ReturnType<typeof RequestProcessProposal.prototype.toObject>; extend_vote?: ReturnType<typeof RequestExtendVote.prototype.toObject>; verify_vote_extension?: ReturnType<typeof RequestVerifyVoteExtension.prototype.toObject>; finalize_block?: ReturnType<typeof RequestFinalizeBlock.prototype.toObject>; } = {}; if (this.echo != null) { data.echo = this.echo.toObject(); } if (this.flush != null) { data.flush = this.flush.toObject(); } if (this.info != null) { data.info = this.info.toObject(); } if (this.init_chain != null) { data.init_chain = this.init_chain.toObject(); } if (this.query != null) { data.query = this.query.toObject(); } if (this.check_tx != null) { data.check_tx = this.check_tx.toObject(); } if (this.commit != null) { data.commit = this.commit.toObject(); } if (this.list_snapshots != null) { data.list_snapshots = this.list_snapshots.toObject(); } if (this.offer_snapshot != null) { data.offer_snapshot = this.offer_snapshot.toObject(); } if (this.load_snapshot_chunk != null) { data.load_snapshot_chunk = this.load_snapshot_chunk.toObject(); } if (this.apply_snapshot_chunk != null) { data.apply_snapshot_chunk = this.apply_snapshot_chunk.toObject(); } if (this.prepare_proposal != null) { data.prepare_proposal = this.prepare_proposal.toObject(); } if (this.process_proposal != null) { data.process_proposal = this.process_proposal.toObject(); } if (this.extend_vote != null) { data.extend_vote = this.extend_vote.toObject(); } if (this.verify_vote_extension != null) { data.verify_vote_extension = this.verify_vote_extension.toObject(); } if (this.finalize_block != null) { data.finalize_block = this.finalize_block.toObject(); } return data; } serialize(): Uint8Array; serialize(w: pb_1.BinaryWriter): void; serialize(w?: pb_1.BinaryWriter): Uint8Array | void { const writer = w || new pb_1.BinaryWriter(); if (this.has_echo) writer.writeMessage(1, this.echo, () => this.echo.serialize(writer)); if (this.has_flush) writer.writeMessage(2, this.flush, () => this.flush.serialize(writer)); if (this.has_info) writer.writeMessage(3, this.info, () => this.info.serialize(writer)); if (this.has_init_chain) writer.writeMessage(5, this.init_chain, () => this.init_chain.serialize(writer)); if (this.has_query) writer.writeMessage(6, this.query, () => this.query.serialize(writer)); if (this.has_check_tx) writer.writeMessage(8, this.check_tx, () => this.check_tx.serialize(writer)); if (this.has_commit) writer.writeMessage(11, this.commit, () => this.commit.serialize(writer)); if (this.has_list_snapshots) writer.writeMessage(12, this.list_snapshots, () => this.list_snapshots.serialize(writer)); if (this.has_offer_snapshot) writer.writeMessage(13, this.offer_snapshot, () => this.offer_snapshot.serialize(writer)); if (this.has_load_snapshot_chunk) writer.writeMessage(14, this.load_snapshot_chunk, () => this.load_snapshot_chunk.serialize(writer)); if (this.has_apply_snapshot_chunk) writer.writeMessage(15, this.apply_snapshot_chunk, () => this.apply_snapshot_chunk.serialize(writer)); if (this.has_prepare_proposal) writer.writeMessage(16, this.prepare_proposal, () => this.prepare_proposal.serialize(writer)); if (this.has_process_proposal) writer.writeMessage(17, this.process_proposal, () => this.process_proposal.serialize(writer)); if (this.has_extend_vote) writer.writeMessage(18, this.extend_vote, () => this.extend_vote.serialize(writer)); if (this.has_verify_vote_extension) writer.writeMessage(19, this.verify_vote_extension, () => this.verify_vote_extension.serialize(writer)); if (this.has_finalize_block) writer.writeMessage(20, this.finalize_block, () => this.finalize_block.serialize(writer)); if (!w) return writer.getResultBuffer(); } static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Request { const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Request(); while (reader.nextField()) { if (reader.isEndGroup()) break; switch (reader.getFieldNumber()) { case 1: reader.readMessage(message.echo, () => message.echo = RequestEcho.deserialize(reader)); break; case 2: reader.readMessage(message.flush, () => message.flush = RequestFlush.deserialize(reader)); break; case 3: reader.readMessage(message.info, () => message.info = RequestInfo.deserialize(reader)); break; case 5: reader.readMessage(message.init_chain, () => message.init_chain = RequestInitChain.deserialize(reader)); break; case 6: reader.readMessage(message.query, () => message.query = RequestQuery.deserialize(reader)); break; case 8: reader.readMessage(message.check_tx, () => message.check_tx = RequestCheckTx.deserialize(reader)); break; case 11: reader.readMessage(message.commit, () => message.commit = RequestCommit.deserialize(reader)); break; case 12: reader.readMessage(message.list_snapshots, () => message.list_snapshots = RequestListSnapshots.deserialize(reader)); break; case 13: reader.readMessage(message.offer_snapshot, () => message.offer_snapshot = RequestOfferSnapshot.deserialize(reader)); break; case 14: reader.readMessage(message.load_snapshot_chunk, () => message.load_snapshot_chunk = RequestLoadSnapshotChunk.deserialize(reader)); break; case 15: reader.readMessage(message.apply_snapshot_chunk, () => message.apply_snapshot_chunk = RequestApplySnapshotChunk.deserialize(reader)); break; case 16: reader.readMessage(message.prepare_proposal, () => message.prepare_proposal = RequestPrepareProposal.deserialize(reader)); break; case 17: reader.readMessage(message.process_proposal, () => message.process_proposal = RequestProcessProposal.deserialize(reader)); break; case 18: reader.readMessage(message.extend_vote, () => message.extend_vote = RequestExtendVote.deserialize(reader)); break; case 19: reader.readMessage(message.verify_vote_extension, () => message.verify_vote_extension = RequestVerifyVoteExtension.deserialize(reader)); break; case 20: reader.readMessage(message.finalize_block, () => message.finalize_block = RequestFinalizeBlock.deserialize(reader)); break; default: reader.skipField(); } } return message; } serializeBinary(): Uint8Array { return this.serialize(); } static deserializeBinary(bytes: Uint8Array): Request { return Request.deserialize(bytes); } } export class RequestEcho extends pb_1.Message { #one_of_decls: number[][] = []; constructor(data?: any[] | { message?: string; }) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); if (!Array.isArray(data) && typeof data == "object") { if ("message" in data && data.message != undefined) { this.message = data.message; } } } get message() { return pb_1.Message.getFieldWithDefault(this, 1, "") as string; } set message(value: string) { pb_1.Message.setField(this, 1, value); } static fromObject(data: { message?: string; }): RequestEcho { const message = new RequestEcho({}); if (data.message != null) { message.message = data.message; } return message; } toObject() { const data: { message?: string; } = {}; if (this.message != null) { data.message = this.message; } return data; } serialize(): Uint8Array; serialize(w: pb_1.BinaryWriter): void; serialize(w?: pb_1.BinaryWriter): Uint8Array | void { const writer = w || new pb_1.BinaryWriter(); if (this.message.length) writer.writeString(1, this.message); if (!w) return writer.getResultBuffer(); } static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RequestEcho { const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RequestEcho(); while (reader.nextField()) { if (reader.isEndGroup()) break; switch (reader.getFieldNumber()) { case 1: message.message = reader.readString(); break; default: reader.skipField(); } } return message; } serializeBinary(): Uint8Array { return this.serialize(); } static deserializeBinary(bytes: Uint8Array): RequestEcho { return RequestEcho.deserialize(bytes); } } export class RequestFlush extends pb_1.Message { #one_of_decls: number[][] = []; constructor(data?: any[] | {}) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); if (!Array.isArray(data) && typeof data == "object") { } } static fromObject(data: {}): RequestFlush { const message = new RequestFlush({}); return message; } toObject() { const data: {} = {}; return data; } serialize(): Uint8Array; serialize(w: pb_1.BinaryWriter): void; serialize(w?: pb_1.BinaryWriter): Uint8Array | void { const writer = w || new pb_1.BinaryWriter(); if (!w) return writer.getResultBuffer(); } static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RequestFlush { const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RequestFlush(); while (reader.nextField()) { if (reader.isEndGroup()) break; switch (reader.getFieldNumber()) { default: reader.skipField(); } } return message; } serializeBinary(): Uint8Array { return this.serialize(); } static deserializeBinary(bytes: Uint8Array): RequestFlush { return RequestFlush.deserialize(bytes); } } export class RequestInfo extends pb_1.Message { #one_of_decls: number[][] = []; constructor(data?: any[] | { version?: string; block_version?: number; p2p_version?: number; abci_version?: string; }) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); if (!Array.isArray(data) && typeof data == "object") { if ("version" in data && data.version != undefined) { this.version = data.version; } if ("block_version" in data && data.block_version != undefined) { this.block_version = data.block_version; } if ("p2p_version" in data && data.p2p_version != undefined) { this.p2p_version = data.p2p_version; } if ("abci_version" in data && data.abci_version != undefined) { this.abci_version = data.abci_version; } } } get version() { return pb_1.Message.getFieldWithDefault(this, 1, "") as string; } set version(value: string) { pb_1.Message.setField(this, 1, value); } get block_version() { return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; } set block_version(value: number) { pb_1.Message.setField(this, 2, value); } get p2p_version() { return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; } set p2p_version(value: number) { pb_1.Message.setField(this, 3, value); } get abci_version() { return pb_1.Message.getFieldWithDefault(this, 4, "") as string; } set abci_version(value: string) { pb_1.Message.setField(this, 4, value); } static fromObject(data: { version?: string; block_version?: number; p2p_version?: number; abci_version?: string; }): RequestInfo { const message = new RequestInfo({}); if (data.version != null) { message.version = data.version; } if (data.block_version != null) { message.block_version = data.block_version; } if (data.p2p_version != null) { message.p2p_version = data.p2p_version; } if (data.abci_version != null) { message.abci_version = data.abci_version; } return message; } toObject() { const data: { version?: string; block_version?: number; p2p_version?: number; abci_version?: string; } = {}; if (this.version != null) { data.version = this.version; } if (this.block_version != null) { data.block_version = this.block_version; } if (this.p2p_version != null) { data.p2p_version = this.p2p_version; } if (this.abci_version != null) { data.abci_version = this.abci_version; } return data; } serialize(): Uint8Array; serialize(w: pb_1.BinaryWriter): void; serialize(w?: pb_1.BinaryWriter): Uint8Array | void { const writer = w || new pb_1.BinaryWriter(); if (this.version.length) writer.writeString(1, this.version); if (this.block_version != 0) writer.writeUint64(2, this.block_version); if (this.p2p_version != 0) writer.writeUint64(3, this.p2p_version); if (this.abci_version.length) writer.writeString(4, this.abci_version); if (!w) return writer.getResultBuffer(); } static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RequestInfo { const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RequestInfo(); while (reader.nextField()) { if (reader.isEndGroup()) break; switch (reader.getFieldNumber()) { case 1: message.version = reader.readString(); break; case 2: message.block_version = reader.readUint64(); break; case 3: message.p2p_version = reader.readUint64(); break; case 4: message.abci_version = reader.readString(); break; default: reader.skipField(); } } return message; } serializeBinary(): Uint8Array { return this.serialize(); } static deserializeBinary(bytes: Uint8Array): RequestInfo { return RequestInfo.deserialize(bytes); } } export class RequestInitChain extends pb_1.Message { #one_of_decls: number[][] = []; constructor(data?: any[] | { time?: dependency_5.google.protobuf.Timestamp; chain_id?: string; consensus_params?: dependency_3.tendermint.types.ConsensusParams; validators?: ValidatorUpdate[]; app_state_bytes?: Uint8Array; initial_height?: number; }) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4], this.#one_of_decls); if (!Array.isArray(data) && typeof data == "object") { if ("time" in data && data.time != undefined) { this.time = data.time; } if ("chain_id" in data && data.chain_id != undefined) { this.chain_id = data.chain_id; } if ("consensus_params" in data && data.consensus_params != undefined) { this.consensus_params = data.consensus_params; } if ("validators" in data && data.validators != undefined) { this.validators = data.validators; } if ("app_state_bytes" in data && data.app_state_bytes != undefined) { this.app_state_bytes = data.app_state_bytes; } if ("initial_height" in data && data.initial_height != undefined) { this.initial_height = data.initial_height; } } } get time() { return pb_1.Message.getWrapperField(this, dependency_5.google.protobuf.Timestamp, 1) as dependency_5.google.protobuf.Timestamp; } set time(value: dependency_5.google.protobuf.Timestamp) { pb_1.Message.setWrapperField(this, 1, value); } get has_time() { return pb_1.Message.getField(this, 1) != null; } get chain_id() { return pb_1.Message.getFieldWithDefault(this, 2, "") as string; } set chain_id(value: string) { pb_1.Message.setField(this, 2, value); } get consensus_params() { return pb_1.Message.getWrapperField(this, dependency_3.tendermint.types.ConsensusParams, 3) as dependency_3.tendermint.types.ConsensusParams; } set consensus_params(value: dependency_3.tendermint.types.ConsensusParams) { pb_1.Message.setWrapperField(this, 3, value); } get has_consensus_params() { return pb_1.Message.getField(this, 3) != null; } get validators() { return pb_1.Message.getRepeatedWrapperField(this, ValidatorUpdate, 4) as ValidatorUpdate[]; } set validators(value: ValidatorUpdate[]) { pb_1.Message.setRepeatedWrapperField(this, 4, value); } get app_state_bytes() { return pb_1.Message.getFieldWithDefault(this, 5, new Uint8Array(0)) as Uint8Array; } set app_state_bytes(value: Uint8Array) { pb_1.Message.setField(this, 5, value); } get initial_height() { return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; } set initial_height(value: number) { pb_1.Message.setField(this, 6, value); } static fromObject(data: { time?: ReturnType<typeof dependency_5.google.protobuf.Timestamp.prototype.toObject>; chain_id?: string; consensus_params?: ReturnType<typeof dependency_3.tendermint.types.ConsensusParams.prototype.toObject>; validators?: ReturnType<typeof ValidatorUpdate.prototype.toObject>[]; app_state_bytes?: Uint8Array; initial_height?: number; }): RequestInitChain { const message = new RequestInitChain({}); if (data.time != null) { message.time = dependency_5.google.protobuf.Timestamp.fromObject(data.time); } if (data.chain_id != null) { message.chain_id = data.chain_id; } if (data.consensus_params != null) { message.consensus_params = dependency_3.tendermint.types.ConsensusParams.fromObject(data.consensus_params); } if (data.validators != null) { message.validators = data.validators.map(item => ValidatorUpdate.fromObject(item)); } if (data.app_state_bytes != null) { message.app_state_bytes = data.app_state_bytes; } if (data.initial_height != null) { message.initial_height = data.initial_height; } return message; } toObject() { const data: { time?: ReturnType<typeof dependency_5.google.protobuf.Timestamp.prototype.toObject>; chain_id?: string; consensus_params?: ReturnType<typeof dependency_3.tendermint.types.ConsensusParams.prototype.toObject>; validators?: ReturnType<typeof ValidatorUpdate.prototype.toObject>[]; app_state_bytes?: Uint8Array; initial_height?: number; } = {}; if (this.time != null) { data.time = this.time.toObject(); } if (this.chain_id != null) { data.chain_id = this.chain_id; } if (this.consensus_params != null) { data.consensus_params = this.consensus_params.toObject(); } if (this.validators != null) { data.validators = this.validators.map((item: ValidatorUpdate) => item.toObject()); } if (this.app_state_bytes != null) { data.app_state_bytes = this.app_state_bytes; } if (this.initial_height != null) { data.initial_height = this.initial_height; } return data; } serialize(): Uint8Array; serialize(w: pb_1.BinaryWriter): void; serialize(w?: pb_1.BinaryWriter): Uint8Array | void { const writer = w || new pb_1.BinaryWriter(); if (this.has_time) writer.writeMessage(1, this.time, () => this.time.serialize(writer)); if (this.chain_id.length) writer.writeString(2, this.chain_id); if (this.has_consensus_params) writer.writeMessage(3, this.consensus_params, () => this.consensus_params.serialize(writer)); if (this.validators.length) writer.writeRepeatedMessage(4, this.validators, (item: ValidatorUpdate) => item.serialize(writer)); if (this.app_state_bytes.length) writer.writeBytes(5, this.app_state_bytes); if (thi