UNPKG

@bandprotocol/bandchain.js

Version:

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

1,099 lines (1,098 loc) 61.7 kB
/** * Generated by the protoc-gen-ts. DO NOT EDIT! * compiler version: 3.20.3 * source: ibc/core/connection/v1/query.proto * git: https://github.com/thesayyn/protoc-gen-ts */ import * as dependency_1 from "./../../../../gogoproto/gogo"; import * as dependency_2 from "./../../../../cosmos/base/query/v1beta1/pagination"; import * as dependency_3 from "./../../client/v1/client"; import * as dependency_4 from "./connection"; import * as dependency_5 from "./../../../../google/api/annotations"; import * as dependency_6 from "./../../../../google/protobuf/any"; import * as pb_1 from "google-protobuf"; import * as grpc_1 from "@grpc/grpc-js"; export namespace ibc.core.connection.v1 { export class QueryConnectionRequest extends pb_1.Message { #one_of_decls: number[][] = []; constructor(data?: any[] | { connection_id?: 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 ("connection_id" in data && data.connection_id != undefined) { this.connection_id = data.connection_id; } } } get connection_id() { return pb_1.Message.getFieldWithDefault(this, 1, "") as string; } set connection_id(value: string) { pb_1.Message.setField(this, 1, value); } static fromObject(data: { connection_id?: string; }): QueryConnectionRequest { const message = new QueryConnectionRequest({}); if (data.connection_id != null) { message.connection_id = data.connection_id; } return message; } toObject() { const data: { connection_id?: string; } = {}; if (this.connection_id != null) { data.connection_id = this.connection_id; } 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.connection_id.length) writer.writeString(1, this.connection_id); if (!w) return writer.getResultBuffer(); } static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryConnectionRequest { const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryConnectionRequest(); while (reader.nextField()) { if (reader.isEndGroup()) break; switch (reader.getFieldNumber()) { case 1: message.connection_id = reader.readString(); break; default: reader.skipField(); } } return message; } serializeBinary(): Uint8Array { return this.serialize(); } static deserializeBinary(bytes: Uint8Array): QueryConnectionRequest { return QueryConnectionRequest.deserialize(bytes); } } export class QueryConnectionResponse extends pb_1.Message { #one_of_decls: number[][] = []; constructor(data?: any[] | { connection?: dependency_4.ibc.core.connection.v1.ConnectionEnd; proof?: Uint8Array; proof_height?: dependency_3.ibc.core.client.v1.Height; }) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); if (!Array.isArray(data) && typeof data == "object") { if ("connection" in data && data.connection != undefined) { this.connection = data.connection; } if ("proof" in data && data.proof != undefined) { this.proof = data.proof; } if ("proof_height" in data && data.proof_height != undefined) { this.proof_height = data.proof_height; } } } get connection() { return pb_1.Message.getWrapperField(this, dependency_4.ibc.core.connection.v1.ConnectionEnd, 1) as dependency_4.ibc.core.connection.v1.ConnectionEnd; } set connection(value: dependency_4.ibc.core.connection.v1.ConnectionEnd) { pb_1.Message.setWrapperField(this, 1, value); } get has_connection() { return pb_1.Message.getField(this, 1) != null; } get proof() { return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; } set proof(value: Uint8Array) { pb_1.Message.setField(this, 2, value); } get proof_height() { return pb_1.Message.getWrapperField(this, dependency_3.ibc.core.client.v1.Height, 3) as dependency_3.ibc.core.client.v1.Height; } set proof_height(value: dependency_3.ibc.core.client.v1.Height) { pb_1.Message.setWrapperField(this, 3, value); } get has_proof_height() { return pb_1.Message.getField(this, 3) != null; } static fromObject(data: { connection?: ReturnType<typeof dependency_4.ibc.core.connection.v1.ConnectionEnd.prototype.toObject>; proof?: Uint8Array; proof_height?: ReturnType<typeof dependency_3.ibc.core.client.v1.Height.prototype.toObject>; }): QueryConnectionResponse { const message = new QueryConnectionResponse({}); if (data.connection != null) { message.connection = dependency_4.ibc.core.connection.v1.ConnectionEnd.fromObject(data.connection); } if (data.proof != null) { message.proof = data.proof; } if (data.proof_height != null) { message.proof_height = dependency_3.ibc.core.client.v1.Height.fromObject(data.proof_height); } return message; } toObject() { const data: { connection?: ReturnType<typeof dependency_4.ibc.core.connection.v1.ConnectionEnd.prototype.toObject>; proof?: Uint8Array; proof_height?: ReturnType<typeof dependency_3.ibc.core.client.v1.Height.prototype.toObject>; } = {}; if (this.connection != null) { data.connection = this.connection.toObject(); } if (this.proof != null) { data.proof = this.proof; } if (this.proof_height != null) { data.proof_height = this.proof_height.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_connection) writer.writeMessage(1, this.connection, () => this.connection.serialize(writer)); if (this.proof.length) writer.writeBytes(2, this.proof); if (this.has_proof_height) writer.writeMessage(3, this.proof_height, () => this.proof_height.serialize(writer)); if (!w) return writer.getResultBuffer(); } static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryConnectionResponse { const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryConnectionResponse(); while (reader.nextField()) { if (reader.isEndGroup()) break; switch (reader.getFieldNumber()) { case 1: reader.readMessage(message.connection, () => message.connection = dependency_4.ibc.core.connection.v1.ConnectionEnd.deserialize(reader)); break; case 2: message.proof = reader.readBytes(); break; case 3: reader.readMessage(message.proof_height, () => message.proof_height = dependency_3.ibc.core.client.v1.Height.deserialize(reader)); break; default: reader.skipField(); } } return message; } serializeBinary(): Uint8Array { return this.serialize(); } static deserializeBinary(bytes: Uint8Array): QueryConnectionResponse { return QueryConnectionResponse.deserialize(bytes); } } export class QueryConnectionsRequest extends pb_1.Message { #one_of_decls: number[][] = []; constructor(data?: any[] | { pagination?: dependency_2.cosmos.base.query.v1beta1.PageRequest; }) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); if (!Array.isArray(data) && typeof data == "object") { if ("pagination" in data && data.pagination != undefined) { this.pagination = data.pagination; } } } get pagination() { return pb_1.Message.getWrapperField(this, dependency_2.cosmos.base.query.v1beta1.PageRequest, 1) as dependency_2.cosmos.base.query.v1beta1.PageRequest; } set pagination(value: dependency_2.cosmos.base.query.v1beta1.PageRequest) { pb_1.Message.setWrapperField(this, 1, value); } get has_pagination() { return pb_1.Message.getField(this, 1) != null; } static fromObject(data: { pagination?: ReturnType<typeof dependency_2.cosmos.base.query.v1beta1.PageRequest.prototype.toObject>; }): QueryConnectionsRequest { const message = new QueryConnectionsRequest({}); if (data.pagination != null) { message.pagination = dependency_2.cosmos.base.query.v1beta1.PageRequest.fromObject(data.pagination); } return message; } toObject() { const data: { pagination?: ReturnType<typeof dependency_2.cosmos.base.query.v1beta1.PageRequest.prototype.toObject>; } = {}; if (this.pagination != null) { data.pagination = this.pagination.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_pagination) writer.writeMessage(1, this.pagination, () => this.pagination.serialize(writer)); if (!w) return writer.getResultBuffer(); } static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryConnectionsRequest { const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryConnectionsRequest(); while (reader.nextField()) { if (reader.isEndGroup()) break; switch (reader.getFieldNumber()) { case 1: reader.readMessage(message.pagination, () => message.pagination = dependency_2.cosmos.base.query.v1beta1.PageRequest.deserialize(reader)); break; default: reader.skipField(); } } return message; } serializeBinary(): Uint8Array { return this.serialize(); } static deserializeBinary(bytes: Uint8Array): QueryConnectionsRequest { return QueryConnectionsRequest.deserialize(bytes); } } export class QueryConnectionsResponse extends pb_1.Message { #one_of_decls: number[][] = []; constructor(data?: any[] | { connections?: dependency_4.ibc.core.connection.v1.IdentifiedConnection[]; pagination?: dependency_2.cosmos.base.query.v1beta1.PageResponse; height?: dependency_3.ibc.core.client.v1.Height; }) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); if (!Array.isArray(data) && typeof data == "object") { if ("connections" in data && data.connections != undefined) { this.connections = data.connections; } if ("pagination" in data && data.pagination != undefined) { this.pagination = data.pagination; } if ("height" in data && data.height != undefined) { this.height = data.height; } } } get connections() { return pb_1.Message.getRepeatedWrapperField(this, dependency_4.ibc.core.connection.v1.IdentifiedConnection, 1) as dependency_4.ibc.core.connection.v1.IdentifiedConnection[]; } set connections(value: dependency_4.ibc.core.connection.v1.IdentifiedConnection[]) { pb_1.Message.setRepeatedWrapperField(this, 1, value); } get pagination() { return pb_1.Message.getWrapperField(this, dependency_2.cosmos.base.query.v1beta1.PageResponse, 2) as dependency_2.cosmos.base.query.v1beta1.PageResponse; } set pagination(value: dependency_2.cosmos.base.query.v1beta1.PageResponse) { pb_1.Message.setWrapperField(this, 2, value); } get has_pagination() { return pb_1.Message.getField(this, 2) != null; } get height() { return pb_1.Message.getWrapperField(this, dependency_3.ibc.core.client.v1.Height, 3) as dependency_3.ibc.core.client.v1.Height; } set height(value: dependency_3.ibc.core.client.v1.Height) { pb_1.Message.setWrapperField(this, 3, value); } get has_height() { return pb_1.Message.getField(this, 3) != null; } static fromObject(data: { connections?: ReturnType<typeof dependency_4.ibc.core.connection.v1.IdentifiedConnection.prototype.toObject>[]; pagination?: ReturnType<typeof dependency_2.cosmos.base.query.v1beta1.PageResponse.prototype.toObject>; height?: ReturnType<typeof dependency_3.ibc.core.client.v1.Height.prototype.toObject>; }): QueryConnectionsResponse { const message = new QueryConnectionsResponse({}); if (data.connections != null) { message.connections = data.connections.map(item => dependency_4.ibc.core.connection.v1.IdentifiedConnection.fromObject(item)); } if (data.pagination != null) { message.pagination = dependency_2.cosmos.base.query.v1beta1.PageResponse.fromObject(data.pagination); } if (data.height != null) { message.height = dependency_3.ibc.core.client.v1.Height.fromObject(data.height); } return message; } toObject() { const data: { connections?: ReturnType<typeof dependency_4.ibc.core.connection.v1.IdentifiedConnection.prototype.toObject>[]; pagination?: ReturnType<typeof dependency_2.cosmos.base.query.v1beta1.PageResponse.prototype.toObject>; height?: ReturnType<typeof dependency_3.ibc.core.client.v1.Height.prototype.toObject>; } = {}; if (this.connections != null) { data.connections = this.connections.map((item: dependency_4.ibc.core.connection.v1.IdentifiedConnection) => item.toObject()); } if (this.pagination != null) { data.pagination = this.pagination.toObject(); } if (this.height != null) { data.height = this.height.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.connections.length) writer.writeRepeatedMessage(1, this.connections, (item: dependency_4.ibc.core.connection.v1.IdentifiedConnection) => item.serialize(writer)); if (this.has_pagination) writer.writeMessage(2, this.pagination, () => this.pagination.serialize(writer)); if (this.has_height) writer.writeMessage(3, this.height, () => this.height.serialize(writer)); if (!w) return writer.getResultBuffer(); } static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryConnectionsResponse { const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryConnectionsResponse(); while (reader.nextField()) { if (reader.isEndGroup()) break; switch (reader.getFieldNumber()) { case 1: reader.readMessage(message.connections, () => pb_1.Message.addToRepeatedWrapperField(message, 1, dependency_4.ibc.core.connection.v1.IdentifiedConnection.deserialize(reader), dependency_4.ibc.core.connection.v1.IdentifiedConnection)); break; case 2: reader.readMessage(message.pagination, () => message.pagination = dependency_2.cosmos.base.query.v1beta1.PageResponse.deserialize(reader)); break; case 3: reader.readMessage(message.height, () => message.height = dependency_3.ibc.core.client.v1.Height.deserialize(reader)); break; default: reader.skipField(); } } return message; } serializeBinary(): Uint8Array { return this.serialize(); } static deserializeBinary(bytes: Uint8Array): QueryConnectionsResponse { return QueryConnectionsResponse.deserialize(bytes); } } export class QueryClientConnectionsRequest extends pb_1.Message { #one_of_decls: number[][] = []; constructor(data?: any[] | { client_id?: 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 ("client_id" in data && data.client_id != undefined) { this.client_id = data.client_id; } } } get client_id() { return pb_1.Message.getFieldWithDefault(this, 1, "") as string; } set client_id(value: string) { pb_1.Message.setField(this, 1, value); } static fromObject(data: { client_id?: string; }): QueryClientConnectionsRequest { const message = new QueryClientConnectionsRequest({}); if (data.client_id != null) { message.client_id = data.client_id; } return message; } toObject() { const data: { client_id?: string; } = {}; if (this.client_id != null) { data.client_id = this.client_id; } 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.client_id.length) writer.writeString(1, this.client_id); if (!w) return writer.getResultBuffer(); } static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryClientConnectionsRequest { const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryClientConnectionsRequest(); while (reader.nextField()) { if (reader.isEndGroup()) break; switch (reader.getFieldNumber()) { case 1: message.client_id = reader.readString(); break; default: reader.skipField(); } } return message; } serializeBinary(): Uint8Array { return this.serialize(); } static deserializeBinary(bytes: Uint8Array): QueryClientConnectionsRequest { return QueryClientConnectionsRequest.deserialize(bytes); } } export class QueryClientConnectionsResponse extends pb_1.Message { #one_of_decls: number[][] = []; constructor(data?: any[] | { connection_paths?: string[]; proof?: Uint8Array; proof_height?: dependency_3.ibc.core.client.v1.Height; }) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); if (!Array.isArray(data) && typeof data == "object") { if ("connection_paths" in data && data.connection_paths != undefined) { this.connection_paths = data.connection_paths; } if ("proof" in data && data.proof != undefined) { this.proof = data.proof; } if ("proof_height" in data && data.proof_height != undefined) { this.proof_height = data.proof_height; } } } get connection_paths() { return pb_1.Message.getFieldWithDefault(this, 1, []) as string[]; } set connection_paths(value: string[]) { pb_1.Message.setField(this, 1, value); } get proof() { return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; } set proof(value: Uint8Array) { pb_1.Message.setField(this, 2, value); } get proof_height() { return pb_1.Message.getWrapperField(this, dependency_3.ibc.core.client.v1.Height, 3) as dependency_3.ibc.core.client.v1.Height; } set proof_height(value: dependency_3.ibc.core.client.v1.Height) { pb_1.Message.setWrapperField(this, 3, value); } get has_proof_height() { return pb_1.Message.getField(this, 3) != null; } static fromObject(data: { connection_paths?: string[]; proof?: Uint8Array; proof_height?: ReturnType<typeof dependency_3.ibc.core.client.v1.Height.prototype.toObject>; }): QueryClientConnectionsResponse { const message = new QueryClientConnectionsResponse({}); if (data.connection_paths != null) { message.connection_paths = data.connection_paths; } if (data.proof != null) { message.proof = data.proof; } if (data.proof_height != null) { message.proof_height = dependency_3.ibc.core.client.v1.Height.fromObject(data.proof_height); } return message; } toObject() { const data: { connection_paths?: string[]; proof?: Uint8Array; proof_height?: ReturnType<typeof dependency_3.ibc.core.client.v1.Height.prototype.toObject>; } = {}; if (this.connection_paths != null) { data.connection_paths = this.connection_paths; } if (this.proof != null) { data.proof = this.proof; } if (this.proof_height != null) { data.proof_height = this.proof_height.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.connection_paths.length) writer.writeRepeatedString(1, this.connection_paths); if (this.proof.length) writer.writeBytes(2, this.proof); if (this.has_proof_height) writer.writeMessage(3, this.proof_height, () => this.proof_height.serialize(writer)); if (!w) return writer.getResultBuffer(); } static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryClientConnectionsResponse { const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryClientConnectionsResponse(); while (reader.nextField()) { if (reader.isEndGroup()) break; switch (reader.getFieldNumber()) { case 1: pb_1.Message.addToRepeatedField(message, 1, reader.readString()); break; case 2: message.proof = reader.readBytes(); break; case 3: reader.readMessage(message.proof_height, () => message.proof_height = dependency_3.ibc.core.client.v1.Height.deserialize(reader)); break; default: reader.skipField(); } } return message; } serializeBinary(): Uint8Array { return this.serialize(); } static deserializeBinary(bytes: Uint8Array): QueryClientConnectionsResponse { return QueryClientConnectionsResponse.deserialize(bytes); } } export class QueryConnectionClientStateRequest extends pb_1.Message { #one_of_decls: number[][] = []; constructor(data?: any[] | { connection_id?: 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 ("connection_id" in data && data.connection_id != undefined) { this.connection_id = data.connection_id; } } } get connection_id() { return pb_1.Message.getFieldWithDefault(this, 1, "") as string; } set connection_id(value: string) { pb_1.Message.setField(this, 1, value); } static fromObject(data: { connection_id?: string; }): QueryConnectionClientStateRequest { const message = new QueryConnectionClientStateRequest({}); if (data.connection_id != null) { message.connection_id = data.connection_id; } return message; } toObject() { const data: { connection_id?: string; } = {}; if (this.connection_id != null) { data.connection_id = this.connection_id; } 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.connection_id.length) writer.writeString(1, this.connection_id); if (!w) return writer.getResultBuffer(); } static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryConnectionClientStateRequest { const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryConnectionClientStateRequest(); while (reader.nextField()) { if (reader.isEndGroup()) break; switch (reader.getFieldNumber()) { case 1: message.connection_id = reader.readString(); break; default: reader.skipField(); } } return message; } serializeBinary(): Uint8Array { return this.serialize(); } static deserializeBinary(bytes: Uint8Array): QueryConnectionClientStateRequest { return QueryConnectionClientStateRequest.deserialize(bytes); } } export class QueryConnectionClientStateResponse extends pb_1.Message { #one_of_decls: number[][] = []; constructor(data?: any[] | { identified_client_state?: dependency_3.ibc.core.client.v1.IdentifiedClientState; proof?: Uint8Array; proof_height?: dependency_3.ibc.core.client.v1.Height; }) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); if (!Array.isArray(data) && typeof data == "object") { if ("identified_client_state" in data && data.identified_client_state != undefined) { this.identified_client_state = data.identified_client_state; } if ("proof" in data && data.proof != undefined) { this.proof = data.proof; } if ("proof_height" in data && data.proof_height != undefined) { this.proof_height = data.proof_height; } } } get identified_client_state() { return pb_1.Message.getWrapperField(this, dependency_3.ibc.core.client.v1.IdentifiedClientState, 1) as dependency_3.ibc.core.client.v1.IdentifiedClientState; } set identified_client_state(value: dependency_3.ibc.core.client.v1.IdentifiedClientState) { pb_1.Message.setWrapperField(this, 1, value); } get has_identified_client_state() { return pb_1.Message.getField(this, 1) != null; } get proof() { return pb_1.Message.getFieldWithDefault(this, 2, new Uint8Array(0)) as Uint8Array; } set proof(value: Uint8Array) { pb_1.Message.setField(this, 2, value); } get proof_height() { return pb_1.Message.getWrapperField(this, dependency_3.ibc.core.client.v1.Height, 3) as dependency_3.ibc.core.client.v1.Height; } set proof_height(value: dependency_3.ibc.core.client.v1.Height) { pb_1.Message.setWrapperField(this, 3, value); } get has_proof_height() { return pb_1.Message.getField(this, 3) != null; } static fromObject(data: { identified_client_state?: ReturnType<typeof dependency_3.ibc.core.client.v1.IdentifiedClientState.prototype.toObject>; proof?: Uint8Array; proof_height?: ReturnType<typeof dependency_3.ibc.core.client.v1.Height.prototype.toObject>; }): QueryConnectionClientStateResponse { const message = new QueryConnectionClientStateResponse({}); if (data.identified_client_state != null) { message.identified_client_state = dependency_3.ibc.core.client.v1.IdentifiedClientState.fromObject(data.identified_client_state); } if (data.proof != null) { message.proof = data.proof; } if (data.proof_height != null) { message.proof_height = dependency_3.ibc.core.client.v1.Height.fromObject(data.proof_height); } return message; } toObject() { const data: { identified_client_state?: ReturnType<typeof dependency_3.ibc.core.client.v1.IdentifiedClientState.prototype.toObject>; proof?: Uint8Array; proof_height?: ReturnType<typeof dependency_3.ibc.core.client.v1.Height.prototype.toObject>; } = {}; if (this.identified_client_state != null) { data.identified_client_state = this.identified_client_state.toObject(); } if (this.proof != null) { data.proof = this.proof; } if (this.proof_height != null) { data.proof_height = this.proof_height.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_identified_client_state) writer.writeMessage(1, this.identified_client_state, () => this.identified_client_state.serialize(writer)); if (this.proof.length) writer.writeBytes(2, this.proof); if (this.has_proof_height) writer.writeMessage(3, this.proof_height, () => this.proof_height.serialize(writer)); if (!w) return writer.getResultBuffer(); } static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryConnectionClientStateResponse { const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryConnectionClientStateResponse(); while (reader.nextField()) { if (reader.isEndGroup()) break; switch (reader.getFieldNumber()) { case 1: reader.readMessage(message.identified_client_state, () => message.identified_client_state = dependency_3.ibc.core.client.v1.IdentifiedClientState.deserialize(reader)); break; case 2: message.proof = reader.readBytes(); break; case 3: reader.readMessage(message.proof_height, () => message.proof_height = dependency_3.ibc.core.client.v1.Height.deserialize(reader)); break; default: reader.skipField(); } } return message; } serializeBinary(): Uint8Array { return this.serialize(); } static deserializeBinary(bytes: Uint8Array): QueryConnectionClientStateResponse { return QueryConnectionClientStateResponse.deserialize(bytes); } } export class QueryConnectionConsensusStateRequest extends pb_1.Message { #one_of_decls: number[][] = []; constructor(data?: any[] | { connection_id?: string; revision_number?: number; revision_height?: number; }) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); if (!Array.isArray(data) && typeof data == "object") { if ("connection_id" in data && data.connection_id != undefined) { this.connection_id = data.connection_id; } if ("revision_number" in data && data.revision_number != undefined) { this.revision_number = data.revision_number; } if ("revision_height" in data && data.revision_height != undefined) { this.revision_height = data.revision_height; } } } get connection_id() { return pb_1.Message.getFieldWithDefault(this, 1, "") as string; } set connection_id(value: string) { pb_1.Message.setField(this, 1, value); } get revision_number() { return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; } set revision_number(value: number) { pb_1.Message.setField(this, 2, value); } get revision_height() { return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; } set revision_height(value: number) { pb_1.Message.setField(this, 3, value); } static fromObject(data: { connection_id?: string; revision_number?: number; revision_height?: number; }): QueryConnectionConsensusStateRequest { const message = new QueryConnectionConsensusStateRequest({}); if (data.connection_id != null) { message.connection_id = data.connection_id; } if (data.revision_number != null) { message.revision_number = data.revision_number; } if (data.revision_height != null) { message.revision_height = data.revision_height; } return message; } toObject() { const data: { connection_id?: string; revision_number?: number; revision_height?: number; } = {}; if (this.connection_id != null) { data.connection_id = this.connection_id; } if (this.revision_number != null) { data.revision_number = this.revision_number; } if (this.revision_height != null) { data.revision_height = this.revision_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.connection_id.length) writer.writeString(1, this.connection_id); if (this.revision_number != 0) writer.writeUint64(2, this.revision_number); if (this.revision_height != 0) writer.writeUint64(3, this.revision_height); if (!w) return writer.getResultBuffer(); } static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryConnectionConsensusStateRequest { const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryConnectionConsensusStateRequest(); while (reader.nextField()) { if (reader.isEndGroup()) break; switch (reader.getFieldNumber()) { case 1: message.connection_id = reader.readString(); break; case 2: message.revision_number = reader.readUint64(); break; case 3: message.revision_height = reader.readUint64(); break; default: reader.skipField(); } } return message; } serializeBinary(): Uint8Array { return this.serialize(); } static deserializeBinary(bytes: Uint8Array): QueryConnectionConsensusStateRequest { return QueryConnectionConsensusStateRequest.deserialize(bytes); } } export class QueryConnectionConsensusStateResponse extends pb_1.Message { #one_of_decls: number[][] = []; constructor(data?: any[] | { consensus_state?: dependency_6.google.protobuf.Any; client_id?: string; proof?: Uint8Array; proof_height?: dependency_3.ibc.core.client.v1.Height; }) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); if (!Array.isArray(data) && typeof data == "object") { if ("consensus_state" in data && data.consensus_state != undefined) { this.consensus_state = data.consensus_state; } if ("client_id" in data && data.client_id != undefined) { this.client_id = data.client_id; } if ("proof" in data && data.proof != undefined) { this.proof = data.proof; } if ("proof_height" in data && data.proof_height != undefined) { this.proof_height = data.proof_height; } } } get consensus_state() { return pb_1.Message.getWrapperField(this, dependency_6.google.protobuf.Any, 1) as dependency_6.google.protobuf.Any; } set consensus_state(value: dependency_6.google.protobuf.Any) { pb_1.Message.setWrapperField(this, 1, value); } get has_consensus_state() { return pb_1.Message.getField(this, 1) != null; } get client_id() { return pb_1.Message.getFieldWithDefault(this, 2, "") as string; } set client_id(value: string) { pb_1.Message.setField(this, 2, value); } get proof() { return pb_1.Message.getFieldWithDefault(this, 3, new Uint8Array(0)) as Uint8Array; } set proof(value: Uint8Array) { pb_1.Message.setField(this, 3, value); } get proof_height() { return pb_1.Message.getWrapperField(this, dependency_3.ibc.core.client.v1.Height, 4) as dependency_3.ibc.core.client.v1.Height; } set proof_height(value: dependency_3.ibc.core.client.v1.Height) { pb_1.Message.setWrapperField(this, 4, value); } get has_proof_height() { return pb_1.Message.getField(this, 4) != null; } static fromObject(data: { consensus_state?: ReturnType<typeof dependency_6.google.protobuf.Any.prototype.toObject>; client_id?: string; proof?: Uint8Array; proof_height?: ReturnType<typeof dependency_3.ibc.core.client.v1.Height.prototype.toObject>; }): QueryConnectionConsensusStateResponse { const message = new QueryConnectionConsensusStateResponse({}); if (data.consensus_state != null) { message.consensus_state = dependency_6.google.protobuf.Any.fromObject(data.consensus_state); } if (data.client_id != null) { message.client_id = data.client_id; } if (data.proof != null) { message.proof = data.proof; } if (data.proof_height != null) { message.proof_height = dependency_3.ibc.core.client.v1.Height.fromObject(data.proof_height); } return message; } toObject() { const data: { consensus_state?: ReturnType<typeof dependency_6.google.protobuf.Any.prototype.toObject>; client_id?: string; proof?: Uint8Array; proof_height?: ReturnType<typeof dependency_3.ibc.core.client.v1.Height.prototype.toObject>; } = {}; if (this.consensus_state != null) { data.consensus_state = this.consensus_state.toObject(); } if (this.client_id != null) { data.client_id = this.client_id; } if (this.proof != null) { data.proof = this.proof; } if (this.proof_height != null) { data.proof_height = this.proof_height.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_consensus_state) writer.writeMessage(1, this.consensus_state, () => this.consensus_state.serialize(writer)); if (this.client_id.length) writer.writeString(2, this.client_id); if (this.proof.length) writer.writeBytes(3, this.proof); if (this.has_proof_height) writer.writeMessage(4, this.proof_height, () => this.proof_height.serialize(writer)); if (!w) return writer.getResultBuffer(); } static deserialize(bytes: Uint8Array | pb_1.BinaryReader): QueryConnectionConsensusStateResponse { const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryConnectionConsensusStateResponse(); while (reader.nextField()) { if (reader.isEndGroup()) break; switch (reader.getFieldNumber()) { case 1: reader.readMessage(message.consensus_state, () => message.consensus_state = dependency_6.google.protobuf.Any.deserialize(reader)); break; case 2: message.client_id = reader.readString(); break; case 3: message.proof = reader.readBytes(); break; case 4: reader.readMessage(message.proof_height, () => message.proof_height = dependency_3.ibc.core.client.v1.Height.deserialize(reader)); break; default: reader.skipField(); } } return message; } serializeBinary(): Uint8Array { return this.serialize(); } static deserializeBinary(bytes: Uint8Array): QueryConnectionConsensusStateResponse { return QueryConnectionConsensusStateResponse.deserialize(bytes); } } export class QueryConnectionParamsRequest 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: {}): QueryConnectionParamsRequest { const message = new QueryConnectionParamsRequest({}); 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): QueryConnectionParamsRequest { const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new QueryConnectionParamsRequest(); while (reader.nextField()) { if (reader.isEndGroup()) break; switch (reader.getFieldNumber()) { default: reader.skipField(); } } return message; } serializeBinary(): Uint8Array { return this.serialize(); } static deserializeBinary(bytes: Uint8Array): QueryConnectionParamsRequest { return QueryConnectionParamsRequest.deserialize(bytes); } } export class QueryConnectionParamsResponse extends pb_1.Message { #one_of_decls: number[][] = []; constructor(data?: any[] | { params?: dependency_4.ibc.core.connection.v1.Params; }) { super(); pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); if (!Array.isArray(data) && typeof data == "object") { if ("params" in data && data.params != undefined) { this.params = data.params; } } } get params() { return pb_1.Message.getWrapperField(this, dependency_4.ibc.core.connection.v1.Params, 1) as dependency_4.ibc.core.connection.v1.Params; } set params(value: dependency_4.ibc.core.connection.v1.Params) { pb_1.Message.setWrapperField(this, 1, value); } get has_params() { return pb_1.Message.getField(this, 1) != null; } static fromObject(data: { params?: ReturnType<typeof dependency_4.ibc.core.connection.v1.Params.prototype.toObject>; }): QueryConnectionParamsResponse { const message = new QueryConnectionParamsResponse({}); if (data.params != null) { message.params = dependency_4.ibc.core.connection.v1.Params.fromObject(data.params); } return message; } toObject() { const data: { params?: ReturnType<typeof dependency_4.ibc.core.connection.v1.Params.prototype.toObject>; } = {}; if (this.params != null) { data.params = this.params.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_params)